Class TeleportCommand

java.lang.Object
net.minecraft.server.commands.TeleportCommand

public class TeleportCommand extends Object
  • Field Details

    • INVALID_POSITION

      private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType INVALID_POSITION
  • Constructor Details

    • TeleportCommand

      public TeleportCommand()
  • Method Details

    • register

      public static void register(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher)
    • 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

      private static String formatDouble(double value)
    • 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