-
Bug
-
Resolution: Won't Fix
-
None
-
Minecraft 1.5.1, Minecraft 1.5.2, Minecraft 1.6, Minecraft 1.6.1, Minecraft 1.6.2, Minecraft 1.6.4, Minecraft 1.7.1, Minecraft 1.7.2, Minecraft 13w47e, Minecraft 13w48a, Minecraft 13w48b, Minecraft 1.7.4, Minecraft 14w02c, Minecraft 14w03a, Minecraft 14w03b, Minecraft 14w05b, Minecraft 14w06b, Minecraft 14w07a, Minecraft 14w08a, Minecraft 1.7.5, Minecraft 1.7.9, Minecraft 14w18b, Minecraft 14w20b, Minecraft 14w21a, Minecraft 14w21b, Minecraft 1.8, Minecraft 1.8.1-pre3, Minecraft 1.8.8, Minecraft 15w43c, Minecraft 15w44a, Minecraft 15w46a, Minecraft 15w51b, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.10.2, Minecraft 1.12, Minecraft 1.12.2, 1.14.4, 1.15.2, 20w12a, 1.16 Pre-release 3, 1.16 Pre-release 4, 1.16 Pre-release 5, 1.16 Pre-release 8, 1.16.1, 1.16.2 Pre-release 1, 1.16.3
-
Confirmed
-
Mob behaviour
-
Normal
I will say right now that both MC-12427 and MC-4661 are included in what I am about to report. However, I am reporting exactly what the problem is, how they are in reality the same issue, examples of other pathfinding issues which also occur, and how it could all be fixed with a single theoretical solution. It seems sort of conceded to ask if they could be consolidated into this report, but I feel like this single one is more constructive than a bunch of little ones out there which are all symptoms of the same bug.
The problem
The problem with the pathfinding in Minecraft is that is uses a strictly grid-based system. This would be okay except that collisions are not as strictly grid-based. Entity movement accounts for this, but pathfinding does not. The consequences of this are far reaching. Basically there are many ways in which an entity may conclude that it cannot move when in reality it can and vice versa. Fixing this bug would make farming less frustrating and hiding from monsters much harder. Let me explain each of the four images inside the larger image I posted.
1. Mobs (the creeper) get stuck in northwest corners
This is a combination of things. For one thing, entities begin pathfinding from their northwest corner instead of their center. For another, they do not take into account collisions properly. This means the creeper pictured begins his pathfinding from inside the corner fence. This creeper believes he can travel both north and west because it is air, and he cannot travel either south or east because they are fences. All four of these assertions are wrong. If he were to analyze collisions instead of just the grid he would know this.
2. Mobs are incapable of passing through half slab gaps
Some people like and utilize this, but it is a flaw. The creeper knows he can pathfind through the center of the hole, but reasons he is too tall to put his feet through the center and his head through the half slab. This is false. He does not take into account where his feet will land, and the same can be said about his head.
3. Mobs, especially small ones, get stuck inside walls
The picture is a special case in which the sheep has his northwest corner inside a wall. He can clearly step back and walk through the opening in the fence to my character, but he believes the fastest way is to walk through, because he is already "inside" the fence and does not take collisions into account. This same thing will happen with small entities far more frequently because their entire collision box can fit inside the fence block. This makes it a pain to lead animals along/through fences and other thin walls.
4. Mobs cannot navigate through gaps between blocks
This is the same issue as the creeper who cannot walk through the half slabs but in the x and z dimensions. If the chicken were to acknowledge the size of its bounding box and which blocks it would collide with, it could reason that it is possible to fit through the gap.
More details
It has recently come to my attention that small entities like chickens cannot pathfind out of fence corners even if they are told they can pathfind literally anywhere. This is because they cannot draw a vector out of the fence wireframe without concluding they will collide with it.
Theoretical solution
Ideally, if the code could be more double-based, relying on the actual bounding box, this problem would be fixed in all instances. But, unfortunately, that would likely require a significant amount of processing. Instead, it is probably best to add more conditions to the code which allow pathing along but not through fences.
At the very least, changing pathfinding so that entities begin from their center should fix situations 1 and 3 (MC-12427 and MC-4661 respectively) for the majority of creatures (everything but babies, silverfish, and chickens).
- is duplicated by
-
MC-11614 Mobs don't walk throught 2 block high door ways
- Resolved
-
MC-23671 Cow Mob Path Finding Blocked
- Resolved
-
MC-56317 Silverfish/Endermites/Cave Spiders not pathfinding through half-slabs (DUPLICATE)
- Resolved
-
MC-83644 Mob pathfinding AI gets confused with glass panes
- Resolved
-
MC-95323 fences, carpets and mob ai
- Resolved
-
MC-105078 Mobs unable to jump on the carpet
- Resolved
-
MC-109393 Llamas cannot climb properly, and constantly fall.
- Resolved
-
MC-119232 Villagers cram into a certain corner
- Resolved
-
MC-120034 Villagers can't walk on carpets in a two-block high house.
- Resolved
-
MC-120048 villagers can't go through doors with carpets in front of them.
- Resolved
-
MC-124539 mob path finding wraps around the edges of blocks that do not obstruct its path to the player
- Resolved
-
MC-170368 Silverfish react weirdly around slabs.
- Resolved
-
MC-188959 Zombies cannot go through carpet and block
- Resolved
-
MC-188997 Tamed cat's pathfinding breaks when near a a villager house with glass pane.
- Resolved
-
MC-190227 Mobs can't pathfind through fence corner gaps
- Resolved
-
MC-190326 Infernal mobs strangely fight at the distance between the holes.
- Resolved
-
MC-196974 Mobs cannot move through bamboo.
- Resolved
-
MC-200247 Silverfish cannot hit players that are next to iron bars/glass pane
- Resolved
-
MC-201009 Rabbits breaking
- Resolved
-
MC-262922 Mobs cannot pathfind between walls and fences
- Resolved
-
MC-265930 Mob doesn't move/pathfind closer to the fence to hit the player, even if they would be able to hit the player if they did
- Resolved
-
MC-267501 Mobs with high value of generic.step_height are unable to step up fence or wall
- Resolved
-
MC-1606 Mobs unable to move in slabbed house
- Resolved
-
MC-3149 Mobs do not realize that they can move between fence posts next to nether brick fence.
- Resolved
- relates to
-
MC-12427 Mobs get stuck in the North-West corner of a fence
- Resolved
-
MC-140545 Pathfinding prefers North (negative Z) direction
- Resolved
-
MC-159932 Bees not able to navigate through 4 stairs put together
- Open
-
MC-249244 Some mobs with medium hitboxes occasionally get stuck when passing through open doors
- Open
-
MC-262480 Mobs jump when they get near chains, end rods, bamboos, lightning rods or pointed dripstone
- Open
-
MC-12549 Odd mob "magnetised attraction" behaviour
- Reopened
-
MC-7360 Zombie cant get villager if the villager is in a window or standing in a corner of fences
- Resolved
-
MC-31153 Bias in passive mob AI - still results in self-stranding passive mobs, even with Northwest bug fixed
- Resolved
-
MC-104870 Mobs can't pathfind up stairs if there's carpet at the bottom
- Resolved