Class TeleportEvent
java.lang.Object
journeymap.api.v2.common.event.impl.JourneyMapEvent
journeymap.api.v2.common.event.impl.CommonEvent
journeymap.api.v2.common.event.common.TeleportEvent
-
Nested Class Summary
Nested classes/interfaces inherited from class journeymap.api.v2.common.event.impl.CommonEvent
CommonEvent.Side -
Field Summary
Fields inherited from class journeymap.api.v2.common.event.impl.JourneyMapEvent
timestamp -
Constructor Summary
ConstructorsConstructorDescriptionTeleportEvent(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 TypeMethodDescriptionnet.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> Destination Dimensionnet.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> Dimension where the user initiated the teleport.net.minecraft.core.BlockPosgetPos()Block Position of target location.This will be null for context menu teleporting on the fullscreen map.voidsetDestinationLevel(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> destinationLevel) Set to override the destination level.voidsetPos(net.minecraft.core.BlockPos pos) Update this to modify final teleport locationMethods inherited from class journeymap.api.v2.common.event.impl.CommonEvent
getSideMethods inherited from class journeymap.api.v2.common.event.impl.JourneyMapEvent
cancel, isCancellable, isCancelled
-
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
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-
-