@@ -254,9 +254,9 @@ public class BlockPosition extends BaseBlockPosition {
}
// Paper end
- this.b.b = i;
- this.b.c = j;
- this.b.d = k;
+ ((BaseBlockPosition) this.b).a = i;
+ ((BaseBlockPosition) this.b).b = j;
+ ((BaseBlockPosition) this.b).c = k;
return this.b;
}
}
@@ -370,6 +370,8 @@ public class BlockPosition extends BaseBlockPosition {
public static class MutableBlockPosition extends BlockPosition {
+ // Paper start - Remove variables
+ /*
protected int b;
protected int c;
protected int d;
@@ -382,6 +384,7 @@ public class BlockPosition extends BaseBlockPosition {
public boolean isInvalidYLocation() {
return c < 0 || c >= 256;
}
+ */
// Paper end
public MutableBlockPosition() {
@@ -394,9 +397,11 @@ public class BlockPosition extends BaseBlockPosition {
public MutableBlockPosition(int i, int j, int k) {
super(0, 0, 0);
- this.b = i;
- this.c = j;
- this.d = k;
+ // Paper start - Modify base position variables
+ ((BaseBlockPosition) this).a = i;
+ ((BaseBlockPosition) this).b = j;
+ ((BaseBlockPosition) this).c = k;
+ // Paper end
}
public BlockPosition a(double d0, double d1, double d2) {
@@ -415,6 +420,8 @@ public class BlockPosition extends BaseBlockPosition {
return super.a(enumblockrotation).h();
}
+ // Paper start - Use superclass methods
+ /*
public int getX() {
return this.b;
}
@@ -426,12 +433,16 @@ public class BlockPosition extends BaseBlockPosition {
public int getZ() {
return this.d;
}
+ */
+ // Paper end
public void setValues(int x, int y, int z) { c(x, y, z); } // Paper - OBFHELPER
public BlockPosition.MutableBlockPosition c(int i, int j, int k) {
- this.b = i;
- this.c = j;
- this.d = k;
+ // Paper start - Modify base position variables
+ ((BaseBlockPosition) this).a = i;
+ ((BaseBlockPosition) this).b = j;
+ ((BaseBlockPosition) this).c = k;
+ // Paper end
return this;
}
@@ -448,11 +459,11 @@ public class BlockPosition extends BaseBlockPosition {
}
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(this.getX() + enumdirection.getAdjacentX() * i, this.getY() + enumdirection.getAdjacentY() * i, this.getZ() + enumdirection.getAdjacentZ() * i); // Paper - USE THE BLEEPING GETTERS
}
public void p(int i) {
- this.c = i;
+ ((BaseBlockPosition) this).b = i; // Paper - Modify base variable