Class CaveWorldCarver
java.lang.Object
net.minecraft.world.level.levelgen.carver.WorldCarver<CaveCarverConfiguration>
net.minecraft.world.level.levelgen.carver.CaveWorldCarver
- Direct Known Subclasses:
NetherWorldCarver
A carver which creates Minecraft's most common cave types.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.levelgen.carver.WorldCarver
WorldCarver.CarveSkipChecker -
Field Summary
Fields inherited from class net.minecraft.world.level.levelgen.carver.WorldCarver
AIR, CANYON, CAVE, CAVE_AIR, LAVA, liquids, NETHER_CAVE, WATER -
Constructor Summary
ConstructorsConstructorDescriptionCaveWorldCarver(com.mojang.serialization.Codec<CaveCarverConfiguration> p_159194_) -
Method Summary
Modifier and TypeMethodDescriptionbooleancarve(CarvingContext p_224885_, CaveCarverConfiguration p_224886_, ChunkAccess p_224887_, Function<BlockPos, Holder<Biome>> p_224888_, RandomSource p_224889_, Aquifer p_224890_, ChunkPos p_224891_, CarvingMask p_224892_) Carves the given chunk with caves that originate from the givenchunkPos.protected voidcreateRoom(CarvingContext context, CaveCarverConfiguration config, ChunkAccess chunk, Function<BlockPos, Holder<Biome>> biomeAccessor, Aquifer aquifer, double x, double y, double z, float radius, double horizontalVerticalRatio, CarvingMask carvingMask, WorldCarver.CarveSkipChecker skipChecker) protected voidcreateTunnel(CarvingContext context, CaveCarverConfiguration config, ChunkAccess chunk, Function<BlockPos, Holder<Biome>> biomeAccessor, long seed, Aquifer aquifer, double x, double y, double z, double horizontalRadiusMultiplier, double verticalRadiusMultiplier, float thickness, float yaw, float pitch, int branchIndex, int branchCount, double horizontalVerticalRatio, CarvingMask carvingMask, WorldCarver.CarveSkipChecker skipChecker) protected intprotected floatgetThickness(RandomSource random) protected doublebooleanisStartChunk(CaveCarverConfiguration p_224894_, RandomSource p_224895_) private static booleanshouldSkip(double relative, double relativeY, double relativeZ, double minrelativeY) Methods inherited from class net.minecraft.world.level.levelgen.carver.WorldCarver
canReach, canReplaceBlock, carveBlock, carveEllipsoid, configured, configuredCodec, getRange
-
Constructor Details
-
CaveWorldCarver
-
-
Method Details
-
isStartChunk
- Specified by:
isStartChunkin classWorldCarver<CaveCarverConfiguration>
-
carve
public boolean carve(CarvingContext p_224885_, CaveCarverConfiguration p_224886_, ChunkAccess p_224887_, Function<BlockPos, Holder<Biome>> p_224888_, RandomSource p_224889_, Aquifer p_224890_, ChunkPos p_224891_, CarvingMask p_224892_) Description copied from class:WorldCarverCarves the given chunk with caves that originate from the givenchunkPos. This method is invoked 289 times in order to generate each chunk (once for every position in an 8 chunk radius, or 17x17 chunk area, centered around the target chunk).- Specified by:
carvein classWorldCarver<CaveCarverConfiguration>- Parameters:
p_224887_- The chunk to be carvedp_224891_- The chunk position this carver is being called from- See Also:
-
getCaveBound
protected int getCaveBound() -
getThickness
-
getYScale
protected double getYScale() -
createRoom
protected void createRoom(CarvingContext context, CaveCarverConfiguration config, ChunkAccess chunk, Function<BlockPos, Holder<Biome>> biomeAccessor, Aquifer aquifer, double x, double y, double z, float radius, double horizontalVerticalRatio, CarvingMask carvingMask, WorldCarver.CarveSkipChecker skipChecker) -
createTunnel
protected void createTunnel(CarvingContext context, CaveCarverConfiguration config, ChunkAccess chunk, Function<BlockPos, Holder<Biome>> biomeAccessor, long seed, Aquifer aquifer, double x, double y, double z, double horizontalRadiusMultiplier, double verticalRadiusMultiplier, float thickness, float yaw, float pitch, int branchIndex, int branchCount, double horizontalVerticalRatio, CarvingMask carvingMask, WorldCarver.CarveSkipChecker skipChecker) -
shouldSkip
private static boolean shouldSkip(double relative, double relativeY, double relativeZ, double minrelativeY)
-