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.
- relates to
-
MC-83350 Entities teleporting through a portal disappear instead of teleporting.
- Resolved
-
MC-123155 When any non-player entity enters an End portal the obsidian platform is not regenerated and the entity can fall into the void
- Resolved
-
MC-151648 Non-player entities cannot travel through unlinked nether portals
- Resolved
-
MC-278942 Mobs are able to create new portals from those that are unlinked in both the nether and the overworld
- Resolved