Hoist cave scan column top

- read the column top once per column and again only after zone decoration writes
This commit is contained in:
Brian Neumann-Fopiano committed 2026-09-28 11:57:02 -04:00
1 parent 34f00d86cf
commit dcdda0d3c7
1 file changed
+5 -1
@@ -903,8 +903,9 @@ public class IrisCarveModifier extends EngineAssignedModifier<NativeBlockState>
int worldX = blockX + localX; int worldX = blockX + localX;
int worldZ = blockZ + localZ; int worldZ = blockZ + localZ;
int floor = -1; int floor = -1;
int top = extent == null ? height - 1 : extent.highestStoredY(localX, localZ);
for (int y = 1; y < height; y++) { for (int y = 1; y < height; y++) {
if (extent != null && y > extent.highestStoredY(localX, localZ)) { if (y > top) {
break; break;
} }
NativeBlockState state = output.getRaw(localX, y, localZ); NativeBlockState state = output.getRaw(localX, y, localZ);
@@ -927,6 +928,9 @@ public class IrisCarveModifier extends EngineAssignedModifier<NativeBlockState>
worldX, worldZ, resolver, caveBiomes, customBiomes); worldX, worldZ, resolver, caveBiomes, customBiomes);
decorateZone(output, zone, localX, localZ, worldX, worldZ, decorateZone(output, zone, localX, localZ, worldX, worldZ,
floorBiome, ceilingBiome); floorBiome, ceilingBiome);
if (extent != null) {
top = extent.highestStoredY(localX, localZ);
}
} }
floor = -1; floor = -1;
} }