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 String
formatDouble
(double pValue) private static void
performTeleport
(CommandSourceStack pSource, Entity pEntity, ServerLevel pLevel, double pX, double pY, double pZ, Set<RelativeMovement> pRelativeList, float pYaw, float pPitch, TeleportCommand.LookAt pFacing) static void
register
(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> p_139009_) private static int
teleportToEntity
(CommandSourceStack pSource, Collection<? extends Entity> pTargets, Entity pDestination) private static int
teleportToPos
(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
-