public abstract class NoiseSurfaceBuilder extends SurfaceBuilder
chunkSource, defaultBlock, defaultFluid, settings| Constructor and Description |
|---|
NoiseSurfaceBuilder(ChunkSource chunkSource,
ModernBetaGeneratorSettings settings,
boolean useBedrockRandom,
boolean useSandstoneRandom,
boolean swapCoords)
Constructs a new abstract NoiseSurfaceBuilder.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
atBeachDepth(int y)
Determines whether the y-value is the correct height for generating beaches.
|
protected PerlinOctaveNoise |
getBeachOctaveNoise()
Gets the PerlinOctaveNoise sampler used for beach generation.
|
protected PerlinOctaveNoise |
getSurfaceOctaveNoise()
Gets the PerlinOctaveNoise sampler used for surface generation.
|
protected double |
getSurfaceVariation(java.util.Random random)
Gets the random variation for generating edges of surfaces.
|
abstract boolean |
isBasin(int surfaceDepth)
Determines whether stone basins should generate given the surface depth.
|
abstract boolean |
isBeach(int x,
int z,
java.util.Random random)
Determines whether beaches should generate at the given coordinates.
|
abstract boolean |
isGravelBeach(int x,
int z,
java.util.Random random)
Determines whether gravel beaches should generate at the given coordinates.
|
void |
provideSurface(net.minecraft.world.World world,
net.minecraft.world.biome.Biome[] biomes,
net.minecraft.world.chunk.ChunkPrimer chunkPrimer,
int chunkX,
int chunkZ)
Replace default blocks with biome-specific topsoil blocks and set in the chunk.
|
abstract int |
sampleSurfaceDepth(int x,
int z,
java.util.Random random)
Samples the surface depth at the given coordinates.
|
createSurfaceRandom, getSeaLevel, getWorldHeight, isBedrock, isCustomSurface, useBedrock, useCustomSurfaceBuilder, useSandstonepublic NoiseSurfaceBuilder(ChunkSource chunkSource, ModernBetaGeneratorSettings settings, boolean useBedrockRandom, boolean useSandstoneRandom, boolean swapCoords)
chunkSource - The chunkSource object.settings - The generator settings.useBedrockRandom - Whether a separate Random should be used to generate bedrock.useSandstoneRandom - Whether a separate Random should be used to generate sandstone.swapCoords - Whether to swap x/z-coordinates when sampling noise.public final void provideSurface(net.minecraft.world.World world,
net.minecraft.world.biome.Biome[] biomes,
net.minecraft.world.chunk.ChunkPrimer chunkPrimer,
int chunkX,
int chunkZ)
SurfaceBuilderprovideSurface in class SurfaceBuilderworld - The world object.biomes - Array of biomes in the chunk.chunkPrimer - Blockstate data for the chunk.chunkX - x-coordinate in chunk coordinates.chunkZ - z-coordinate in chunk coordinates.public abstract boolean isBeach(int x,
int z,
@Nullable
java.util.Random random)
x - x-coordinate in block coordinates.z - z-coordinate in block coordinates.random - The random used to vary surface transition. Can be null if transitions aren't implemented.public abstract boolean isGravelBeach(int x,
int z,
@Nullable
java.util.Random random)
x - x-coordinate in block coordinates.z - z-coordinate in block coordinates.random - The random used to vary surface transition. Can be null if transitions aren't implemented.public abstract int sampleSurfaceDepth(int x,
int z,
@Nullable
java.util.Random random)
x - x-coordinate in block coordinates.z - z-coordinate in block coordinates.random - The random used to vary surface transition. Can be null if transitions aren't implemented.public abstract boolean isBasin(int surfaceDepth)
surfaceDepth - The surface depth noise value.public boolean atBeachDepth(int y)
y - x-coordinate in block coordinates.protected PerlinOctaveNoise getBeachOctaveNoise()
getBeachOctaveNoise if possible, otherwise a default sampler.protected PerlinOctaveNoise getSurfaceOctaveNoise()
getSurfaceOctaveNoise if possible, otherwise a default sampler.protected double getSurfaceVariation(@Nullable
java.util.Random random)
random - The random to sample. Can be null.random is null then returns 0.0.