Noise router

This feature is exclusive to Java Edition.
 

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.

JSON format

The different density functions of the noise router and their uses.

  • [NBT Compound / JSON Object] noise_router: Each entry is one density function (an [String] ID, or a new [Double][NBT Compound / JSON Object] density function definition)
    • [String][Double][NBT Compound / JSON Object] initial_density_without_jaggedness: Used by the generation of aquifers and surface rules. At a horizontal position, starting from the top of the world, the game searches from top to bottom with the precision of size_vertical*4 blocks. The first Y-level whose noise value greater than 25/64 is used as the initial terrain height for world generation. This height should be generally lower than the actual terrain height (determined by the final density).
    • [String][Double][NBT Compound / JSON Object] final_density: Determines where there is an air or a default block. If positive, returns a default block that can be replaced by the surface rule. Otherwise, an air block where aquifers can generate.
    • [String][Double][NBT Compound / JSON Object] barrier: Affects whether to separate between aquifers and open areas in caves. Larger values leads to higher probability to separate.
    • [String][Double][NBT Compound / JSON Object] fluid_level_floodedness: Affects the probability of generating liquid in an cave for aquifer. The larger value leads to higher probability. The noise value greater than 1.0 is regarded as 1.0, and value less than -1.0 is regarded as -1.0.
    • [String][Double][NBT Compound / JSON Object] fluid_level_spread: Affects the height of the liquid surface at a horizonal position. Smaller value leads to higher probability for lower height.
    • [String][Double][NBT Compound / JSON Object] lava: Affects whether an aquifer here uses lava instead of water. The threshold is 0.3.
    • [String][Double][NBT Compound / JSON Object] vein_toggle: Affects ore vein type and vertical range. If the noise value is greater than 0.0, the vein is a copper vein. If the noise value is less than or equal to 0.0, the vein is an iron vein.
    • [String][Double][NBT Compound / JSON Object] vein_ridged: Controls which blocks are part of a vein. If greater than or equal to 0.0, the block is not part of a vein. If less than 0.0, the block is either the vein type's stone block, or possibly an ore block.
    • [String][Double][NBT Compound / JSON Object] vein_gap: Affects which blocks in a vein are ore blocks. If greater than -0.3, and a random number is less than the absolute value of vein_toggle mapped from 0.4 - 0.6 to 0.1 - 0.3, with values outside of this range clamped, an ore block is placed, with a 2% chance for the ore block to be a raw metal block. Otherwise, the ore type's stone block is placed.
    • [String][Double][NBT Compound / JSON Object] temperature: The temperature values only for biome placement. Note that this field and the following five fields do not affect terrain shape, as terrain generation is defined in final_density.
    • [String][Double][NBT Compound / JSON Object] vegetation: The humidity values only for biome placement.
    • [String][Double][NBT Compound / JSON Object] continents: The continentalness values only for biome placement.
    • [String][Double][NBT Compound / JSON Object] erosion: The erosion values only for biome placement and aquifer generation.
    • [String][Double][NBT Compound / JSON Object] depth: The depth values only for biome placement and aquifer generation.
    • [String][Double][NBT Compound / JSON Object] ridges: The weirdness values only for biome placement.

Final density

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.

Flat world

The side view of a flat world using the y_clamped_gradient density function

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
}

Noises

The side view of a world using a single noise
The side view of a world using noise, creating overhangs

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.

Navigation