public abstract class ChunkGenerator<C extends ChunkGeneratorConfig> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected BiomeSource |
biomeSource |
protected C |
config |
protected long |
seed |
protected IWorld |
world |
| Constructor and Description |
|---|
ChunkGenerator(IWorld world,
BiomeSource biomeSource,
C config) |
| Modifier and Type | Method and Description |
|---|---|
void |
addStructureReferences(IWorld world,
StructureAccessor structureAccessor,
Chunk chunk) |
abstract void |
buildSurface(ChunkRegion region,
Chunk chunk) |
void |
carve(BiomeAccess biomeAccess,
Chunk chunk,
GenerationStep.Carver carver) |
void |
generateFeatures(ChunkRegion chunkRegion,
StructureAccessor structureAccessor) |
BiomeSource |
getBiomeSource() |
abstract BlockView |
getColumnSample(int x,
int z) |
C |
getConfig() |
protected Biome |
getDecorationBiome(BiomeAccess biomeAccess,
BlockPos pos) |
List<Biome.SpawnEntry> |
getEntitySpawnList(StructureAccessor structureAccessor,
EntityCategory entityCategory,
BlockPos blockPos) |
abstract int |
getHeight(int x,
int z,
Heightmap.Type heightmapType) |
int |
getHeightInGround(int x,
int z,
Heightmap.Type heightmapType) |
int |
getHeightOnGround(int x,
int z,
Heightmap.Type heightmapType) |
int |
getMaxY() |
int |
getSeaLevel() |
long |
getSeed() |
abstract int |
getSpawnHeight() |
<C extends FeatureConfig> |
getStructureConfig(Biome biome,
StructureFeature<C> structureFeature) |
boolean |
hasStructure(Biome biome,
StructureFeature<? extends FeatureConfig> feature) |
BlockPos |
locateStructure(ServerWorld serverWorld,
String id,
BlockPos center,
int radius,
boolean skipExistingChunks) |
void |
populateBiomes(Chunk chunk) |
void |
populateEntities(ChunkRegion region) |
abstract void |
populateNoise(IWorld world,
StructureAccessor structureAccessor,
Chunk chunk) |
void |
setStructureStarts(StructureAccessor structureAccessor,
BiomeAccess biomeAccess,
Chunk chunk,
ChunkGenerator<?> chunkGenerator,
StructureManager structureManager) |
void |
spawnEntities(ServerWorld world,
boolean spawnMonsters,
boolean spawnAnimals) |
protected final IWorld world
protected final long seed
protected final BiomeSource biomeSource
protected final C extends ChunkGeneratorConfig config
public ChunkGenerator(IWorld world, BiomeSource biomeSource, C config)
public void populateBiomes(Chunk chunk)
protected Biome getDecorationBiome(BiomeAccess biomeAccess, BlockPos pos)
public void carve(BiomeAccess biomeAccess, Chunk chunk, GenerationStep.Carver carver)
@Nullable public BlockPos locateStructure(ServerWorld serverWorld, String id, BlockPos center, int radius, boolean skipExistingChunks)
public void generateFeatures(ChunkRegion chunkRegion, StructureAccessor structureAccessor)
public abstract void buildSurface(ChunkRegion region, Chunk chunk)
public void populateEntities(ChunkRegion region)
public C getConfig()
public abstract int getSpawnHeight()
public void spawnEntities(ServerWorld world, boolean spawnMonsters, boolean spawnAnimals)
public boolean hasStructure(Biome biome, StructureFeature<? extends FeatureConfig> feature)
@Nullable public <C extends FeatureConfig> C getStructureConfig(Biome biome, StructureFeature<C> structureFeature)
public BiomeSource getBiomeSource()
public long getSeed()
public int getMaxY()
public List<Biome.SpawnEntry> getEntitySpawnList(StructureAccessor structureAccessor, EntityCategory entityCategory, BlockPos blockPos)
public void setStructureStarts(StructureAccessor structureAccessor, BiomeAccess biomeAccess, Chunk chunk, ChunkGenerator<?> chunkGenerator, StructureManager structureManager)
public void addStructureReferences(IWorld world, StructureAccessor structureAccessor, Chunk chunk)
public abstract void populateNoise(IWorld world, StructureAccessor structureAccessor, Chunk chunk)
public int getSeaLevel()
public abstract int getHeight(int x,
int z,
Heightmap.Type heightmapType)
public abstract BlockView getColumnSample(int x, int z)
public int getHeightOnGround(int x,
int z,
Heightmap.Type heightmapType)
public int getHeightInGround(int x,
int z,
Heightmap.Type heightmapType)