Class PortalTeleporter
java.lang.Object
tech.anonymoushacker1279.openportals.portal.teleport.PortalTeleporter
Main service for handling portal teleportation. Orchestrates the entire teleportation process including: -
Destination calculation - Portal linking lookup - Portal creation - Teleport transition generation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable net.minecraft.world.level.portal.TeleportTransitionattemptTeleport(net.minecraft.world.level.Level level, net.minecraft.world.entity.Entity entity, net.minecraft.world.level.block.Block portalBase, net.minecraft.core.BlockPos portalPos) Attempt to teleport an entity through a portal.
-
Constructor Details
-
PortalTeleporter
public PortalTeleporter()
-
-
Method Details
-
attemptTeleport
@Nullable public static @Nullable net.minecraft.world.level.portal.TeleportTransition attemptTeleport(net.minecraft.world.level.Level level, net.minecraft.world.entity.Entity entity, net.minecraft.world.level.block.Block portalBase, net.minecraft.core.BlockPos portalPos) Attempt to teleport an entity through a portal.- Parameters:
level- the level the entity is currently inentity- the entity to teleportportalBase- the portal frame blockportalPos- the position of the portal- Returns:
- a TeleportTransition if successful, or null if teleportation should not occur
-