Class PortalTeleporter

java.lang.Object
tech.anonymoushacker1279.openportals.portal.teleport.PortalTeleporter

public class PortalTeleporter extends Object
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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 in
      entity - the entity to teleport
      portalBase - the portal frame block
      portalPos - the position of the portal
      Returns:
      a TeleportTransition if successful, or null if teleportation should not occur