Package net.minecraft.server.commands
Class TeleportCommand
java.lang.Object
net.minecraft.server.commands.TeleportCommand
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringformatDouble(double value) getRelatives(Coordinates position, Coordinates rotation, boolean absolute) private static voidperformTeleport(CommandSourceStack source, Entity target, ServerLevel level, double x, double y, double z, Set<Relative> relatives, float yRot, float xRot, LookAt lookAt) static voidregister(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher) private static intteleportToEntity(CommandSourceStack source, Collection<? extends Entity> targets, Entity destination) private static intteleportToPos(CommandSourceStack source, Collection<? extends Entity> targets, ServerLevel level, Coordinates position, Coordinates rotation, LookAt lookAt)
-
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 LookAt lookAt) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getRelatives
private static Set<Relative> getRelatives(Coordinates position, @Nullable Coordinates rotation, boolean absolute) -
formatDouble
-
performTeleport
private static void performTeleport(CommandSourceStack source, Entity target, ServerLevel level, double x, double y, double z, Set<Relative> relatives, float yRot, float xRot, @Nullable LookAt lookAt) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-