1.20.1 & 1.21.1 Configuration Guide - YUNG-GANG/YUNGs-Better-Caves GitHub Wiki
The configs for Better Caves in 1.20+ are significantly different from prior versions.
Fundamentally, there are two places where you'll find settings for you to modify:
- The JSON files modifiable via data pack at
data/bettercaves/worldgen/configured_carver/. These contain the vast majority of settings. - The JSON file located at
<minecraft folder>/config/bettercaves/<version>/liquidregions.json. This is where you'll modify the Liquid Regions settings for each dimension.
Better Caves has two types of sub-carvers within it: Cave Carvers and Cavern Carvers. Cave Carvers generally carve more noodly shapes out of terrain, while Cavern Carvers are essentially inverted Cave Carvers; that is, they carve the space around the noodly shape, instead of carving out the noodly shape itself. Thus, Caverns are typically larger and more open spaces than Caves.
You can define an arbitrary number of Layers for both Caves and Caverns. A Layer has three parameters: region size, cave/cavern spawn rate, and a list of carvers that can be applied. Each Layer divides the world up into regions along the x-z plane and then randomly picks one of its defined carvers to be applied to each region (or no carver at all sometimes, if the Layer's spawn rate is set to less than 100%). Each of the carvers within a Layer then contains the various settings responsible for shape, size, min/max Y, spawn weight, and all the other settings that determine what the caves in the region will actually look like. A detailed overview of all of this is provided below.
First, let's take a look at the main files responsible for adding the new Better Caves carvers.
This contains the settings for a new type of carver, bettercaves:better_cave. The following contains the default values that ship with the mod. I've added comments to the first occurrence of each unique setting explaining what it does.
{
"type": "bettercaves:better_cave",
"config": {
// The list of Cave Layers to be added.
// A Cave Layer is a collection of Cave Carvers that will be chosen from to carve out caves in the world.
// Each Cave Layer splits the world into distinct regions in the x-z plane.
// The Carver chosen for each region is determined by the spawn weights of the Carvers in that Cave Layer.
// By default, Better Caves only has one Cave Layer which covers the entire underground, up to y=80.
// The Layer is given a 100% spawn chance, meaning there will be caves everywhere underground below y=80.
"cave_layers": [
{
// The chance for a Carver to be applied to a given region.
// Determines how many regions will have a Carver applied to them.
"cave_spawn_chance": 100.0,
// Determines the size of the regions in the x-z plane.
// Paradoxically, a lower value results in larger regions.
// This number is highly sensitive, so small changes can have a big impact on the size of the regions.
"cave_region_size_frequency": 0.008,
// The list of Carvers to choose from for this Cave Layer.
"carvers": [
{
// The relative chance of this Carver being chosen for a region.
"spawn_weight": 10,
// The minimum y-level at which this Carver can carve.
"bottom_y": -63,
// The maximum y-level at which this Carver can carve.
"top_y": 80,
// The distance from a given point on the surface at which the Carver will start to close off.
// Will use the top_y instead of surface height if it is lower.
// Will use the top_y no matter what if override_surface_detection is enabled in the misc settings.
"surface_cutoff_distance": 15,
// Stretches caves vertically. Lower value = taller caves with steeper drops.
"y_compression": 5.0,
// Stretches caves horizontally. Lower value = wider caves.
"xz_compression": 1.6,
// Blockstate to use for debugging. Only used if debug_settings.enabled is true.
"debug_carve_state": {
"Name": "minecraft:oak_planks"
},
// Advanced settings for the noise function used to carve out caves.
// You probably don't want to change these unless you know what you're doing.
"advanced": {
// Blocks with generated noise values below this threshold are carved.
"noise_threshold": 0.95,
// Number of octaves used for ridged multi-fractal noise generation.
"fractal_octaves": 1,
// The gain for successive octaves of ridged multi-fractal noise generation.
"fractal_gain": 0.3,
// Frequency used in ridged multi-fractal noise generation.
"fractal_frequency": 0.03,
// Number of noise generation functions used.
// The intersection of these values is used to calculate a single noise value.
"num_generators": 2,
// The noise value for each block is weighed by the noise value(s) of block(s) above it.
// Increases headroom for the player.
"y_adjust": true,
// Determines how much the noise value for the block above a given block impacts that block's noise value.
"y_adjust_f1": 0.9,
// Determines how much the noise value for the block 2 blocks above a given block impacts that block's noise value.
"y_adjust_f2": 0.9,
// Whether to use FastNoiseLite (true) or OpenSimplex2S (false) for noise generation.
"is_fast_noise": true,
// Type of noise to use for this carver. This is an enum value from the FastNoise Java library.
// Accepted values: Value, ValueFractal, Perlin, PerlinFractal, Simplex, SimplexFractal, Cellular, WhiteNoise, Cubic, CubicFractal
"noise_type": "CubicFractal"
}
},
{
"spawn_weight": 5,
"bottom_y": -63,
"top_y": 80,
"surface_cutoff_distance": 15,
"y_compression": 2.2,
"xz_compression": 0.9,
"debug_carve_state": {
"Name": "minecraft:cobblestone"
},
"advanced": {
"noise_threshold": 0.82,
"fractal_octaves": 1,
"fractal_gain": 0.3,
"fractal_frequency": 0.025,
"num_generators": 2,
"y_adjust": true,
"y_adjust_f1": 0.95,
"y_adjust_f2": 0.5,
"is_fast_noise": false,
"noise_type": "SimplexFractal"
}
}
]
}
],
// The list of Cavern Layers to be added.
// The Cavern Layer system is similar to the Cave Layer system, but Caverns are much larger and more open.
// By default, Better Caves only has one Cavern Layer at the bottom of the world, up to y=-18.
// The Layer is given a 23% spawn chance, meaning 23% of the underground will have a cavern below y=-18.
"cavern_layers": [
{
"cavern_spawn_chance": 23.0,
"cavern_region_size_frequency": 0.005,
"carvers": [
{
"spawn_weight": 10,
"bottom_y": -63,
"top_y": -18,
"y_compression": 1.1,
"xz_compression": 0.6,
// If enabled, the carver will raise the floor of the cavern a bit and apply additional terrain smoothing.
// This leads to less pools of liquid and more flat, walkable caverns.
"is_floored": false,
"debug_carve_state": {
"Name": "minecraft:redstone_block"
},
"advanced": {
"noise_threshold": 0.6,
"fractal_octaves": 1,
"fractal_gain": 0.3,
"fractal_frequency": 0.03,
"num_generators": 2,
"noise_type": "SimplexFractal",
"is_fast_noise": true
}
},
{
"spawn_weight": 10,
"bottom_y": -63,
"top_y": -28,
"y_compression": 1.3,
"xz_compression": 0.7,
"is_floored": true,
"debug_carve_state": {
"Name": "minecraft:gold_block"
},
"advanced": {
"noise_threshold": 0.6,
"fractal_octaves": 1,
"fractal_gain": 0.3,
"fractal_frequency": 0.028,
"num_generators": 2,
"noise_type": "SimplexFractal",
"is_fast_noise": true
}
}
]
}
],
// Miscellaneous Settings
"misc": {
// The block tag for blocks that can be carved.
"replaceable": "#minecraft:overworld_carver_replaceables",
// If enabled, ignores surface detection for closing off caves and caverns, forcing them to spawn
// up until their max height. Useful for Nether-like dimensions with no real "surface".
"override_surface_detection": false
},
// Debug Settings.
"debug_settings": {
// Enables the Debug Renderer. DO NOT USE THIS ON A NORMAL WORLD.
"enabled": false,
// The max_y value for caves to generate at when the debug renderer is enabled.
"top_y": 128
}
}
}As you can see above, each Carver in a Layer has a spawn_weight associated with it. This is a simple weighted probability of that Carver being chosen for the given Layer.
For example, let's look at the default Cave Layer above. It has two Carvers: one with a spawn weight of 10, and one with 5. This means that for any given region in the Layer, the chance of the first Carver being chosen is 10 / (10 + 5) = 10 / 15 = .67 or 67%. Of course, this means the second Carver has a 33% chance of being chosen. And note that there is a 0% chance of no Carver being chosen, since the Layer has a cave_spawn_chance of 100%.
This is a secondary carver that simply adds some old-school vanilla carver caves at the surface. These are helpful in connecting surface entrances to the Better Caves cave systems, which do not go above y=80 by default.
Note that this simply uses the vanilla minecraft:cave carver type, so there isn't really anything to explain here, but I've included the JSON here anyway for the sake of completion.
{
"type": "minecraft:cave",
"config": {
"floor_level": {
"type": "minecraft:uniform",
"max_exclusive": -0.4,
"min_inclusive": -1.0
},
"horizontal_radius_multiplier": {
"type": "minecraft:uniform",
"max_exclusive": 1.4,
"min_inclusive": 0.7
},
"lava_level": {
"above_bottom": 0
},
"probability": 0.15,
"replaceable": "#minecraft:overworld_carver_replaceables",
"vertical_radius_multiplier": {
"type": "minecraft:uniform",
"max_exclusive": 1.3,
"min_inclusive": 0.8
},
"y": {
"type": "minecraft:uniform",
"max_inclusive": {
"absolute": 180
},
"min_inclusive": {
"above_bottom": 80
}
},
"yScale": {
"type": "minecraft:uniform",
"max_exclusive": 0.9,
"min_inclusive": 0.1
}
}
}Besides the data pack JSON files, there is also another separate JSON file for configuring Liquid Regions, located at <minecraft folder>/config/bettercaves/<version folder>/liquidregions.json.
Liquid Regions simply refers to the system added by Better Caves that splits the world into distinct regions in the x-z plane, and then assigns either water or lava to that region. The chosen liquid block for a given region will then be used instead of air when a Carver carves that region, below a certain altitude. Check out the default JSON below:
{
"liquidRegions": {
"minecraft:overworld": {
"liquid_region_size": 0.001,
"water_region_spawn_chance": 40.0,
"liquid_altitude": -55
}
}
}
As you can see:
- The
water_region_spawn_chanceparameter shows that 40% of regions will be water, which means the remaining 60% will be lava. - The
liquid_altitudeis set to -55, so all blocks at and below this y-level will use the proper liquid block for this region, instead of air. - The
liquid_region_sizedetermines how large regions are. Like the other size parameters in the better_caves.json file, a smaller value here actually increases the size of liquid regions. Note that these liquid regions are completely distinct from the regions in Cave Layers.
Unlike the carvers which are added per-biome, Liquid Regions are added per-dimension. You can add Liquid Regions to other dimensions by simply adding another entry to the list in the liquidregions.json.