mojira.dev
MC-312634

Tamed entities can teleport outside the world border when following their owner

The Bug:

Tamed entities can teleport outside the world border when following their owner.

When a tamed entity teleports to its owner, the game checks the world border at the place the pet is leaving, and not where it lands. With the owner next to the border, the pet can potentially teleport outside of the bounds of the world. 26.4 Snapshot 4 fixed this same mistake for endermen and chorus fruit (MC-311312) but not for pets.

Steps to Reproduce:

  1. Create a superflat world and switch to creative mode.

  2. Set the world border’s center to your current position and the world border’s width to 25 by using the commands provided below.

    /worldborder center ~ ~
    /worldborder set 25
  3. Spawn a wolf, tame it, and make sure it is standing.

  4. Switch into spectator mode and fly out of the world border.

  5. Switch back into creative mode and observe if the wolf teleports to you.

Observed Behavior:

A pet that teleports to its owner can end up outside the world border.

Expected Behavior:

A pet would only teleport to a spot inside the world border.

Linked issues

Attachments

Comments 1

Avoma

(Unassigned)

Confirmed

26.3, 26.4 Snapshot 4

Retrieved