Package org.cyclops.cyclopscore.helper
Class LocationHelpers
java.lang.Object
org.cyclops.cyclopscore.helper.LocationHelpers
Deprecated.
Helper methods involving
BlockPosS and PacketHandler.TargetPointS.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.core.BlockPosaddToDimension(net.minecraft.core.BlockPos blockPos, int dimension, int value) Deprecated.static net.minecraft.core.BlockPoscopyLocation(net.minecraft.core.BlockPos blockPos) Deprecated.static net.minecraft.core.Vec3icopyLocation(net.minecraft.core.Vec3i blockPos) Deprecated.static PacketHandler.TargetPointcreateTargetPointFromEntity(net.minecraft.world.entity.Entity entity, int range) Deprecated.Creates aPacketHandler.TargetPointfor the dimension and position of the givenEntityand a given range.static PacketHandler.TargetPointcreateTargetPointFromLocation(net.minecraft.server.level.ServerLevel world, net.minecraft.core.BlockPos location, int range) Deprecated.Creates aPacketHandler.TargetPointfor the dimension of the given world and the givenBlockPos.static net.minecraft.core.BlockPosfromArray(int[] coordinates) Deprecated.static doublegetPitch(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.BlockPosgetRandomPointInSphere(net.minecraft.core.BlockPos center, int radius) Deprecated.Get a random point inside a sphere in an efficient way.static doublegetYaw(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.BlockPossubtract(net.minecraft.core.BlockPos blockPos, net.minecraft.core.Vec3i vec) Deprecated.static net.minecraft.core.Vec3isubtract(net.minecraft.core.Vec3i vec1, net.minecraft.core.Vec3i vec2) Deprecated.static int[]toArray(net.minecraft.core.Vec3i blockPos) Deprecated.static StringtoCompactString(net.minecraft.core.BlockPos pos) Deprecated.Compactly format a position.static StringtoCompactString(net.minecraft.core.Vec3i vec) Deprecated.Compactly format a vector.
-
Constructor Details
-
LocationHelpers
public LocationHelpers()Deprecated.
-
-
Method Details
-
createTargetPointFromEntity
public static PacketHandler.TargetPoint createTargetPointFromEntity(net.minecraft.world.entity.Entity entity, int range) Deprecated.Creates aPacketHandler.TargetPointfor the dimension and position of the givenEntityand a given range.- Parameters:
entity- Entity who's dimension and position will be used to create thePacketHandler.TargetPoint.range- The range of thePacketHandler.TargetPoint.- Returns:
- A
PacketHandler.TargetPointwith the position and dimension of the entity and the given range.
-
createTargetPointFromLocation
public static PacketHandler.TargetPoint createTargetPointFromLocation(net.minecraft.server.level.ServerLevel world, net.minecraft.core.BlockPos location, int range) Deprecated.Creates aPacketHandler.TargetPointfor the dimension of the given world and the givenBlockPos.- Parameters:
world- The world from which the dimension will be used.location- The location for the target.range- The range of thePacketHandler.TargetPoint.- Returns:
- A
PacketHandler.TargetPointwith the position and dimension of the entity and the given range.
-
getRandomPointInSphere
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
public static net.minecraft.core.BlockPos copyLocation(net.minecraft.core.BlockPos blockPos) Deprecated. -
copyLocation
public static net.minecraft.core.Vec3i copyLocation(net.minecraft.core.Vec3i blockPos) Deprecated. -
addToDimension
public static net.minecraft.core.BlockPos addToDimension(net.minecraft.core.BlockPos blockPos, int dimension, int value) Deprecated. -
fromArray
public static net.minecraft.core.BlockPos fromArray(int[] coordinates) Deprecated. -
toArray
public static int[] toArray(net.minecraft.core.Vec3i blockPos) Deprecated. -
subtract
public static net.minecraft.core.BlockPos subtract(net.minecraft.core.BlockPos blockPos, net.minecraft.core.Vec3i vec) Deprecated. -
subtract
public static net.minecraft.core.Vec3i subtract(net.minecraft.core.Vec3i vec1, net.minecraft.core.Vec3i vec2) Deprecated. -
getYaw
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- Startend- End- Returns:
- The yaw
-
getPitch
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- Startend- End- Returns:
- The pitch
-
toCompactString
Deprecated.Compactly format a position.- Parameters:
pos- The position.- Returns:
- The string.
-
toCompactString
Deprecated.Compactly format a vector.- Parameters:
vec- The vector.- Returns:
- The string.
-