Minecraft:Noise router: Difference between revisions
More actions
Sync: new page from Minecraft |
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 | |{{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.
- Template:Nbt: Each entry is Template:Json ref
- Template:NbtTemplate:NbtTemplate:NbtTemplate:Until / Template:NbtTemplate:NbtTemplate:NbtTemplate:Upcoming: 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.
- Template:NbtTemplate:NbtTemplate:Nbt: 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.
- Template:NbtTemplate:NbtTemplate:Nbt: Affects whether to separate between aquifers and open areas in caves. Larger values leads to higher probability to separate.
- Template:NbtTemplate:NbtTemplate:Nbt: 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.
- Template:NbtTemplate:NbtTemplate:Nbt: Affects the height of the liquid surface at a horizontal position. Smaller value leads to higher probability for lower height.
- Template:NbtTemplate:NbtTemplate:Nbt: Affects whether an aquifer here uses lava instead of water. The threshold is 0.3.
- Template:NbtTemplate:NbtTemplate:Nbt: Affects Minecraft:ore vein type, vertical range and richness, given a vein of the appropriate type can generate at the location. If the Y coordinate is between 0 and 50 (inclusive), and the noise value is greater than 0.0, the vein is a copper vein. If the Y coordinate is between -60 and -8 (inclusive), and the noise value is less than or equal to 0.0, the vein is an iron vein. Veins generate where this value is at least 0.4 at 20 blocks from the limits and at least 0.6 at the limits, with a linear falloff.
- Template:NbtTemplate:NbtTemplate:Nbt: 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 has a 30% probability to be replaced by either the vein type's filler block, or possibly an ore block.
- Template:NbtTemplate:NbtTemplate:Nbt: Affects which blocks in a vein are ore blocks. If this is less than or equal to -0.3, the vein type's stone block is placed. Otherwise, with a probability equal to the absolute value of vein_toggle mapped from 0.4 - 0.6 to 10% - 30%, with values outside of this range clamped, an ore block is placed, with a further 2% chance for the ore block to be a raw metal block.
- Template:NbtTemplate:NbtTemplate:Nbt: 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.
- Template:NbtTemplate:NbtTemplate:Nbt: The humidity values only for biome placement.
- Template:NbtTemplate:NbtTemplate:Nbt: The continentalness values only for biome placement.
- Template:NbtTemplate:NbtTemplate:Nbt: The erosion values only for biome placement and aquifer generation.
- Template:NbtTemplate:NbtTemplate:Nbt: The depth values only for biome placement and aquifer generation.
- Template:NbtTemplate:NbtTemplate:Nbt: The weirdness values only for biome placement.
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
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
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:Navbox Java Edition technical
Minecraft:de:Rausch-Router Minecraft:fr:Routeur de bruit Minecraft:ko:Noise router Minecraft:pt:Roteamento de ruído