mojira.dev
MC-74923

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

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.

Linked issues

Attachments

Comments 9

The video shows the described buggy portal behaviour. Sped up 4x.

Confirmed for 15w50a: I know, it's outdated. It's just still more recent then what it already says.

@unknown we can only add the newest versions to the list

Is this still an issue in the latest snapshot 16w44a? If so please update the affected versions.

This is an automated comment on any open or reopened issue with out-of-date affected versions.

Is this still an issue in the most recent versions (currently that is 1.11) of Minecraft? If so, please update the affected versions and help us keeping this ticket updated from time to time. If you are the owner/reporter of this ticket, you can modify the affected version(s) yourself.

Hello! I apologise for my absense. This bug still affects Minecraft version 1.11 and can still be easily recreated.

Updated affected versions and environment.

Fixed in 1.15.2 or earlier.

Niko Geil

(Unassigned)

Confirmed

(Unassigned)

entity, nether_portal, teleport

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

Retrieved