Add FixChunk command

This commit is contained in:
dfsek
2020-10-10 18:58:29 -07:00
parent 8e1dd75ae9
commit c91d2a46ed
4 changed files with 53 additions and 2 deletions

View File

@@ -17,6 +17,7 @@ import com.dfsek.terra.population.TreePopulator;
import com.dfsek.terra.structure.StructureSpawnRequirement;
import com.dfsek.terra.util.DataUtil;
import org.bukkit.Bukkit;
import org.bukkit.Chunk;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.BlockFace;
@@ -156,6 +157,11 @@ public class TerraChunkGenerator extends GaeaChunkGenerator {
}
}
public static synchronized void fixChunk(Chunk c) {
if(!(c.getWorld().getGenerator() instanceof TerraChunkGenerator)) throw new IllegalArgumentException();
popMap.get(c.getWorld()).checkNeighbors(c.getX(), c.getZ(), c.getWorld());
}
@Override
public int getNoiseOctaves(World world) {
return 4;