![]() |
VOOZH | about |
The noise router is a collection of density functions. Density functions compute a value for each block position. They are used for terrain generation, biome layout, aquifers, ore veins, and more. A noise router is a part of a dimension's noise settings.
The different density functions of the noise router and their uses.
final_density is the main density function that determines whether a block position should be solid or air. If the function returns a value greater than 0, the noise settings' default_block is placed. Otherwise, either air or the default_fluid is placed, decided by the aquifer logic. Only afterward, the default_block is replaced with other blocks using the surface rules.
Setting the final density is set to 0 results in a void dimension, similarly setting it to 1 would completely fill the world with stone.
data/minecraft/worldgen/noise_settings/overworld.json{ "sea_level":-64, "disable_mob_generation":false, "aquifers_enabled":false, "ore_veins_enabled":false, "legacy_random_source":false, "default_block":{ "Name":"minecraft:stone" }, "default_fluid":{ "Name":"minecraft:water", "Properties":{ "level":"0" } }, "noise":{ "min_y":-64, "height":384, "size_horizontal":2, "size_vertical":2 }, "noise_router":{ "barrier":0, "fluid_level_floodedness":0, "fluid_level_spread":0, "lava":0, "temperature":0, "vegetation":0, "continents":0, "erosion":0, "depth":0, "ridges":0, "initial_density_without_jaggedness":0, "final_density":0, "vein_toggle":0, "vein_ridged":0, "vein_gap":0 }, "spawn_target":[], "surface_rule":{ "type":"minecraft:sequence", "sequence":[] } }
Using the y_clamped_gradient density function, a flat world can be created. In the following example positions at Y=-64 get a density of 1 and positions at Y=320 get a density of -1.
{ "type":"minecraft:y_clamped_gradient", "from_y":-64, "to_y":320, "from_value":1, "to_value":-1 }
To bring some variety to the world, a noise is needed. By adding the previous y_clamped_gradient to a noise, the height of the terrain is based on a noise that varies along the X and Z coordinates.
{ "type":"minecraft:add", "argument1":{ "type":"minecraft:y_clamped_gradient", "from_y":-64, "to_y":320, "from_value":1, "to_value":-1 }, "argument2":{ "type":"minecraft:noise", "noise":"minecraft:gravel", "xz_scale":2, "y_scale":0 } }
The noise can be scaled to alter the results. Using "xz_scale":0.5 makes the terrain smoother.
To get overhangs, the noise also needs to vary along the Y coordinate. This can be done with "xz_scale":1 and "y_scale":1.
| Java Edition | |||||||
|---|---|---|---|---|---|---|---|
| 1.18.2 | pre1 | Added noise router to noise settings | |||||
| 1.21.9 | 25w31a | Replaced initial_density_without_jaggedness with preliminary_surface_level determining the preliminary surface directly, instead of by scanning the initial density. | |||||