From 067a77c4f0c14748adbb06f8a5dd5be21f15b48a Mon Sep 17 00:00:00 2001 From: mschae23 <46165762+mschae23@users.noreply.github.com> Date: Tue, 26 Jul 2022 15:38:46 +0200 Subject: [PATCH] Fixed vanilla example --- Cargo.lock | 2 +- Cargo.toml | 2 +- test/minecraft.densityfunction | 4 ++-- test/offset_factor_jaggedness.densityfunction | 12 ++++++------ test/target/overworld/caves/entrances.json | 18 ++++++++++++++++++ test/target/overworld/caves/spaghetti_2d.json | 6 ++++++ test/target/overworld/jaggedness.json | 12 ++++++------ 7 files changed, 40 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1181878..b9cac51 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -66,7 +66,7 @@ dependencies = [ [[package]] name = "density_function_lang" -version = "3.0.1" +version = "3.1.0" dependencies = [ "clap", "lazy_static", diff --git a/Cargo.toml b/Cargo.toml index d716438..ba2b792 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "density_function_lang" -version = "3.0.1" +version = "3.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/test/minecraft.densityfunction b/test/minecraft.densityfunction index b8724b3..8edda50 100644 --- a/test/minecraft.densityfunction +++ b/test/minecraft.densityfunction @@ -132,8 +132,8 @@ module df { template quarter_negative(arg) { simple_1("minecraft:quarter_negative", arg) } template squeeze(arg) { simple_1("minecraft:squeeze", arg) } - template weird_scaled_sampler(arg, noise, rarity_value_mapper) { { - "type": "minecraft:weird_scaled_sampler", + template weird_scaled_sampler(input, noise, rarity_value_mapper) { { + "type": "minecraft:weird_scaled_sampler", "input": input, "noise": noise, "rarity_value_mapper": rarity_value_mapper } } diff --git a/test/offset_factor_jaggedness.densityfunction b/test/offset_factor_jaggedness.densityfunction index 41f95be..901cf14 100644 --- a/test/offset_factor_jaggedness.densityfunction +++ b/test/offset_factor_jaggedness.densityfunction @@ -502,7 +502,7 @@ export jaggedness = apply_blending(df_spline( spline("minecraft:overworld/continents", [ spline_point(-0.11, 0.0), spline_point(0.03, spline("minecraft:overworld/erosion", [ - spline_point(-1.0, spline("minecraft:ridges_folded", [ + spline_point(-1.0, spline("minecraft:overworld/ridges_folded", [ spline_point(0.19999999, 0.0), spline_point(0.44999996, 0.0), spline_point(1.0, spline("minecraft:overworld/ridges", [ @@ -510,7 +510,7 @@ export jaggedness = apply_blending(df_spline( spline_point(-0.01, 0.3), ])), ])), - spline_point(-0.78, spline("minecraft:ridges_folded", [ + spline_point(-0.78, spline("minecraft:overworld/ridges_folded", [ spline_point(0.19999999, 0.0), spline_point(0.44999996, 0.0), spline_point(1.0, spline("minecraft:overworld/ridges", [ @@ -518,7 +518,7 @@ export jaggedness = apply_blending(df_spline( spline_point(-0.01, 0.15), ])), ])), - spline_point(-0.5775, spline("minecraft:ridges_folded", [ + spline_point(-0.5775, spline("minecraft:overworld/ridges_folded", [ spline_point(0.19999999, 0.0), spline_point(0.44999996, 0.0), spline_point(1.0, spline("minecraft:overworld/ridges", [ @@ -529,7 +529,7 @@ export jaggedness = apply_blending(df_spline( spline_point(-0.375, 0.0), ])), spline_point(0.65, spline("minecraft:overworld/erosion", [ - spline_point(-1.0, spline("minecraft:ridges_folded", [ + spline_point(-1.0, spline("minecraft:overworld/ridges_folded", [ spline_point(0.19999999, 0.0), spline_point(0.44999996, spline("minecraft:overworld/ridges", [ spline_point(-0.01, 0.63), @@ -540,7 +540,7 @@ export jaggedness = apply_blending(df_spline( spline_point(-0.01, 0.3), ])), ])), - spline_point(-0.78, spline("minecraft:ridges_folded", [ + spline_point(-0.78, spline("minecraft:overworld/ridges_folded", [ spline_point(0.19999999, 0.0), spline_point(0.44999996, 0.0), spline_point(1.0, spline("minecraft:overworld/ridges", [ @@ -548,7 +548,7 @@ export jaggedness = apply_blending(df_spline( spline_point(-0.01, 0.3), ])), ])), - spline_point(-0.5775, spline("minecraft:ridges_folded", [ + spline_point(-0.5775, spline("minecraft:overworld/ridges_folded", [ spline_point(0.19999999, 0.0), spline_point(0.44999996, 0.0), spline_point(1.0, spline("minecraft:overworld/ridges", [ diff --git a/test/target/overworld/caves/entrances.json b/test/target/overworld/caves/entrances.json index 99e46a0..731ed1d 100644 --- a/test/target/overworld/caves/entrances.json +++ b/test/target/overworld/caves/entrances.json @@ -33,11 +33,29 @@ "type": "minecraft:max", "argument1": { "type": "minecraft:weird_scaled_sampler", + "input": { + "type": "minecraft:cache_once", + "argument": { + "type": "minecraft:noise", + "noise": "minecraft:spaghetti_3d_rarity", + "xz_scale": 2.0, + "y_scale": 1.0 + } + }, "noise": "minecraft:spaghetti_3d_1", "rarity_value_mapper": "type_1" }, "argument2": { "type": "minecraft:weird_scaled_sampler", + "input": { + "type": "minecraft:cache_once", + "argument": { + "type": "minecraft:noise", + "noise": "minecraft:spaghetti_3d_rarity", + "xz_scale": 2.0, + "y_scale": 1.0 + } + }, "noise": "minecraft:spaghetti_3d_2", "rarity_value_mapper": "type_1" } diff --git a/test/target/overworld/caves/spaghetti_2d.json b/test/target/overworld/caves/spaghetti_2d.json index b88dda8..bebee3e 100644 --- a/test/target/overworld/caves/spaghetti_2d.json +++ b/test/target/overworld/caves/spaghetti_2d.json @@ -6,6 +6,12 @@ "type": "minecraft:add", "argument1": { "type": "minecraft:weird_scaled_sampler", + "input": { + "type": "minecraft:noise", + "noise": "minecraft:spaghetti_2d_modulator", + "xz_scale": 2.0, + "y_scale": 1.0 + }, "noise": "minecraft:spaghetti_2d", "rarity_value_mapper": "type_2" }, diff --git a/test/target/overworld/jaggedness.json b/test/target/overworld/jaggedness.json index f7ae509..6122853 100644 --- a/test/target/overworld/jaggedness.json +++ b/test/target/overworld/jaggedness.json @@ -33,7 +33,7 @@ "derivative": 0.0, "location": -1.0, "value": { - "coordinate": "minecraft:ridges_folded", + "coordinate": "minecraft:overworld/ridges_folded", "points": [ { "derivative": 0.0, @@ -71,7 +71,7 @@ "derivative": 0.0, "location": -0.78, "value": { - "coordinate": "minecraft:ridges_folded", + "coordinate": "minecraft:overworld/ridges_folded", "points": [ { "derivative": 0.0, @@ -109,7 +109,7 @@ "derivative": 0.0, "location": -0.5775, "value": { - "coordinate": "minecraft:ridges_folded", + "coordinate": "minecraft:overworld/ridges_folded", "points": [ { "derivative": 0.0, @@ -161,7 +161,7 @@ "derivative": 0.0, "location": -1.0, "value": { - "coordinate": "minecraft:ridges_folded", + "coordinate": "minecraft:overworld/ridges_folded", "points": [ { "derivative": 0.0, @@ -213,7 +213,7 @@ "derivative": 0.0, "location": -0.78, "value": { - "coordinate": "minecraft:ridges_folded", + "coordinate": "minecraft:overworld/ridges_folded", "points": [ { "derivative": 0.0, @@ -251,7 +251,7 @@ "derivative": 0.0, "location": -0.5775, "value": { - "coordinate": "minecraft:ridges_folded", + "coordinate": "minecraft:overworld/ridges_folded", "points": [ { "derivative": 0.0,