diff --git a/core/src/main/java/art/arcane/iris/generation/stage/IrisCarveModifier.java b/core/src/main/java/art/arcane/iris/generation/stage/IrisCarveModifier.java index 5034b3d74..64bf27b3e 100644 --- a/core/src/main/java/art/arcane/iris/generation/stage/IrisCarveModifier.java +++ b/core/src/main/java/art/arcane/iris/generation/stage/IrisCarveModifier.java @@ -903,8 +903,9 @@ public class IrisCarveModifier extends EngineAssignedModifier int worldX = blockX + localX; int worldZ = blockZ + localZ; int floor = -1; + int top = extent == null ? height - 1 : extent.highestStoredY(localX, localZ); for (int y = 1; y < height; y++) { - if (extent != null && y > extent.highestStoredY(localX, localZ)) { + if (y > top) { break; } NativeBlockState state = output.getRaw(localX, y, localZ); @@ -927,6 +928,9 @@ public class IrisCarveModifier extends EngineAssignedModifier worldX, worldZ, resolver, caveBiomes, customBiomes); decorateZone(output, zone, localX, localZ, worldX, worldZ, floorBiome, ceilingBiome); + if (extent != null) { + top = extent.highestStoredY(localX, localZ); + } } floor = -1; }