mojira.dev
MC-174759

Dragon eggs can be teleported to a height below void

The Bug

Clicking a dragon egg on a low enough block means the egg has a chance to teleport into the void. Dropping an egg through a hole in the world, one can see it fall. Clicking the egg on the other hand, simply makes it teleport down into the void.

https://www.youtube.com/watch?v=GrHPSvI3BEY

Steps to Reproduce

  1. Create a Superflat world:

    minecraft:glass;minecraft:plains
  2. Place a dragon egg.

  3. Right-click it to make it teleport.

  4. Note that the dragon egg will be teleported below the lowest built height.

Code Analysis

Code Analysis provided by @unknown

Adding a check using level.isInWorldBounds(blockPos) in the teleport method if statement fixes this issue.

So instead of the check being level.getBlockState(blockpos).isAir() && worldborder.isWithinBounds(blockpos) the check would be
level.getBlockState(blockpos).isAir() && worldborder.isWithinBounds(blockpos) && level.isInWorldBounds(blockPos)

Linked issues

Comments 13

Could you perhabs attach a video of this happening?

This issue has been temporarily closed as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.

Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki

happens with 2 block high ground too

someone needs to check whether MC-175565 is the reason for this or not (can't reproduce with commands)

I'm pretty sure that they are both the same issue. You can see the particle trail the dragon egg leaves behind leading into the void.

particles are not connected to the actual movement tho (MC-2157)
but i guess it being possible to tp there confirms it

3 more comments

Reporter are not active.

Shouldn't this ticket say that dragon eggs can teleport below min_y in general? The Nether, for example, still stops at y=0.

@@unknown, agree, I have changed the summary.

Can confirm in 1.20.4

Can confirm in version 1.21.6

Alexander Wallis

[Mod]Les3awe

(Unassigned)

Confirmed

Gameplay

Important

Block states

dragon_egg

1.15.2, 1.16.1, 1.16.2 Pre-release 2, 1.16.2 Pre-release 3, 1.16.2, ..., 1.21.5 Release Candidate 1, 1.21.5, 25w17a, 1.21.6 Pre-Release 3, 1.21.6

Future Update

Retrieved