diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/mode/RawEntityShowMode.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/mode/RawEntityShowMode.java index 98e4c6d8..22952c0d 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/mode/RawEntityShowMode.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/show/mode/RawEntityShowMode.java @@ -27,6 +27,6 @@ import org.bukkit.entity.Player; public class RawEntityShowMode extends FactoredEntityShowMode { public RawEntityShowMode(Player player, ShowModeParameter showModeParameter) { - super(player, showModeParameter, 1000000); + super(player, showModeParameter, -1); } } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/shared/RoundedPosition.java b/BauSystem_Main/src/de/steamwar/bausystem/shared/RoundedPosition.java index c803bb9a..23aed77f 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/shared/RoundedPosition.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/shared/RoundedPosition.java @@ -25,11 +25,11 @@ import java.util.Objects; public class RoundedPosition { - private static final int factor = 10; + private static final long factor = 10; - private int x; - private int y; - private int z; + private long x; + private long y; + private long z; public RoundedPosition(Position position) { this(position.getLocation().getX(), position.getLocation().getY(), position.getLocation().getZ()); @@ -48,15 +48,21 @@ public class RoundedPosition { } public RoundedPosition(double x, double y, double z) { - this.x = (int) (x * factor); - this.y = (int) (y * factor); - this.z = (int) (z * factor); + this.x = (long) (x * factor); + this.y = (long) (y * factor); + this.z = (long) (z * factor); } - public RoundedPosition(double x, double y, double z, int factor) { - this.x = (int) (x * factor); - this.y = (int) (y * factor); - this.z = (int) (z * factor); + public RoundedPosition(double x, double y, double z, long factor) { + if (factor == -1) { + this.x = Double.doubleToLongBits(x); + this.y = Double.doubleToLongBits(y); + this.z = Double.doubleToLongBits(z); + } else { + this.x = (long) (x * factor); + this.y = (long) (y * factor); + this.z = (long) (z * factor); + } } @Override