Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
58537c42f3
Commit
4aa66e12c4
@ -27,6 +27,6 @@ import org.bukkit.entity.Player;
|
|||||||
public class RawEntityShowMode extends FactoredEntityShowMode {
|
public class RawEntityShowMode extends FactoredEntityShowMode {
|
||||||
|
|
||||||
public RawEntityShowMode(Player player, ShowModeParameter showModeParameter) {
|
public RawEntityShowMode(Player player, ShowModeParameter showModeParameter) {
|
||||||
super(player, showModeParameter, 1000000);
|
super(player, showModeParameter, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,11 +25,11 @@ import java.util.Objects;
|
|||||||
|
|
||||||
public class RoundedPosition {
|
public class RoundedPosition {
|
||||||
|
|
||||||
private static final int factor = 10;
|
private static final long factor = 10;
|
||||||
|
|
||||||
private int x;
|
private long x;
|
||||||
private int y;
|
private long y;
|
||||||
private int z;
|
private long z;
|
||||||
|
|
||||||
public RoundedPosition(Position position) {
|
public RoundedPosition(Position position) {
|
||||||
this(position.getLocation().getX(), position.getLocation().getY(), position.getLocation().getZ());
|
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) {
|
public RoundedPosition(double x, double y, double z) {
|
||||||
this.x = (int) (x * factor);
|
this.x = (long) (x * factor);
|
||||||
this.y = (int) (y * factor);
|
this.y = (long) (y * factor);
|
||||||
this.z = (int) (z * factor);
|
this.z = (long) (z * factor);
|
||||||
}
|
}
|
||||||
|
|
||||||
public RoundedPosition(double x, double y, double z, int factor) {
|
public RoundedPosition(double x, double y, double z, long factor) {
|
||||||
this.x = (int) (x * factor);
|
if (factor == -1) {
|
||||||
this.y = (int) (y * factor);
|
this.x = Double.doubleToLongBits(x);
|
||||||
this.z = (int) (z * factor);
|
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
|
@Override
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren