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

Player-in-block checking happens after block collision events are done

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 1.12.2, Minecraft 17w50a, Minecraft 18w22c, Minecraft 1.13-pre1, Minecraft 1.13-pre2, Minecraft 1.13-pre3, Minecraft 1.13-pre4, Minecraft 1.13-pre5, Minecraft 1.13-pre6, Minecraft 1.13-pre8, Minecraft 1.13, Minecraft 18w30b, Minecraft 18w32a, Minecraft 1.13.1-pre1, Minecraft 1.13.1-pre2, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a, Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 3, Minecraft 1.14.4 Pre-Release 2, 1.15.2, 20w10a, 20w51a, 21w03a, 1.16.5, 21w05b, 21w08b, 21w13a, 21w17a, 1.17.1, 22w15a, 1.19.2, 1.20.6, 24w18a
    • Confirmed
    • Collision, Player
    • Normal
    • Platform

      The bug

      The NetHandlerPlayServer.processPlayer (MCP name) function checks if the player's bounding box is intersecting any blocks, and if it is, reverts the player's position to the old one.

      However, this check is done even if the player has been teleported by a portal block such as the end portal, which can lead to the following problem:

      1. A player somehow sends a move packet that places them halfway between an end portal block and an end portal frame block
      2. Even though the move is illegal, the end portal's collision function gets called and the player is teleported into the end (Bug 1)
      3. The collision checks whether the player's move was invalid and reverts the player's position, but not dimension change (Bug 2)
      4. The player is dropped into the end at their previous position, likely causing them to fall into the void and die

      Doing this check before block collision functions are called (or at least also cancelling the dimension change) would solve the problem.

      How to reproduce

      1. Use the following commands to make you intersect with a block and stand in front of an end portal
        /setblock ~2 ~ ~ end_portal
        /setblock ~1 ~ ~1 glass
        /execute align xz run teleport @s ~1.7 ~ ~0.700005 -60 0
        
      2. Walk forward
        You enter the end but at your original position instead of on the platform

        1. MC-123364.mp4
          5.66 MB
        2. 2017-12-18_02.16.40.png
          2017-12-18_02.16.40.png
          662 kB
        3. 2017-12-18_00.00.38.png
          2017-12-18_00.00.38.png
          738 kB

            Unassigned Unassigned
            runemoro Runemoro
            Votes:
            21 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              CHK: