fixed uhoh

This commit is contained in:
mcrcortex
2024-08-08 19:46:39 +10:00
parent 15391a6f91
commit 7f25f5ff5d

View File

@@ -204,12 +204,6 @@ public final class WorldSection {
} }
public int addNonEmptyBlockCount(int delta) { public int addNonEmptyBlockCount(int delta) {
if (VERIFY_WORLD_SECTION_EXECUTION) {
if (this.lvl != 0) {
throw new IllegalStateException("Tried updating a level 0 lod when its not level 0: " + WorldEngine.pprintPos(this.key));
}
}
int count = ((int)NON_EMPTY_BLOCK_HANDLE.getAndAdd(this, delta)) + delta; int count = ((int)NON_EMPTY_BLOCK_HANDLE.getAndAdd(this, delta)) + delta;
if (VERIFY_WORLD_SECTION_EXECUTION) { if (VERIFY_WORLD_SECTION_EXECUTION) {
if (count < 0) { if (count < 0) {
@@ -220,6 +214,11 @@ public final class WorldSection {
} }
public boolean updateLvl0State() { public boolean updateLvl0State() {
if (VERIFY_WORLD_SECTION_EXECUTION) {
if (this.lvl != 0) {
throw new IllegalStateException("Tried updating a level 0 lod when its not level 0: " + WorldEngine.pprintPos(this.key));
}
}
byte prev, next; byte prev, next;
do { do {
prev = this.getNonEmptyChildren(); prev = this.getNonEmptyChildren();