2021-01-03 07:21:15 +00:00
|
|
|
package dev.plex.world;
|
2020-10-31 04:51:22 +00:00
|
|
|
|
2022-01-27 21:23:01 +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
|
|
|
|
{
|
|
|
|
private final List<BlockPopulator> populators;
|
2022-02-26 06:26:42 +00:00
|
|
|
protected int height;
|
2020-10-31 04:51:22 +00:00
|
|
|
|
|
|
|
protected CustomChunkGenerator(int height, BlockPopulator... populators)
|
|
|
|
{
|
|
|
|
this.height = height;
|
|
|
|
this.populators = Arrays.asList(populators);
|
|
|
|
}
|
|
|
|
|
2022-03-19 09:38:09 +00:00
|
|
|
@Override
|
2020-10-31 04:51:22 +00:00
|
|
|
public List<BlockPopulator> getDefaultPopulators(World world)
|
|
|
|
{
|
|
|
|
return populators;
|
|
|
|
}
|
|
|
|
|
|
|
|
public abstract void createLoopChunkData(int x, int y, int z, ChunkData chunk);
|
|
|
|
}
|