mojira.dev
MC-313108

Mob navigation is not recalculated when lava is replaced with water

Summary

Replacing lava with water can leave a mob following a stale partial path, even when a new route to its destination becomes available.

Steps to reproduce

  1. Build a flat stone floor and enclose the destination with a three-block-high wall, leaving one entrance.

  2. Place lava in the entrance and spawn a vanilla zombie eight blocks away.

  3. In a GameTest, request a path to the destination with getNavigation().createPath(target, 0), then activate the partial path with moveTo(path, 0.5).

  4. Replace the lava with water using setBlock(position, Blocks.WATER.defaultBlockState(), 3).

  5. Compare the active path with a newly requested path to the same destination.

Expected result

The active navigation should be reconsidered when the entrance becomes passable.

Actual result

The active partial path does not change after the block update. A new path request can reach the destination.

Technical cause

ServerLevel.sendBlockUpdated checks for changes in collision shape before notifying navigating mobs. Lava and water have the same empty collision shape, so this fluid change does not trigger path recomputation. The same condition is present in the Minecraft 26.3 source.

Comments 0

No comments.

Mikulasz12

(Unassigned)

Unconfirmed

26.3

Retrieved