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 destination, @Nullable Coordinates rotation, boolean sameDimension) private static voidperformTeleport(CommandSourceStack source, Entity victim, ServerLevel level, double x, double y, double z, Set<Relative> relatives, float yRot, float xRot, @Nullable LookAt lookAt) static voidregister(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher) private static intteleportToEntity(CommandSourceStack source, Collection<? extends Entity> entities, Entity destination) private static intteleportToPos(CommandSourceStack source, Collection<? extends Entity> entities, ServerLevel level, Coordinates destination, @Nullable Coordinates rotation, @Nullable 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> entities, Entity destination) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
teleportToPos
private static int teleportToPos(CommandSourceStack source, Collection<? extends Entity> entities, ServerLevel level, Coordinates destination, @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 destination, @Nullable Coordinates rotation, boolean sameDimension) -
formatDouble
-
performTeleport
private static void performTeleport(CommandSourceStack source, Entity victim, 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
-