mojira.dev
MC-142817

Villagers and mobs try to pathfind through corners

The bug

Mobs try to pathfind through corners, if there is an air block behind the corner. This seems to affect all mobs, including passive mobs such as villagers.

To reproduce

  1. Build a diagonal wall that mobs could theoretically walk around

  2. Behind that wall, build a pillar

  3. Climb on that pillar

  4. Switch to Survival mode

  5. Spawn a zombie on the other side of the wall

Video

[media]

Original description

Sorry, I am creating this bug again because MC-142516 was resolved as a duplicate of a non-related bug.

"Zombies, Creepers, Skeletons are all behaving like they have no AI for pathfinding at all. In bamboo forests or inside mineshafts they are unable to get around a corner (or double corner), just to reach me. Instead they are searching for the shortest direct path and get stuck."

All mobs are generally moving and are following me. They have also seen me, I usually hit them first and run just 5 blocks away. All the mobs in the picture have seen me, followed, but then stayed where you can see them. They just have no clue how to get around.

Related issues

MC-10836 In ocean biomes there are random air pockets in the water. They vary in size. MC-145129 NPCs get stuck between blocks and fences MC-147556 house design gets villagers killed MC-147899 Villagers have difficulty pathfinding to bed or workstations MC-148111 Villager getting stuck on diagonal structures MC-148197 Villagers hit doors from the side while entering houses MC-148430 Villager Pathfinding AI is severely broken MC-148537 Many mobs pathfind through corners of solid blocks MC-148988 Problems with Villager Pathfinding MC-149383 Villager cant correctly get their ways to their house MC-149429 AI tries to path diagenely through walls MC-149520 Villager Pathfinding & Sleeping MC-149653 Villager get stuck in Diagonal placed blocks MC-149778 Villagers Get Stuck MC-150068 Aldeanos no entran a casa y se quedan fuera de ellas toda la noche MC-150073 Villagers will get stuck in buildings when trying to get to there bed MC-150163 Villagers path finding MC-150350 villagers get stuck in corners MC-150652 Villagers get stuck in diagonal walls MC-151167 Villagers don't go to their houses at night MC-151219 Villagers Cant find Correct Pathways MC-151336 Villagers pathfind through walls MC-151394 Villager's AI Cannot Use Doors Correctly MC-151461 Villagers finding spots and getting stuck MCL-10836 Access to workplace for villagers

Attachments

Comments

migrated
[media][media][media][media][media][media][media][media][media][media][media][media]
migrated

I added some more pictures of mobs not following anymore if they reach bamboo.

migrated

If I remember correctly, this is a feature of the AI appearing when it's not supposed to. Ordinarily, when the AI cannot create a path from the monster to its target, it will attempt to simply get as close as possible without entering a hazard. However, in these cases, the monster clearly has a very short path to follow but is prevented from following the path. This definitely relates to my MC-142964, except manifesting in a comically more severe way. In fact let me test this...

 

Well, part of your error is something more obvious - mobs path through Bamboo like they would tall grass; they ignore it entirely.

violine1101

