mirror of
https://github.com/plexusorg/Plex.git
synced 2025-07-05 00:56:42 +00:00
tttt
This commit is contained in:
29
src/main/java/dev/plex/world/FlatChunkGenerator.java
Normal file
29
src/main/java/dev/plex/world/FlatChunkGenerator.java
Normal file
@ -0,0 +1,29 @@
|
||||
package dev.plex.world;
|
||||
|
||||
import java.util.Random;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.generator.BlockPopulator;
|
||||
|
||||
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);
|
||||
}
|
Reference in New Issue
Block a user