Patches 100-260 (#2729)

This commit is contained in:
MiniDigger | Martin
2019-12-12 00:43:22 +01:00
parent 2dc2fcce09
commit c9ef3d1cfc
159 changed files with 639 additions and 954 deletions

View File

@@ -21,15 +21,18 @@ This is based upon conclusions drawn from inspecting the assenmbly generated byt
They had 'callq' (invoke) instead of 'mov' (get from memory) instructions.
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
index 7cb46d7a9c..e96428bb2b 100644
index 71089442c..c439a8d01 100644
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
@@ -0,0 +0,0 @@ import javax.annotation.concurrent.Immutable;
public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
public static final BaseBlockPosition ZERO = new BaseBlockPosition(0, 0, 0);
- @Deprecated
- private final int a;
- @Deprecated
- private final int b;
- @Deprecated
- private final int c;
// Paper start
+ protected int x;
@@ -75,6 +78,12 @@ index 7cb46d7a9c..e96428bb2b 100644
- return this.c;
+ return this.z;
}
public BaseBlockPosition down() {
@@ -0,0 +0,0 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
public BaseBlockPosition shift(EnumDirection enumdirection, int i) {
return i == 0 ? this : new BaseBlockPosition(this.getX() + enumdirection.getAdjacentX() * i, this.getY() + enumdirection.getAdjacentY() * i, this.getZ() + enumdirection.getAdjacentZ() * i);
}
+ // Paper end
public BaseBlockPosition d(BaseBlockPosition baseblockposition) {
@@ -82,7 +91,7 @@ index 7cb46d7a9c..e96428bb2b 100644
}
public boolean a(BaseBlockPosition baseblockposition, double d0) {
- return this.distanceSquared((double) baseblockposition.a, (double) baseblockposition.b, (double) baseblockposition.c, false) < d0 * d0;
- return this.distanceSquared((double) baseblockposition.getX(), (double) baseblockposition.getY(), (double) baseblockposition.getZ(), false) < d0 * d0;
+ return this.distanceSquared((double) baseblockposition.x, (double) baseblockposition.y, (double) baseblockposition.z, false) < d0 * d0; // Paper
}
@@ -91,9 +100,9 @@ index 7cb46d7a9c..e96428bb2b 100644
}
public int n(BaseBlockPosition baseblockposition) {
- float f = (float) Math.abs(baseblockposition.getX() - this.a);
- float f1 = (float) Math.abs(baseblockposition.getY() - this.b);
- float f2 = (float) Math.abs(baseblockposition.getZ() - this.c);
- float f = (float) Math.abs(baseblockposition.getX() - this.getX());
- float f1 = (float) Math.abs(baseblockposition.getY() - this.getY());
- float f2 = (float) Math.abs(baseblockposition.getZ() - this.getZ());
+ float f = (float) Math.abs(baseblockposition.getX() - this.x); // Paper
+ float f1 = (float) Math.abs(baseblockposition.getY() - this.y); // Paper
+ float f2 = (float) Math.abs(baseblockposition.getZ() - this.z); // Paper
@@ -101,7 +110,7 @@ index 7cb46d7a9c..e96428bb2b 100644
return (int) (f + f1 + f2);
}
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index 2eabaaeba2..04f754d2c1 100644
index 1cdf0346f..5a505b753 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 implements MinecraftSeriali
@@ -114,19 +123,12 @@ index 2eabaaeba2..04f754d2c1 100644
protected int b;
protected int c;
protected int d;
- // Paper start
+
@Override
public boolean isValidLocation() {
return b >= -30000000 && d >= -30000000 && b < 30000000 && d < 30000000 && c >= 0 && c < 256;
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
public boolean isInvalidYLocation() {
return c < 0 || c >= 256;
}
-
+ */
// Paper end
+ // Paper end
public MutableBlockPosition() {
this(0, 0, 0);
}
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
}