Class LocationHelpers

java.lang.Object
org.cyclops.cyclopscore.helper.LocationHelpers

@Deprecated public class LocationHelpers extends Object
Deprecated.
Helper methods involving BlockPosS and PacketHandler.TargetPointS.
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    static net.minecraft.core.BlockPos
    addToDimension(net.minecraft.core.BlockPos blockPos, int dimension, int value)
    Deprecated.
     
    static net.minecraft.core.BlockPos
    copyLocation(net.minecraft.core.BlockPos blockPos)
    Deprecated.
     
    static net.minecraft.core.Vec3i
    copyLocation(net.minecraft.core.Vec3i blockPos)
    Deprecated.
     
    createTargetPointFromEntity(net.minecraft.world.entity.Entity entity, int range)
    Deprecated.
    Creates a PacketHandler.TargetPoint for the dimension and position of the given Entity and a given range.
    createTargetPointFromLocation(net.minecraft.server.level.ServerLevel world, net.minecraft.core.BlockPos location, int range)
    Deprecated.
    Creates a PacketHandler.TargetPoint for the dimension of the given world and the given BlockPos.
    static net.minecraft.core.BlockPos
    fromArray(int[] coordinates)
    Deprecated.
     
    static double
    getPitch(net.minecraft.core.BlockPos start, net.minecraft.core.BlockPos end)
    Deprecated.
    Get pitch from the start location to the end location.
    static net.minecraft.core.BlockPos
    getRandomPointInSphere(net.minecraft.core.BlockPos center, int radius)
    Deprecated.
    Get a random point inside a sphere in an efficient way.
    static double
    getYaw(net.minecraft.core.BlockPos start, net.minecraft.core.BlockPos end)
    Deprecated.
    Get yaw from the start location to the end location.
    static net.minecraft.core.BlockPos
    subtract(net.minecraft.core.BlockPos blockPos, net.minecraft.core.Vec3i vec)
    Deprecated.
     
    static net.minecraft.core.Vec3i
    subtract(net.minecraft.core.Vec3i vec1, net.minecraft.core.Vec3i vec2)
    Deprecated.
     
    static int[]
    toArray(net.minecraft.core.Vec3i blockPos)
    Deprecated.
     
    static String
    toCompactString(net.minecraft.core.BlockPos pos)
    Deprecated.
    Compactly format a position.
    static String
    toCompactString(net.minecraft.core.Vec3i vec)
    Deprecated.
    Compactly format a vector.

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details Link icon

    • LocationHelpers Link icon

      public LocationHelpers()
      Deprecated.
  • Method Details Link icon

    • createTargetPointFromEntity Link icon

      public static PacketHandler.TargetPoint createTargetPointFromEntity(net.minecraft.world.entity.Entity entity, int range)
      Deprecated.
      Creates a PacketHandler.TargetPoint for the dimension and position of the given Entity and a given range.
      Parameters:
      entity - Entity who's dimension and position will be used to create the PacketHandler.TargetPoint.
      range - The range of the PacketHandler.TargetPoint.
      Returns:
      A PacketHandler.TargetPoint with the position and dimension of the entity and the given range.
    • createTargetPointFromLocation Link icon

      public static PacketHandler.TargetPoint createTargetPointFromLocation(net.minecraft.server.level.ServerLevel world, net.minecraft.core.BlockPos location, int range)
      Deprecated.
      Creates a PacketHandler.TargetPoint for the dimension of the given world and the given BlockPos.
      Parameters:
      world - The world from which the dimension will be used.
      location - The location for the target.
      range - The range of the PacketHandler.TargetPoint.
      Returns:
      A PacketHandler.TargetPoint with the position and dimension of the entity and the given range.
    • getRandomPointInSphere Link icon

      public static net.minecraft.core.BlockPos getRandomPointInSphere(net.minecraft.core.BlockPos center, int radius)
      Deprecated.
      Get a random point inside a sphere in an efficient way.
      Parameters:
      center - The center coordinates of the sphere.
      radius - The radius of the sphere.
      Returns:
      The coordinates of the random point.
    • copyLocation Link icon

      public static net.minecraft.core.BlockPos copyLocation(net.minecraft.core.BlockPos blockPos)
      Deprecated.
    • copyLocation Link icon

      public static net.minecraft.core.Vec3i copyLocation(net.minecraft.core.Vec3i blockPos)
      Deprecated.
    • addToDimension Link icon

      public static net.minecraft.core.BlockPos addToDimension(net.minecraft.core.BlockPos blockPos, int dimension, int value)
      Deprecated.
    • fromArray Link icon

      public static net.minecraft.core.BlockPos fromArray(int[] coordinates)
      Deprecated.
    • toArray Link icon

      public static int[] toArray(net.minecraft.core.Vec3i blockPos)
      Deprecated.
    • subtract Link icon

      public static net.minecraft.core.BlockPos subtract(net.minecraft.core.BlockPos blockPos, net.minecraft.core.Vec3i vec)
      Deprecated.
    • subtract Link icon

      public static net.minecraft.core.Vec3i subtract(net.minecraft.core.Vec3i vec1, net.minecraft.core.Vec3i vec2)
      Deprecated.
    • getYaw Link icon

      public static double getYaw(net.minecraft.core.BlockPos start, net.minecraft.core.BlockPos end)
      Deprecated.
      Get yaw from the start location to the end location.
      Parameters:
      start - Start
      end - End
      Returns:
      The yaw
    • getPitch Link icon

      public static double getPitch(net.minecraft.core.BlockPos start, net.minecraft.core.BlockPos end)
      Deprecated.
      Get pitch from the start location to the end location.
      Parameters:
      start - Start
      end - End
      Returns:
      The pitch
    • toCompactString Link icon

      public static String toCompactString(net.minecraft.core.BlockPos pos)
      Deprecated.
      Compactly format a position.
      Parameters:
      pos - The position.
      Returns:
      The string.
    • toCompactString Link icon

      public static String toCompactString(net.minecraft.core.Vec3i vec)
      Deprecated.
      Compactly format a vector.
      Parameters:
      vec - The vector.
      Returns:
      The string.