Package net.minecraft.server.commands
Class TeleportCommand
java.lang.Object
net.minecraft.server.commands.TeleportCommand
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interface(package private) static final record(package private) static final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringformatDouble(double pValue) private static voidperformTeleport(CommandSourceStack pSource, Entity pEntity, ServerLevel pLevel, double pX, double pY, double pZ, Set<RelativeMovement> pRelativeList, float pYaw, float pPitch, TeleportCommand.LookAt pFacing) static voidregister(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> pDispatcher) private static intteleportToEntity(CommandSourceStack pSource, Collection<? extends Entity> pTargets, Entity pDestination) private static intteleportToPos(CommandSourceStack pSource, Collection<? extends Entity> pTargets, ServerLevel pLevel, Coordinates pPosition, Coordinates pRotation, TeleportCommand.LookAt pFacing)
-
Field Details
-
INVALID_POSITION
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType INVALID_POSITION
-
-
Constructor Details
-
TeleportCommand
public TeleportCommand()
-
-
Method Details
-
register
-
teleportToEntity
private static int teleportToEntity(CommandSourceStack pSource, Collection<? extends Entity> pTargets, Entity pDestination) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
teleportToPos
private static int teleportToPos(CommandSourceStack pSource, Collection<? extends Entity> pTargets, ServerLevel pLevel, Coordinates pPosition, @Nullable Coordinates pRotation, @Nullable TeleportCommand.LookAt pFacing) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
formatDouble
-
performTeleport
private static void performTeleport(CommandSourceStack pSource, Entity pEntity, ServerLevel pLevel, double pX, double pY, double pZ, Set<RelativeMovement> pRelativeList, float pYaw, float pPitch, @Nullable TeleportCommand.LookAt pFacing) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-