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

Portal entries of non-existent portals are not removed if entities keep using teleporting

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Cannot Reproduce
    • Affects Version/s: Minecraft 1.8.1, Minecraft 15w43a, Minecraft 16w33a, Minecraft 1.11, Minecraft 1.11.2, Minecraft 1.12 Pre-Release 2, Minecraft 1.13.1
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      The bug

      Portal entries for portals which were destroyed remain in the map storing a portal position per chunk if entities keep teleporting to that chunk and therefor the entry is looked up.

      A lookup entry is only removed if it was not used for 300 ticks (and the world time % 100 == 0). This means the teleporting entities might end up in a lava lake or fall from the sky on in the other dimension if they are searching for a portal in the respective chunk within this cooldown and additionally reset the cooldown.

      Expected behavior

      Portals being broken are directly removed from the lookup.

      How to reproduce

      1. Create a Nether portal in the spawn chunks of the Overworld, or make somehow sure that the area remains loaded when you enter the portal.
      2. Place a dropper with a redstone clock dropping items into the the portal.
      3. Enter the Nether and break the exit portal, either by breaking the obsidian or breaking the portal blocks.
        → The items will continue to spawn at the position of the old portal.

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      Only the method net.minecraft.world.Teleporter.removeStalePortalLocations(long) is removing portal entries once they have not been used for 300 ticks and the world time % 100 == 0. Instead the method net.minecraft.world.Teleporter.placeInExistingPortal(Entity, float) could additionally test if there is still a portal at the position the entry defines. If not it should search for a nearby portal.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              account3r2 Niko Geil
              Votes:
              7 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                CHK: