Package net.minecraft.world.gen.chunk
Class ChunkGenerator
java.lang.Object
net.minecraft.world.gen.chunk.ChunkGenerator
- Direct Known Subclasses:
DebugChunkGenerator,FlatChunkGenerator,SurfaceChunkGenerator
public abstract class ChunkGenerator extends Object
In charge of shaping, adding biome specific surface blocks, and carving chunks,
as well as populating the generated chunks with features and entities.
Biome placement starts here, however all vanilla and most modded chunk generators delegate this to a biome source.
-
Field Summary
Fields Modifier and Type Field Description protected BiomeSourcebiomeSourceprivate StructuresConfigconfigstatic com.mojang.serialization.Codec<ChunkGenerator>field_24746protected BiomeSourcefield_24747private longfield_24748private List<ChunkPos>field_24749 -
Constructor Summary
Constructors Constructor Description ChunkGenerator(BiomeSource biomeSource, BiomeSource biomeSource2, StructuresConfig structuresConfig, long long2)ChunkGenerator(BiomeSource biomeSource, StructuresConfig structuresConfig) -
Method Summary
Modifier and Type Method Description voidaddStructureReferences(WorldAccess world, StructureAccessor accessor, Chunk chunk)abstract voidbuildSurface(ChunkRegion region, Chunk chunk)voidcarve(long seed, BiomeAccess access, Chunk chunk, GenerationStep.Carver carver)voidgenerateFeatures(ChunkRegion region, StructureAccessor accessor)BiomeSourcegetBiomeSource()abstract BlockViewgetColumnSample(int x, int z)StructuresConfiggetConfig()List<Biome.SpawnEntry>getEntitySpawnList(Biome biome, StructureAccessor accessor, SpawnGroup group, BlockPos pos)abstract intgetHeight(int x, int z, Heightmap.Type heightmapType)intgetHeightInGround(int x, int z, Heightmap.Type heightmapType)intgetHeightOnGround(int x, int z, Heightmap.Type heightmapType)intgetMaxY()intgetSeaLevel()intgetSpawnHeight()BlockPoslocateStructure(ServerWorld world, StructureFeature<?> feature, BlockPos center, int radius, boolean skipExistingChunks)protected abstract com.mojang.serialization.Codec<? extends ChunkGenerator>method_28506()booleanmethod_28507(ChunkPos chunkPos)private voidmethod_28508(ConfiguredStructureFeature<?,?> configuredStructureFeature, StructureAccessor structureAccessor, Chunk chunk, StructureManager structureManager, long long2, ChunkPos chunkPos, Biome biome)private voidmethod_28509()voidpopulateBiomes(Chunk chunk)voidpopulateEntities(ChunkRegion region)abstract voidpopulateNoise(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.voidsetStructureStarts(StructureAccessor structureAccessor, Chunk chunk, StructureManager structureManager, long long2)abstract ChunkGeneratorwithSeed(long seed)
-
Field Details
-
field_24746
-
biomeSource
-
field_24747
-
config
-
field_24748
private final long field_24748 -
field_24749
-
-
Constructor Details
-
ChunkGenerator
-
ChunkGenerator
public ChunkGenerator(BiomeSource biomeSource, BiomeSource biomeSource2, StructuresConfig structuresConfig, long long2)
-
-
Method Details
-
method_28509
private void method_28509() -
method_28506
-
withSeed
-
populateBiomes
-
carve
-
locateStructure
@Nullable public BlockPos locateStructure(ServerWorld world, StructureFeature<?> feature, BlockPos center, int radius, boolean skipExistingChunks) -
generateFeatures
-
buildSurface
-
populateEntities
-
getConfig
-
getSpawnHeight
public int getSpawnHeight() -
getBiomeSource
-
getMaxY
public int getMaxY() -
getEntitySpawnList
public List<Biome.SpawnEntry> getEntitySpawnList(Biome biome, StructureAccessor accessor, SpawnGroup group, BlockPos pos) -
setStructureStarts
public void setStructureStarts(StructureAccessor structureAccessor, Chunk chunk, StructureManager structureManager, long long2) -
method_28508
private void method_28508(ConfiguredStructureFeature<?,?> configuredStructureFeature, StructureAccessor structureAccessor, Chunk chunk, StructureManager structureManager, long long2, ChunkPos chunkPos, Biome biome) -
addStructureReferences
-
populateNoise
Generates the base shape of the chunk out of the basic block states as decided by this chunk generator's config. -
getSeaLevel
public int getSeaLevel() -
getHeight
-
getColumnSample
-
getHeightOnGround
-
getHeightInGround
-
method_28507
-