diff --git a/src/main/java/net/minecraft/src/Chunk.java b/src/main/java/net/minecraft/src/Chunk.java index 188aa6c..a587f96 100644 --- a/src/main/java/net/minecraft/src/Chunk.java +++ b/src/main/java/net/minecraft/src/Chunk.java @@ -59,7 +59,7 @@ public class Chunk { } public int getHeightValue(int var1, int var2) { - return this.heightMap[var2 << 4 | var1] & 255; + return this.heightMap[var2 << 4 | var1] & 0xff; } public void func_1014_a() { diff --git a/src/main/java/net/minecraft/src/NibbleArray.java b/src/main/java/net/minecraft/src/NibbleArray.java index 28a1f67..296940d 100644 --- a/src/main/java/net/minecraft/src/NibbleArray.java +++ b/src/main/java/net/minecraft/src/NibbleArray.java @@ -15,17 +15,21 @@ public class NibbleArray { int var4 = var1 << 11 | var3 << 7 | var2; int var5 = var4 >> 1; int var6 = var4 & 1; - return var6 == 0 ? this.data[var5] & 15 : this.data[var5] >> 4 & 15; + if (var6 == 0) { + return data[var5] & 0xf; + } else { + return data[var5] >> 4 & 0xf; + } } public void setNibble(int var1, int var2, int var3, int var4) { int var5 = var1 << 11 | var3 << 7 | var2; int var6 = var5 >> 1; int var7 = var5 & 1; - if(var7 == 0) { - this.data[var6] = (byte)(this.data[var6] & 240 | var4 & 15); + if (var7 == 0) { + data[var6] = (byte) (data[var6] & 0xf0 | var4 & 0xf); } else { - this.data[var6] = (byte)(this.data[var6] & 15 | (var4 & 15) << 4); + data[var6] = (byte) (data[var6] & 0xf | (var4 & 0xf) << 4); } }