Package net.minecraft.world.level.chunk
Class ChunkGenerator
java.lang.Object
net.minecraft.world.level.chunk.ChunkGenerator
- Direct Known Subclasses:
DebugLevelSource
,FlatLevelSource
,NoiseBasedChunkGenerator
-
Field Summary
Modifier and TypeFieldDescriptionprotected final BiomeSource
static final com.mojang.serialization.Codec
<ChunkGenerator> private final Supplier
<List<FeatureSorter.StepFeatureData>> private final Function
<Holder<Biome>, BiomeGenerationSettings> -
Constructor Summary
ConstructorDescriptionChunkGenerator
(BiomeSource p_256133_) ChunkGenerator
(BiomeSource p_255838_, Function<Holder<Biome>, BiomeGenerationSettings> p_256216_) -
Method Summary
Modifier and TypeMethodDescriptionabstract void
addDebugScreenInfo
(List<String> p_223175_, RandomState p_223176_, BlockPos p_223177_) void
applyBiomeDecoration
(WorldGenLevel p_223087_, ChunkAccess p_223088_, StructureManager p_223089_) abstract void
applyCarvers
(WorldGenRegion p_223043_, long p_223044_, RandomState p_223045_, BiomeManager p_223046_, StructureManager p_223047_, ChunkAccess p_223048_, GenerationStep.Carving p_223049_) abstract void
buildSurface
(WorldGenRegion p_223050_, StructureManager p_223051_, RandomState p_223052_, ChunkAccess p_223053_) protected abstract com.mojang.serialization.MapCodec
<? extends ChunkGenerator> codec()
createBiomes
(Executor p_223159_, RandomState p_223160_, Blender p_223161_, StructureManager p_223162_, ChunkAccess p_223163_) void
createReferences
(WorldGenLevel p_223077_, StructureManager p_223078_, ChunkAccess p_223079_) createState
(HolderLookup<StructureSet> p_256405_, RandomState p_256101_, long p_256018_) void
createStructures
(RegistryAccess p_255835_, ChunkGeneratorStructureState p_256505_, StructureManager p_255934_, ChunkAccess p_255767_, StructureTemplateManager p_255832_) private static int
fetchReferences
(StructureManager p_223055_, ChunkAccess p_223056_, SectionPos p_223057_, Structure p_223058_) abstract CompletableFuture
<ChunkAccess> fillFromNoise
(Executor p_223209_, Blender p_223210_, RandomState p_223211_, StructureManager p_223212_, ChunkAccess p_223213_) findNearestMapStructure
(ServerLevel p_223038_, HolderSet<Structure> p_223039_, BlockPos p_223040_, int p_223041_, boolean p_223042_) abstract NoiseColumn
getBaseColumn
(int p_223028_, int p_223029_, LevelHeightAccessor p_223030_, RandomState p_223031_) abstract int
getBaseHeight
(int p_223032_, int p_223033_, Heightmap.Types p_223034_, LevelHeightAccessor p_223035_, RandomState p_223036_) getBiomeGenerationSettings
(Holder<Biome> p_223132_) Deprecated.int
getFirstFreeHeight
(int p_223222_, int p_223223_, Heightmap.Types p_223224_, LevelHeightAccessor p_223225_, RandomState p_223226_) int
getFirstOccupiedHeight
(int p_223236_, int p_223237_, Heightmap.Types p_223238_, LevelHeightAccessor p_223239_, RandomState p_223240_) abstract int
abstract int
getMinY()
getMobsAt
(Holder<Biome> p_223134_, StructureManager p_223135_, MobCategory p_223136_, BlockPos p_223137_) getNearestGeneratedStructure
(Set<Holder<Structure>> p_223182_, ServerLevel p_223183_, StructureManager p_223184_, BlockPos p_223185_, boolean p_223186_, ConcentricRingsStructurePlacement p_223187_) getNearestGeneratedStructure
(Set<Holder<Structure>> p_223189_, LevelReader p_223190_, StructureManager p_223191_, int p_223192_, int p_223193_, int p_223194_, boolean p_223195_, long p_223196_, RandomSpreadStructurePlacement p_223197_) abstract int
int
getSpawnHeight
(LevelHeightAccessor p_156157_) getStructureGeneratingAt
(Set<Holder<Structure>> p_223199_, LevelReader p_223200_, StructureManager p_223201_, boolean p_223202_, StructurePlacement p_223203_, ChunkPos p_223204_) Optional
<ResourceKey<com.mojang.serialization.MapCodec<? extends ChunkGenerator>>> private static BoundingBox
getWritableArea
(ChunkAccess p_187718_) void
abstract void
spawnOriginalMobs
(WorldGenRegion p_62167_) private static boolean
tryAddReference
(StructureManager p_223060_, StructureStart p_223061_) private boolean
tryGenerateStructure
(StructureSet.StructureSelectionEntry p_223105_, StructureManager p_223106_, RegistryAccess p_223107_, RandomState p_223108_, StructureTemplateManager p_223109_, long p_223110_, ChunkAccess p_223111_, ChunkPos p_223112_, SectionPos p_223113_) void
validate()
-
Field Details
-
CODEC
-
biomeSource
-
featuresPerStep
-
generationSettingsGetter
-
-
Constructor Details
-
ChunkGenerator
-
ChunkGenerator
public ChunkGenerator(BiomeSource p_255838_, Function<Holder<Biome>, BiomeGenerationSettings> p_256216_)
-
-
Method Details
-
refreshFeaturesPerStep
@Internal public void refreshFeaturesPerStep() -
validate
public void validate() -
codec
-
createState
public ChunkGeneratorStructureState createState(HolderLookup<StructureSet> p_256405_, RandomState p_256101_, long p_256018_) -
getTypeNameForDataFixer
public Optional<ResourceKey<com.mojang.serialization.MapCodec<? extends ChunkGenerator>>> getTypeNameForDataFixer() -
createBiomes
public CompletableFuture<ChunkAccess> createBiomes(Executor p_223159_, RandomState p_223160_, Blender p_223161_, StructureManager p_223162_, ChunkAccess p_223163_) -
applyCarvers
public abstract void applyCarvers(WorldGenRegion p_223043_, long p_223044_, RandomState p_223045_, BiomeManager p_223046_, StructureManager p_223047_, ChunkAccess p_223048_, GenerationStep.Carving p_223049_) -
findNearestMapStructure
-
getNearestGeneratedStructure
@Nullable private com.mojang.datafixers.util.Pair<BlockPos,Holder<Structure>> getNearestGeneratedStructure(Set<Holder<Structure>> p_223182_, ServerLevel p_223183_, StructureManager p_223184_, BlockPos p_223185_, boolean p_223186_, ConcentricRingsStructurePlacement p_223187_) -
getNearestGeneratedStructure
@Nullable private static com.mojang.datafixers.util.Pair<BlockPos,Holder<Structure>> getNearestGeneratedStructure(Set<Holder<Structure>> p_223189_, LevelReader p_223190_, StructureManager p_223191_, int p_223192_, int p_223193_, int p_223194_, boolean p_223195_, long p_223196_, RandomSpreadStructurePlacement p_223197_) -
getStructureGeneratingAt
@Nullable private static com.mojang.datafixers.util.Pair<BlockPos,Holder<Structure>> getStructureGeneratingAt(Set<Holder<Structure>> p_223199_, LevelReader p_223200_, StructureManager p_223201_, boolean p_223202_, StructurePlacement p_223203_, ChunkPos p_223204_) -
tryAddReference
-
applyBiomeDecoration
public void applyBiomeDecoration(WorldGenLevel p_223087_, ChunkAccess p_223088_, StructureManager p_223089_) -
getWritableArea
-
buildSurface
public abstract void buildSurface(WorldGenRegion p_223050_, StructureManager p_223051_, RandomState p_223052_, ChunkAccess p_223053_) -
spawnOriginalMobs
-
getSpawnHeight
-
getBiomeSource
-
getGenDepth
public abstract int getGenDepth() -
getMobsAt
public WeightedRandomList<MobSpawnSettings.SpawnerData> getMobsAt(Holder<Biome> p_223134_, StructureManager p_223135_, MobCategory p_223136_, BlockPos p_223137_) -
createStructures
public void createStructures(RegistryAccess p_255835_, ChunkGeneratorStructureState p_256505_, StructureManager p_255934_, ChunkAccess p_255767_, StructureTemplateManager p_255832_) -
tryGenerateStructure
private boolean tryGenerateStructure(StructureSet.StructureSelectionEntry p_223105_, StructureManager p_223106_, RegistryAccess p_223107_, RandomState p_223108_, StructureTemplateManager p_223109_, long p_223110_, ChunkAccess p_223111_, ChunkPos p_223112_, SectionPos p_223113_) -
fetchReferences
private static int fetchReferences(StructureManager p_223055_, ChunkAccess p_223056_, SectionPos p_223057_, Structure p_223058_) -
createReferences
public void createReferences(WorldGenLevel p_223077_, StructureManager p_223078_, ChunkAccess p_223079_) -
fillFromNoise
public abstract CompletableFuture<ChunkAccess> fillFromNoise(Executor p_223209_, Blender p_223210_, RandomState p_223211_, StructureManager p_223212_, ChunkAccess p_223213_) -
getSeaLevel
public abstract int getSeaLevel() -
getMinY
public abstract int getMinY() -
getBaseHeight
public abstract int getBaseHeight(int p_223032_, int p_223033_, Heightmap.Types p_223034_, LevelHeightAccessor p_223035_, RandomState p_223036_) -
getBaseColumn
public abstract NoiseColumn getBaseColumn(int p_223028_, int p_223029_, LevelHeightAccessor p_223030_, RandomState p_223031_) -
getFirstFreeHeight
public int getFirstFreeHeight(int p_223222_, int p_223223_, Heightmap.Types p_223224_, LevelHeightAccessor p_223225_, RandomState p_223226_) -
getFirstOccupiedHeight
public int getFirstOccupiedHeight(int p_223236_, int p_223237_, Heightmap.Types p_223238_, LevelHeightAccessor p_223239_, RandomState p_223240_) -
addDebugScreenInfo
public abstract void addDebugScreenInfo(List<String> p_223175_, RandomState p_223176_, BlockPos p_223177_) -
getBiomeGenerationSettings
Deprecated.
-