public abstract class NoiseChunkSource extends ChunkSource
| Modifier and Type | Class and Description |
|---|---|
protected static class |
NoiseChunkSource.NoiseScaleDepth |
| Modifier and Type | Field and Description |
|---|---|
protected int |
horizontalNoiseResolution |
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. |
NoiseSampler |
getNoiseSampler(net.minecraft.util.ResourceLocation key)
Gets a noise sampler identified by ResourceLocation key.
|
NoiseSettings |
getNoiseSettings()
Gets the noise settings container.
|
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 double |
sampleNoiseOffset(int noiseY,
double scale,
double depth)
Samples the noise offset at the given noise y-coordinate.
|
protected abstract NoiseChunkSource.NoiseScaleDepth |
sampleNoiseScaleDepth(int startNoiseX,
int startNoiseZ,
int localNoiseX,
int localNoiseZ)
Samples the scale and depth values at startNoiseX + localNoiseX, startNoiseZ + localNoiseZ.
|
buildBiomeInjectorRules, createBiomeInjectionRules, createRandom, getBeachOctaveNoise, getDefaultBlock, getDefaultFluid, getForestOctaveNoise, getGeneratorSettings, getSeaLevel, getSeed, getSurfaceOctaveNoise, getWorldSpawner, pruneChunk, setBeachOctaveNoise, setCloudHeight, setForestOctaveNoise, setSurfaceOctaveNoise, skipChunkprotected 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 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 NoiseSampler getNoiseSampler(net.minecraft.util.ResourceLocation key)
key - The noise sampler keypublic NoiseSettings getNoiseSettings()
public java.lang.String debugNoiseSettings()
public 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 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)
getNoiseScaleDepth
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 NoiseChunkSource.NoiseScaleDepth sampleNoiseScaleDepth(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.