mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Override BlockPosition.MutableBlockPosition.isValidLocation()
Fixes GH-281
This commit is contained in:
parent
4e3d8a41ee
commit
b2087ca1af
1 changed files with 17 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue