Skip to content

Commit

Permalink
Fixed vanilla example
Browse files Browse the repository at this point in the history
  • Loading branch information
mschae23 committed Jul 26, 2022
1 parent 412e00e commit 067a77c
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/minecraft.densityfunction
Original file line number Diff line number Diff line change
Expand Up @@ -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
} }

Expand Down
12 changes: 6 additions & 6 deletions test/offset_factor_jaggedness.densityfunction
Original file line number Diff line number Diff line change
Expand Up @@ -502,23 +502,23 @@ 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", [
spline_point(-0.01, 0.63),
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", [
spline_point(-0.01, 0.315),
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", [
Expand All @@ -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),
Expand All @@ -540,15 +540,15 @@ 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", [
spline_point(-0.01, 0.63),
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", [
Expand Down
18 changes: 18 additions & 0 deletions test/target/overworld/caves/entrances.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
6 changes: 6 additions & 0 deletions test/target/overworld/caves/spaghetti_2d.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
12 changes: 6 additions & 6 deletions test/target/overworld/jaggedness.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"derivative": 0.0,
"location": -1.0,
"value": {
"coordinate": "minecraft:ridges_folded",
"coordinate": "minecraft:overworld/ridges_folded",
"points": [
{
"derivative": 0.0,
Expand Down Expand Up @@ -71,7 +71,7 @@
"derivative": 0.0,
"location": -0.78,
"value": {
"coordinate": "minecraft:ridges_folded",
"coordinate": "minecraft:overworld/ridges_folded",
"points": [
{
"derivative": 0.0,
Expand Down Expand Up @@ -109,7 +109,7 @@
"derivative": 0.0,
"location": -0.5775,
"value": {
"coordinate": "minecraft:ridges_folded",
"coordinate": "minecraft:overworld/ridges_folded",
"points": [
{
"derivative": 0.0,
Expand Down Expand Up @@ -161,7 +161,7 @@
"derivative": 0.0,
"location": -1.0,
"value": {
"coordinate": "minecraft:ridges_folded",
"coordinate": "minecraft:overworld/ridges_folded",
"points": [
{
"derivative": 0.0,
Expand Down Expand Up @@ -213,7 +213,7 @@
"derivative": 0.0,
"location": -0.78,
"value": {
"coordinate": "minecraft:ridges_folded",
"coordinate": "minecraft:overworld/ridges_folded",
"points": [
{
"derivative": 0.0,
Expand Down Expand Up @@ -251,7 +251,7 @@
"derivative": 0.0,
"location": -0.5775,
"value": {
"coordinate": "minecraft:ridges_folded",
"coordinate": "minecraft:overworld/ridges_folded",
"points": [
{
"derivative": 0.0,
Expand Down

0 comments on commit 067a77c

Please sign in to comment.