Confirmed in 19w12b. I edited the ticket a bit (I hope you're fine with that, OP) and attached a video showcasing this bug.

violine1101

This behaviour can also be observed with villagers in snowy tundra villages. They try to get in and out of their igloos by going through their corners.

ZeNico13

Still in 19w13a

migrated

This happens very, very frequently in Savanna Villages, since most the Houses are based with no Corners Villagers gets stuck there trying to reach their Beds even if the Door is close to them.

ZeNico13

Still in 19w14a

ZeNico13

Still in 19w14b and 1.14 Pre-Release 1

ZeNico13

Still in 1.14 Pre-Release 2

migrated

Added images of Savanna villagers when they walk around corners and they begin to jump up and down. They eventually stop but some have stayed out at night not able to reach their beds.

migrated

Villagers leave their village never to return. I watched a villager wander off from a taiga village; I followed him for 400 blocks as he walked purposefully away from everyone and everything he knew. Last I saw him he was headed for a bamboo forest

------------

My comment was marked resolved as a duplicate of this ticket, but I don't see any comments relating specifically to my issue so I am copying my comment from the other ticket to here.

violine1101

The issue you're describing is entirely unrelated to this ticket. Please create a new report.

ZeNico13

Still in 1.14 pre-3, 1.14 pre-4 and 1.14 pre-5

ZeNico13

Still in 1.14 Release

migrated

Yes, the problem still prevails in the latest 1.14 release:

[media]
GolfinhoVoador

I wanna know why this is not still resolved, 29 votes + 4 votes on MC-147905 + 5 votes on MC-101424 + 4 votes on MC-110390 + many others!

Edit: I know its not high priority, but its still a bug that as all other bugs shall be squashed.
Imagine a new player on a wooden home hidden on a corner of his house...
And them his entire house explodes and he dies, not understanding anything that happened he questions to himself: "why did my house explode"

migrated

Confirmed (esp. for cats + villagers) in 1.14 official. They also try to jump onto 1.5 block high structures, like block+slab fences

migrated

Finally assigned! Hopefully gets fixed for 1.14.1
I was waiting for so long to see this Issue catching the attention of Mojang, specially in this Update where you can find it more commonly with Illagers and Villagers.

Hopefully MC-96319 gets squashed too, it's another Bug that can be reproduced more commonly in this Update.

migrated

I wonder if this solves other pathfinding issues for villagers. In particular I have noticed, trying to pathfind under trap doors (making a less than two block high space), trying to pathfind over carpets in a two block high space (villagers are too tall), pathfinding to the nearest wall or roof to their workstation, even when a perfectly acceptable path to the workstation exists, pathfinding to glass panes or walls instead of to doors, climbing ladders and getting stuck at the top on a closed trapdoor (and not leaving). And those are just what I've noticed in the past few days.

migrated

I also hope this fix indirectly the obstruction issue that happens in Villagers and of course in other Mobs where they don't count Bamboo, Lanterns and Flower Pots as obstructions, making them try to Pathfind directly through these Blocks resulting in see Mobs often get stuck instead of Pathfind around these Blocks.
I found this when I tried to make a Jungle Village close to a Bamboo Forest and when the Villagers started the "Wander" Schedule they often get stuck around the Bamboo (Most of the times is just 1 Bamboo in front of them what causes the problem), same for Golems, Zombies or any kind of Mob and since I noticed the Reporter of this Issue added a Picture with Bamboo so it might be a double Fix (Hopefully).

GolfinhoVoador

— Villagers and of course in other Mobs where they don't count Bamboo, Lanterns and Flower Pots as obstructions
Same thing to fences. MC-147905

migrated

MC-96319 is also getting fixed. And this Issue is directly the problem with Mobs Pathfind not regarding some Blocks as obstructions (Bamboo, Lanterns, Flower Pots, Mob Heads, End Rods, etc.)
Thankfully both Bugs that raised in this Update due to how common are getting reproduced are finally fixed after Months/Years. Kudos on Henrik for the fix of these Issues.

migrated

Why is this resolved? I have a similar issue on 1.11.4 Bedrock for Nintendo Switch. I’ve seen villagers not being able to reach workstations and beds even when they are on the other side of the door between them. It’s almost as if they don’t know how to use the door half of the time unless it’s open. Villagers end up staying outside at night or run directly into zombies. It’s very annoying because I often see villagers hanging around the overhang of the roof or walking back and forth outside to get to the bed from outside instead of using the door.

migrated

Fixed for Java Edition.

migrated

It’s an issue in bedrock Edition too. Villager path finding is awful. Forget about building two story buildings  because Villagers can barely find themselves in a house. They also don’t respond to the bell sometimes. I don’t know if I should create a separate report because there are several issues. I sometimes wish that they never change the formula from doors to beds.

violine1101

This section of the bug tracker is for Java Edition only. For Bedrock Edition, please visit the MCPE project.

Noy0

This bug is back again in 19w36a, but may be only when doing certain AI tasks.  I've seen a villager path-find into a pair of diagonal fence posts while heading to work.  but seem to avoid doing so when doing other things.

violine1101

@unknown, if so, please create a new ticket (and link to this ticket in the description).

Noy0

Sorry about that.  Though, the bug seems to be different this time around so I've created a ticket for a "different" bug; one regarding villagers path-finding to work (and possibly other targets as well).  Because this time around it might just be them path-finding straight to the target as opposed to path-finding thru corners.
MC-160582

migrated

migrated

Confirmed

Mob behaviour

Minecraft 19w03c, Minecraft 19w12b, Minecraft 19w13a, Minecraft 19w13b, Minecraft 19w14a, Minecraft 1.14 Pre-Release 1, Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 5, Minecraft 1.14

Minecraft 1.14.1 Pre-Release 1

Retrieved