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 value) private static void
performTeleport
(CommandSourceStack source, Entity entity, ServerLevel level, double x, double y, double z, Set<RelativeMovement> relativeList, float yaw, float pitch, TeleportCommand.LookAt facing) static void
register
(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher) private static int
teleportToEntity
(CommandSourceStack source, Collection<? extends Entity> targets, Entity destination) private static int
teleportToPos
(CommandSourceStack source, Collection<? extends Entity> targets, ServerLevel level, Coordinates position, Coordinates rotation, TeleportCommand.LookAt facing)
-
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 source, Collection<? extends Entity> targets, Entity destination) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
teleportToPos
private static int teleportToPos(CommandSourceStack source, Collection<? extends Entity> targets, ServerLevel level, Coordinates position, @Nullable Coordinates rotation, @Nullable TeleportCommand.LookAt facing) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
formatDouble
-
performTeleport
private static void performTeleport(CommandSourceStack source, Entity entity, ServerLevel level, double x, double y, double z, Set<RelativeMovement> relativeList, float yaw, float pitch, @Nullable TeleportCommand.LookAt facing) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-