mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 00:07:56 +01:00
Override BlockPosition.MutableBlockPosition.isValidLocation()
Fixes GH-281
This commit is contained in:
parent
4e3d8a41ee
commit
b2087ca1af
@ -23,6 +23,23 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
|
|
||||||
public BaseBlockPosition(int i, int j, int k) {
|
public BaseBlockPosition(int i, int j, int k) {
|
||||||
this.a = i;
|
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
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
|
Loading…
Reference in New Issue
Block a user