Package net.minecraft.world.gen.chunk
Class SurfaceChunkGenerator
java.lang.Object
net.minecraft.world.gen.chunk.ChunkGenerator
net.minecraft.world.gen.chunk.SurfaceChunkGenerator
public final class SurfaceChunkGenerator extends ChunkGenerator
-
Field Summary
Fields Modifier and Type Field Description private static BlockStateAIRstatic com.mojang.serialization.Codec<SurfaceChunkGenerator>CODECprotected BlockStatedefaultBlockprotected BlockStatedefaultFluidprivate static float[]field_16649protected ChunkGeneratorTypefield_24774private static float[]field_24775private OctavePerlinNoiseSamplerfield_24776private SimplexNoiseSamplerfield_24777private longfield_24778private intfield_24779private inthorizontalNoiseResolutionprivate OctavePerlinNoiseSamplerinterpolationNoiseprivate OctavePerlinNoiseSamplerlowerInterpolatedNoiseprivate intnoiseSizeXprivate intnoiseSizeYprivate intnoiseSizeZprotected ChunkRandomrandomprivate NoiseSamplersurfaceDepthNoiseprivate OctavePerlinNoiseSamplerupperInterpolatedNoiseprivate intverticalNoiseResolutionFields inherited from class net.minecraft.world.gen.chunk.ChunkGenerator
biomeSource, field_24746, field_24747 -
Constructor Summary
Constructors Modifier Constructor Description SurfaceChunkGenerator(BiomeSource biomeSource, long long2, ChunkGeneratorType chunkGeneratorType)privateSurfaceChunkGenerator(BiomeSource biomeSource, BiomeSource biomeSource2, long long2, ChunkGeneratorType chunkGeneratorType) -
Method Summary
Modifier and Type Method Description private voidbuildBedrock(Chunk chunk, Random random)voidbuildSurface(ChunkRegion region, Chunk chunk)protected BlockStategetBlockState(double density, int y)BlockViewgetColumnSample(int x, int z)List<Biome.SpawnEntry>getEntitySpawnList(Biome biome, StructureAccessor accessor, SpawnGroup group, BlockPos pos)intgetHeight(int x, int z, Heightmap.Type heightmapType)intgetMaxY()intgetSeaLevel()private static doublemethod_16571(int int2, int int3, int int4)private static doublemethod_16572(int int2, int int3, int int4)protected com.mojang.serialization.Codec<? extends ChunkGenerator>method_28506()booleanmethod_28548(long long2, ChunkGeneratorType.Preset preset)private doublemethod_28553(int int2, int int3)voidpopulateEntities(ChunkRegion region)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.private intsampleHeightmap(int x, int z, BlockState[] states, Predicate<BlockState> predicate)private doublesampleNoise(int x, int y, int z, double horizontalScale, double verticalScale, double horizontalStretch, double verticalStretch)private voidsampleNoiseColumn(double[] buffer, int x, int z)private double[]sampleNoiseColumn(int x, int z)ChunkGeneratorwithSeed(long seed)Methods inherited from class net.minecraft.world.gen.chunk.ChunkGenerator
addStructureReferences, carve, generateFeatures, getBiomeSource, getConfig, getHeightInGround, getHeightOnGround, getSpawnHeight, locateStructure, method_28507, populateBiomes, setStructureStarts
-
Field Details
-
CODEC
-
field_16649
private static final float[] field_16649 -
field_24775
private static final float[] field_24775 -
AIR
-
verticalNoiseResolution
private final int verticalNoiseResolution -
horizontalNoiseResolution
private final int horizontalNoiseResolution -
noiseSizeX
private final int noiseSizeX -
noiseSizeY
private final int noiseSizeY -
noiseSizeZ
private final int noiseSizeZ -
random
-
lowerInterpolatedNoise
-
upperInterpolatedNoise
-
interpolationNoise
-
surfaceDepthNoise
-
field_24776
-
field_24777
-
defaultBlock
-
defaultFluid
-
field_24778
private final long field_24778 -
field_24774
-
field_24779
private final int field_24779
-
-
Constructor Details
-
SurfaceChunkGenerator
public SurfaceChunkGenerator(BiomeSource biomeSource, long long2, ChunkGeneratorType chunkGeneratorType) -
SurfaceChunkGenerator
private SurfaceChunkGenerator(BiomeSource biomeSource, BiomeSource biomeSource2, long long2, ChunkGeneratorType chunkGeneratorType)
-
-
Method Details
-
method_28506
- Specified by:
method_28506in classChunkGenerator
-
withSeed
- Specified by:
withSeedin classChunkGenerator
-
method_28548
-
sampleNoise
private double sampleNoise(int x, int y, int z, double horizontalScale, double verticalScale, double horizontalStretch, double verticalStretch) -
sampleNoiseColumn
private double[] sampleNoiseColumn(int x, int z) -
sampleNoiseColumn
private void sampleNoiseColumn(double[] buffer, int x, int z) -
method_28553
private double method_28553(int int2, int int3) -
getHeight
- Specified by:
getHeightin classChunkGenerator
-
getColumnSample
- Specified by:
getColumnSamplein classChunkGenerator
-
sampleHeightmap
private int sampleHeightmap(int x, int z, @Nullable BlockState[] states, @Nullable Predicate<BlockState> predicate) -
getBlockState
-
buildSurface
- Specified by:
buildSurfacein classChunkGenerator
-
buildBedrock
-
populateNoise
Generates the base shape of the chunk out of the basic block states as decided by this chunk generator's config.- Specified by:
populateNoisein classChunkGenerator
-
method_16572
private static double method_16572(int int2, int int3, int int4) -
method_16571
private static double method_16571(int int2, int int3, int int4) -
getMaxY
public int getMaxY()- Overrides:
getMaxYin classChunkGenerator
-
getSeaLevel
public int getSeaLevel()- Overrides:
getSeaLevelin classChunkGenerator
-
getEntitySpawnList
public List<Biome.SpawnEntry> getEntitySpawnList(Biome biome, StructureAccessor accessor, SpawnGroup group, BlockPos pos)- Overrides:
getEntitySpawnListin classChunkGenerator
-
populateEntities
- Overrides:
populateEntitiesin classChunkGenerator
-