public abstract class ChunkGenerator extends Object
| Modifier and Type | Field and Description |
|---|---|
protected BiomeSource |
biomeSource |
private ChunkGeneratorConfig |
config |
| Constructor and Description |
|---|
ChunkGenerator(BiomeSource biomeSource,
ChunkGeneratorConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
addStructureReferences(WorldAccess world,
StructureAccessor accessor,
Chunk chunk) |
abstract void |
buildSurface(ChunkRegion region,
Chunk chunk) |
void |
carve(long seed,
BiomeAccess access,
Chunk chunk,
GenerationStep.Carver carver) |
abstract ChunkGenerator |
create(long seed) |
void |
generateFeatures(ChunkRegion region,
StructureAccessor accessor) |
BiomeSource |
getBiomeSource() |
abstract BlockView |
getColumnSample(int x,
int z) |
ChunkGeneratorConfig |
getConfig() |
protected Biome |
getDecorationBiome(BiomeAccess biomeAccess,
BlockPos pos) |
List<Biome.SpawnEntry> |
getEntitySpawnList(Biome biome,
StructureAccessor accessor,
SpawnGroup group,
BlockPos pos) |
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() |
int |
getSpawnHeight() |
<C extends FeatureConfig> |
getStructureConfig(Biome biome,
StructureFeature<C> feature) |
boolean |
hasStructure(Biome biome,
StructureFeature<? extends FeatureConfig> feature) |
boolean |
hasStructure(StructureFeature<?> feature) |
BlockPos |
locateStructure(ServerWorld world,
String id,
BlockPos center,
int radius,
boolean skipExistingChunks) |
void |
populateBiomes(Chunk chunk) |
void |
populateEntities(ChunkRegion region) |
abstract void |
populateNoise(WorldAccess world,
StructureAccessor accessor,
Chunk chunk)
Generates the base shape of the chunk out of the basic block states as decided by this chunk generator's config.
|
void |
setStructureStarts(StructureAccessor accessor,
BiomeAccess biomeAccess,
Chunk chunk,
ChunkGenerator generator,
StructureManager manager,
long seed) |
void |
spawnEntities(ServerWorld world,
boolean spawnMonsters,
boolean spawnAnimals) |
protected final BiomeSource biomeSource
private final ChunkGeneratorConfig config
public ChunkGenerator(BiomeSource biomeSource, ChunkGeneratorConfig config)
@Environment(value=CLIENT) public abstract ChunkGenerator create(long seed)
public void populateBiomes(Chunk chunk)
protected Biome getDecorationBiome(BiomeAccess biomeAccess, BlockPos pos)
public void carve(long seed,
BiomeAccess access,
Chunk chunk,
GenerationStep.Carver carver)
@Nullable public BlockPos locateStructure(ServerWorld world, String id, BlockPos center, int radius, boolean skipExistingChunks)
public void generateFeatures(ChunkRegion region, StructureAccessor accessor)
public abstract void buildSurface(ChunkRegion region, Chunk chunk)
public void populateEntities(ChunkRegion region)
public ChunkGeneratorConfig getConfig()
public 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> feature)
public BiomeSource getBiomeSource()
public int getMaxY()
public List<Biome.SpawnEntry> getEntitySpawnList(Biome biome, StructureAccessor accessor, SpawnGroup group, BlockPos pos)
public void setStructureStarts(StructureAccessor accessor, BiomeAccess biomeAccess, Chunk chunk, ChunkGenerator generator, StructureManager manager, long seed)
public boolean hasStructure(StructureFeature<?> feature)
public void addStructureReferences(WorldAccess world, StructureAccessor accessor, Chunk chunk)
public abstract void populateNoise(WorldAccess world, StructureAccessor accessor, 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)