mojira.dev
MC-108313

Ocelots and wolves jump off cliffs while chasing other mobs

The bug

When ocelots chase chickens or when wolves chase skeletons or sheep they jump towards their target without testing if they can land where they are jumping to.

Reproduction steps

  1. Build the setup as shown in the attachment below:

[media]
  1. (2 blocks with 3 blocks of air in between)

  2. Summon a chicken or sheep on the diamond block, and an ocelot or a wolf on the emerald block.
    ❌ Sometimes the ocelot or wolf jumps into the gap between the blocks

The reason

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.shouldExecute() does not test if at the position where the mob is supposed to leap to is a block.

Linked issues

Attachments

Comments 21

I think that works ok, is not a bug

Edit: Commented on wrong ticked, thanks @unknown

@unknown, you commented on the wrong ticket.

Thank you, that was the analysis for MC-99603

Still present in 1.13.1.

11 more comments

Can confirm in 1.18.

Can confirm in 1.18.2.

Can confirm in 1.19 and 22w24a.

Can confirm in 1.19.2.

Can confirm in 1.20.5.

marcono1234

(Unassigned)

Confirmed

Mob behaviour

ocelot, wolf

Minecraft 1.10.2, Minecraft 16w39c, Minecraft 16w42a, Minecraft 1.13.1, Minecraft 1.13.2-pre2, ..., 1.20.5, 1.20.6, 1.21, 1.21.5, 1.21.7 Release Candidate 2

Retrieved