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
Create a Superflat world:
minecraft:glass;minecraft:plains
Place a dragon egg.
Right-click it to make it teleport.
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
is duplicated by 1
relates to 5
Comments 13
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
Shouldn't this ticket say that dragon eggs can teleport below min_y in general? The Nether, for example, still stops at y=0.
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