aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/hysky/skyblocker/utils/Boxes.java
diff options
context:
space:
mode:
authorKevinthegreat <92656833+kevinthegreat1@users.noreply.github.com>2024-07-26 14:17:30 +0800
committerKevinthegreat <92656833+kevinthegreat1@users.noreply.github.com>2024-07-26 14:17:30 +0800
commitc314749a48affe7d1ddc74aa0b5772cdc1afdf0e (patch)
tree9576ecf65b65792e84cefc123f67d78fb6bb6cce /src/main/java/de/hysky/skyblocker/utils/Boxes.java
parent7cff9a33c40b36a65fb63aaa0018366bb5df8327 (diff)
downloadSkyblocker-c314749a48affe7d1ddc74aa0b5772cdc1afdf0e.tar.gz
Skyblocker-c314749a48affe7d1ddc74aa0b5772cdc1afdf0e.tar.bz2
Skyblocker-c314749a48affe7d1ddc74aa0b5772cdc1afdf0e.zip
Refactor RenderHelper
Diffstat (limited to 'src/main/java/de/hysky/skyblocker/utils/Boxes.java')
-rw-r--r--src/main/java/de/hysky/skyblocker/utils/Boxes.java20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/main/java/de/hysky/skyblocker/utils/Boxes.java b/src/main/java/de/hysky/skyblocker/utils/Boxes.java
index cd944a46..c50d9bcf 100644
--- a/src/main/java/de/hysky/skyblocker/utils/Boxes.java
+++ b/src/main/java/de/hysky/skyblocker/utils/Boxes.java
@@ -5,14 +5,22 @@ import net.minecraft.util.math.Direction.Axis;
import net.minecraft.util.math.Vec3d;
public class Boxes {
- /** Returns the vector of the min pos of this box. **/
+ /**
+ * Returns the vector of the min pos of this box.
+ * @deprecated Use {@link Box#getMinPos()} instead.
+ */
+ @Deprecated(since = "1.22")
public static Vec3d getMinVec(Box box) {
- return new Vec3d(box.minX, box.minY, box.minZ);
+ return box.getMinPos();
}
- /** Returns the vector of the max pos of this box. **/
+ /**
+ * Returns the vector of the max pos of this box.
+ * @deprecated Use {@link Box#getMaxPos()} instead.
+ */
+ @Deprecated(since = "1.22")
public static Vec3d getMaxVec(Box box) {
- return new Vec3d(box.maxX, box.maxY, box.maxZ);
+ return box.getMaxPos();
}
/** Returns the vector of the side lengths of this box. **/
@@ -22,12 +30,12 @@ public class Boxes {
/** Offsets this box so that minX, minY and minZ are all zero. **/
public static Box moveToZero(Box box) {
- return box.offset(getMinVec(box).negate());
+ return box.offset(box.getMinPos().negate());
}
/** Returns the distance between to oppisite corners of the box. **/
public static double getCornerLength(Box box) {
- return getMinVec(box).distanceTo(getMaxVec(box));
+ return box.getMinPos().distanceTo(box.getMaxPos());
}
/** Returns the length of an axis in the box. **/