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
- 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.
- Place a dropper with a redstone clock dropping items into the the portal.
- 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
Created Issue:
Entities coming through Overworld to Nether without a portal
Expected:
Items shot from dropper in Overworld into a portal will create more Nether portals if the portal the items are coming though is broken and there are no more portals in range.What happened:
After breaking the portal in the Nether, the items continued to come though the place the portal used to be. This happens even after creating another portal in the Nether that is in range of the Overworld portal.To reproduce:
1) Create a portal in the Nether with a dropper (with a redstone clock) to shoot items into the Nether portal. This can also be done with an existing portal.
2) Enter the Nether and break the portal, either by breaking the obsidian or breaking the portal blocks.Notes:
The items will continue to come "out of nowhere" even after leaving and entering the Nether through a different portal.
The chunks for the Overworld portal must be loaded.
This presumptuously can be done the other way around (Nether > Overworld) as long as the Nether chunks are loaded.
This is not a visual glitch.
This will happen with all entities, including mobs.Environment
Ubuntu 14.10 (x64)
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu1)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)
Expected:
Items shot from dropper in Overworld into a portal will create more Nether portals if the portal the items are coming though is broken and there are no more portals in range.What happened:
After breaking the portal in the Nether, the items continued to come though the place the portal used to be. This happens even after creating another portal in the Nether that is in range of the Overworld portal.To reproduce:
1) Create a portal in the Nether with a dropper (with a redstone clock) to shoot items into the Nether portal. This can also be done with an existing portal.
2) Enter the Nether and break the portal, either by breaking the obsidian or breaking the portal blocks.Notes:
The items will continue to come "out of nowhere" even after leaving and entering the Nether through a different portal.
The chunks for the Overworld portal must be loaded.
This presumptuously can be done the other way around (Nether > Overworld) as long as the Nether chunks are loaded.
This is not a visual glitch.
This will happen with all entities, including mobs and players.
Expected:
Itemsshot from dropper inOverworld into a portal will create more Nether portals if the portal theitems arecoming though is broken and there are no more portals in range.What happened:
After breaking the portal in the Nether, theitems continued to come though the place the portal used to be. This happens even after creating another portal in the Nether that is in range of the Overworld portal.To reproduce:
1) Create a portal in the Nether with a dropper (with a redstone clock) to shoot items into the Nether portal. This can also be done with an existing portal.
2) Enter the Nether and break the portal, either by breaking the obsidian or breaking the portal blocks.Notes:
The items will continue to come "out of nowhere" even after leaving and entering the Nether through a different portal.
The chunks for the Overworld portal must be loaded.
This presumptuously can be done the other way around (Nether > Overworld) as long as the Nether chunks are loaded.
This is not a visual glitch.
This will happen with all entities, including mobs and players.Expected:
Entites from the Overworld going into a portal will create more Nether portals if the portal the entity is coming though is broken and there are no more portals in range.What happened:
After breaking the portal in the Nether, the entities continued to come though the place the portal used to be. This happens even after creating another portal in the Nether that is in range of the Overworld portal.To reproduce:
1) Create a portal in the Nether with a dropper (with a redstone clock) to shoot items into the Nether portal. This can also be done with an existing portal.
2) Enter the Nether and break the portal, either by breaking the obsidian or breaking the portal blocks.Notes:
The items will continue to come "out of nowhere" even after leaving and entering the Nether through a different portal.
The chunks for the Overworld portal must be loaded.
This presumptuously can be done the other way around (Nether > Overworld) as long as the Nether chunks are loaded.
This is not a visual glitch.
This will happen with all entities, including mobs and players.
Ubuntu 14.10 (x64)
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu1)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)Ubuntu 16.04 (x64)
Ubuntu 14.10 (x64)openjdk version "1.8.0_111"
OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-2ubuntu0.16.04.2-b14)
OpenJDK 64-Bit Server VM (build 25.111-b14, mixed mode)java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu1)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)
Entities coming through Overworld to Nether without aportalPortal entries of non-existent portals are not removed if entities keep using teleporting
Ubuntu 16.04 (x64)
Ubuntu 14.10 (x64)openjdk version "1.8.0_111"
OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-2ubuntu0.16.04.2-b14)
OpenJDK 64-Bit Server VM (build 25.111-b14, mixed mode)java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu1)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)
Expected:
Entites from the Overworld going into a portal will create more Nether portals if the portal the entity is coming though is broken and there are no more portals in range.What happened:
After breaking the portal in the Nether, the entities continued to come though the place the portal used to be. This happens even after creating another portal in the Nether that is in range of the Overworld portal.To reproduce:
1) Create a portal in the Nether with a dropper (with a redstone clock) to shoot items into the Nether portal. This can also be done with an existing portal.
2) Enter the Nether and break the portal, either by breaking the obsidian or breaking the portal blocks.Notes:
The items will continue to come "out of nowhere" even after leaving and entering the Nether through a different portal.
The chunks for the Overworld portal must be loaded.
This presumptuously can be done the other way around (Nether > Overworld) as long as the Nether chunks are loaded.
This is not a visual glitch.Thiswillhappen with all entities, including mobs and players.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
- 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.
- Place a dropper with a redstone clock dropping items into the the portal.
- 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.
is duplicated by
is duplicated by
The video shows the described buggy portal behaviour. Sped up 4x.
15w43a
Confirmed for 15w50a: I know, it's outdated. It's just still more recent then what it already says.
Sam Bone 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.