Non-player entities going through Nether portal do not generate portal in Nether if none exists
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
- Create a new world, or make sure there are no nearby portals in the Nether
- Create a Nether portal in the Overworld
- Throw for example an item through the portal
- 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.
2017-04-18, 09:43 AM
2024-12-20, 01:26 AM
2024-05-22, 12:11 PM
26
11
entity, nether, nether_portal, position, teleport