Skip to content

Commit 95511d1

Browse files
committed
make structure check ignore unloaded chunks instead of failing if structure is already correctly formed
1 parent 850af25 commit 95511d1

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

src/main/java/com/gtnewhorizon/structurelib/structure/IStructureDefinition.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,20 +204,17 @@ static <T> boolean iterate(T object, ItemStack trigger, IStructureElement<T>[] e
204204
return false;
205205
}
206206
} else {
207-
val keepScanning = callBack.onElementScan(xyz[0], xyz[1], xyz[2],
208-
abc[0], abc[1], abc[2],
209-
world, object, element, false);
207+
//structure was previous already good but here we saw a unloaded chunk don't fail it here
208+
callBack.onElementScan(xyz[0], xyz[1], xyz[2],
209+
abc[0], abc[1], abc[2],
210+
world, object, element, false);
210211
if (DEBUG_MODE) {
211212
StructureLib.LOGGER.info("Multi [{}, {}, {}] !blockExists @ {} {}",
212213
basePositionX, basePositionY, basePositionZ,
213214
Arrays.toString(xyz),
214215
Arrays.toString(abc));
215216

216217
}
217-
218-
if (!keepScanning) {
219-
return false;
220-
}
221218
}
222219
abc[0] += 1;
223220
}

0 commit comments

Comments
 (0)