Do some things

This commit is contained in:
PeytonPlayz595 2024-03-27 22:40:31 -04:00
parent 8a5c76abcc
commit 520e11d10b
2 changed files with 9 additions and 5 deletions

View File

@ -59,7 +59,7 @@ public class Chunk {
} }
public int getHeightValue(int var1, int var2) { 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() { public void func_1014_a() {

View File

@ -15,7 +15,11 @@ public class NibbleArray {
int var4 = var1 << 11 | var3 << 7 | var2; int var4 = var1 << 11 | var3 << 7 | var2;
int var5 = var4 >> 1; int var5 = var4 >> 1;
int var6 = 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) { public void setNibble(int var1, int var2, int var3, int var4) {
@ -23,9 +27,9 @@ public class NibbleArray {
int var6 = var5 >> 1; int var6 = var5 >> 1;
int var7 = var5 & 1; int var7 = var5 & 1;
if (var7 == 0) { if (var7 == 0) {
this.data[var6] = (byte)(this.data[var6] & 240 | var4 & 15); data[var6] = (byte) (data[var6] & 0xf0 | var4 & 0xf);
} else { } else {
this.data[var6] = (byte)(this.data[var6] & 15 | (var4 & 15) << 4); data[var6] = (byte) (data[var6] & 0xf | (var4 & 0xf) << 4);
} }
} }