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

Large entities that arrive in a nether portal can clip into blocks in adjacent unloaded chunks

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.21.3
    • None
    • Java version 1.21.3, on macOS 14.6.1
    • Confirmed
    • Chunk loading, Collision

      When an entity arrives in a portal, there is a collision check to try to ensure that the entity doesn't collide with any blocks (to avoid issues like MC-80032). However, the collision check only accounts for blocks in adjacent chunks if those chunks are already loaded. As a result, entities with a larger-than-1x1 hitbox will sometimes clip into blocks when they arrive in a portal, if the portal happens to be located next to a chunk boundary.

       

      To reproduce:

      1. Construct a 3x3 nether portal in the overworld where the four corner portal blocks (the portal blocks themselves, not the obsidian) are at the following coordinates: (3200, 129, 3199), (3200, 129, 3201), (3200, 131, 3199) (3200, 131, 3201)
      2. Construct a 2x3 nether portal in the nether where the four corner portal blocks are at the following coordinates: (400, 129, 400), (400, 129, 401), (400, 131, 400), (400, 131, 401)
      3. Place 4 solid blocks surrounding the 3x3 nether portal in the overworld, at the following locations: (3199, 129, 3199), (3199, 129, 3201), (3201, 129, 3199), (3201, 129, 3201).
      4. Go to the nether.
      5. Throw a snowball through the portal. Then within 15 seconds, spawn a boat in the portal by running the following command:

      /execute in minecraft:the_nether run summon minecraft:oak_chest_boat 401.68 129.00 400.69 {Rotation: [180.0f, 0.0f]}
      

      6. Go back to the overworld. Note that the boat has appeared on top of the blocks, within the portal.
      7. Break the boat. Return to the nether, and wait at least 15 seconds to ensure that the overworld chunks are unloaded.
      8. Run the same command as before, but this time, don't throw a snowball through the portal first.
      9. Go back to the overworld. Note that the boat is now at the bottom level of the portal, and its hitbox is overlapping with the blocks.

      In other words, if the overworld chunks are already loaded when the boat arrives, then the boat will be correctly placed. If the overworld chunks aren't already loaded when the boat arrives, the boat will collide with the blocks around the portal.

      Expected behavior: When the boat appears on the overworld side of the portal, it shouldn't collide with blocks if other places to spawn are available. Since the arriving entity itself loads the overworld chunks, it's surprising that the behavior would depend on whether those chunks were previously loaded before the entity arrived.

      This seems similar to MC-262115, but the issue doesn't only affect mobs, and it also seems to be specifically dependent on chunkloading. It's possible that the chunkloading-specific behavior described here is actually the root cause of the "inconsistent" behavior in MC-262115.

            Unassigned Unassigned
            not-an-aardvark not-an-aardvark
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              CHK: