Class TeleportEvent


public class TeleportEvent extends CommonEvent
  • Nested Class Summary

    Nested classes/interfaces inherited from class CommonEvent

    CommonEvent.Side
  • Field Summary

    Fields inherited from class JourneyMapEvent

    timestamp
  • Constructor Summary

    Constructors
    Constructor
    Description
    TeleportEvent(Waypoint waypoint, net.minecraft.core.BlockPos pos, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> fromLevel, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> destinationLevel)
     
    TeleportEvent(net.minecraft.core.BlockPos pos, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>
    Destination Dimension
    net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>
    Dimension where the user initiated the teleport.
    net.minecraft.core.BlockPos
    Block Position of target location.
    This will be null for context menu teleporting on the fullscreen map.
    void
    setDestinationLevel(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> destinationLevel)
    Set to override the destination level.
    void
    setPos(net.minecraft.core.BlockPos pos)
    Update this to modify final teleport location

    Methods inherited from class CommonEvent

    getSide

    Methods inherited from class JourneyMapEvent

    cancel, isCancellable, isCancelled

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TeleportEvent

      public TeleportEvent(@Nullable Waypoint waypoint, net.minecraft.core.BlockPos pos, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> fromLevel, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> destinationLevel)
    • TeleportEvent

      public TeleportEvent(net.minecraft.core.BlockPos pos, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level)
  • Method Details

    • getWaypoint

      @Nullable public Waypoint getWaypoint()
      This will be null for context menu teleporting on the fullscreen map.

      Do not modify this, use only for information.

      Returns:
      - The Waypoint
    • getPos

      public net.minecraft.core.BlockPos getPos()
      Block Position of target location.
      Returns:
      the blockpos
    • setPos

      public void setPos(net.minecraft.core.BlockPos pos)
      Update this to modify final teleport location
      Parameters:
      pos -
    • getFromLevel

      public net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> getFromLevel()
      Dimension where the user initiated the teleport.
      Returns:
      - the level key.
    • getDestinationLevel

      public net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> getDestinationLevel()
      Destination Dimension
      Returns:
      - the destination dimension.
    • setDestinationLevel

      public void setDestinationLevel(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> destinationLevel)
      Set to override the destination level.
      Parameters:
      destinationLevel -