Plex/src/main/java/dev/plex/world/FlatChunkGenerator.java

30 lines
792 B
Java
Raw Normal View History

2021-01-03 07:21:15 +00:00
package dev.plex.world;
2020-10-31 04:51:22 +00:00
import org.bukkit.World;
import org.bukkit.generator.BlockPopulator;
2022-01-04 03:04:39 +00:00
import java.util.Random;
2020-10-31 04:51:22 +00:00
public abstract class FlatChunkGenerator extends CustomChunkGenerator
{
public FlatChunkGenerator(int height, BlockPopulator... populators)
{
super(height, populators);
}
@Override
public ChunkData generateChunkData(World world, Random random, int x, int z, BiomeGrid biome)
{
ChunkData chunk = this.createChunkData(world);
for (int xx = 0; xx < 16; xx++)
{
for (int zz = 0; zz < 16; zz++)
{
createLoopChunkData(xx, height, zz, chunk);
}
}
return chunk;
}
public abstract void createLoopChunkData(int x, int y, int z, ChunkData chunk);
}