9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-19 15:09:18 +00:00

fix wrong radius when marking mantle chunks as completed

This commit is contained in:
Julian Krings
2025-11-06 22:25:37 +01:00
parent 5330ddc4ec
commit 65aa95f2a5

View File

@@ -22,6 +22,7 @@ interface MatterGenerator {
val engine: Engine val engine: Engine
val mantle: Mantle val mantle: Mantle
val radius: Int val radius: Int
val realRadius: Int
val components: List<Pair<List<MantleComponent>, Int>> val components: List<Pair<List<MantleComponent>, Int>>
@ChunkCoordinates @ChunkCoordinates
@@ -39,12 +40,12 @@ interface MatterGenerator {
}, { (x, z, c) -> launch(multicore) { }, { (x, z, c) -> launch(multicore) {
acquireChunk(multicore, writer, x, z) acquireChunk(multicore, writer, x, z)
.raiseFlagSuspend(MantleFlag.PLANNED, c.flag) { .raiseFlagSuspend(MantleFlag.PLANNED, c.flag) {
if (c.isEnabled) c.generateLayer(writer, x, z, context) c.generateLayer(writer, x, z, context)
} }
}}) }})
} }
radius(x, z, radius, { x, z -> radius(x, z, realRadius, { x, z ->
emit(Pair(x, z)) emit(Pair(x, z))
}, { }, {
writer.acquireChunk(it.a, it.b) writer.acquireChunk(it.a, it.b)