public final class NoiseChunkGenerator extends ChunkGenerator
Modifier and Type | Field and Description |
---|---|
private static BlockState |
AIR |
private static float[] |
BIOME_WEIGHT_TABLE |
static com.mojang.serialization.Codec<NoiseChunkGenerator> |
CODEC |
protected BlockState |
defaultBlock |
protected BlockState |
defaultFluid |
private OctavePerlinNoiseSampler |
densityNoise |
private int |
horizontalNoiseResolution |
private OctavePerlinNoiseSampler |
interpolationNoise |
private SimplexNoiseSampler |
islandNoise |
private OctavePerlinNoiseSampler |
lowerInterpolatedNoise |
private static float[] |
NOISE_WEIGHT_TABLE |
private int |
noiseSizeX |
private int |
noiseSizeY |
private int |
noiseSizeZ |
protected ChunkRandom |
random |
private long |
seed |
protected Supplier<ChunkGeneratorSettings> |
settings |
private NoiseSampler |
surfaceDepthNoise |
private OctavePerlinNoiseSampler |
upperInterpolatedNoise |
private int |
verticalNoiseResolution |
private int |
worldHeight |
biomeSource, populationSource
Modifier | Constructor and Description |
---|---|
private |
NoiseChunkGenerator(BiomeSource populationSource,
BiomeSource biomeSource,
long seed,
Supplier<ChunkGeneratorSettings> settings) |
|
NoiseChunkGenerator(BiomeSource biomeSource,
long seed,
Supplier<ChunkGeneratorSettings> settings) |
Modifier and Type | Method and Description |
---|---|
private void |
buildBedrock(Chunk chunk,
Random random) |
void |
buildSurface(ChunkRegion region,
Chunk chunk) |
private static double |
calculateNoiseWeight(int x,
int y,
int z) |
protected BlockState |
getBlockState(double density,
int y) |
protected com.mojang.serialization.Codec<? extends ChunkGenerator> |
getCodec() |
BlockView |
getColumnSample(int x,
int z) |
List<SpawnSettings.SpawnEntry> |
getEntitySpawnList(Biome biome,
StructureAccessor accessor,
SpawnGroup group,
BlockPos pos) |
int |
getHeight(int x,
int z,
Heightmap.Type heightmapType) |
private static double |
getNoiseWeight(int x,
int y,
int z) |
private double |
getRandomDensityAt(int x,
int z) |
int |
getSeaLevel() |
int |
getWorldHeight() |
boolean |
matchesSettings(long seed,
RegistryKey<ChunkGeneratorSettings> settingsKey) |
void |
populateEntities(ChunkRegion region) |
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.
|
private int |
sampleHeightmap(int x,
int z,
BlockState[] states,
Predicate<BlockState> predicate) |
private double |
sampleNoise(int x,
int y,
int z,
double horizontalScale,
double verticalScale,
double horizontalStretch,
double verticalStretch) |
private void |
sampleNoiseColumn(double[] buffer,
int x,
int z) |
private double[] |
sampleNoiseColumn(int x,
int z) |
ChunkGenerator |
withSeed(long seed) |
addStructureReferences, carve, generateFeatures, getBiomeSource, getHeightInGround, getHeightOnGround, getSpawnHeight, getStructuresConfig, isStrongholdStartingChunk, locateStructure, populateBiomes, setStructureStarts
public static final com.mojang.serialization.Codec<NoiseChunkGenerator> CODEC
private static final float[] NOISE_WEIGHT_TABLE
private static final float[] BIOME_WEIGHT_TABLE
private static final BlockState AIR
private final int verticalNoiseResolution
private final int horizontalNoiseResolution
private final int noiseSizeX
private final int noiseSizeY
private final int noiseSizeZ
protected final ChunkRandom random
private final OctavePerlinNoiseSampler lowerInterpolatedNoise
private final OctavePerlinNoiseSampler upperInterpolatedNoise
private final OctavePerlinNoiseSampler interpolationNoise
private final NoiseSampler surfaceDepthNoise
private final OctavePerlinNoiseSampler densityNoise
@Nullable private final SimplexNoiseSampler islandNoise
protected final BlockState defaultBlock
protected final BlockState defaultFluid
private final long seed
protected final Supplier<ChunkGeneratorSettings> settings
private final int worldHeight
public NoiseChunkGenerator(BiomeSource biomeSource, long seed, Supplier<ChunkGeneratorSettings> settings)
private NoiseChunkGenerator(BiomeSource populationSource, BiomeSource biomeSource, long seed, Supplier<ChunkGeneratorSettings> settings)
protected com.mojang.serialization.Codec<? extends ChunkGenerator> getCodec()
getCodec
in class ChunkGenerator
@Environment(value=CLIENT) public ChunkGenerator withSeed(long seed)
withSeed
in class ChunkGenerator
public boolean matchesSettings(long seed, RegistryKey<ChunkGeneratorSettings> settingsKey)
private double sampleNoise(int x, int y, int z, double horizontalScale, double verticalScale, double horizontalStretch, double verticalStretch)
private double[] sampleNoiseColumn(int x, int z)
private void sampleNoiseColumn(double[] buffer, int x, int z)
private double getRandomDensityAt(int x, int z)
public int getHeight(int x, int z, Heightmap.Type heightmapType)
getHeight
in class ChunkGenerator
public BlockView getColumnSample(int x, int z)
getColumnSample
in class ChunkGenerator
private int sampleHeightmap(int x, int z, @Nullable BlockState[] states, @Nullable Predicate<BlockState> predicate)
protected BlockState getBlockState(double density, int y)
public void buildSurface(ChunkRegion region, Chunk chunk)
buildSurface
in class ChunkGenerator
public void populateNoise(WorldAccess world, StructureAccessor accessor, Chunk chunk)
populateNoise
in class ChunkGenerator
private static double getNoiseWeight(int x, int y, int z)
private static double calculateNoiseWeight(int x, int y, int z)
public int getWorldHeight()
getWorldHeight
in class ChunkGenerator
public int getSeaLevel()
getSeaLevel
in class ChunkGenerator
public List<SpawnSettings.SpawnEntry> getEntitySpawnList(Biome biome, StructureAccessor accessor, SpawnGroup group, BlockPos pos)
getEntitySpawnList
in class ChunkGenerator
public void populateEntities(ChunkRegion region)
populateEntities
in class ChunkGenerator