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 pValue) getRelatives(Coordinates pPosition, Coordinates pRotation, boolean pAbsolute) private static voidperformTeleport(CommandSourceStack pSource, Entity pTarget, ServerLevel pLevel, double pX, double pY, double pZ, Set<Relative> pRelatives, float pYRot, float pXRot, LookAt pLookAt) 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, LookAt pLookAt)
-
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 LookAt pLookAt) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getRelatives
private static Set<Relative> getRelatives(Coordinates pPosition, @Nullable Coordinates pRotation, boolean pAbsolute) -
formatDouble
-
performTeleport
private static void performTeleport(CommandSourceStack pSource, Entity pTarget, ServerLevel pLevel, double pX, double pY, double pZ, Set<Relative> pRelatives, float pYRot, float pXRot, @Nullable LookAt pLookAt) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-