public abstract class NoiseChunkSource extends ChunkSource
| Modifier and Type | Field and Description |
|---|---|
protected int |
horizontalNoiseResolution |
static net.minecraft.util.ResourceLocation |
INITIAL_NOISE_HEIGHT_SAMPLER |
protected int |
noiseSizeX |
protected int |
noiseSizeY |
protected int |
noiseSizeZ |
protected int |
noiseTopY |
protected int |
verticalNoiseResolution |
blockSources, DEEP_OCEAN_MIN_DEPTH, defaultBlock, defaultFluid, OCEAN_MIN_DEPTH, random, seaLevel, seed, settings, worldHeight| Constructor and Description |
|---|
NoiseChunkSource(long seed,
ModernBetaGeneratorSettings settings)
Constructs an abstract NoiseChunkSource with necessary noise setting information.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
debugNoiseCoordinates(int x,
int y,
int z)
Gets the local noise coordinates for the given block coordinates.
|
java.lang.String |
debugNoiseModifiers(int x,
int y,
int z)
Gets the scale, depth, and offset values for the given block coordinates.
|
java.lang.String |
debugNoiseSettings()
Gets the noise size values for the current chunk source.
|
double |
getDensity(net.minecraft.util.ResourceLocation key,
int x,
int y,
int z)
Gets sampled terrain density from a particular layer identified by ResourceLocation key.
|
int |
getHeight(int x,
int z,
HeightmapChunk.Type type)
Inherited from
getHeight. |
NoiseHeight |
getNoiseHeight(int x,
int z)
Gets sampled noise height at a particular coordinate.
|
NoiseHeightSampler |
getNoiseHeightSampler(net.minecraft.util.ResourceLocation key)
Gets a noise height sampler identified by ResourceLocation key.
|
NoiseSampler |
getNoiseSampler(net.minecraft.util.ResourceLocation key)
Gets a noise sampler identified by ResourceLocation key.
|
NoiseSettings |
getNoiseSettings()
Gets the noise settings container.
|
int |
getNoiseSizeX()
Gets the number of horizontal subchunks along x.
|
int |
getNoiseSizeY()
Gets the number of vertical subchunks.
|
int |
getNoiseSizeZ()
Gets the number of horizontal subchunks along z.
|
void |
provideInitialChunk(net.minecraft.world.chunk.ChunkPrimer chunkPrimer,
int chunkX,
int chunkZ)
Inherited from
provideInitialChunk. |
void |
provideProcessedChunk(net.minecraft.world.chunk.ChunkPrimer chunkPrimer,
int chunkX,
int chunkZ,
java.util.List<net.minecraft.world.gen.structure.StructureComponent> structureComponents)
Inherited from
provideProcessedChunk. |
void |
provideSurface(net.minecraft.world.World world,
net.minecraft.world.biome.Biome[] biomes,
net.minecraft.world.chunk.ChunkPrimer chunkPrimer,
int chunkX,
int chunkZ)
Inherited from
provideSurface. |
protected void |
sampleNoiseColumn(double[] buffer,
int startNoiseX,
int startNoiseZ,
int localNoiseX,
int localNoiseZ)
Samples noise for a column at startNoiseX + localNoiseX, startNoiseZ + localNoiseZ.
|
protected abstract NoiseHeight |
sampleNoiseHeight(int startNoiseX,
int startNoiseZ,
int localNoiseX,
int localNoiseZ)
Samples the scale and depth values at startNoiseX + localNoiseX, startNoiseZ + localNoiseZ.
|
protected abstract double |
sampleNoiseOffset(int noiseY,
double scale,
double depth)
Samples the noise offset at the given noise y-coordinate.
|
createBiomeInjectionRules, createRandom, getBeachOctaveNoise, getDefaultBlock, getDefaultFluid, getForestOctaveNoise, getGeneratorSettings, getSeaLevel, getSeed, getSurfaceOctaveNoise, getWorldSpawner, pruneChunk, setBeachOctaveNoise, setCloudHeight, setForestOctaveNoise, setSurfaceOctaveNoise, skipChunkpublic static final net.minecraft.util.ResourceLocation INITIAL_NOISE_HEIGHT_SAMPLER
protected final int verticalNoiseResolution
protected final int horizontalNoiseResolution
protected final int noiseSizeX
protected final int noiseSizeZ
protected final int noiseSizeY
protected final int noiseTopY
public NoiseChunkSource(long seed,
ModernBetaGeneratorSettings settings)
seed - The world seed.settings - The generator settings.public void provideInitialChunk(net.minecraft.world.chunk.ChunkPrimer chunkPrimer,
int chunkX,
int chunkZ)
provideInitialChunk.
This does not generate terrain, only samples the initial densities.provideInitialChunk in class ChunkSourcechunkPrimer - Chunk primerchunkX - x-coordinate in chunk coordinateschunkZ - z-coordinate in chunk coordinatespublic void provideProcessedChunk(net.minecraft.world.chunk.ChunkPrimer chunkPrimer,
int chunkX,
int chunkZ,
java.util.List<net.minecraft.world.gen.structure.StructureComponent> structureComponents)
provideProcessedChunk.
This actually generates the terrain, after collection of village component placements.provideProcessedChunk in class ChunkSourcechunkPrimer - Chunk primerchunkX - x-coordinate in chunk coordinateschunkZ - z-coordinate in chunk coordinatesstructureComponents - The list of structure components that at least partially occupy this chunk.public void provideSurface(net.minecraft.world.World world,
net.minecraft.world.biome.Biome[] biomes,
net.minecraft.world.chunk.ChunkPrimer chunkPrimer,
int chunkX,
int chunkZ)
provideSurface.provideSurface in class ChunkSourceworld - The world objectbiomes - Biome array for chunkchunkPrimer - Chunk primerchunkX - x-coordinate in chunk coordinateschunkZ - z-coordinate in chunk coordinatespublic int getHeight(int x,
int z,
HeightmapChunk.Type type)
getHeight.
Initially generates heightmap for entire chunk, if chunk containing x/z coordinates has never been sampled.getHeight in class ChunkSourcex - x-coordinate in block coordinates.z - z-coordinate in block coordinates.type - HeightmapChunk.Type.public final double getDensity(net.minecraft.util.ResourceLocation key,
int x,
int y,
int z)
key - The terrain density layer keyx - x-coordinate in block coordinates.y - y-coordinate in block coordinates.z - z-coordinate in block coordinates.public final NoiseHeight getNoiseHeight(int x, int z)
x - x-coordinate in block coordinates.z - z-coordinate in block coordinates.@Nullable public final NoiseSampler getNoiseSampler(net.minecraft.util.ResourceLocation key)
key - The noise sampler key@Nullable public final NoiseHeightSampler getNoiseHeightSampler(net.minecraft.util.ResourceLocation key)
key - The noise height sampler keypublic final NoiseSettings getNoiseSettings()
public final int getNoiseSizeX()
public final int getNoiseSizeZ()
public final int getNoiseSizeY()
public final java.lang.String debugNoiseSettings()
public final java.lang.String debugNoiseCoordinates(int x,
int y,
int z)
x - x-coordinate in block coordinates.y - y-coordinate in block cooridnates.z - z-coordinate in block coordinates.public final java.lang.String debugNoiseModifiers(int x,
int y,
int z)
x - x-coordinate in block coordinates.y - y-coordinate in block coordinates.z - z-coordinate in block coordinates.protected void sampleNoiseColumn(double[] buffer,
int startNoiseX,
int startNoiseZ,
int localNoiseX,
int localNoiseZ)
getNoiseHeight
and getNoiseOffset.buffer - Buffer of size noiseSizeY + 1 to store noise columnstartNoiseX - x-coordinate start of chunk in noise coordinates.startNoiseZ - z-coordinate start of chunk in noise coordinates.localNoiseX - Current subchunk index along x-axis.localNoiseZ - Current subchunk index along z-axis.protected abstract NoiseHeight sampleNoiseHeight(int startNoiseX, int startNoiseZ, int localNoiseX, int localNoiseZ)
startNoiseX - x-coordinate start of chunk in noise coordinates.startNoiseZ - z-coordinate start of chunk in noise coordinates.localNoiseX - Current subchunk index along x-axis.localNoiseZ - Current subchunk index along z-axis.protected abstract double sampleNoiseOffset(int noiseY,
double scale,
double depth)
noiseY - y-coordinate in noise coordinates.scale - The terrain scale modifier.depth - The terrain depth modifier.