public abstract class Carver<C extends CarverConfig> extends Object
Modifier and Type | Field and Description |
---|---|
protected static BlockState |
AIR |
protected Set<Block> |
alwaysCarvableBlocks |
static Carver<ProbabilityConfig> |
CANYON |
protected Set<Fluid> |
carvableFluids |
static Carver<ProbabilityConfig> |
CAVE |
protected static BlockState |
CAVE_AIR |
private com.mojang.serialization.Codec<ConfiguredCarver<C>> |
codec |
protected int |
heightLimit |
protected static FluidState |
LAVA |
static Carver<ProbabilityConfig> |
NETHER_CAVE |
static Carver<ProbabilityConfig> |
UNDERWATER_CANYON |
static Carver<ProbabilityConfig> |
UNDERWATER_CAVE |
protected static FluidState |
WATER |
Constructor and Description |
---|
Carver(com.mojang.serialization.Codec<C> configCodec,
int heightLimit) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canAlwaysCarveBlock(BlockState state) |
protected boolean |
canCarveBlock(BlockState state,
BlockState stateAbove) |
protected boolean |
canCarveBranch(int mainChunkX,
int mainChunkZ,
double x,
double z,
int branch,
int branchCount,
float baseWidth) |
abstract boolean |
carve(Chunk chunk,
Function<BlockPos,Biome> posToBiome,
Random random,
int seaLevel,
int chunkX,
int chunkZ,
int mainChunkX,
int mainChunkZ,
BitSet carvingMask,
C c) |
protected boolean |
carveAtPoint(Chunk chunk,
Function<BlockPos,Biome> posToBiome,
BitSet carvingMask,
Random random,
BlockPos.Mutable mutable,
BlockPos.Mutable mutable2,
BlockPos.Mutable mutable3,
int seaLevel,
int mainChunkX,
int mainChunkZ,
int x,
int z,
int relativeX,
int y,
int relativeZ,
MutableBoolean mutableBoolean) |
protected boolean |
carveRegion(Chunk chunk,
Function<BlockPos,Biome> posToBiome,
long seed,
int seaLevel,
int chunkX,
int chunkZ,
double x,
double y,
double z,
double yaw,
double pitch,
BitSet carvingMask) |
int |
getBranchFactor() |
com.mojang.serialization.Codec<ConfiguredCarver<C>> |
getCodec() |
private boolean |
isOnBoundary(int minX,
int maxX,
int minZ,
int maxZ,
int x,
int z) |
protected abstract boolean |
isPositionExcluded(double scaledRelativeX,
double scaledRelativeY,
double scaledRelativeZ,
int y) |
protected boolean |
isRegionUncarvable(Chunk chunk,
int mainChunkX,
int mainChunkZ,
int relMinX,
int relMaxX,
int minY,
int maxY,
int relMinZ,
int relMaxZ) |
ConfiguredCarver<C> |
method_28614(C c) |
private static <C extends CarverConfig,F extends Carver<C>> |
register(String string,
F f) |
abstract boolean |
shouldCarve(Random random,
int chunkX,
int chunkZ,
C config) |
public static final Carver<ProbabilityConfig> CAVE
public static final Carver<ProbabilityConfig> NETHER_CAVE
public static final Carver<ProbabilityConfig> CANYON
public static final Carver<ProbabilityConfig> UNDERWATER_CANYON
public static final Carver<ProbabilityConfig> UNDERWATER_CAVE
protected static final BlockState AIR
protected static final BlockState CAVE_AIR
protected static final FluidState WATER
protected static final FluidState LAVA
private final com.mojang.serialization.Codec<ConfiguredCarver<C extends CarverConfig>> codec
protected final int heightLimit
public Carver(com.mojang.serialization.Codec<C> configCodec, int heightLimit)
private static <C extends CarverConfig,F extends Carver<C>> F register(String string, F f)
public ConfiguredCarver<C> method_28614(C c)
public com.mojang.serialization.Codec<ConfiguredCarver<C>> getCodec()
public int getBranchFactor()
protected boolean carveRegion(Chunk chunk, Function<BlockPos,Biome> posToBiome, long seed, int seaLevel, int chunkX, int chunkZ, double x, double y, double z, double yaw, double pitch, BitSet carvingMask)
protected boolean carveAtPoint(Chunk chunk, Function<BlockPos,Biome> posToBiome, BitSet carvingMask, Random random, BlockPos.Mutable mutable, BlockPos.Mutable mutable2, BlockPos.Mutable mutable3, int seaLevel, int mainChunkX, int mainChunkZ, int x, int z, int relativeX, int y, int relativeZ, MutableBoolean mutableBoolean)
public abstract boolean carve(Chunk chunk, Function<BlockPos,Biome> posToBiome, Random random, int seaLevel, int chunkX, int chunkZ, int mainChunkX, int mainChunkZ, BitSet carvingMask, C c)
protected boolean canAlwaysCarveBlock(BlockState state)
protected boolean canCarveBlock(BlockState state, BlockState stateAbove)
protected boolean isRegionUncarvable(Chunk chunk, int mainChunkX, int mainChunkZ, int relMinX, int relMaxX, int minY, int maxY, int relMinZ, int relMaxZ)
private boolean isOnBoundary(int minX, int maxX, int minZ, int maxZ, int x, int z)
protected boolean canCarveBranch(int mainChunkX, int mainChunkZ, double x, double z, int branch, int branchCount, float baseWidth)
protected abstract boolean isPositionExcluded(double scaledRelativeX, double scaledRelativeY, double scaledRelativeZ, int y)