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

Entering a tall portal that takes you to a short portal from the top causes you to take suffocation damage

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 20w28a
    • Minecraft 1.12.2, Minecraft 17w43a, Minecraft 17w43b, Minecraft 17w45a, Minecraft 17w45b, Minecraft 17w46a, Minecraft 17w48a, Minecraft 17w50a, Minecraft 18w01a, Minecraft 18w03b, Minecraft 18w06a, Minecraft 18w10d, Minecraft 18w14b, Minecraft 18w20c, Minecraft 1.13-pre1, Minecraft 1.13-pre3, Minecraft 1.13-pre6, Minecraft 1.13-pre8, Minecraft 1.13-pre10, Minecraft 1.13, Minecraft 18w30b, Minecraft 18w31a, Minecraft 1.13.1, 1.14.4, 1.15 Pre-release 6, 1.15.1, 1.15.2, 20w08a, 20w10a, 20w21a
    • Confirmed
    • (Unassigned)

      The bug

      When entering a tall portal that takes you to a short portal from the top, you take suffocation damage. This also happens when going from a wide portal to a thin portal.

      How to reproduce

      1. Download the attached test world
      2. Enter the portal from the very top platform (you should spawn at it; be careful not to fall down inside the portal)
      3. Observe that when you enter the nether, note blocks triggered by pressure plates on top of the portal play, and you take a few hits of suffocation damage. (Also, you spawn at y=46.71429, while the max y you can fly up to under the portal is 45.2)

      Code analysis

      By redstonehelper, based on 1.12.2 decompiled using MCP 9.40. The problem is that the player's height and width aren't accounted for in net.minecraft.entity.Entity.setPortal(BlockPos) when calculating lastPortalVec. Player height and width then also need to be accounted for in net.minecraft.world.Teleporter.placeInExistingPortal(Entity, float).

        1. Minecraft 1.16.2 - Singleplayer 2020-09-02 18-08-26.mp4
          9.44 MB
          CalXee

            Unassigned Unassigned
            pokechu22 [Mod] Pokechu22
            Votes:
            19 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: