public abstract class SurfaceBuilder
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected net.minecraft.block.state.IBlockState |
defaultBlock |
protected net.minecraft.block.state.IBlockState |
defaultFluid |
| Constructor and Description |
|---|
SurfaceBuilder(ChunkSource chunkSource,
ModernBetaGeneratorSettings settings)
Constructs a new abstract SurfaceBuilder with basic surface information.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Random |
createSurfaceRandom(int chunkX,
int chunkZ)
Get a new Random object initialized with chunk coordinates for seed, for surface generation.
|
protected PerlinOctaveNoise |
getBeachOctaveNoise()
Gets the PerlinOctaveNoise sampler used for beach generation.
|
protected int |
getSeaLevel()
Gets the sea level, from the chunk source.
|
protected PerlinOctaveNoise |
getSurfaceOctaveNoise()
Gets the PerlinOctaveNoise sampler used for surface generation.
|
protected int |
getWorldHeight()
Gets the world height, from generator settings.
|
abstract 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.
|
protected boolean |
useBedrock()
Indicates whether bedrock should be generated at the bottom of the world.
|
protected boolean |
useCustomSurfaceBuilder(net.minecraft.world.World world,
net.minecraft.world.biome.Biome biome,
net.minecraft.world.chunk.ChunkPrimer chunkPrimer,
java.util.Random random,
int x,
int z,
boolean override)
Use a biome-specific surface builder, at a given x/z-coordinate and topmost y-coordinate.
|
protected boolean |
useSandstone()
Indicates whether sandstone should be generated underneath beaches or deserts, from the generator settings.
|
protected final net.minecraft.block.state.IBlockState defaultBlock
protected final net.minecraft.block.state.IBlockState defaultFluid
public SurfaceBuilder(ChunkSource chunkSource, ModernBetaGeneratorSettings settings)
chunkSource - Associated chunkSource object.settings - The generator settings.public abstract void provideSurface(net.minecraft.world.World world,
net.minecraft.world.biome.Biome[] biomes,
net.minecraft.world.chunk.ChunkPrimer chunkPrimer,
int chunkX,
int chunkZ)
world - 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.protected PerlinOctaveNoise getBeachOctaveNoise()
getBeachOctaveNoise if possible, otherwise a default sampler.protected PerlinOctaveNoise getSurfaceOctaveNoise()
getSurfaceOctaveNoise if possible, otherwise a default sampler.protected int getWorldHeight()
protected int getSeaLevel()
protected boolean useSandstone()
protected boolean useBedrock()
protected java.util.Random createSurfaceRandom(int chunkX,
int chunkZ)
chunkX - x-coordinate in chunk coordinates.chunkZ - z-coordinate in chunk coordinates.protected boolean useCustomSurfaceBuilder(net.minecraft.world.World world,
net.minecraft.world.biome.Biome biome,
net.minecraft.world.chunk.ChunkPrimer chunkPrimer,
java.util.Random random,
int x,
int z,
boolean override)
biomesWithCustomSurfaces set.world - The world object.biome - Biome with surface builder to use.chunkPrimer - Chunk primer.random - Randomx - x-coordinate in block coordinates.z - z-coordinate in block coordinates.override - Force usage of vanilla surface builder.