Eliminate ALL cascading worldgen lag, with the following changes:

- Offset structures by minus half their width in x/z (as well as the usual +8), so they can't ever spill out of the 2x2 chunk area being generated (provided they are less than 16 blocks wide, which mine are)
- Pass the block placement flags 16 | 2 to Template#addBlocksToWorld instead of just 2, to prevent neighbour updates
- Ignore unloaded blocks when removing floating trees (in theory there can't be trees there anyway)
This commit is contained in:
Electroblob77
2020-07-13 21:38:37 +01:00
parent ded4caca2f
commit 2e3df272ec
8 changed files with 20 additions and 14 deletions
@@ -62,7 +62,7 @@ public class WorldGenObelisk extends WorldGenSurfaceStructure {
ITemplateProcessor processor = (w, p, i) -> i.blockState.getBlock() instanceof BlockRunestone ? new Template.BlockInfo(
i.pos, i.blockState.withProperty(BlockRunestone.ELEMENT, element), i.tileentityData) : i;
template.addBlocksToWorld(world, origin, processor, settings, 2);
template.addBlocksToWorld(world, origin, processor, settings, 2 | 16);
WizardryAntiqueAtlasIntegration.markObelisk(world, origin.getX(), origin.getZ());