2021-01-03 07:21:15 +00:00
|
|
|
package dev.plex.world;
|
2020-10-31 04:51:22 +00:00
|
|
|
|
2020-11-06 01:29:38 +00:00
|
|
|
import java.util.Arrays;
|
|
|
|
import java.util.List;
|
2020-10-31 04:51:22 +00:00
|
|
|
import org.bukkit.World;
|
|
|
|
import org.bukkit.generator.BlockPopulator;
|
|
|
|
import org.bukkit.generator.ChunkGenerator;
|
|
|
|
|
|
|
|
public abstract class CustomChunkGenerator extends ChunkGenerator
|
|
|
|
{
|
|
|
|
protected int height;
|
|
|
|
private final List<BlockPopulator> populators;
|
|
|
|
|
|
|
|
protected CustomChunkGenerator(int height, BlockPopulator... populators)
|
|
|
|
{
|
|
|
|
this.height = height;
|
|
|
|
this.populators = Arrays.asList(populators);
|
|
|
|
}
|
|
|
|
|
|
|
|
public List<BlockPopulator> getDefaultPopulators(World world)
|
|
|
|
{
|
|
|
|
return populators;
|
|
|
|
}
|
|
|
|
|
|
|
|
public abstract void createLoopChunkData(int x, int y, int z, ChunkData chunk);
|
|
|
|
}
|