public abstract class SurfaceBuilder
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected ChunkSource |
chunkSource |
protected net.minecraft.block.state.IBlockState |
defaultBlock |
protected net.minecraft.block.state.IBlockState |
defaultFluid |
protected ModernBetaGeneratorSettings |
settings |
| Constructor and Description |
|---|
SurfaceBuilder(ChunkSource chunkSource,
ModernBetaGeneratorSettings settings)
Constructs a new abstract SurfaceBuilder with basic surface information.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Random |
createSurfaceRandom(int chunkX,
int chunkZ)
Get a new Random object initialized with chunk coordinates for seed, for surface generation.
|
protected int |
getSeaLevel()
Gets the sea level, from the chunk source.
|
protected int |
getWorldHeight()
Gets the world height, from generator settings.
|
boolean |
isBedrock(int y,
java.util.Random random)
Determines whether bedrock should generate at the given y-level.
|
boolean |
isCustomSurface(net.minecraft.world.biome.Biome biome)
Checks whether a given biome is within the set of biomes using custom surfaces.
|
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
protected final ChunkSource chunkSource
protected final ModernBetaGeneratorSettings settings
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.public boolean isBedrock(int y,
java.util.Random random)
y - y-coordinate in block coordinatesrandom - The random used to vary bedrock.public java.util.Random createSurfaceRandom(int chunkX,
int chunkZ)
chunkX - x-coordinate in chunk coordinates.chunkZ - z-coordinate in chunk coordinates.public boolean isCustomSurface(net.minecraft.world.biome.Biome biome)
biome - The biome to check.protected int getWorldHeight()
protected int getSeaLevel()
protected boolean useSandstone()
protected boolean useBedrock()
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.