Simplify composite generators

This commit is contained in:
Daniel Mills 2021-01-04 13:03:54 -05:00
parent a77c99d050
commit 64f27e7d39

View File

@ -502,13 +502,11 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
Hunk<BlockData> blocks = Hunk.view((ChunkData) tc); Hunk<BlockData> blocks = Hunk.view((ChunkData) tc);
Hunk<Biome> biomes = Hunk.view((BiomeGrid) tc); Hunk<Biome> biomes = Hunk.view((BiomeGrid) tc);
AtomicBoolean postMod = new AtomicBoolean(false); Hunk<BlockData> post = Hunk.newAtomicHunk(biomes.getWidth(), biomes.getHeight(), biomes.getDepth());
Hunk<BlockData> trk = Hunk.newAtomicHunk(biomes.getWidth(), biomes.getHeight(), biomes.getDepth());
Hunk<BlockData> post = trk.trackWrite(postMod);
compound.generate(x * 16, z * 16, blocks, post, biomes); compound.generate(x * 16, z * 16, blocks, post, biomes);
generated++; generated++;
return postMod.get() ? () -> blocks.insertSoftly(0,0,0, post, (b) -> b == null || B.isAirOrFluid(b)) : () -> {}; return () -> blocks.insertSoftly(0,0,0, post, (b) -> b == null || B.isAirOrFluid(b));
} }
@Override @Override