Class PortalLocationCalculator
java.lang.Object
tech.anonymoushacker1279.openportals.portal.teleport.PortalLocationCalculator
Calculates portal destination coordinates with dimension scaling and world border constraints.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.core.BlockPoscalculateDestinationPosition(net.minecraft.world.entity.Entity entity, net.minecraft.server.level.ServerLevel destination) Calculate the scaled destination position for an entity teleporting between dimensions.
-
Constructor Details
-
PortalLocationCalculator
public PortalLocationCalculator()
-
-
Method Details
-
calculateDestinationPosition
public static net.minecraft.core.BlockPos calculateDestinationPosition(net.minecraft.world.entity.Entity entity, net.minecraft.server.level.ServerLevel destination) Calculate the scaled destination position for an entity teleporting between dimensions. Applies dimension scaling and clamps to world border with safety margins.- Parameters:
entity- the entity being teleporteddestination- the destination level- Returns:
- the calculated destination block position
-