Observed behavior:
Villagers cannot pathfind across/through/over waterlogged blocks.
Expected behavior:
Villagers should pathfind across/through/over waterlogged blocks, just like zombies or other mobs can.
Reproduction instructions:
Create a room, 8x8 for example, with 2 high solid block walls
Split the room down the middle one block deep
Fill the one block gap with lower slabs
Place a bed on one side of the room
Spawn a villager on the other
Set the time to midnight
See the village pathfind over the lower slabs to the bed.
Kill the villager and set the time to noon
Waterlog the slabbed gap
Place a bed on one side of the room
Spawn a villager on the other
Set the time to midnight
See the villager wander around their side of the room for a while until the storm cloud particles appear over the villager and bed.
Rinse and repeat this whole procedure for upper slabs, lower trap doors, upper trap doors, and any other block that can be waterlogged.
Alternate reproduction instructions:
Create a room, 8x8 for example, with 2 high solid block walls and a roof (so zombies don't burn)
Split the room down the middle one block deep
Fill the one block gap with lower slabs
Make an exit on one side of the room
On the non exit side of the room, spawn a villager and a zombie
Watch the villager pathfind over the lower slabs to the room exit
Kill the villager and zombie
Waterlog the slabbed gap
On the non exit side of the room, spawn a villager and a zombie
Watch the villager be unable to escape the zombie (note: the zombie may hit the villager over the gap. If that happens, ignore that test and repeat)
Kill the villager and zombie
Spawn a village on the non exit side of the room and a zombie on the other.
Watch the zombie pathfind over the waterlogged gap and get the villager.
Rinse and repeat the whole procedure for upper slabs, lower trap doors, upper trap doors, and any other block that can be waterlogged.
I realize there are other villager pathfinding bugs in the tracker but non of the tickets marked with the current available "affected version" tags describe this behavior in particular. This seems like this issue is related to the resolution of MCPE-47075 as that issue closely resembles this one.
Linked issues
is duplicated by 1
Comments 3
duplicate of, or relates to MCPE-37005
This is very different from MCPE-37005. There the issue is mobs getting stuck inside blocks, and it only applies to small mobs. Villagers have no problem moving out of a waterlogged block.
The problem here is that villagers will not choose a path across any kind of water unless they are already in water. This applies to both flowing and source water as well as to waterlogged and flow-logged blocks.
I would guess the bug is in navigation.walk checking both block layers instead of just the main block layer. Water in the second block layer (i.e. for waterlogged blocks) should not be checked for walking navigation at all because it is sufficient to check whether the block in the primary layer is navigable. Pathmaking should just fail for seagrass and kelp the same way it does for flowers, and succeed for slabs regardless of if they are wet.
Affects Nintendo Switch as well