Override BlockPosition.MutableBlockPosition.isValidLocation()

Fixes GH-281
This commit is contained in:
BlackHole 2016-05-12 12:56:48 -05:00
parent 4e3d8a41ee
commit b2087ca1af

View file

@ -23,6 +23,23 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public BaseBlockPosition(int i, int j, int k) {
this.a = i;
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition {
protected int b;
protected int c;
protected int d;
+ // Paper start
+ @Override
+ public boolean isValidLocation() {
+ return this.getX() >= -30000000 && this.getZ() >= -30000000 && this.getX() < 30000000 && this.getZ() < 30000000 && this.getY() >= 0 && this.getY() < 256;
+ }
+ // Paper end
public MutableBlockPosition() {
this(0, 0, 0);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/World.java