Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Noise router: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Sync: new page from Minecraft
 
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
Line 6: Line 6:
<div class="treeview">
<div class="treeview">
* {{nbt|compound|noise_router}}: Each entry is {{lcfirst: {{json ref|density function|inline=1|inline_type={{nbt|double}}{{nbt|compound}}}}}}
* {{nbt|compound|noise_router}}: Each entry is {{lcfirst: {{json ref|density function|inline=1|inline_type={{nbt|double}}{{nbt|compound}}}}}}
** {{nbt|string}}{{nbt|double}}{{nbt|compound|preliminary_surface_level}}: A 2D density function (sampled at Y=0) determining the Y-level of the preliminary surface; should generally be lower than the actual terrain height (determined by the final density). Used by the generation of aquifers and surface rules.
** {{nbt|string}}{{nbt|double}}{{nbt|compound|preliminary_surface_level}}{{until|JE 26.3}} / {{nbt|string}}{{nbt|double}}{{nbt|compound|chunk_surface_level}}{{upcoming|JE 26.3}}: A 2D density function (sampled at Y=0) determining the Y-level of the preliminary surface; should generally be lower than the actual terrain height (determined by the final density). Used by the generation of aquifers and surface rules.
** {{nbt|string}}{{nbt|double}}{{nbt|compound|final_density}}: Determines where there is an air or a default block. If positive, returns a default block that can be replaced by the [[Minecraft:surface rule]]. Otherwise, an air block where aquifers can generate.
** {{nbt|string}}{{nbt|double}}{{nbt|compound|final_density}}: Determines where there is an air or a default block. If positive, returns a default block that can be replaced by the [[Minecraft:surface rule]]. Otherwise, an air block where aquifers can generate.
** {{nbt|string}}{{nbt|double}}{{nbt|compound|barrier}}: Affects whether to separate between aquifers and open areas in caves. Larger values leads to higher probability to separate.
** {{nbt|string}}{{nbt|double}}{{nbt|compound|barrier}}: Affects whether to separate between aquifers and open areas in caves. Larger values leads to higher probability to separate.
Line 121: Line 121:
|{{HistoryLine|java}}
|{{HistoryLine|java}}
|{{HistoryLine||1.18.2|dev=pre1|Added noise router to noise settings}}
|{{HistoryLine||1.18.2|dev=pre1|Added noise router to noise settings}}
|{{HistoryLine||1.21.9|dev=25w31a|Replaced <code>initial_density_without_jaggedness</code> with <code>preliminary_surface_level</code> determining the preliminary surface directly, instead of by scanning the initial density.}}
|{{HistoryLine||1.21.9|dev=25w31a|Replaced {{cd|initial_density_without_jaggedness}} with {{cd|preliminary_surface_level}} determining the preliminary surface directly, instead of by scanning the initial density.}}
|{{HistoryLine|java upcoming}}
|{{HistoryLine||26.3|dev=snap10|{{cd|preliminary_surface_level}} has been renamed to {{cd|chunk_surface_level}}.}}
}}
}}



Latest revision as of 11:20, 28 August 2026

Template:Exclusive The noise router is a collection of Minecraft: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.

Final density

Template:Cd 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 Minecraft:air or the default_fluid is placed, decided by the aquifer logic. Only afterward, the default_block is replaced with other blocks using the Minecraft: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. Template:Collapse Template:Filename <syntaxhighlight lang="json" highlight="34"> {

 "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": []
 }

} </syntaxhighlight> Template:Collapse

Flat world

File:Noise router diagram flat world.png
The side view of a flat world using the y_clamped_gradient density function

Using the [[Minecraft:Density function#y_clamped_gradient|Template:Cd 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. <syntaxhighlight lang="json"> {

 "type": "minecraft:y_clamped_gradient",
 "from_y": -64,
 "to_y": 320,
 "from_value": 1,
 "to_value": -1

} </syntaxhighlight>

Noises

File:Noise router diagram simple noise.png
The side view of a world using a single noise
File:Noise router diagram simple noise (overhangs).png
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 Template:Cd to a noise, the height of the terrain is based on a noise that varies along the X and Z coordinates. <syntaxhighlight lang="json" highlight="2,10-15"> {

 "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
 }

} </syntaxhighlight>

The noise can be scaled to alter the results. Using <syntaxhighlight lang="json" inline>"xz_scale": 0.5</syntaxhighlight> makes the terrain smoother.

To get overhangs, the noise also needs to vary along the Y coordinate. This can be done with <syntaxhighlight lang="json" inline>"xz_scale": 1</syntaxhighlight> and <syntaxhighlight lang="json" inline>"y_scale": 1</syntaxhighlight>.

History

Template:HistoryTable

Navigation

Template:Navbox Java Edition technical

Minecraft:de:Rausch-Router Minecraft:fr:Routeur de bruit Minecraft:ko:Noise router Minecraft:pt:Roteamento de ruído