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

Non-player entities going through Nether portal do not generate portal in Nether if none exists

XMLWordPrintable

    • Confirmed
    • Chunk loading, Entities
    • Low
    • Platform

      The bug

      Non-player entities going through a Nether portal do not generate a new portal in the Nether if none exists. Instead they are just placed at x / 8, y, z / 8, which could be in or above a lava lake as well.

      How to reproduce

      1. Create a new world, or make sure there are no nearby portals in the Nether
      2. Create a Nether portal in the Overworld
      3. Throw for example an item through the portal
      4. Enter the portal
        → The item is very likely not at the position of the portal

      Note: You can also summon an armor stand in the portal to see where it was teleported.

      /summon armor_stand ~ ~-3 ~ {Invulnerable:1b,NoGravity:1b,Glowing:1b,Tags:[teleportMarker]}
      

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      While for players the method net.minecraft.world.Teleporter.placeInPortal(Entity, float) is used which creates a portal if none exists, non-player entities only use net.minecraft.world.Teleporter.placeInExistingPortal(Entity, float) which assumes there is already a portal. It looks like they could use Teleporter.placeInPortal(Entity, float) instead as well without any downsites.

            HugoHagglund [Mojang] SHugoh
            GoldilokZ Anthony Barlow
            Votes:
            26 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: