mojira.dev
MC-99603

Wolves, Dogs, and Ocelots fall out of the world

Wolves, Dogs, and Ocelots fall through the world when they try to attack something that is directly above them. This seems to only happen when the x and z coordinates of the animals and their targets are exactly the same.

I would expect them to just stand underneath the target and look up at it like a zombie does with villagers.

What actually happens is that they try to jump and attack what is above them and end up glitching into the blocks below it and eventually fall out of the world.

Steps to reproduce:
1) Build an enclosure like the one in the pictures I've provided.
2) Summon a wolf in the bottom space and a skeleton in the space above it. (Make sure they have the same x and z coordinates or the glitch won't occur)
3) Watch as the poor animal commits a bizarre form of suicide.
This will happen with wolves/sheep and ocelots/chickens as well.


Code analysis by @unknown can be found in this comment

Attachments

Comments 2

Please link to this comment in the description

The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.

This happens probably because the method net.minecraft.entity.ai.EntityAILeapAtTarget.startExecuting() sets the motionX and motionZ field to NaN because the wolf is at the same x and z position as the skeleton.

Chris Scranton

Agnes Larsson

Community Consensus

Minecraft 1.9, Minecraft 1.9.1 Pre-Release 1, Minecraft 1.9.1 Pre-Release 2, Minecraft 1.9.1 Pre-Release 3, Minecraft 16w39c

Minecraft 16w41a

Retrieved