Skip to content

Instantly share code, notes, and snippets.

@misode
Last active February 16, 2022 23:09
Show Gist options
  • Save misode/8fa66c37bd8a468d5090327c8acc519e to your computer and use it in GitHub Desktop.
Save misode/8fa66c37bd8a468d5090327c8acc519e to your computer and use it in GitHub Desktop.
Density functions in 22w07a
{
"type": "min",
"input_1": {
"type": "squeeze",
"input": {
"type": "mul",
"input_1": {
"type": "interpolated",
"input": {
"type": "blend",
"input": {
"type": "slide",
"settings": "minecraft:overworld",
"input": {
"type": "range_choice",
"input": { // #59 BASE NOISE
"type": "cache_once",
"input": {
"type": "add",
"input_1": { // #4
"type": "mul",
"input_1": {
"type": "mul",
"input_1": {
"type": "add",
"input_1": { // #56 DEPTH
"type": "add",
"input_1": {
"type": "y_clamped_gradient",
"from_y": -64,
"to_y": 320,
"from_value": 1.5,
"to_value": -1.5
},
"input_2": { // #53 OFFSET
"type": "flat_cache",
"input": {
"type": "cache_2d",
"input": {
"type": "lerp",
"from": {
"type": "blend_alpha"
},
"to": {
"type": "blend_offset"
},
"input": {
"type": "terrain_shaper_spline",
"continentalness": { // #50 CONTINENTALNESS
"type": "flat_cache",
"input": {
"type": "shifted_noise",
"shift_x": { // #7
"type": "flat_cache",
"input": {
"type": "cache_2d",
"input": {
"type": "shift_a",
"noise": "minecraft:offset"
}
}
},
"shift_y": {
"type": "constant",
"value": 0
},
"shift_z": { // #6
"type": "flat_cache",
"input": {
"type": "cache_2d",
"input": {
"type": "shift_b",
"noise": "minecraft:offset"
}
}
},
"xz_scale": 0.25,
"y_scale": 0,
"noise": "minecraft:continentalness"
}
},
"erosion": { // #51 EROSION
},
"weirdness": { // #52 WEIRDNESS
},
"spline": {
// OFFSET SPLINE
},
"min_value": -0.81,
"max_value": 2.5
}
}
}
}
},
"input_2": { // #54 FACTOR
}
},
"input_2": { // #58
"type": "mul",
"input_1": { // #55 JAGGEDNESS
},
"input_2": {
"type": "half_negative",
"input": { // #57
"type": "noise",
"noise": "minecraft:jagged",
"xz_scale": 1500,
"y_scale": 0
}
}
}
},
"input_2": {
"type": "constant",
"value": 4
}
},
"input_2": { // #8 NOODLE TOGGLE
}
}
},
"min_inclusive": -9999,
"max_exclusive": 1.5625,
"when_in_range": {
"type": "min",
"input_1": { // #59 BASE NOISE
},
"input_2": {
"type": "mul",
"input_1": {
"type": "constant",
"value": 5
},
"input_2": { // #37 SPAGHETTI CAVES
"type": "cache_once",
"input": {
"type": "min",
"input_1": { // #36
},
"input_2": {
"type": "add",
"input_1": { // #34
},
"input_2": { // #31
}
}
}
}
}
},
"when_out_of_range": { // #63
"type": "max",
"input_1": { // #62
"type": "min",
"input_1": {
"type": "min",
"input_1": { // #61
"type": "add",
"input_1": { // #39
},
"input_2": { // #60
"type": "add",
"input_1": {
"type": "constant",
"value": 0.27
},
"input_2": { // #40 CHEESE CAVES
}
}
},
"input_2": { // #37
}
},
"input_2": {
"type": "add",
"input_1": { // #26
},
"input_2": { // #18
}
}
},
"input_2": { // #18
}
}
}
}
}
},
"input_2": {
"type": "constant",
"value": 0.64
}
}
},
"input_2": { // #5 NOODLE CAVES
"type": "range_choice",
"input": { // #8 NOODLE TOGGLE
"type": "interpolated",
"input": {
"type": "range_choice",
"input": { // #41 NOODLE BOUNDS
"type": "y_clamped_gradient",
"from_y": -128,
"to_y": 640,
"from_value": -128,
"to_value": 640
},
"min_inclusive": -60,
"max_exclusive": 320,
"when_in_range": {
"type": "noise",
"noise": "minecraft:noodle"
},
"when_out_of_range": {
"type": "constant",
"value": -1
}
}
},
"min_inclusive": -9999,
"max_exclusive": 0,
"when_in_range": {
"type": "constant",
"value": 64
},
"when_out_of_range": {
"type": "add",
"input_1": {
"type": "interpolated",
"input": {
"type": "range_choice",
"input": { // #41
},
"min_inclusive": -60,
"max_exclusive": 320,
"when_in_range": {
"type": "map",
"input": {
"type": "noise",
"noise": "minecraft:noodle_thickness"
},
"from_value": -0.05,
"to_value": -0.1
},
"when_out_of_range": {
"type": "constant",
"value": 0
}
}
},
"input_2": {
"type": "mul",
"input_1": {
"type": "constant",
"value": 1.5
},
"input_2": {
"type": "max",
"input_1": {
"type": "abs",
"input": {
"type": "interpolated",
"input": {
"type": "range_choice",
"input": { // #41
},
"min_inclusive": -60,
"max_exclusive": 320,
"when_in_range": {
"type": "noise",
"noise": "minecraft:noodle_ridge_a",
"xz_scale": 2.6666666666666665,
"y_scale": 2.6666666666666665
},
"when_out_of_range": {
"type": "constant",
"value": 0
}
}
}
},
"input_2": {
"type": "abs",
"input": {
"type": "interpolated",
"input": {
"type": "range_choice",
"input": { // #41
},
"min_inclusive": -60,
"max_exclusive": 320,
"when_in_range": {
"type": "noise",
"noise": "minecraft:noodle_ridge_b",
"xz_scale": 2.6666666666666665,
"y_scale": 2.6666666666666665
},
"when_out_of_range": {
"type": "constant",
"value": 0
}
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment