Mapped Noise
- Id:
moderner_beta:mapped_noise
- Inputs: none
- Uses seed: yes
- Added in: 3.0.0
The Mapped Noise layer allows for the use of perlin noise within the layer pipeline. While perlin noise is typically used for generating numbers, limitiations with the fractal layer system lead to the noise instead returning biomes based on the numbers. There must be a biome associated with the value 0 or else the layer will fail.
Properties
values
- Type:
list[{value: double, biome: biome}]
- Default: required
- Description: A list of biomes to map noise values to. There must be an entry with a value of 0. Entries with values above 0 are outputted if the noise is above these values and entries with value below 0 are outputted when the noise value is below these values.
- Type:
scale
- Type:
double
- Default:
1
- Description: The scale of the noise. Larger values result in larger noise.
- Type:
amplitudes
- Type:
list[double]
- Default:
[1]
- Description: A list of amplitudes to apply to the noise. Behaves exactly like vanilla Minecraft's noise parameters. Supplying more amplitudes increases the amount of octaves of noise.
- Type:
useSaltedSeed
- Type:
bool
- Default:
true
- Description: When set to false, the seed used for the noise is exactly the same as the world seed. Keeping this set to true allows for multiple mapped noise layers with different shapes.
- Type:
Example
The Mapped Noise layer is used for generating ocean climates in the 1.17.1 preset.
JSON
json
{
"scale": 8.0,
"amplitudes": [
1.0
],
"useSaltedSeed": false,
"id": "ocean_climate",
"seed": 2,
"values": [
{
"value": -0.4,
"biome": "minecraft:frozen_ocean"
},
{
"value": -0.2,
"biome": "minecraft:cold_ocean"
},
{
"value": 0.0,
"biome": "minecraft:ocean"
},
{
"value": 0.4,
"biome": "minecraft:warm_ocean"
},
{
"value": 0.2,
"biome": "minecraft:lukewarm_ocean"
}
],
"type": "moderner_beta:mapped_noise"
}
Pseudocode
python
noise = sample_noise(x, z)
if noise < -0.4:
return "minecraft:frozen_ocean"
elif noise < -0.2:
return "minecraft:cold_ocean"
elif noise > 0.2:
return "minecraft:lukewarm_ocean"
elif noise > 0.4:
return "minecraft:warm_ocean"
else
return "minecraft:ocean"
Output