Even more patches for 1.14
This commit is contained in:
@@ -21,7 +21,7 @@ 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 4c7793f86d..cc17a414f5 100644
|
||||
index 7cb46d7a9..e96428bb2 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;
|
||||
@@ -79,40 +79,32 @@ index 4c7793f86d..cc17a414f5 100644
|
||||
|
||||
public BaseBlockPosition d(BaseBlockPosition baseblockposition) {
|
||||
return new BaseBlockPosition(this.getY() * baseblockposition.getZ() - this.getZ() * baseblockposition.getY(), this.getZ() * baseblockposition.getX() - this.getX() * baseblockposition.getZ(), this.getX() * baseblockposition.getY() - this.getY() * baseblockposition.getX());
|
||||
}
|
||||
|
||||
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.x, (double) baseblockposition.y, (double) baseblockposition.z, false) < d0 * d0; // Paper
|
||||
}
|
||||
|
||||
public boolean a(IPosition iposition, double d0) {
|
||||
@@ -0,0 +0,0 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
|
||||
}
|
||||
|
||||
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.x); // Paper
|
||||
+ float f1 = (float) Math.abs(baseblockposition.getY() - this.y); // Paper
|
||||
+ float f2 = (float) Math.abs(baseblockposition.getZ() - this.z); // Paper
|
||||
|
||||
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 80e13dfb2e..20cf9255ba 100644
|
||||
index 64700b97c..a5e5a4eba 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 {
|
||||
if (this.g == null) {
|
||||
this.g = new BlockPosition.MutableBlockPosition(i, j, k);
|
||||
return this.g;
|
||||
- } else if (this.g.b == l && this.g.c == i1 && this.g.d == j1) {
|
||||
+ } else if (this.g.x == l && this.g.y == i1 && this.g.z == j1) {
|
||||
return (BlockPosition.MutableBlockPosition) this.endOfData();
|
||||
} else {
|
||||
- if (this.g.b < l) {
|
||||
- ++this.g.b;
|
||||
- } else if (this.g.c < i1) {
|
||||
- this.g.b = i; // Paper - decompile fix Readd line removed by the decompiler
|
||||
- ++this.g.c;
|
||||
- } else if (this.g.d < j1) {
|
||||
- this.g.b = i; // Paper - decompile fix Readd line removed by the decompiler
|
||||
- this.g.c = j; // Paper - decompile fix Readd line removed by the decompiler
|
||||
- ++this.g.d;
|
||||
+ if (this.g.x < l) {
|
||||
+ ++this.g.x;
|
||||
+ } else if (this.g.y < i1) {
|
||||
+ this.g.x = i; // Paper - decompile fix Readd line removed by the decompiler
|
||||
+ ++this.g.y;
|
||||
+ } else if (this.g.z < j1) {
|
||||
+ this.g.x = i; // Paper - decompile fix Readd line removed by the decompiler
|
||||
+ this.g.y = j; // Paper - decompile fix Readd line removed by the decompiler
|
||||
+ ++this.g.z;
|
||||
}
|
||||
|
||||
return this.g;
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
||||
}
|
||||
|
||||
public static class MutableBlockPosition extends BlockPosition {
|
||||
@@ -127,7 +119,7 @@ index 80e13dfb2e..20cf9255ba 100644
|
||||
@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 {
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
||||
public boolean isInvalidYLocation() {
|
||||
return c < 0 || c >= 256;
|
||||
}
|
||||
@@ -135,7 +127,7 @@ index 80e13dfb2e..20cf9255ba 100644
|
||||
// Paper end
|
||||
|
||||
public MutableBlockPosition() {
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
||||
}
|
||||
|
||||
public MutableBlockPosition(int i, int j, int k) {
|
||||
@@ -150,26 +142,27 @@ index 80e13dfb2e..20cf9255ba 100644
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
public BlockPosition a(double d0, double d1, double d2) {
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
return super.a(enumblockrotation).h();
|
||||
public MutableBlockPosition(double d0, double d1, double d2) {
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
||||
return super.a(enumblockrotation).immutableCopy();
|
||||
}
|
||||
|
||||
+
|
||||
+ /*
|
||||
+ // Paper start - use parent getters
|
||||
@Override
|
||||
public int getX() {
|
||||
return this.b;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
||||
@Override
|
||||
public int getZ() {
|
||||
return this.d;
|
||||
- }
|
||||
+ }*/
|
||||
+ // Paper end
|
||||
|
||||
public BlockPosition.MutableBlockPosition setValues(int i, int j, int k) { return c(i, j, k);} // Paper - OBFHELPER
|
||||
public BlockPosition.MutableBlockPosition c(int i, int j, int k) {
|
||||
public BlockPosition.MutableBlockPosition setValues(int i, int j, int k) { return d(i, j, k);} // Paper - OBFHELPER
|
||||
public BlockPosition.MutableBlockPosition d(int i, int j, int k) {
|
||||
- this.b = i;
|
||||
- this.c = j;
|
||||
- this.d = k;
|
||||
@@ -181,17 +174,17 @@ index 80e13dfb2e..20cf9255ba 100644
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
||||
}
|
||||
|
||||
public BlockPosition.MutableBlockPosition c(EnumDirection enumdirection, int i) {
|
||||
- return this.c(this.b + enumdirection.getAdjacentX() * i, this.c + enumdirection.getAdjacentY() * i, this.d + enumdirection.getAdjacentZ() * i);
|
||||
+ return this.c(x + enumdirection.getAdjacentX() * i, y + enumdirection.getAdjacentY() * i, z + enumdirection.getAdjacentZ() * i); // Paper - use xyz
|
||||
- return this.d(this.b + enumdirection.getAdjacentX() * i, this.c + enumdirection.getAdjacentY() * i, this.d + enumdirection.getAdjacentZ() * i);
|
||||
+ return this.d(this.x + enumdirection.getAdjacentX() * i, this.y + enumdirection.getAdjacentY() * i, this.z + enumdirection.getAdjacentZ() * i);
|
||||
}
|
||||
|
||||
public BlockPosition.MutableBlockPosition d(int i, int j, int k) {
|
||||
- return this.c(this.b + i, this.c + j, this.d + k);
|
||||
+ return this.c(x + i, y + j, z + k); // Paper - use xyz
|
||||
public BlockPosition.MutableBlockPosition e(int i, int j, int k) {
|
||||
- return this.d(this.b + i, this.c + j, this.d + k);
|
||||
+ return this.d(this.x + i, this.y + j, this.z + k);
|
||||
}
|
||||
|
||||
public void p(int i) {
|
||||
@@ -199,5 +192,5 @@ index 80e13dfb2e..20cf9255ba 100644
|
||||
+ this.y = i; // Paper change to y
|
||||
}
|
||||
|
||||
public BlockPosition toBlockPosition() { return h(); } // Paper - OBFHELPER
|
||||
@Override
|
||||
--
|
||||
Reference in New Issue
Block a user