]> git.lizzy.rs Git - BoundingBoxOutlineReloaded.git/blobdiff - src/main/java/com/irtimaled/bbor/client/providers/SpawningSphereProvider.java
Simplify commands to use Coords & Pos objects
[BoundingBoxOutlineReloaded.git] / src / main / java / com / irtimaled / bbor / client / providers / SpawningSphereProvider.java
index a5a2a1ef9393cd9c4e15a2f18fe0c002456caa09..056b18b3de7695c90ab400e3c88f4e4806c711c4 100644 (file)
@@ -22,9 +22,7 @@ public class SpawningSphereProvider implements IBoundingBoxProvider<BoundingBoxS
     private static BoundingBoxSpawningSphere spawningSphere;
     private static Integer dimensionId;
 
-    public static void setSphere(double x, double y, double z) {
-        Point point = new Point(snapToNearestHalf(x), y, snapToNearestHalf(z));
-
+    public static void setSphere(Point point) {
         if (spawningSphere != null && spawningSphere.getPoint().equals(point)) return;
         clear();
 
@@ -33,13 +31,6 @@ public class SpawningSphereProvider implements IBoundingBoxProvider<BoundingBoxS
         lastBoundingBox = null;
     }
 
-    private static double snapToNearestHalf(double value) {
-        int floor = MathHelper.floor(value);
-        int fraction = MathHelper.floor((value - floor) * 4.0);
-        if (fraction % 2 == 1) fraction++;
-        return floor + (fraction / 4.0);
-    }
-
     public static boolean clear() {
         if (spawningSphere != null) {
             lastBoundingBox = null;