Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-174759

Dragon eggs can be teleported to a height below void

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.15.2, 1.16.1, 1.16.2 Pre-release 2, 1.16.2 Pre-release 3, 1.16.2, 1.16.3, 20w51a, 1.17.1, 21w44a, 1.18 Pre-release 1, 1.18 Pre-release 2, 1.18 Pre-release 3, 1.18 Pre-release 4, 1.18 Pre-release 5, 1.18 Pre-release 7, 1.18 Release Candidate 3, 1.18, 1.18.1 Release Candidate 1, 1.19, 1.19.1 Release Candidate 2, 1.19.1 Release Candidate 3, 1.19.1, 1.19.2 Release Candidate 1, 1.19.2, 22w42a, 22w43a, 1.19.3 Release Candidate 1, 1.19.3, 23w04a, 23w06a, 1.19.4 Release Candidate 1, 1.19.4 Release Candidate 3, 1.19.4, 23w16a, 23w17a, 23w18a, 1.20 Pre-release 1, 1.20 Pre-release 2, 1.20 Pre-release 3, 1.20 Pre-release 4, 1.20 Pre-release 5, 1.20 Pre-release 6, 1.20 Release Candidate 1, 1.20, 1.20.1 Release Candidate 1, 1.20.1, 23w31a, 23w32a, 23w33a, 23w35a, 1.20.2 Pre-release 2, 1.20.2 Release Candidate 1, 1.20.2, 23w40a, 23w41a, 23w42a, 23w43b, 23w44a, 23w45a, 23w46a, 1.20.3 Pre-Release 2, 1.20.3 Release Candidate 1, 1.20.4, 23w51b, 24w03b, 24w04a, 24w05b, 24w06a, 24w07a, 24w09a, 24w11a, 24w12a, 24w13a, 24w14a, 1.20.5 Pre-Release 1, 1.20.5 Pre-Release 3
    • Confirmed
    • Block states

      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 Thumpbacker

      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)

            Unassigned Unassigned
            Les3awe [Mod] Les3awe
            Votes:
            12 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              CHK: