Sync gen of engines

This commit is contained in:
Daniel Mills 2021-01-01 19:07:29 -05:00
parent a921845ae3
commit 70fef94d15

View File

@ -242,32 +242,17 @@ public class IrisEngineCompound implements EngineCompound {
} }
cbiome.set(engine.getTarget().isInverted() ? cbiome.get().invertY() : cbiome.get()); cbiome.set(engine.getTarget().isInverted() ? cbiome.get().invertY() : cbiome.get());
e.queue(() -> { engine.generate(x, z, cblock.get(), cpblock.get(), cbiome.get());
engine.generate(x, z, cblock.get(), cpblock.get(), cbiome.get()); blocks.insert(0, doffset, 0, cblock.get());
synchronized (insert)
{
insert[index.get()] = () -> {
blocks.insert(0, doffset, 0, cblock.get());
if(structures) if(structures)
{ {
postblocks.insert(0, doffset, 0, cpblock.get()); postblocks.insert(0, doffset, 0, cpblock.get());
} }
biomes.insert(0, doffset, 0, cbiome.get());
};
}
});
biomes.insert(0, doffset, 0, cbiome.get());
offset += height; offset += height;
} }
e.complete();
for(i = 0; i < insert.length; i++)
{
insert[i].run();
}
} }
wallClock.put(p.getMilliseconds()); wallClock.put(p.getMilliseconds());