Mojira Archive
MC-93276

Mobs steered by passenger Slimes walk to 0,0

Credit for discovery goes to Reddit user /u/JAZEYEN, as described in this thread: https://www.reddit.com/r/MinecraftCommands/comments/3tzhc0/something_intersting_you_might_want_to_try/

When a mob that uses the standard base AI is spawned with a Slime riding and steering it, it will immediately head directly towards x=0, z=0. Specifically, the northwest corner of the block at 0,0. It will not attempt to avoid obstacles in any way, instead walking off of cliffs and getting stuck on one-block-high ridges if they are between it and the origin. When it reaches the northwest corner of 0,0, it will endlessly spin in circles around the point.

This behavior is the same in all dimensions, and will continue even if 0,0 is in an unloaded chunk. Magma Cubes may be used instead of Slimes with no change to the effects. Removing the Slime at any time fully restores the mob to normal.

To reproduce, start a world with cheats and run the command

/summon zombie ~ ~ ~ {Invulnerable:1b,Passengers:[{id:slime,Invulnerable:1b}]}

Watch as the Zombie heads for the origin. Replace Zombie with any mob from the following list and run again, as many times as you want.

Tested, affects the following mobs:
Chicken, Cow, Mooshroom, Pig, Rabbit, Sheep, Villager*, Zombie, Skeleton, Spider, Cave Spider, Creeper, Enderman, Witch, Zombie Pigman, Blaze, Wither Skeleton, Endermite, Silverfish, Horse, Ocelot, Wolf, Iron Golem, Snow Golem, Wither**
* Villagers always run instead of walking when affected.
** Withers will rise continuously into the air to attack the Slime, but otherwise behave as described.

Tested, does not affect the following mobs:
Bat, Squid, Guardian, Ghast, Slime, Magma Cube, Ender Dragon

NOTE: I have done some testing, and this bug has existed since 15w38a, when passenger AI overriding was first added. However, I can not select that as an Affected Version.


Code analysis by Marcono1234 can be found in this comment.