The bug
Portals that are made of a material other than obsidian or are not in a standard shape place the player below them on usage.
This can be a problem for custom maps that may want to use portals of a non-standard shape or material. This situation will not be encountered in normal survival gameplay.
The distance below depends on the height of the portal on the other end.
How to reproduce
Download the attached test world
Enter the portal with a normal obsidian frame
Observe that you are teleported to the portal normally. Return to the overworld.
Enter the portal with a quartz frame. This portal is an "invalid" state (if it were to receive a block update, the portal blocks would remove themselves), but something like this could be found in adventure maps.
Observe that you are teleported far below the portal in the nether.
Code analysis
By @unknown, based on 1.12.2 decompiled using MCP 9.40. The problem is that in net.minecraft.entity.Entity.setPortal(BlockPos)
, invalid portals produce some unexpected (positive) values in lastPortalVec
. A simple fix would be for net.minecraft.world.Teleporter.placeInExistingPortal(Entity, float)
to place the entity in the bottom left corner of the destination portal if the values in lastPortalVec
are invalid.
Related issues
Attachments
Comments
