chore: parse DoublePerlinNoiseParameters at compile time
This commit is contained in:
parent
823914ec1c
commit
744664cb2f
48
Cargo.lock
generated
48
Cargo.lock
generated
@ -1415,19 +1415,19 @@ checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"libc",
|
"libc",
|
||||||
"r-efi",
|
"r-efi 5.3.0",
|
||||||
"wasip2",
|
"wasip2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "getrandom"
|
name = "getrandom"
|
||||||
version = "0.4.1"
|
version = "0.4.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec"
|
checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"libc",
|
"libc",
|
||||||
"r-efi",
|
"r-efi 6.0.0",
|
||||||
"rand_core 0.10.0",
|
"rand_core 0.10.0",
|
||||||
"wasip2",
|
"wasip2",
|
||||||
"wasip3",
|
"wasip3",
|
||||||
@ -1958,9 +1958,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "js-sys"
|
name = "js-sys"
|
||||||
version = "0.3.87"
|
version = "0.3.91"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "93f0862381daaec758576dcc22eb7bbf4d7efd67328553f3b45a412a51a3fb21"
|
checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
@ -2896,9 +2896,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "1.0.44"
|
version = "1.0.45"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
|
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
]
|
]
|
||||||
@ -2909,6 +2909,12 @@ version = "5.3.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
|
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "r-efi"
|
||||||
|
version = "6.0.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "radix_trie"
|
name = "radix_trie"
|
||||||
version = "0.2.1"
|
version = "0.2.1"
|
||||||
@ -2937,7 +2943,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "bc266eb313df6c5c09c1c7b1fbe2510961e5bcd3add930c1e31f7ed9da0feff8"
|
checksum = "bc266eb313df6c5c09c1c7b1fbe2510961e5bcd3add930c1e31f7ed9da0feff8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chacha20",
|
"chacha20",
|
||||||
"getrandom 0.4.1",
|
"getrandom 0.4.2",
|
||||||
"rand_core 0.10.0",
|
"rand_core 0.10.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -3631,7 +3637,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0"
|
checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"fastrand",
|
"fastrand",
|
||||||
"getrandom 0.4.1",
|
"getrandom 0.3.4",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"rustix 1.1.4",
|
"rustix 1.1.4",
|
||||||
"windows-sys 0.61.2",
|
"windows-sys 0.61.2",
|
||||||
@ -4142,11 +4148,11 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "uuid"
|
name = "uuid"
|
||||||
version = "1.21.0"
|
version = "1.22.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b672338555252d43fd2240c714dc444b8c6fb0a5c5335e65a07bba7742735ddb"
|
checksum = "a68d3c8f01c0cfa54a75291d83601161799e4a89a39e0929f4b0354d88757a37"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"getrandom 0.4.1",
|
"getrandom 0.4.2",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"md-5",
|
"md-5",
|
||||||
"serde_core",
|
"serde_core",
|
||||||
@ -4210,9 +4216,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen"
|
name = "wasm-bindgen"
|
||||||
version = "0.2.110"
|
version = "0.2.114"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1de241cdc66a9d91bd84f097039eb140cdc6eec47e0cdbaf9d932a1dd6c35866"
|
checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
@ -4223,9 +4229,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-macro"
|
name = "wasm-bindgen-macro"
|
||||||
version = "0.2.110"
|
version = "0.2.114"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e12fdf6649048f2e3de6d7d5ff3ced779cdedee0e0baffd7dff5cdfa3abc8a52"
|
checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
"wasm-bindgen-macro-support",
|
"wasm-bindgen-macro-support",
|
||||||
@ -4233,9 +4239,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-macro-support"
|
name = "wasm-bindgen-macro-support"
|
||||||
version = "0.2.110"
|
version = "0.2.114"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0e63d1795c565ac3462334c1e396fd46dbf481c40f51f5072c310717bc4fb309"
|
checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bumpalo",
|
"bumpalo",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
@ -4246,9 +4252,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-shared"
|
name = "wasm-bindgen-shared"
|
||||||
version = "0.2.110"
|
version = "0.2.114"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e9f9cdac23a5ce71f6bf9f8824898a501e511892791ea2a0c6b8568c68b9cb53"
|
checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
|||||||
@ -101,7 +101,7 @@ futures = { version = "0.3", default-features = false, features = ["executor"] }
|
|||||||
rayon = "1.11"
|
rayon = "1.11"
|
||||||
crossbeam = "0.8"
|
crossbeam = "0.8"
|
||||||
|
|
||||||
uuid = { version = "1.21", features = ["serde", "v3", "v4"] }
|
uuid = { version = "1.22", features = ["serde", "v3", "v4"] }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ console-subscriber = { version = "0.5.0", default-features = false }
|
|||||||
crc-fast = "1.10.0"
|
crc-fast = "1.10.0"
|
||||||
criterion = { version = "0.8", default-features = false }
|
criterion = { version = "0.8", default-features = false }
|
||||||
crossbeam-utils = "0.8.21"
|
crossbeam-utils = "0.8.21"
|
||||||
crossfire = { version = "3.1.4", features = ["compat"] }
|
crossfire = { version = "3.1.5", features = ["compat"] }
|
||||||
dashmap = "6.1"
|
dashmap = "6.1"
|
||||||
ecdsa = "0.16.9"
|
ecdsa = "0.16.9"
|
||||||
enum_dispatch = "0.3.13"
|
enum_dispatch = "0.3.13"
|
||||||
@ -178,5 +178,5 @@ wasmtime-wasi = "42.0"
|
|||||||
wit-bindgen = "0.53"
|
wit-bindgen = "0.53"
|
||||||
wasmparser = "0.245"
|
wasmparser = "0.245"
|
||||||
|
|
||||||
postcard = { version = "1.0", features = ["alloc"] }
|
postcard = { version = "1.1", features = ["alloc"] }
|
||||||
tracing-serde-structured = "0.4"
|
tracing-serde-structured = "0.4"
|
||||||
|
|||||||
4
pumpkin-codegen/Cargo.lock
generated
4
pumpkin-codegen/Cargo.lock
generated
@ -863,9 +863,9 @@ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "uuid"
|
name = "uuid"
|
||||||
version = "1.21.0"
|
version = "1.22.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b672338555252d43fd2240c714dc444b8c6fb0a5c5335e65a07bba7742735ddb"
|
checksum = "a68d3c8f01c0cfa54a75291d83601161799e4a89a39e0929f4b0354d88757a37"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"getrandom 0.4.1",
|
"getrandom 0.4.1",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
use heck::ToShoutySnakeCase;
|
||||||
use proc_macro2::TokenStream;
|
use proc_macro2::TokenStream;
|
||||||
use quote::{ToTokens, format_ident, quote};
|
use quote::{ToTokens, format_ident, quote};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
@ -211,9 +212,17 @@ impl ToTokens for MaterialConditionStruct {
|
|||||||
min_threshold,
|
min_threshold,
|
||||||
max_threshold,
|
max_threshold,
|
||||||
} => {
|
} => {
|
||||||
|
let noise_id = quote::format_ident!(
|
||||||
|
"{}",
|
||||||
|
noise
|
||||||
|
.strip_prefix("minecraft:")
|
||||||
|
.unwrap()
|
||||||
|
.to_shouty_snake_case()
|
||||||
|
);
|
||||||
|
|
||||||
tokens.extend(quote!(
|
tokens.extend(quote!(
|
||||||
MaterialCondition::NoiseThreshold(NoiseThresholdMaterialCondition {
|
MaterialCondition::NoiseThreshold(NoiseThresholdMaterialCondition {
|
||||||
noise: #noise,
|
noise: DoublePerlinNoiseParameters::#noise_id,
|
||||||
min_threshold: #min_threshold,
|
min_threshold: #min_threshold,
|
||||||
max_threshold: #max_threshold,
|
max_threshold: #max_threshold,
|
||||||
})
|
})
|
||||||
@ -363,6 +372,8 @@ pub fn build() -> TokenStream {
|
|||||||
|
|
||||||
quote!(
|
quote!(
|
||||||
use crate::dimension::Dimension;
|
use crate::dimension::Dimension;
|
||||||
|
use crate::chunk::DoublePerlinNoiseParameters;
|
||||||
|
|
||||||
use std::{cell::RefCell, num::NonZeroUsize};
|
use std::{cell::RefCell, num::NonZeroUsize};
|
||||||
use pumpkin_util::random::RandomDeriver;
|
use pumpkin_util::random::RandomDeriver;
|
||||||
use pumpkin_util::y_offset::YOffset;
|
use pumpkin_util::y_offset::YOffset;
|
||||||
@ -393,11 +404,11 @@ pub fn build() -> TokenStream {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl GenerationShapeConfig {
|
impl GenerationShapeConfig {
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub const fn vertical_cell_block_count(&self) -> u8 { self.size_vertical << 2 }
|
pub const fn vertical_cell_block_count(&self) -> u8 { self.size_vertical << 2 }
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub const fn horizontal_cell_block_count(&self) -> u8 { self.size_horizontal << 2 }
|
pub const fn horizontal_cell_block_count(&self) -> u8 { self.size_horizontal << 2 }
|
||||||
|
|
||||||
@ -462,7 +473,7 @@ pub fn build() -> TokenStream {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub struct NoiseThresholdMaterialCondition {
|
pub struct NoiseThresholdMaterialCondition {
|
||||||
pub noise: &'static str,
|
pub noise: DoublePerlinNoiseParameters,
|
||||||
pub min_threshold: f64,
|
pub min_threshold: f64,
|
||||||
pub max_threshold: f64,
|
pub max_threshold: f64,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@ use std::fs;
|
|||||||
|
|
||||||
use crate::placed_feature::{
|
use crate::placed_feature::{
|
||||||
value_to_block_direction, value_to_block_predicate, value_to_block_state_codec,
|
value_to_block_direction, value_to_block_predicate, value_to_block_state_codec,
|
||||||
value_to_height_provider, value_to_int_provider, value_to_y_offset,
|
value_to_height_provider, value_to_int_provider,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn build() -> TokenStream {
|
pub fn build() -> TokenStream {
|
||||||
@ -199,14 +199,20 @@ pub fn value_to_configured_feature(v: &Value) -> TokenStream {
|
|||||||
}
|
}
|
||||||
"minecraft:ore" | "minecraft:scattered_ore" => {
|
"minecraft:ore" | "minecraft:scattered_ore" => {
|
||||||
let size = config["size"].as_i64().unwrap_or(0) as i32;
|
let size = config["size"].as_i64().unwrap_or(0) as i32;
|
||||||
let discard = config["discard_chance_on_air_exposure"].as_f64().unwrap_or(0.0) as f32;
|
let discard = config["discard_chance_on_air_exposure"]
|
||||||
|
.as_f64()
|
||||||
|
.unwrap_or(0.0) as f32;
|
||||||
let targets: Vec<TokenStream> = config["targets"]
|
let targets: Vec<TokenStream> = config["targets"]
|
||||||
.as_array()
|
.as_array()
|
||||||
.map(|arr| arr.iter().map(|t| {
|
.map(|arr| {
|
||||||
let rule = value_to_rule_test(&t["target"]);
|
arr.iter()
|
||||||
let state = value_to_block_state_codec(&t["state"]);
|
.map(|t| {
|
||||||
quote! { OreTarget { target: #rule, state: #state } }
|
let rule = value_to_rule_test(&t["target"]);
|
||||||
}).collect())
|
let state = value_to_block_state_codec(&t["state"]);
|
||||||
|
quote! { OreTarget { target: #rule, state: #state } }
|
||||||
|
})
|
||||||
|
.collect()
|
||||||
|
})
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
if type_str == "minecraft:scattered_ore" {
|
if type_str == "minecraft:scattered_ore" {
|
||||||
quote! {
|
quote! {
|
||||||
@ -243,11 +249,15 @@ pub fn value_to_configured_feature(v: &Value) -> TokenStream {
|
|||||||
"minecraft:block_column" => {
|
"minecraft:block_column" => {
|
||||||
let layers: Vec<TokenStream> = config["layers"]
|
let layers: Vec<TokenStream> = config["layers"]
|
||||||
.as_array()
|
.as_array()
|
||||||
.map(|arr| arr.iter().map(|l| {
|
.map(|arr| {
|
||||||
let h = value_to_int_provider(&l["height"]);
|
arr.iter()
|
||||||
let p = value_to_block_state_provider(&l["provider"]);
|
.map(|l| {
|
||||||
quote! { Layer { height: #h, provider: #p } }
|
let h = value_to_int_provider(&l["height"]);
|
||||||
}).collect())
|
let p = value_to_block_state_provider(&l["provider"]);
|
||||||
|
quote! { Layer { height: #h, provider: #p } }
|
||||||
|
})
|
||||||
|
.collect()
|
||||||
|
})
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
let dir = value_to_block_direction(config["direction"].as_str().unwrap_or("up"));
|
let dir = value_to_block_direction(config["direction"].as_str().unwrap_or("up"));
|
||||||
let allowed = value_to_block_predicate(&config["allowed_placement"]);
|
let allowed = value_to_block_predicate(&config["allowed_placement"]);
|
||||||
@ -291,11 +301,15 @@ pub fn value_to_configured_feature(v: &Value) -> TokenStream {
|
|||||||
"minecraft:random_selector" => {
|
"minecraft:random_selector" => {
|
||||||
let entries: Vec<TokenStream> = config["features"]
|
let entries: Vec<TokenStream> = config["features"]
|
||||||
.as_array()
|
.as_array()
|
||||||
.map(|arr| arr.iter().map(|e| {
|
.map(|arr| {
|
||||||
let feat = value_to_placed_feature_wrapper(&e["feature"]);
|
arr.iter()
|
||||||
let chance = e["chance"].as_f64().unwrap_or(0.1) as f32;
|
.map(|e| {
|
||||||
quote! { RandomFeatureEntry { feature: #feat, chance: #chance } }
|
let feat = value_to_placed_feature_wrapper(&e["feature"]);
|
||||||
}).collect())
|
let chance = e["chance"].as_f64().unwrap_or(0.1) as f32;
|
||||||
|
quote! { RandomFeatureEntry { feature: #feat, chance: #chance } }
|
||||||
|
})
|
||||||
|
.collect()
|
||||||
|
})
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
let default = value_to_placed_feature_wrapper(&config["default"]);
|
let default = value_to_placed_feature_wrapper(&config["default"]);
|
||||||
quote! {
|
quote! {
|
||||||
@ -308,7 +322,7 @@ pub fn value_to_configured_feature(v: &Value) -> TokenStream {
|
|||||||
"minecraft:simple_random_selector" => {
|
"minecraft:simple_random_selector" => {
|
||||||
let features: Vec<TokenStream> = config["features"]
|
let features: Vec<TokenStream> = config["features"]
|
||||||
.as_array()
|
.as_array()
|
||||||
.map(|arr| arr.iter().map(|f| value_to_inline_placed_feature(f)).collect())
|
.map(|arr| arr.iter().map(value_to_inline_placed_feature).collect())
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
quote! {
|
quote! {
|
||||||
ConfiguredFeature::SimpleRandomSelector(SimpleRandomFeature {
|
ConfiguredFeature::SimpleRandomSelector(SimpleRandomFeature {
|
||||||
@ -330,7 +344,8 @@ pub fn value_to_configured_feature(v: &Value) -> TokenStream {
|
|||||||
let inv = config["crystal_invulnerable"].as_bool().unwrap_or(false);
|
let inv = config["crystal_invulnerable"].as_bool().unwrap_or(false);
|
||||||
let spikes: Vec<TokenStream> = config["spikes"]
|
let spikes: Vec<TokenStream> = config["spikes"]
|
||||||
.as_array()
|
.as_array()
|
||||||
.map(|arr| arr.iter().map(|s| {
|
.map(|arr| {
|
||||||
|
arr.iter().map(|s| {
|
||||||
let cx = s["centerX"].as_i64().unwrap_or(0) as i32;
|
let cx = s["centerX"].as_i64().unwrap_or(0) as i32;
|
||||||
let cz = s["centerZ"].as_i64().unwrap_or(0) as i32;
|
let cz = s["centerZ"].as_i64().unwrap_or(0) as i32;
|
||||||
let r = s["radius"].as_i64().unwrap_or(0) as i32;
|
let r = s["radius"].as_i64().unwrap_or(0) as i32;
|
||||||
@ -339,7 +354,8 @@ pub fn value_to_configured_feature(v: &Value) -> TokenStream {
|
|||||||
quote! {
|
quote! {
|
||||||
Spike { center_x: #cx, center_z: #cz, radius: #r, height: #h, guarded: #g }
|
Spike { center_x: #cx, center_z: #cz, radius: #r, height: #h, guarded: #g }
|
||||||
}
|
}
|
||||||
}).collect())
|
}).collect()
|
||||||
|
})
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
quote! {
|
quote! {
|
||||||
ConfiguredFeature::EndSpike(EndSpikeFeature {
|
ConfiguredFeature::EndSpike(EndSpikeFeature {
|
||||||
@ -354,7 +370,9 @@ pub fn value_to_configured_feature(v: &Value) -> TokenStream {
|
|||||||
}
|
}
|
||||||
"minecraft:pointed_dripstone" => {
|
"minecraft:pointed_dripstone" => {
|
||||||
let taller = config["chance_of_taller_dripstone"].as_f64().unwrap_or(0.2) as f32;
|
let taller = config["chance_of_taller_dripstone"].as_f64().unwrap_or(0.2) as f32;
|
||||||
let dir_spread = config["chance_of_directional_spread"].as_f64().unwrap_or(0.7) as f32;
|
let dir_spread = config["chance_of_directional_spread"]
|
||||||
|
.as_f64()
|
||||||
|
.unwrap_or(0.7) as f32;
|
||||||
let r2 = config["chance_of_spread_radius2"].as_f64().unwrap_or(0.5) as f32;
|
let r2 = config["chance_of_spread_radius2"].as_f64().unwrap_or(0.5) as f32;
|
||||||
let r3 = config["chance_of_spread_radius3"].as_f64().unwrap_or(0.5) as f32;
|
let r3 = config["chance_of_spread_radius3"].as_f64().unwrap_or(0.5) as f32;
|
||||||
quote! {
|
quote! {
|
||||||
@ -369,14 +387,17 @@ pub fn value_to_configured_feature(v: &Value) -> TokenStream {
|
|||||||
"minecraft:geode" => {
|
"minecraft:geode" => {
|
||||||
let blocks = &config["blocks"];
|
let blocks = &config["blocks"];
|
||||||
let filling_provider = value_to_block_state_provider(&blocks["filling_provider"]);
|
let filling_provider = value_to_block_state_provider(&blocks["filling_provider"]);
|
||||||
let inner_layer_provider = value_to_block_state_provider(&blocks["inner_layer_provider"]);
|
let inner_layer_provider =
|
||||||
|
value_to_block_state_provider(&blocks["inner_layer_provider"]);
|
||||||
let alternate_inner_layer_provider =
|
let alternate_inner_layer_provider =
|
||||||
value_to_block_state_provider(&blocks["alternate_inner_layer_provider"]);
|
value_to_block_state_provider(&blocks["alternate_inner_layer_provider"]);
|
||||||
let middle_layer_provider = value_to_block_state_provider(&blocks["middle_layer_provider"]);
|
let middle_layer_provider =
|
||||||
let outer_layer_provider = value_to_block_state_provider(&blocks["outer_layer_provider"]);
|
value_to_block_state_provider(&blocks["middle_layer_provider"]);
|
||||||
|
let outer_layer_provider =
|
||||||
|
value_to_block_state_provider(&blocks["outer_layer_provider"]);
|
||||||
let inner_placements: Vec<TokenStream> = blocks["inner_placements"]
|
let inner_placements: Vec<TokenStream> = blocks["inner_placements"]
|
||||||
.as_array()
|
.as_array()
|
||||||
.map(|arr| arr.iter().map(|s| value_to_block_state_codec(s)).collect())
|
.map(|arr| arr.iter().map(value_to_block_state_codec).collect())
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
let cannot_replace = value_to_block_wrapper(&blocks["cannot_replace"]);
|
let cannot_replace = value_to_block_wrapper(&blocks["cannot_replace"]);
|
||||||
let invalid_blocks = value_to_block_wrapper(&blocks["invalid_blocks"]);
|
let invalid_blocks = value_to_block_wrapper(&blocks["invalid_blocks"]);
|
||||||
@ -392,12 +413,15 @@ pub fn value_to_configured_feature(v: &Value) -> TokenStream {
|
|||||||
let base_crack_size = crack["base_crack_size"].as_f64().unwrap_or(2.0);
|
let base_crack_size = crack["base_crack_size"].as_f64().unwrap_or(2.0);
|
||||||
let crack_point_offset = crack["crack_point_offset"].as_i64().unwrap_or(2) as i32;
|
let crack_point_offset = crack["crack_point_offset"].as_i64().unwrap_or(2) as i32;
|
||||||
|
|
||||||
let use_potential_placements_chance =
|
let use_potential_placements_chance = config["use_potential_placements_chance"]
|
||||||
config["use_potential_placements_chance"].as_f64().unwrap_or(0.35);
|
.as_f64()
|
||||||
let use_alternate_layer0_chance =
|
.unwrap_or(0.35);
|
||||||
config["use_alternate_layer0_chance"].as_f64().unwrap_or(0.0);
|
let use_alternate_layer0_chance = config["use_alternate_layer0_chance"]
|
||||||
let placements_require_layer0_alternate =
|
.as_f64()
|
||||||
config["placements_require_layer0_alternate"].as_bool().unwrap_or(true);
|
.unwrap_or(0.0);
|
||||||
|
let placements_require_layer0_alternate = config["placements_require_layer0_alternate"]
|
||||||
|
.as_bool()
|
||||||
|
.unwrap_or(true);
|
||||||
let outer_wall_distance = value_to_int_provider(&config["outer_wall_distance"]);
|
let outer_wall_distance = value_to_int_provider(&config["outer_wall_distance"]);
|
||||||
let distribution_points = value_to_int_provider(&config["distribution_points"]);
|
let distribution_points = value_to_int_provider(&config["distribution_points"]);
|
||||||
let point_offset = value_to_int_provider(&config["point_offset"]);
|
let point_offset = value_to_int_provider(&config["point_offset"]);
|
||||||
@ -436,12 +460,18 @@ pub fn value_to_configured_feature(v: &Value) -> TokenStream {
|
|||||||
invalid_blocks_threshold: #invalid_blocks_threshold,
|
invalid_blocks_threshold: #invalid_blocks_threshold,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"minecraft:monster_room" => quote! { ConfiguredFeature::MonsterRoom(crate::generation::feature::features::monster_room::DungeonFeature {}) },
|
"minecraft:monster_room" => {
|
||||||
|
quote! { ConfiguredFeature::MonsterRoom(crate::generation::feature::features::monster_room::DungeonFeature {}) }
|
||||||
|
}
|
||||||
"minecraft:underwater_magma" => {
|
"minecraft:underwater_magma" => {
|
||||||
let floor_range = config["floor_search_range"].as_i64().unwrap_or(0) as i32;
|
let floor_range = config["floor_search_range"].as_i64().unwrap_or(0) as i32;
|
||||||
let placement_radius = config["placement_radius_around_floor"].as_i64().unwrap_or(0) as i32;
|
let placement_radius = config["placement_radius_around_floor"]
|
||||||
let placement_prob = config["placement_probability_per_valid_position"].as_f64().unwrap_or(0.0) as f32;
|
.as_i64()
|
||||||
|
.unwrap_or(0) as i32;
|
||||||
|
let placement_prob = config["placement_probability_per_valid_position"]
|
||||||
|
.as_f64()
|
||||||
|
.unwrap_or(0.0) as f32;
|
||||||
quote! {
|
quote! {
|
||||||
ConfiguredFeature::UnderwaterMagma(
|
ConfiguredFeature::UnderwaterMagma(
|
||||||
crate::generation::feature::features::underwater_magma::UnderwaterMagmaFeature {
|
crate::generation::feature::features::underwater_magma::UnderwaterMagmaFeature {
|
||||||
@ -451,48 +481,126 @@ pub fn value_to_configured_feature(v: &Value) -> TokenStream {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
|
||||||
// All TODO/empty features
|
// All TODO/empty features
|
||||||
"minecraft:fossil" => quote! { ConfiguredFeature::Fossil(crate::generation::feature::features::fossil::FossilFeature {}) },
|
"minecraft:fossil" => {
|
||||||
"minecraft:lake" => quote! { ConfiguredFeature::Lake(crate::generation::feature::features::lake::LakeFeature {}) },
|
quote! { ConfiguredFeature::Fossil(crate::generation::feature::features::fossil::FossilFeature {}) }
|
||||||
"minecraft:disk" => quote! { ConfiguredFeature::Disk(crate::generation::feature::features::disk::DiskFeature {}) },
|
}
|
||||||
"minecraft:huge_brown_mushroom" => quote! { ConfiguredFeature::HugeBrownMushroom(crate::generation::feature::features::huge_brown_mushroom::HugeBrownMushroomFeature {}) },
|
"minecraft:lake" => {
|
||||||
"minecraft:huge_red_mushroom" => quote! { ConfiguredFeature::HugeRedMushroom(crate::generation::feature::features::huge_red_mushroom::HugeRedMushroomFeature {}) },
|
quote! { ConfiguredFeature::Lake(crate::generation::feature::features::lake::LakeFeature {}) }
|
||||||
"minecraft:ice_spike" => quote! { ConfiguredFeature::IceSpike(crate::generation::feature::features::ice_spike::IceSpikeFeature {}) },
|
}
|
||||||
"minecraft:glowstone_blob" => quote! { ConfiguredFeature::GlowstoneBlob(crate::generation::feature::features::glowstone_blob::GlowstoneBlobFeature {}) },
|
"minecraft:disk" => {
|
||||||
"minecraft:freeze_top_layer" => quote! { ConfiguredFeature::FreezeTopLayer(crate::generation::feature::features::freeze_top_layer::FreezeTopLayerFeature {}) },
|
quote! { ConfiguredFeature::Disk(crate::generation::feature::features::disk::DiskFeature {}) }
|
||||||
"minecraft:vines" => quote! { ConfiguredFeature::Vines(crate::generation::feature::features::vines::VinesFeature) },
|
}
|
||||||
"minecraft:vegetation_patch" => quote! { ConfiguredFeature::VegetationPatch(crate::generation::feature::features::vegetation_patch::VegetationPatchFeature {}) },
|
"minecraft:huge_brown_mushroom" => {
|
||||||
"minecraft:waterlogged_vegetation_patch" => quote! { ConfiguredFeature::WaterloggedVegetationPatch(crate::generation::feature::features::waterlogged_vegetation_patch::WaterloggedVegetationPatchFeature {}) },
|
quote! { ConfiguredFeature::HugeBrownMushroom(crate::generation::feature::features::huge_brown_mushroom::HugeBrownMushroomFeature {}) }
|
||||||
"minecraft:root_system" => quote! { ConfiguredFeature::RootSystem(crate::generation::feature::features::root_system::RootSystemFeature {}) },
|
}
|
||||||
"minecraft:multiface_growth" => quote! { ConfiguredFeature::MultifaceGrowth(crate::generation::feature::features::multiface_growth::MultifaceGrowthFeature {}) },
|
"minecraft:huge_red_mushroom" => {
|
||||||
"minecraft:blue_ice" => quote! { ConfiguredFeature::BlueIce(crate::generation::feature::features::blue_ice::BlueIceFeature {}) },
|
quote! { ConfiguredFeature::HugeRedMushroom(crate::generation::feature::features::huge_red_mushroom::HugeRedMushroomFeature {}) }
|
||||||
"minecraft:iceberg" => quote! { ConfiguredFeature::Iceberg(crate::generation::feature::features::iceberg::IcebergFeature {}) },
|
}
|
||||||
"minecraft:forest_rock" => quote! { ConfiguredFeature::ForestRock(crate::generation::feature::features::forest_rock::ForestRockFeature {}) },
|
"minecraft:ice_spike" => {
|
||||||
"minecraft:end_platform" => quote! { ConfiguredFeature::EndPlatform(crate::generation::feature::features::end_platform::EndPlatformFeature) },
|
quote! { ConfiguredFeature::IceSpike(crate::generation::feature::features::ice_spike::IceSpikeFeature {}) }
|
||||||
"minecraft:end_island" => quote! { ConfiguredFeature::EndIsland(crate::generation::feature::features::end_island::EndIslandFeature {}) },
|
}
|
||||||
"minecraft:end_gateway" => quote! { ConfiguredFeature::EndGateway(crate::generation::feature::features::end_gateway::EndGatewayFeature {}) },
|
"minecraft:glowstone_blob" => {
|
||||||
"minecraft:kelp" => quote! { ConfiguredFeature::Kelp(crate::generation::feature::features::kelp::KelpFeature {}) },
|
quote! { ConfiguredFeature::GlowstoneBlob(crate::generation::feature::features::glowstone_blob::GlowstoneBlobFeature {}) }
|
||||||
"minecraft:coral_tree" => quote! { ConfiguredFeature::CoralTree(crate::generation::feature::features::coral::coral_tree::CoralTreeFeature) },
|
}
|
||||||
"minecraft:coral_mushroom" => quote! { ConfiguredFeature::CoralMushroom(crate::generation::feature::features::coral::coral_mushroom::CoralMushroomFeature) },
|
"minecraft:freeze_top_layer" => {
|
||||||
"minecraft:coral_claw" => quote! { ConfiguredFeature::CoralClaw(crate::generation::feature::features::coral::coral_claw::CoralClawFeature) },
|
quote! { ConfiguredFeature::FreezeTopLayer(crate::generation::feature::features::freeze_top_layer::FreezeTopLayerFeature {}) }
|
||||||
"minecraft:huge_fungus" => quote! { ConfiguredFeature::HugeFungus(crate::generation::feature::features::huge_fungus::HugeFungusFeature {}) },
|
}
|
||||||
"minecraft:weeping_vines" => quote! { ConfiguredFeature::WeepingVines(crate::generation::feature::features::weeping_vines::WeepingVinesFeature {}) },
|
"minecraft:vines" => {
|
||||||
"minecraft:twisting_vines" => quote! { ConfiguredFeature::TwistingVines(crate::generation::feature::features::twisting_vines::TwistingVinesFeature {}) },
|
quote! { ConfiguredFeature::Vines(crate::generation::feature::features::vines::VinesFeature) }
|
||||||
"minecraft:basalt_columns" => quote! { ConfiguredFeature::BasaltColumns(crate::generation::feature::features::basalt_columns::BasaltColumnsFeature {}) },
|
}
|
||||||
"minecraft:delta_feature" => quote! { ConfiguredFeature::DeltaFeature(crate::generation::feature::features::delta_feature::DeltaFeatureFeature {}) },
|
"minecraft:vegetation_patch" => {
|
||||||
"minecraft:fill_layer" => quote! { ConfiguredFeature::FillLayer(crate::generation::feature::features::fill_layer::FillLayerFeature {}) },
|
quote! { ConfiguredFeature::VegetationPatch(crate::generation::feature::features::vegetation_patch::VegetationPatchFeature {}) }
|
||||||
"minecraft:bonus_chest" => quote! { ConfiguredFeature::BonusChest(crate::generation::feature::features::bonus_chest::BonusChestFeature {}) },
|
}
|
||||||
"minecraft:basalt_pillar" => quote! { ConfiguredFeature::BasaltPillar(crate::generation::feature::features::basalt_pillar::BasaltPillarFeature {}) },
|
"minecraft:waterlogged_vegetation_patch" => {
|
||||||
"minecraft:dripstone_cluster" => quote! { ConfiguredFeature::DripstoneCluster(crate::generation::feature::features::drip_stone::cluster::DripstoneClusterFeature {}) },
|
quote! { ConfiguredFeature::WaterloggedVegetationPatch(crate::generation::feature::features::waterlogged_vegetation_patch::WaterloggedVegetationPatchFeature {}) }
|
||||||
"minecraft:large_dripstone" => quote! { ConfiguredFeature::LargeDripstone(crate::generation::feature::features::drip_stone::large::LargeDripstoneFeature {}) },
|
}
|
||||||
"minecraft:sculk_patch" => quote! { ConfiguredFeature::SculkPatch(crate::generation::feature::features::sculk_patch::SculkPatchFeature {}) },
|
"minecraft:root_system" => {
|
||||||
"minecraft:block_pile" => quote! { ConfiguredFeature::BlockPile(crate::generation::feature::features::block_pile::BlockPileFeature {}) },
|
quote! { ConfiguredFeature::RootSystem(crate::generation::feature::features::root_system::RootSystemFeature {}) }
|
||||||
"minecraft:chorus_plant" => quote! { ConfiguredFeature::ChorusPlant(crate::generation::feature::features::chorus_plant::ChorusPlantFeature {}) },
|
}
|
||||||
"minecraft:replace_single_block" => quote! { ConfiguredFeature::ReplaceSingleBlock(crate::generation::feature::features::replace_single_block::ReplaceSingleBlockFeature {}) },
|
"minecraft:multiface_growth" => {
|
||||||
"minecraft:void_start_platform" => quote! { ConfiguredFeature::VoidStartPlatform(crate::generation::feature::features::void_start_platform::VoidStartPlatformFeature {}) },
|
quote! { ConfiguredFeature::MultifaceGrowth(crate::generation::feature::features::multiface_growth::MultifaceGrowthFeature {}) }
|
||||||
"minecraft:desert_well" => quote! { ConfiguredFeature::DesertWell(crate::generation::feature::features::desert_well::DesertWellFeature) },
|
}
|
||||||
|
"minecraft:blue_ice" => {
|
||||||
|
quote! { ConfiguredFeature::BlueIce(crate::generation::feature::features::blue_ice::BlueIceFeature {}) }
|
||||||
|
}
|
||||||
|
"minecraft:iceberg" => {
|
||||||
|
quote! { ConfiguredFeature::Iceberg(crate::generation::feature::features::iceberg::IcebergFeature {}) }
|
||||||
|
}
|
||||||
|
"minecraft:forest_rock" => {
|
||||||
|
quote! { ConfiguredFeature::ForestRock(crate::generation::feature::features::forest_rock::ForestRockFeature {}) }
|
||||||
|
}
|
||||||
|
"minecraft:end_platform" => {
|
||||||
|
quote! { ConfiguredFeature::EndPlatform(crate::generation::feature::features::end_platform::EndPlatformFeature) }
|
||||||
|
}
|
||||||
|
"minecraft:end_island" => {
|
||||||
|
quote! { ConfiguredFeature::EndIsland(crate::generation::feature::features::end_island::EndIslandFeature {}) }
|
||||||
|
}
|
||||||
|
"minecraft:end_gateway" => {
|
||||||
|
quote! { ConfiguredFeature::EndGateway(crate::generation::feature::features::end_gateway::EndGatewayFeature {}) }
|
||||||
|
}
|
||||||
|
"minecraft:kelp" => {
|
||||||
|
quote! { ConfiguredFeature::Kelp(crate::generation::feature::features::kelp::KelpFeature {}) }
|
||||||
|
}
|
||||||
|
"minecraft:coral_tree" => {
|
||||||
|
quote! { ConfiguredFeature::CoralTree(crate::generation::feature::features::coral::coral_tree::CoralTreeFeature) }
|
||||||
|
}
|
||||||
|
"minecraft:coral_mushroom" => {
|
||||||
|
quote! { ConfiguredFeature::CoralMushroom(crate::generation::feature::features::coral::coral_mushroom::CoralMushroomFeature) }
|
||||||
|
}
|
||||||
|
"minecraft:coral_claw" => {
|
||||||
|
quote! { ConfiguredFeature::CoralClaw(crate::generation::feature::features::coral::coral_claw::CoralClawFeature) }
|
||||||
|
}
|
||||||
|
"minecraft:huge_fungus" => {
|
||||||
|
quote! { ConfiguredFeature::HugeFungus(crate::generation::feature::features::huge_fungus::HugeFungusFeature {}) }
|
||||||
|
}
|
||||||
|
"minecraft:weeping_vines" => {
|
||||||
|
quote! { ConfiguredFeature::WeepingVines(crate::generation::feature::features::weeping_vines::WeepingVinesFeature {}) }
|
||||||
|
}
|
||||||
|
"minecraft:twisting_vines" => {
|
||||||
|
quote! { ConfiguredFeature::TwistingVines(crate::generation::feature::features::twisting_vines::TwistingVinesFeature {}) }
|
||||||
|
}
|
||||||
|
"minecraft:basalt_columns" => {
|
||||||
|
quote! { ConfiguredFeature::BasaltColumns(crate::generation::feature::features::basalt_columns::BasaltColumnsFeature {}) }
|
||||||
|
}
|
||||||
|
"minecraft:delta_feature" => {
|
||||||
|
quote! { ConfiguredFeature::DeltaFeature(crate::generation::feature::features::delta_feature::DeltaFeatureFeature {}) }
|
||||||
|
}
|
||||||
|
"minecraft:fill_layer" => {
|
||||||
|
quote! { ConfiguredFeature::FillLayer(crate::generation::feature::features::fill_layer::FillLayerFeature {}) }
|
||||||
|
}
|
||||||
|
"minecraft:bonus_chest" => {
|
||||||
|
quote! { ConfiguredFeature::BonusChest(crate::generation::feature::features::bonus_chest::BonusChestFeature {}) }
|
||||||
|
}
|
||||||
|
"minecraft:basalt_pillar" => {
|
||||||
|
quote! { ConfiguredFeature::BasaltPillar(crate::generation::feature::features::basalt_pillar::BasaltPillarFeature {}) }
|
||||||
|
}
|
||||||
|
"minecraft:dripstone_cluster" => {
|
||||||
|
quote! { ConfiguredFeature::DripstoneCluster(crate::generation::feature::features::drip_stone::cluster::DripstoneClusterFeature {}) }
|
||||||
|
}
|
||||||
|
"minecraft:large_dripstone" => {
|
||||||
|
quote! { ConfiguredFeature::LargeDripstone(crate::generation::feature::features::drip_stone::large::LargeDripstoneFeature {}) }
|
||||||
|
}
|
||||||
|
"minecraft:sculk_patch" => {
|
||||||
|
quote! { ConfiguredFeature::SculkPatch(crate::generation::feature::features::sculk_patch::SculkPatchFeature {}) }
|
||||||
|
}
|
||||||
|
"minecraft:block_pile" => {
|
||||||
|
quote! { ConfiguredFeature::BlockPile(crate::generation::feature::features::block_pile::BlockPileFeature {}) }
|
||||||
|
}
|
||||||
|
"minecraft:chorus_plant" => {
|
||||||
|
quote! { ConfiguredFeature::ChorusPlant(crate::generation::feature::features::chorus_plant::ChorusPlantFeature {}) }
|
||||||
|
}
|
||||||
|
"minecraft:replace_single_block" => {
|
||||||
|
quote! { ConfiguredFeature::ReplaceSingleBlock(crate::generation::feature::features::replace_single_block::ReplaceSingleBlockFeature {}) }
|
||||||
|
}
|
||||||
|
"minecraft:void_start_platform" => {
|
||||||
|
quote! { ConfiguredFeature::VoidStartPlatform(crate::generation::feature::features::void_start_platform::VoidStartPlatformFeature {}) }
|
||||||
|
}
|
||||||
|
"minecraft:desert_well" => {
|
||||||
|
quote! { ConfiguredFeature::DesertWell(crate::generation::feature::features::desert_well::DesertWellFeature) }
|
||||||
|
}
|
||||||
other => {
|
other => {
|
||||||
let msg = format!("unknown configured feature type: {other}");
|
let msg = format!("unknown configured feature type: {other}");
|
||||||
quote! { compile_error!(#msg) }
|
quote! { compile_error!(#msg) }
|
||||||
@ -510,11 +618,15 @@ fn value_to_block_state_provider(v: &Value) -> TokenStream {
|
|||||||
"minecraft:weighted_state_provider" => {
|
"minecraft:weighted_state_provider" => {
|
||||||
let entries: Vec<TokenStream> = v["entries"]
|
let entries: Vec<TokenStream> = v["entries"]
|
||||||
.as_array()
|
.as_array()
|
||||||
.map(|arr| arr.iter().map(|e| {
|
.map(|arr| {
|
||||||
let data = value_to_block_state_codec(&e["data"]);
|
arr.iter()
|
||||||
let weight = e["weight"].as_i64().unwrap_or(1) as i32;
|
.map(|e| {
|
||||||
quote! { Weighted { data: #data, weight: #weight } }
|
let data = value_to_block_state_codec(&e["data"]);
|
||||||
}).collect())
|
let weight = e["weight"].as_i64().unwrap_or(1) as i32;
|
||||||
|
quote! { Weighted { data: #data, weight: #weight } }
|
||||||
|
})
|
||||||
|
.collect()
|
||||||
|
})
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
quote! {
|
quote! {
|
||||||
BlockStateProvider::Weighted(WeightedBlockStateProvider {
|
BlockStateProvider::Weighted(WeightedBlockStateProvider {
|
||||||
@ -530,7 +642,7 @@ fn value_to_block_state_provider(v: &Value) -> TokenStream {
|
|||||||
let base = value_to_noise_base(v);
|
let base = value_to_noise_base(v);
|
||||||
let states: Vec<TokenStream> = v["states"]
|
let states: Vec<TokenStream> = v["states"]
|
||||||
.as_array()
|
.as_array()
|
||||||
.map(|arr| arr.iter().map(|s| value_to_block_state_codec(s)).collect())
|
.map(|arr| arr.iter().map(value_to_block_state_codec).collect())
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
quote! {
|
quote! {
|
||||||
BlockStateProvider::NoiseProvider(NoiseBlockStateProvider {
|
BlockStateProvider::NoiseProvider(NoiseBlockStateProvider {
|
||||||
@ -543,7 +655,7 @@ fn value_to_block_state_provider(v: &Value) -> TokenStream {
|
|||||||
let base_provider = value_to_noise_base(v);
|
let base_provider = value_to_noise_base(v);
|
||||||
let states: Vec<TokenStream> = v["states"]
|
let states: Vec<TokenStream> = v["states"]
|
||||||
.as_array()
|
.as_array()
|
||||||
.map(|arr| arr.iter().map(|s| value_to_block_state_codec(s)).collect())
|
.map(|arr| arr.iter().map(value_to_block_state_codec).collect())
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
let base_noise_provider = quote! {
|
let base_noise_provider = quote! {
|
||||||
NoiseBlockStateProvider { base: #base_provider, states: vec![#(#states),*] }
|
NoiseBlockStateProvider { base: #base_provider, states: vec![#(#states),*] }
|
||||||
@ -551,7 +663,7 @@ fn value_to_block_state_provider(v: &Value) -> TokenStream {
|
|||||||
let v0 = v["variety"][0].as_u64().unwrap_or(2) as u32;
|
let v0 = v["variety"][0].as_u64().unwrap_or(2) as u32;
|
||||||
let v1 = v["variety"][1].as_u64().unwrap_or(4) as u32;
|
let v1 = v["variety"][1].as_u64().unwrap_or(4) as u32;
|
||||||
let slow_noise = value_to_dpnp(&v["slow_noise"]);
|
let slow_noise = value_to_dpnp(&v["slow_noise"]);
|
||||||
let slow_scale = v["slow_scale"].as_f64().unwrap_or(1.0) as f64;
|
let slow_scale = v["slow_scale"].as_f64().unwrap_or(1.0);
|
||||||
quote! {
|
quote! {
|
||||||
BlockStateProvider::DualNoise(DualNoiseBlockStateProvider {
|
BlockStateProvider::DualNoise(DualNoiseBlockStateProvider {
|
||||||
base: #base_noise_provider,
|
base: #base_noise_provider,
|
||||||
@ -568,11 +680,11 @@ fn value_to_block_state_provider(v: &Value) -> TokenStream {
|
|||||||
let default = value_to_block_state_codec(&v["default_state"]);
|
let default = value_to_block_state_codec(&v["default_state"]);
|
||||||
let low: Vec<TokenStream> = v["low_states"]
|
let low: Vec<TokenStream> = v["low_states"]
|
||||||
.as_array()
|
.as_array()
|
||||||
.map(|a| a.iter().map(|s| value_to_block_state_codec(s)).collect())
|
.map(|a| a.iter().map(value_to_block_state_codec).collect())
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
let high: Vec<TokenStream> = v["high_states"]
|
let high: Vec<TokenStream> = v["high_states"]
|
||||||
.as_array()
|
.as_array()
|
||||||
.map(|a| a.iter().map(|s| value_to_block_state_codec(s)).collect())
|
.map(|a| a.iter().map(value_to_block_state_codec).collect())
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
quote! {
|
quote! {
|
||||||
BlockStateProvider::NoiseThreshold(NoiseThresholdBlockStateProvider {
|
BlockStateProvider::NoiseThreshold(NoiseThresholdBlockStateProvider {
|
||||||
@ -893,7 +1005,11 @@ fn value_to_tree_decorator(v: &Value) -> TokenStream {
|
|||||||
let bp = value_to_block_state_provider(&v["block_provider"]);
|
let bp = value_to_block_state_provider(&v["block_provider"]);
|
||||||
let dirs: Vec<TokenStream> = v["directions"]
|
let dirs: Vec<TokenStream> = v["directions"]
|
||||||
.as_array()
|
.as_array()
|
||||||
.map(|arr| arr.iter().filter_map(|d| d.as_str().map(value_to_block_direction)).collect())
|
.map(|arr| {
|
||||||
|
arr.iter()
|
||||||
|
.filter_map(|d| d.as_str().map(value_to_block_direction))
|
||||||
|
.collect()
|
||||||
|
})
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
quote! {
|
quote! {
|
||||||
TreeDecorator::AttachedToLogs(AttachedToLogsTreeDecorator {
|
TreeDecorator::AttachedToLogs(AttachedToLogsTreeDecorator {
|
||||||
@ -935,10 +1051,13 @@ fn value_to_tree_decorator(v: &Value) -> TokenStream {
|
|||||||
|
|
||||||
fn value_to_inline_placed_feature(v: &Value) -> TokenStream {
|
fn value_to_inline_placed_feature(v: &Value) -> TokenStream {
|
||||||
let feature = value_to_feature_ref(&v["feature"]);
|
let feature = value_to_feature_ref(&v["feature"]);
|
||||||
let placement_arr = v["placement"].as_array().map(|a| a.as_slice()).unwrap_or(&[]);
|
let placement_arr = v["placement"]
|
||||||
|
.as_array()
|
||||||
|
.map(|a| a.as_slice())
|
||||||
|
.unwrap_or(&[]);
|
||||||
let placement: Vec<TokenStream> = placement_arr
|
let placement: Vec<TokenStream> = placement_arr
|
||||||
.iter()
|
.iter()
|
||||||
.map(|p| value_to_placement_modifier_cf(p))
|
.map(value_to_placement_modifier_cf)
|
||||||
.collect();
|
.collect();
|
||||||
quote! {
|
quote! {
|
||||||
PlacedFeature {
|
PlacedFeature {
|
||||||
@ -985,7 +1104,9 @@ fn value_to_placement_modifier_cf(v: &Value) -> TokenStream {
|
|||||||
"minecraft:in_square" => quote! { PlacementModifier::InSquare(SquarePlacementModifier) },
|
"minecraft:in_square" => quote! { PlacementModifier::InSquare(SquarePlacementModifier) },
|
||||||
"minecraft:fixed_placement" => quote! { PlacementModifier::FixedPlacement },
|
"minecraft:fixed_placement" => quote! { PlacementModifier::FixedPlacement },
|
||||||
"minecraft:heightmap" => {
|
"minecraft:heightmap" => {
|
||||||
let hm = crate::placed_feature::value_to_height_map(v["heightmap"].as_str().unwrap_or("MOTION_BLOCKING"));
|
let hm = crate::placed_feature::value_to_height_map(
|
||||||
|
v["heightmap"].as_str().unwrap_or("MOTION_BLOCKING"),
|
||||||
|
);
|
||||||
quote! { PlacementModifier::Heightmap(HeightmapPlacementModifier { heightmap: #hm }) }
|
quote! { PlacementModifier::Heightmap(HeightmapPlacementModifier { heightmap: #hm }) }
|
||||||
}
|
}
|
||||||
"minecraft:height_range" => {
|
"minecraft:height_range" => {
|
||||||
@ -1009,9 +1130,21 @@ fn value_to_placement_modifier_cf(v: &Value) -> TokenStream {
|
|||||||
quote! { PlacementModifier::BlockPredicateFilter(BlockFilterPlacementModifier { predicate: #pred }) }
|
quote! { PlacementModifier::BlockPredicateFilter(BlockFilterPlacementModifier { predicate: #pred }) }
|
||||||
}
|
}
|
||||||
"minecraft:surface_relative_threshold_filter" => {
|
"minecraft:surface_relative_threshold_filter" => {
|
||||||
let hm = crate::placed_feature::value_to_height_map(v["heightmap"].as_str().unwrap_or("MOTION_BLOCKING"));
|
let hm = crate::placed_feature::value_to_height_map(
|
||||||
let mn = if v["min_inclusive"].is_number() { let x = v["min_inclusive"].as_i64().unwrap() as i32; quote!{Some(#x)} } else { quote!{None} };
|
v["heightmap"].as_str().unwrap_or("MOTION_BLOCKING"),
|
||||||
let mx = if v["max_inclusive"].is_number() { let x = v["max_inclusive"].as_i64().unwrap() as i32; quote!{Some(#x)} } else { quote!{None} };
|
);
|
||||||
|
let mn = if v["min_inclusive"].is_number() {
|
||||||
|
let x = v["min_inclusive"].as_i64().unwrap() as i32;
|
||||||
|
quote! {Some(#x)}
|
||||||
|
} else {
|
||||||
|
quote! {None}
|
||||||
|
};
|
||||||
|
let mx = if v["max_inclusive"].is_number() {
|
||||||
|
let x = v["max_inclusive"].as_i64().unwrap() as i32;
|
||||||
|
quote! {Some(#x)}
|
||||||
|
} else {
|
||||||
|
quote! {None}
|
||||||
|
};
|
||||||
quote! { PlacementModifier::SurfaceRelativeThresholdFilter(SurfaceThresholdFilterPlacementModifier { heightmap: #hm, min_inclusive: #mn, max_inclusive: #mx }) }
|
quote! { PlacementModifier::SurfaceRelativeThresholdFilter(SurfaceThresholdFilterPlacementModifier { heightmap: #hm, min_inclusive: #mn, max_inclusive: #mx }) }
|
||||||
}
|
}
|
||||||
"minecraft:surface_water_depth_filter" => {
|
"minecraft:surface_water_depth_filter" => {
|
||||||
@ -1041,7 +1174,9 @@ fn value_to_placement_modifier_cf(v: &Value) -> TokenStream {
|
|||||||
let asc = if v["allowed_search_condition"].is_object() {
|
let asc = if v["allowed_search_condition"].is_object() {
|
||||||
let p = value_to_block_predicate(&v["allowed_search_condition"]);
|
let p = value_to_block_predicate(&v["allowed_search_condition"]);
|
||||||
quote! { Some(#p) }
|
quote! { Some(#p) }
|
||||||
} else { quote! { None } };
|
} else {
|
||||||
|
quote! { None }
|
||||||
|
};
|
||||||
let steps = v["max_steps"].as_i64().unwrap_or(1) as i32;
|
let steps = v["max_steps"].as_i64().unwrap_or(1) as i32;
|
||||||
quote! { PlacementModifier::EnvironmentScan(EnvironmentScanPlacementModifier { direction_of_search: #dir, target_condition: #tc, allowed_search_condition: #asc, max_steps: #steps }) }
|
quote! { PlacementModifier::EnvironmentScan(EnvironmentScanPlacementModifier { direction_of_search: #dir, target_condition: #tc, allowed_search_condition: #asc, max_steps: #steps }) }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,19 +77,19 @@ pub fn build() -> TokenStream {
|
|||||||
.as_ref()
|
.as_ref()
|
||||||
.and_then(|a| a.get("minecraft:visual/sky_color"))
|
.and_then(|a| a.get("minecraft:visual/sky_color"))
|
||||||
.and_then(|v| v.as_str())
|
.and_then(|v| v.as_str())
|
||||||
.and_then(|s| parse_hex_color(s));
|
.and_then(parse_hex_color);
|
||||||
let fog_color = dim
|
let fog_color = dim
|
||||||
.attributes
|
.attributes
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.and_then(|a| a.get("minecraft:visual/fog_color"))
|
.and_then(|a| a.get("minecraft:visual/fog_color"))
|
||||||
.and_then(|v| v.as_str())
|
.and_then(|v| v.as_str())
|
||||||
.and_then(|s| parse_hex_color(s));
|
.and_then(parse_hex_color);
|
||||||
let cloud_color = dim
|
let cloud_color = dim
|
||||||
.attributes
|
.attributes
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.and_then(|a| a.get("minecraft:visual/cloud_color"))
|
.and_then(|a| a.get("minecraft:visual/cloud_color"))
|
||||||
.and_then(|v| v.as_str())
|
.and_then(|v| v.as_str())
|
||||||
.and_then(|s| parse_hex_color(s));
|
.and_then(parse_hex_color);
|
||||||
|
|
||||||
let fixed_time = if let Some(t) = dim.fixed_time {
|
let fixed_time = if let Some(t) = dim.fixed_time {
|
||||||
quote! { Some(#t) }
|
quote! { Some(#t) }
|
||||||
@ -124,9 +124,21 @@ pub fn build() -> TokenStream {
|
|||||||
format!("minecraft:{name}")
|
format!("minecraft:{name}")
|
||||||
};
|
};
|
||||||
|
|
||||||
let sky_color_literal = if let Some(c) = sky_color { quote! { Some(#c) } } else { quote! { None } };
|
let sky_color_literal = if let Some(c) = sky_color {
|
||||||
let fog_color_literal = if let Some(c) = fog_color { quote! { Some(#c) } } else { quote! { None } };
|
quote! { Some(#c) }
|
||||||
let cloud_color_literal = if let Some(c) = cloud_color { quote! { Some(#c) } } else { quote! { None } };
|
} else {
|
||||||
|
quote! { None }
|
||||||
|
};
|
||||||
|
let fog_color_literal = if let Some(c) = fog_color {
|
||||||
|
quote! { Some(#c) }
|
||||||
|
} else {
|
||||||
|
quote! { None }
|
||||||
|
};
|
||||||
|
let cloud_color_literal = if let Some(c) = cloud_color {
|
||||||
|
quote! { Some(#c) }
|
||||||
|
} else {
|
||||||
|
quote! { None }
|
||||||
|
};
|
||||||
let timelines_literal = if let Some(t) = timelines.clone() {
|
let timelines_literal = if let Some(t) = timelines.clone() {
|
||||||
quote! { Some(#t) }
|
quote! { Some(#t) }
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -244,40 +244,96 @@ impl ToTokens for ItemComponents {
|
|||||||
if let Some(damage_resistant) = &self.damage_resistant {
|
if let Some(damage_resistant) = &self.damage_resistant {
|
||||||
let res_type_variant = match damage_resistant.types.as_str() {
|
let res_type_variant = match damage_resistant.types.as_str() {
|
||||||
// Common canonical and shorthand forms mapped to enum variant names
|
// Common canonical and shorthand forms mapped to enum variant names
|
||||||
"#minecraft:always_hurts_ender_dragons" | "minecraft:always_hurts_ender_dragons" | "always_hurts_ender_dragons" => "AlwaysHurtsEnderDragons",
|
"#minecraft:always_hurts_ender_dragons"
|
||||||
"#minecraft:always_kills_armor_stands" | "minecraft:always_kills_armor_stands" | "always_kills_armor_stands" => "AlwaysKillsArmorStands",
|
| "minecraft:always_hurts_ender_dragons"
|
||||||
"#minecraft:always_most_significant_fall" | "minecraft:always_most_significant_fall" | "always_most_significant_fall" => "AlwaysMostSignificantFall",
|
| "always_hurts_ender_dragons" => "AlwaysHurtsEnderDragons",
|
||||||
"#minecraft:always_triggers_silverfish" | "minecraft:always_triggers_silverfish" | "always_triggers_silverfish" => "AlwaysTriggersSilverfish",
|
"#minecraft:always_kills_armor_stands"
|
||||||
"#minecraft:avoids_guardian_thorns" | "minecraft:avoids_guardian_thorns" | "avoids_guardian_thorns" => "AvoidsGuardianThorns",
|
| "minecraft:always_kills_armor_stands"
|
||||||
"#minecraft:burns_armor_stands" | "minecraft:burns_armor_stands" | "burns_armor_stands" => "BurnsArmorStands",
|
| "always_kills_armor_stands" => "AlwaysKillsArmorStands",
|
||||||
"#minecraft:burn_from_stepping" | "minecraft:burn_from_stepping" | "burn_from_stepping" => "BurnFromStepping",
|
"#minecraft:always_most_significant_fall"
|
||||||
"#minecraft:bypasses_armor" | "minecraft:bypasses_armor" | "bypasses_armor" => "BypassesArmor",
|
| "minecraft:always_most_significant_fall"
|
||||||
"#minecraft:bypasses_cooldown" | "minecraft:bypasses_cooldown" | "bypasses_cooldown" => "BypassesCooldown",
|
| "always_most_significant_fall" => "AlwaysMostSignificantFall",
|
||||||
"#minecraft:bypasses_effects" | "minecraft:bypasses_effects" | "bypasses_effects" => "BypassesEffects",
|
"#minecraft:always_triggers_silverfish"
|
||||||
"#minecraft:bypasses_enchantments" | "minecraft:bypasses_enchantments" | "bypasses_enchantments" => "BypassesEnchantments",
|
| "minecraft:always_triggers_silverfish"
|
||||||
"#minecraft:bypasses_invulnerability" | "minecraft:bypasses_invulnerability" | "bypasses_invulnerability" => "BypassesInvulnerability",
|
| "always_triggers_silverfish" => "AlwaysTriggersSilverfish",
|
||||||
"#minecraft:bypasses_resistance" | "minecraft:bypasses_resistance" | "bypasses_resistance" => "BypassesResistance",
|
"#minecraft:avoids_guardian_thorns"
|
||||||
"#minecraft:bypasses_shield" | "minecraft:bypasses_shield" | "bypasses_shield" => "BypassesShield",
|
| "minecraft:avoids_guardian_thorns"
|
||||||
"#minecraft:bypasses_wolf_armor" | "minecraft:bypasses_wolf_armor" | "bypasses_wolf_armor" => "BypassesWolfArmor",
|
| "avoids_guardian_thorns" => "AvoidsGuardianThorns",
|
||||||
"#minecraft:can_break_armor_stand" | "minecraft:can_break_armor_stand" | "can_break_armor_stand" => "CanBreakArmorStands",
|
"#minecraft:burns_armor_stands"
|
||||||
"#minecraft:damages_helmet" | "minecraft:damages_helmet" | "damages_helmet" => "DamagesHelmet",
|
| "minecraft:burns_armor_stands"
|
||||||
"#minecraft:ignites_armor_stands" | "minecraft:ignites_armor_stands" | "ignites_armor_stands" => "IgnitesArmorStands",
|
| "burns_armor_stands" => "BurnsArmorStands",
|
||||||
|
"#minecraft:burn_from_stepping"
|
||||||
|
| "minecraft:burn_from_stepping"
|
||||||
|
| "burn_from_stepping" => "BurnFromStepping",
|
||||||
|
"#minecraft:bypasses_armor" | "minecraft:bypasses_armor" | "bypasses_armor" => {
|
||||||
|
"BypassesArmor"
|
||||||
|
}
|
||||||
|
"#minecraft:bypasses_cooldown"
|
||||||
|
| "minecraft:bypasses_cooldown"
|
||||||
|
| "bypasses_cooldown" => "BypassesCooldown",
|
||||||
|
"#minecraft:bypasses_effects"
|
||||||
|
| "minecraft:bypasses_effects"
|
||||||
|
| "bypasses_effects" => "BypassesEffects",
|
||||||
|
"#minecraft:bypasses_enchantments"
|
||||||
|
| "minecraft:bypasses_enchantments"
|
||||||
|
| "bypasses_enchantments" => "BypassesEnchantments",
|
||||||
|
"#minecraft:bypasses_invulnerability"
|
||||||
|
| "minecraft:bypasses_invulnerability"
|
||||||
|
| "bypasses_invulnerability" => "BypassesInvulnerability",
|
||||||
|
"#minecraft:bypasses_resistance"
|
||||||
|
| "minecraft:bypasses_resistance"
|
||||||
|
| "bypasses_resistance" => "BypassesResistance",
|
||||||
|
"#minecraft:bypasses_shield" | "minecraft:bypasses_shield" | "bypasses_shield" => {
|
||||||
|
"BypassesShield"
|
||||||
|
}
|
||||||
|
"#minecraft:bypasses_wolf_armor"
|
||||||
|
| "minecraft:bypasses_wolf_armor"
|
||||||
|
| "bypasses_wolf_armor" => "BypassesWolfArmor",
|
||||||
|
"#minecraft:can_break_armor_stand"
|
||||||
|
| "minecraft:can_break_armor_stand"
|
||||||
|
| "can_break_armor_stand" => "CanBreakArmorStands",
|
||||||
|
"#minecraft:damages_helmet" | "minecraft:damages_helmet" | "damages_helmet" => {
|
||||||
|
"DamagesHelmet"
|
||||||
|
}
|
||||||
|
"#minecraft:ignites_armor_stands"
|
||||||
|
| "minecraft:ignites_armor_stands"
|
||||||
|
| "ignites_armor_stands" => "IgnitesArmorStands",
|
||||||
"#minecraft:is_drowning" | "minecraft:is_drowning" | "is_drowning" => "Drowning",
|
"#minecraft:is_drowning" | "minecraft:is_drowning" | "is_drowning" => "Drowning",
|
||||||
"#minecraft:is_explosion" | "minecraft:is_explosion" | "is_explosion" | "explosion" => "Explosion",
|
"#minecraft:is_explosion"
|
||||||
|
| "minecraft:is_explosion"
|
||||||
|
| "is_explosion"
|
||||||
|
| "explosion" => "Explosion",
|
||||||
"#minecraft:is_fall" | "minecraft:is_fall" | "is_fall" | "fall" => "Fall",
|
"#minecraft:is_fall" | "minecraft:is_fall" | "is_fall" | "fall" => "Fall",
|
||||||
"#minecraft:is_fire" | "minecraft:is_fire" | "is_fire" | "fire" | "in_fire" | "minecraft:in_fire" => "Fire",
|
"#minecraft:is_fire" | "minecraft:is_fire" | "is_fire" | "fire" | "in_fire"
|
||||||
|
| "minecraft:in_fire" => "Fire",
|
||||||
"#minecraft:is_freezing" | "minecraft:is_freezing" | "is_freezing" => "Freezing",
|
"#minecraft:is_freezing" | "minecraft:is_freezing" | "is_freezing" => "Freezing",
|
||||||
"#minecraft:is_lightning" | "minecraft:is_lightning" | "is_lightning" => "Lightning",
|
"#minecraft:is_lightning" | "minecraft:is_lightning" | "is_lightning" => {
|
||||||
"#minecraft:is_player_attack" | "minecraft:is_player_attack" | "is_player_attack" => "PlayerAttack",
|
"Lightning"
|
||||||
"#minecraft:is_projectile" | "minecraft:is_projectile" | "is_projectile" => "Projectile",
|
}
|
||||||
|
"#minecraft:is_player_attack"
|
||||||
|
| "minecraft:is_player_attack"
|
||||||
|
| "is_player_attack" => "PlayerAttack",
|
||||||
|
"#minecraft:is_projectile" | "minecraft:is_projectile" | "is_projectile" => {
|
||||||
|
"Projectile"
|
||||||
|
}
|
||||||
"#minecraft:mace_smash" | "minecraft:mace_smash" | "mace_smash" => "MaceSmash",
|
"#minecraft:mace_smash" | "minecraft:mace_smash" | "mace_smash" => "MaceSmash",
|
||||||
"#minecraft:no_anger" | "minecraft:no_anger" | "no_anger" => "NoAnger",
|
"#minecraft:no_anger" | "minecraft:no_anger" | "no_anger" => "NoAnger",
|
||||||
"#minecraft:no_impact" | "minecraft:no_impact" | "no_impact" => "NoImpact",
|
"#minecraft:no_impact" | "minecraft:no_impact" | "no_impact" => "NoImpact",
|
||||||
"#minecraft:no_knockback" | "minecraft:no_knockback" | "no_knockback" => "NoKnockback",
|
"#minecraft:no_knockback" | "minecraft:no_knockback" | "no_knockback" => {
|
||||||
"#minecraft:panic_causes" | "minecraft:panic_causes" | "panic_causes" => "PanicCauses",
|
"NoKnockback"
|
||||||
"#minecraft:panic_environmental_causes" | "minecraft:panic_environmental_causes" | "panic_environmental_causes" => "PanicEnvironmentalCauses",
|
}
|
||||||
"#minecraft:witch_resistant_to" | "minecraft:witch_resistant_to" | "witch_resistant_to" => "WitchResistantTo",
|
"#minecraft:panic_causes" | "minecraft:panic_causes" | "panic_causes" => {
|
||||||
"#minecraft:wither_immune_to" | "minecraft:wither_immune_to" | "wither_immune_to" => "WitherImmuneTo",
|
"PanicCauses"
|
||||||
|
}
|
||||||
|
"#minecraft:panic_environmental_causes"
|
||||||
|
| "minecraft:panic_environmental_causes"
|
||||||
|
| "panic_environmental_causes" => "PanicEnvironmentalCauses",
|
||||||
|
"#minecraft:witch_resistant_to"
|
||||||
|
| "minecraft:witch_resistant_to"
|
||||||
|
| "witch_resistant_to" => "WitchResistantTo",
|
||||||
|
"#minecraft:wither_immune_to"
|
||||||
|
| "minecraft:wither_immune_to"
|
||||||
|
| "wither_immune_to" => "WitherImmuneTo",
|
||||||
_ => "Generic",
|
_ => "Generic",
|
||||||
};
|
};
|
||||||
let res_type_ident = format_ident!("{}", res_type_variant);
|
let res_type_ident = format_ident!("{}", res_type_variant);
|
||||||
|
|||||||
@ -115,7 +115,10 @@ pub fn main() {
|
|||||||
(potion_brewing::build, "potion_brewing.rs"),
|
(potion_brewing::build, "potion_brewing.rs"),
|
||||||
(recipe_remainder::build, "recipe_remainder.rs"),
|
(recipe_remainder::build, "recipe_remainder.rs"),
|
||||||
(placed_feature::build, "placed_features_generated.rs"),
|
(placed_feature::build, "placed_features_generated.rs"),
|
||||||
(configured_feature::build, "configured_features_generated.rs"),
|
(
|
||||||
|
configured_feature::build,
|
||||||
|
"configured_features_generated.rs",
|
||||||
|
),
|
||||||
];
|
];
|
||||||
build_functions.extend(remap::build());
|
build_functions.extend(remap::build());
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@ pub fn build() -> TokenStream {
|
|||||||
pub const #name: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(#first_octave, &[#(#amplitudes),*], #raw_name);
|
pub const #name: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(#first_octave, &[#(#amplitudes),*], #raw_name);
|
||||||
}]);
|
}]);
|
||||||
match_variants.extend([quote! {
|
match_variants.extend([quote! {
|
||||||
#simple_id => &#name,
|
#simple_id => &Self::#name,
|
||||||
}]);
|
}]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,8 +51,8 @@ pub fn build() -> TokenStream {
|
|||||||
_ => return None,
|
_ => return None,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
#variants
|
||||||
}
|
}
|
||||||
|
|
||||||
#variants
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,8 @@ use std::{
|
|||||||
hash::{DefaultHasher, Hash, Hasher},
|
hash::{DefaultHasher, Hash, Hasher},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use heck::ToShoutySnakeCase;
|
||||||
|
|
||||||
use proc_macro2::{Punct, Spacing, Span, TokenStream};
|
use proc_macro2::{Punct, Spacing, Span, TokenStream};
|
||||||
use quote::{ToTokens, TokenStreamExt, quote};
|
use quote::{ToTokens, TokenStreamExt, quote};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
@ -595,14 +597,14 @@ impl DensityFunctionRepr {
|
|||||||
BaseNoiseFunctionComponent::EndIslands
|
BaseNoiseFunctionComponent::EndIslands
|
||||||
},
|
},
|
||||||
Self::Noise { data } => {
|
Self::Noise { data } => {
|
||||||
let noise_id = &data.noise_id;
|
let noise_id = quote::format_ident!("{}", data.noise_id.to_shouty_snake_case());
|
||||||
let xz_scale = &data.xz_scale;
|
let xz_scale = &data.xz_scale;
|
||||||
let y_scale = &data.y_scale;
|
let y_scale = &data.y_scale;
|
||||||
|
|
||||||
quote! {
|
quote! {
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: #noise_id,
|
noise_id: DoublePerlinNoiseParameters::#noise_id,
|
||||||
xz_scale: #xz_scale,
|
xz_scale: #xz_scale,
|
||||||
y_scale: #y_scale,
|
y_scale: #y_scale,
|
||||||
}
|
}
|
||||||
@ -610,16 +612,20 @@ impl DensityFunctionRepr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Self::ShiftA { noise_id } => {
|
Self::ShiftA { noise_id } => {
|
||||||
|
let noise_id = quote::format_ident!("{}", noise_id.to_shouty_snake_case());
|
||||||
|
|
||||||
quote! {
|
quote! {
|
||||||
BaseNoiseFunctionComponent::ShiftA {
|
BaseNoiseFunctionComponent::ShiftA {
|
||||||
noise_id: #noise_id
|
noise_id: DoublePerlinNoiseParameters::#noise_id,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Self::ShiftB { noise_id } => {
|
Self::ShiftB { noise_id } => {
|
||||||
|
let noise_id = quote::format_ident!("{}", noise_id.to_shouty_snake_case());
|
||||||
|
|
||||||
quote! {
|
quote! {
|
||||||
BaseNoiseFunctionComponent::ShiftB {
|
BaseNoiseFunctionComponent::ShiftB {
|
||||||
noise_id: #noise_id
|
noise_id: DoublePerlinNoiseParameters::#noise_id,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -659,7 +665,7 @@ impl DensityFunctionRepr {
|
|||||||
|
|
||||||
let xz_scale = &data.xz_scale;
|
let xz_scale = &data.xz_scale;
|
||||||
let y_scale = &data.y_scale;
|
let y_scale = &data.y_scale;
|
||||||
let noise_id = &data.noise_id;
|
let noise_id = quote::format_ident!("{}", data.noise_id.to_shouty_snake_case());
|
||||||
|
|
||||||
quote! {
|
quote! {
|
||||||
BaseNoiseFunctionComponent::ShiftedNoise {
|
BaseNoiseFunctionComponent::ShiftedNoise {
|
||||||
@ -669,7 +675,7 @@ impl DensityFunctionRepr {
|
|||||||
data: &ShiftedNoiseData {
|
data: &ShiftedNoiseData {
|
||||||
xz_scale: #xz_scale,
|
xz_scale: #xz_scale,
|
||||||
y_scale: #y_scale,
|
y_scale: #y_scale,
|
||||||
noise_id: #noise_id,
|
noise_id: DoublePerlinNoiseParameters::#noise_id,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -802,14 +808,14 @@ impl DensityFunctionRepr {
|
|||||||
Self::WeirdScaled { input, data } => {
|
Self::WeirdScaled { input, data } => {
|
||||||
let input_index = input.get_index_for_component(stack, hash_to_index_map);
|
let input_index = input.get_index_for_component(stack, hash_to_index_map);
|
||||||
|
|
||||||
let noise_id = &data.noise_id;
|
let noise_id = quote::format_ident!("{}", data.noise_id.to_shouty_snake_case());
|
||||||
let action = data.mapper.into_token_stream();
|
let action = data.mapper.into_token_stream();
|
||||||
|
|
||||||
quote! {
|
quote! {
|
||||||
BaseNoiseFunctionComponent::WeirdScaled {
|
BaseNoiseFunctionComponent::WeirdScaled {
|
||||||
input_index: #input_index,
|
input_index: #input_index,
|
||||||
data: &WeirdScaledData {
|
data: &WeirdScaledData {
|
||||||
noise_id: #noise_id,
|
noise_id: DoublePerlinNoiseParameters::#noise_id,
|
||||||
mapper: #action,
|
mapper: #action,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -1015,8 +1021,10 @@ pub fn build() -> TokenStream {
|
|||||||
let end_router = reprs.end.into_token_stream();
|
let end_router = reprs.end.into_token_stream();
|
||||||
|
|
||||||
quote! {
|
quote! {
|
||||||
|
use crate::chunk::DoublePerlinNoiseParameters;
|
||||||
|
|
||||||
pub struct NoiseData {
|
pub struct NoiseData {
|
||||||
pub noise_id: &'static str,
|
pub noise_id: DoublePerlinNoiseParameters,
|
||||||
pub xz_scale: f64,
|
pub xz_scale: f64,
|
||||||
pub y_scale: f64,
|
pub y_scale: f64,
|
||||||
}
|
}
|
||||||
@ -1024,7 +1032,7 @@ pub fn build() -> TokenStream {
|
|||||||
pub struct ShiftedNoiseData {
|
pub struct ShiftedNoiseData {
|
||||||
pub xz_scale: f64,
|
pub xz_scale: f64,
|
||||||
pub y_scale: f64,
|
pub y_scale: f64,
|
||||||
pub noise_id: &'static str,
|
pub noise_id: DoublePerlinNoiseParameters,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
@ -1074,7 +1082,7 @@ pub fn build() -> TokenStream {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub struct WeirdScaledData {
|
pub struct WeirdScaledData {
|
||||||
pub noise_id: &'static str,
|
pub noise_id: DoublePerlinNoiseParameters,
|
||||||
pub mapper: WeirdScaledMapper,
|
pub mapper: WeirdScaledMapper,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1223,10 +1231,10 @@ pub fn build() -> TokenStream {
|
|||||||
data: &'static NoiseData,
|
data: &'static NoiseData,
|
||||||
},
|
},
|
||||||
ShiftA {
|
ShiftA {
|
||||||
noise_id: &'static str,
|
noise_id: DoublePerlinNoiseParameters,
|
||||||
},
|
},
|
||||||
ShiftB {
|
ShiftB {
|
||||||
noise_id: &'static str,
|
noise_id: DoublePerlinNoiseParameters,
|
||||||
},
|
},
|
||||||
ShiftedNoise {
|
ShiftedNoise {
|
||||||
shift_x_index: usize,
|
shift_x_index: usize,
|
||||||
|
|||||||
@ -4,9 +4,10 @@ use serde_json::Value;
|
|||||||
use std::fs;
|
use std::fs;
|
||||||
|
|
||||||
pub fn build() -> TokenStream {
|
pub fn build() -> TokenStream {
|
||||||
let json_content =
|
let json_content = fs::read_to_string("../assets/placed_feature.json")
|
||||||
fs::read_to_string("../assets/placed_feature.json").expect("Failed to read placed_feature.json");
|
.expect("Failed to read placed_feature.json");
|
||||||
let json: Value = serde_json::from_str(&json_content).expect("Failed to parse placed_feature.json");
|
let json: Value =
|
||||||
|
serde_json::from_str(&json_content).expect("Failed to parse placed_feature.json");
|
||||||
|
|
||||||
let entries: Vec<TokenStream> = json
|
let entries: Vec<TokenStream> = json
|
||||||
.as_object()
|
.as_object()
|
||||||
@ -53,8 +54,14 @@ pub fn build() -> TokenStream {
|
|||||||
|
|
||||||
fn value_to_placed_feature(v: &Value) -> TokenStream {
|
fn value_to_placed_feature(v: &Value) -> TokenStream {
|
||||||
let feature = value_to_feature(&v["feature"]);
|
let feature = value_to_feature(&v["feature"]);
|
||||||
let placement_arr = v["placement"].as_array().map(|a| a.as_slice()).unwrap_or(&[]);
|
let placement_arr = v["placement"]
|
||||||
let placement: Vec<TokenStream> = placement_arr.iter().map(value_to_placement_modifier).collect();
|
.as_array()
|
||||||
|
.map(|a| a.as_slice())
|
||||||
|
.unwrap_or(&[]);
|
||||||
|
let placement: Vec<TokenStream> = placement_arr
|
||||||
|
.iter()
|
||||||
|
.map(value_to_placement_modifier)
|
||||||
|
.collect();
|
||||||
quote! {
|
quote! {
|
||||||
PlacedFeature {
|
PlacedFeature {
|
||||||
feature: #feature,
|
feature: #feature,
|
||||||
@ -84,7 +91,8 @@ fn value_to_placement_modifier(v: &Value) -> TokenStream {
|
|||||||
"minecraft:in_square" => quote! { PlacementModifier::InSquare(SquarePlacementModifier) },
|
"minecraft:in_square" => quote! { PlacementModifier::InSquare(SquarePlacementModifier) },
|
||||||
"minecraft:fixed_placement" => quote! { PlacementModifier::FixedPlacement },
|
"minecraft:fixed_placement" => quote! { PlacementModifier::FixedPlacement },
|
||||||
"minecraft:heightmap" => {
|
"minecraft:heightmap" => {
|
||||||
let heightmap = value_to_height_map(v["heightmap"].as_str().unwrap_or("MOTION_BLOCKING"));
|
let heightmap =
|
||||||
|
value_to_height_map(v["heightmap"].as_str().unwrap_or("MOTION_BLOCKING"));
|
||||||
quote! {
|
quote! {
|
||||||
PlacementModifier::Heightmap(HeightmapPlacementModifier {
|
PlacementModifier::Heightmap(HeightmapPlacementModifier {
|
||||||
heightmap: #heightmap,
|
heightmap: #heightmap,
|
||||||
@ -179,7 +187,9 @@ fn value_to_placement_modifier(v: &Value) -> TokenStream {
|
|||||||
"minecraft:environment_scan" => {
|
"minecraft:environment_scan" => {
|
||||||
let dir = value_to_block_direction(v["direction_of_search"].as_str().unwrap_or("down"));
|
let dir = value_to_block_direction(v["direction_of_search"].as_str().unwrap_or("down"));
|
||||||
let target = value_to_block_predicate(&v["target_condition"]);
|
let target = value_to_block_predicate(&v["target_condition"]);
|
||||||
let allowed = if v["allowed_search_condition"].is_null() || v["allowed_search_condition"].is_object() {
|
let allowed = if v["allowed_search_condition"].is_null()
|
||||||
|
|| v["allowed_search_condition"].is_object()
|
||||||
|
{
|
||||||
if v["allowed_search_condition"].is_object() {
|
if v["allowed_search_condition"].is_object() {
|
||||||
let p = value_to_block_predicate(&v["allowed_search_condition"]);
|
let p = value_to_block_predicate(&v["allowed_search_condition"]);
|
||||||
quote! { Some(#p) }
|
quote! { Some(#p) }
|
||||||
@ -450,11 +460,13 @@ pub fn value_to_int_provider(v: &Value) -> TokenStream {
|
|||||||
let entries: Vec<TokenStream> = v["distribution"]
|
let entries: Vec<TokenStream> = v["distribution"]
|
||||||
.as_array()
|
.as_array()
|
||||||
.map(|arr| {
|
.map(|arr| {
|
||||||
arr.iter().map(|e| {
|
arr.iter()
|
||||||
let data = value_to_int_provider(&e["data"]);
|
.map(|e| {
|
||||||
let weight = e["weight"].as_i64().unwrap_or(1) as i32;
|
let data = value_to_int_provider(&e["data"]);
|
||||||
quote! { WeightedEntry { data: #data, weight: #weight } }
|
let weight = e["weight"].as_i64().unwrap_or(1) as i32;
|
||||||
}).collect()
|
quote! { WeightedEntry { data: #data, weight: #weight } }
|
||||||
|
})
|
||||||
|
.collect()
|
||||||
})
|
})
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
quote! { IntProvider::Object(NormalIntProvider::WeightedList(WeightedListIntProvider { distribution: vec![#(#entries),*] })) }
|
quote! { IntProvider::Object(NormalIntProvider::WeightedList(WeightedListIntProvider { distribution: vec![#(#entries),*] })) }
|
||||||
@ -494,7 +506,7 @@ pub fn value_to_block_direction(s: &str) -> TokenStream {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn value_to_offset_predicate(v: &Value) -> TokenStream {
|
fn value_to_offset_predicate(v: &Value) -> TokenStream {
|
||||||
if v.is_null() || v.is_object() && v.as_object().map_or(true, |o| o.is_empty()) {
|
if v.is_null() || v.is_object() && v.as_object().is_none_or(|o| o.is_empty()) {
|
||||||
quote! { OffsetBlocksBlockPredicate { offset: None } }
|
quote! { OffsetBlocksBlockPredicate { offset: None } }
|
||||||
} else if v.is_array() {
|
} else if v.is_array() {
|
||||||
let x = v[0].as_i64().unwrap_or(0) as i32;
|
let x = v[0].as_i64().unwrap_or(0) as i32;
|
||||||
@ -525,7 +537,8 @@ fn value_to_matching_blocks_wrapper(v: &Value) -> TokenStream {
|
|||||||
pub fn value_to_block_state_codec(v: &Value) -> TokenStream {
|
pub fn value_to_block_state_codec(v: &Value) -> TokenStream {
|
||||||
let name = v["Name"].as_str().unwrap_or("minecraft:air");
|
let name = v["Name"].as_str().unwrap_or("minecraft:air");
|
||||||
let name_stripped = name.strip_prefix("minecraft:").unwrap_or(name);
|
let name_stripped = name.strip_prefix("minecraft:").unwrap_or(name);
|
||||||
let block_ident = quote::format_ident!("{}", name_stripped.to_uppercase().replace(':', "_").replace('-', "_"));
|
let block_ident =
|
||||||
|
quote::format_ident!("{}", name_stripped.to_uppercase().replace([':', '-'], "_"));
|
||||||
if let Some(props) = v["Properties"].as_object() {
|
if let Some(props) = v["Properties"].as_object() {
|
||||||
let keys: Vec<&str> = props.keys().map(|k| k.as_str()).collect();
|
let keys: Vec<&str> = props.keys().map(|k| k.as_str()).collect();
|
||||||
let vals: Vec<&str> = props.values().filter_map(|v| v.as_str()).collect();
|
let vals: Vec<&str> = props.values().filter_map(|v| v.as_str()).collect();
|
||||||
|
|||||||
@ -118,13 +118,11 @@ pub(crate) fn build() -> TokenStream {
|
|||||||
let mut timeline_id_map: BTreeMap<String, u16> = BTreeMap::new();
|
let mut timeline_id_map: BTreeMap<String, u16> = BTreeMap::new();
|
||||||
if let Ok(registries) = serde_json::from_str::<serde_json::Value>(
|
if let Ok(registries) = serde_json::from_str::<serde_json::Value>(
|
||||||
&fs::read_to_string("../assets/registry/1_21_11_synced_registries.json").unwrap(),
|
&fs::read_to_string("../assets/registry/1_21_11_synced_registries.json").unwrap(),
|
||||||
) {
|
) && let Some(timelines) = registries.get("timeline")
|
||||||
if let Some(timelines) = registries.get("timeline") {
|
&& let Some(obj) = timelines.as_object()
|
||||||
if let Some(obj) = timelines.as_object() {
|
{
|
||||||
for (i, name) in obj.keys().enumerate() {
|
for (i, name) in obj.keys().enumerate() {
|
||||||
timeline_id_map.insert(name.clone(), i as u16);
|
timeline_id_map.insert(name.clone(), i as u16);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// dimension_id_map will be used when resolving dimension_type tag entries below
|
// dimension_id_map will be used when resolving dimension_type tag entries below
|
||||||
@ -139,7 +137,7 @@ pub(crate) fn build() -> TokenStream {
|
|||||||
|
|
||||||
let mut all_registry_keys = HashSet::new();
|
let mut all_registry_keys = HashSet::new();
|
||||||
all_registry_keys.insert("dimension_type".to_string());
|
all_registry_keys.insert("dimension_type".to_string());
|
||||||
|
|
||||||
let mut latest_modules = Vec::new();
|
let mut latest_modules = Vec::new();
|
||||||
let mut legacy_modules = Vec::new();
|
let mut legacy_modules = Vec::new();
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -17,255 +17,271 @@ impl DoublePerlinNoiseParameters {
|
|||||||
}
|
}
|
||||||
pub fn id_to_parameters(id: &str) -> Option<&DoublePerlinNoiseParameters> {
|
pub fn id_to_parameters(id: &str) -> Option<&DoublePerlinNoiseParameters> {
|
||||||
Some(match id {
|
Some(match id {
|
||||||
"aquifer_barrier" => &AQUIFER_BARRIER,
|
"aquifer_barrier" => &Self::AQUIFER_BARRIER,
|
||||||
"aquifer_fluid_level_floodedness" => &AQUIFER_FLUID_LEVEL_FLOODEDNESS,
|
"aquifer_fluid_level_floodedness" => &Self::AQUIFER_FLUID_LEVEL_FLOODEDNESS,
|
||||||
"aquifer_fluid_level_spread" => &AQUIFER_FLUID_LEVEL_SPREAD,
|
"aquifer_fluid_level_spread" => &Self::AQUIFER_FLUID_LEVEL_SPREAD,
|
||||||
"aquifer_lava" => &AQUIFER_LAVA,
|
"aquifer_lava" => &Self::AQUIFER_LAVA,
|
||||||
"badlands_pillar" => &BADLANDS_PILLAR,
|
"badlands_pillar" => &Self::BADLANDS_PILLAR,
|
||||||
"badlands_pillar_roof" => &BADLANDS_PILLAR_ROOF,
|
"badlands_pillar_roof" => &Self::BADLANDS_PILLAR_ROOF,
|
||||||
"badlands_surface" => &BADLANDS_SURFACE,
|
"badlands_surface" => &Self::BADLANDS_SURFACE,
|
||||||
"calcite" => &CALCITE,
|
"calcite" => &Self::CALCITE,
|
||||||
"cave_cheese" => &CAVE_CHEESE,
|
"cave_cheese" => &Self::CAVE_CHEESE,
|
||||||
"cave_entrance" => &CAVE_ENTRANCE,
|
"cave_entrance" => &Self::CAVE_ENTRANCE,
|
||||||
"cave_layer" => &CAVE_LAYER,
|
"cave_layer" => &Self::CAVE_LAYER,
|
||||||
"clay_bands_offset" => &CLAY_BANDS_OFFSET,
|
"clay_bands_offset" => &Self::CLAY_BANDS_OFFSET,
|
||||||
"continentalness" => &CONTINENTALNESS,
|
"continentalness" => &Self::CONTINENTALNESS,
|
||||||
"continentalness_large" => &CONTINENTALNESS_LARGE,
|
"continentalness_large" => &Self::CONTINENTALNESS_LARGE,
|
||||||
"erosion" => &EROSION,
|
"erosion" => &Self::EROSION,
|
||||||
"erosion_large" => &EROSION_LARGE,
|
"erosion_large" => &Self::EROSION_LARGE,
|
||||||
"gravel" => &GRAVEL,
|
"gravel" => &Self::GRAVEL,
|
||||||
"gravel_layer" => &GRAVEL_LAYER,
|
"gravel_layer" => &Self::GRAVEL_LAYER,
|
||||||
"ice" => &ICE,
|
"ice" => &Self::ICE,
|
||||||
"iceberg_pillar" => &ICEBERG_PILLAR,
|
"iceberg_pillar" => &Self::ICEBERG_PILLAR,
|
||||||
"iceberg_pillar_roof" => &ICEBERG_PILLAR_ROOF,
|
"iceberg_pillar_roof" => &Self::ICEBERG_PILLAR_ROOF,
|
||||||
"iceberg_surface" => &ICEBERG_SURFACE,
|
"iceberg_surface" => &Self::ICEBERG_SURFACE,
|
||||||
"jagged" => &JAGGED,
|
"jagged" => &Self::JAGGED,
|
||||||
"nether_state_selector" => &NETHER_STATE_SELECTOR,
|
"nether_state_selector" => &Self::NETHER_STATE_SELECTOR,
|
||||||
"nether_wart" => &NETHER_WART,
|
"nether_wart" => &Self::NETHER_WART,
|
||||||
"netherrack" => &NETHERRACK,
|
"netherrack" => &Self::NETHERRACK,
|
||||||
"noodle" => &NOODLE,
|
"noodle" => &Self::NOODLE,
|
||||||
"noodle_ridge_a" => &NOODLE_RIDGE_A,
|
"noodle_ridge_a" => &Self::NOODLE_RIDGE_A,
|
||||||
"noodle_ridge_b" => &NOODLE_RIDGE_B,
|
"noodle_ridge_b" => &Self::NOODLE_RIDGE_B,
|
||||||
"noodle_thickness" => &NOODLE_THICKNESS,
|
"noodle_thickness" => &Self::NOODLE_THICKNESS,
|
||||||
"offset" => &OFFSET,
|
"offset" => &Self::OFFSET,
|
||||||
"ore_gap" => &ORE_GAP,
|
"ore_gap" => &Self::ORE_GAP,
|
||||||
"ore_vein_a" => &ORE_VEIN_A,
|
"ore_vein_a" => &Self::ORE_VEIN_A,
|
||||||
"ore_vein_b" => &ORE_VEIN_B,
|
"ore_vein_b" => &Self::ORE_VEIN_B,
|
||||||
"ore_veininess" => &ORE_VEININESS,
|
"ore_veininess" => &Self::ORE_VEININESS,
|
||||||
"packed_ice" => &PACKED_ICE,
|
"packed_ice" => &Self::PACKED_ICE,
|
||||||
"patch" => &PATCH,
|
"patch" => &Self::PATCH,
|
||||||
"pillar" => &PILLAR,
|
"pillar" => &Self::PILLAR,
|
||||||
"pillar_rareness" => &PILLAR_RARENESS,
|
"pillar_rareness" => &Self::PILLAR_RARENESS,
|
||||||
"pillar_thickness" => &PILLAR_THICKNESS,
|
"pillar_thickness" => &Self::PILLAR_THICKNESS,
|
||||||
"powder_snow" => &POWDER_SNOW,
|
"powder_snow" => &Self::POWDER_SNOW,
|
||||||
"ridge" => &RIDGE,
|
"ridge" => &Self::RIDGE,
|
||||||
"soul_sand_layer" => &SOUL_SAND_LAYER,
|
"soul_sand_layer" => &Self::SOUL_SAND_LAYER,
|
||||||
"spaghetti_2d" => &SPAGHETTI_2D,
|
"spaghetti_2d" => &Self::SPAGHETTI_2D,
|
||||||
"spaghetti_2d_elevation" => &SPAGHETTI_2D_ELEVATION,
|
"spaghetti_2d_elevation" => &Self::SPAGHETTI_2D_ELEVATION,
|
||||||
"spaghetti_2d_modulator" => &SPAGHETTI_2D_MODULATOR,
|
"spaghetti_2d_modulator" => &Self::SPAGHETTI_2D_MODULATOR,
|
||||||
"spaghetti_2d_thickness" => &SPAGHETTI_2D_THICKNESS,
|
"spaghetti_2d_thickness" => &Self::SPAGHETTI_2D_THICKNESS,
|
||||||
"spaghetti_3d_1" => &SPAGHETTI_3D_1,
|
"spaghetti_3d_1" => &Self::SPAGHETTI_3D_1,
|
||||||
"spaghetti_3d_2" => &SPAGHETTI_3D_2,
|
"spaghetti_3d_2" => &Self::SPAGHETTI_3D_2,
|
||||||
"spaghetti_3d_rarity" => &SPAGHETTI_3D_RARITY,
|
"spaghetti_3d_rarity" => &Self::SPAGHETTI_3D_RARITY,
|
||||||
"spaghetti_3d_thickness" => &SPAGHETTI_3D_THICKNESS,
|
"spaghetti_3d_thickness" => &Self::SPAGHETTI_3D_THICKNESS,
|
||||||
"spaghetti_roughness" => &SPAGHETTI_ROUGHNESS,
|
"spaghetti_roughness" => &Self::SPAGHETTI_ROUGHNESS,
|
||||||
"spaghetti_roughness_modulator" => &SPAGHETTI_ROUGHNESS_MODULATOR,
|
"spaghetti_roughness_modulator" => &Self::SPAGHETTI_ROUGHNESS_MODULATOR,
|
||||||
"surface" => &SURFACE,
|
"surface" => &Self::SURFACE,
|
||||||
"surface_secondary" => &SURFACE_SECONDARY,
|
"surface_secondary" => &Self::SURFACE_SECONDARY,
|
||||||
"surface_swamp" => &SURFACE_SWAMP,
|
"surface_swamp" => &Self::SURFACE_SWAMP,
|
||||||
"temperature" => &TEMPERATURE,
|
"temperature" => &Self::TEMPERATURE,
|
||||||
"temperature_large" => &TEMPERATURE_LARGE,
|
"temperature_large" => &Self::TEMPERATURE_LARGE,
|
||||||
"vegetation" => &VEGETATION,
|
"vegetation" => &Self::VEGETATION,
|
||||||
"vegetation_large" => &VEGETATION_LARGE,
|
"vegetation_large" => &Self::VEGETATION_LARGE,
|
||||||
_ => return None,
|
_ => return None,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
pub const AQUIFER_BARRIER: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-3i32, &[1f64], "minecraft:aquifer_barrier");
|
||||||
|
pub const AQUIFER_FLUID_LEVEL_FLOODEDNESS: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(
|
||||||
|
-7i32,
|
||||||
|
&[1f64],
|
||||||
|
"minecraft:aquifer_fluid_level_floodedness",
|
||||||
|
);
|
||||||
|
pub const AQUIFER_FLUID_LEVEL_SPREAD: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-5i32, &[1f64], "minecraft:aquifer_fluid_level_spread");
|
||||||
|
pub const AQUIFER_LAVA: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-1i32, &[1f64], "minecraft:aquifer_lava");
|
||||||
|
pub const BADLANDS_PILLAR: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
||||||
|
-2i32,
|
||||||
|
&[1f64, 1f64, 1f64, 1f64],
|
||||||
|
"minecraft:badlands_pillar",
|
||||||
|
);
|
||||||
|
pub const BADLANDS_PILLAR_ROOF: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:badlands_pillar_roof");
|
||||||
|
pub const BADLANDS_SURFACE: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-6i32, &[1f64, 1f64, 1f64], "minecraft:badlands_surface");
|
||||||
|
pub const CALCITE: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-9i32, &[1f64, 1f64, 1f64, 1f64], "minecraft:calcite");
|
||||||
|
pub const CAVE_CHEESE: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
||||||
|
-8i32,
|
||||||
|
&[0.5f64, 1f64, 2f64, 1f64, 2f64, 1f64, 0f64, 2f64, 0f64],
|
||||||
|
"minecraft:cave_cheese",
|
||||||
|
);
|
||||||
|
pub const CAVE_ENTRANCE: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-7i32, &[0.4f64, 0.5f64, 1f64], "minecraft:cave_entrance");
|
||||||
|
pub const CAVE_LAYER: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:cave_layer");
|
||||||
|
pub const CLAY_BANDS_OFFSET: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:clay_bands_offset");
|
||||||
|
pub const CONTINENTALNESS: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
||||||
|
-9i32,
|
||||||
|
&[1f64, 1f64, 2f64, 2f64, 2f64, 1f64, 1f64, 1f64, 1f64],
|
||||||
|
"minecraft:continentalness",
|
||||||
|
);
|
||||||
|
pub const CONTINENTALNESS_LARGE: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
||||||
|
-11i32,
|
||||||
|
&[1f64, 1f64, 2f64, 2f64, 2f64, 1f64, 1f64, 1f64, 1f64],
|
||||||
|
"minecraft:continentalness_large",
|
||||||
|
);
|
||||||
|
pub const EROSION: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
||||||
|
-9i32,
|
||||||
|
&[1f64, 1f64, 0f64, 1f64, 1f64],
|
||||||
|
"minecraft:erosion",
|
||||||
|
);
|
||||||
|
pub const EROSION_LARGE: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
||||||
|
-11i32,
|
||||||
|
&[1f64, 1f64, 0f64, 1f64, 1f64],
|
||||||
|
"minecraft:erosion_large",
|
||||||
|
);
|
||||||
|
pub const GRAVEL: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-8i32, &[1f64, 1f64, 1f64, 1f64], "minecraft:gravel");
|
||||||
|
pub const GRAVEL_LAYER: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
||||||
|
-8i32,
|
||||||
|
&[
|
||||||
|
1f64,
|
||||||
|
1f64,
|
||||||
|
1f64,
|
||||||
|
1f64,
|
||||||
|
0f64,
|
||||||
|
0f64,
|
||||||
|
0f64,
|
||||||
|
0f64,
|
||||||
|
0.013333333333333334f64,
|
||||||
|
],
|
||||||
|
"minecraft:gravel_layer",
|
||||||
|
);
|
||||||
|
pub const ICE: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-4i32, &[1f64, 1f64, 1f64, 1f64], "minecraft:ice");
|
||||||
|
pub const ICEBERG_PILLAR: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
||||||
|
-6i32,
|
||||||
|
&[1f64, 1f64, 1f64, 1f64],
|
||||||
|
"minecraft:iceberg_pillar",
|
||||||
|
);
|
||||||
|
pub const ICEBERG_PILLAR_ROOF: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-3i32, &[1f64], "minecraft:iceberg_pillar_roof");
|
||||||
|
pub const ICEBERG_SURFACE: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-6i32, &[1f64, 1f64, 1f64], "minecraft:iceberg_surface");
|
||||||
|
pub const JAGGED: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
||||||
|
-16i32,
|
||||||
|
&[
|
||||||
|
1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64,
|
||||||
|
1f64, 1f64,
|
||||||
|
],
|
||||||
|
"minecraft:jagged",
|
||||||
|
);
|
||||||
|
pub const NETHER_STATE_SELECTOR: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-4i32, &[1f64], "minecraft:nether_state_selector");
|
||||||
|
pub const NETHER_WART: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
||||||
|
-3i32,
|
||||||
|
&[1f64, 0f64, 0f64, 0.9f64],
|
||||||
|
"minecraft:nether_wart",
|
||||||
|
);
|
||||||
|
pub const NETHERRACK: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
||||||
|
-3i32,
|
||||||
|
&[1f64, 0f64, 0f64, 0.35f64],
|
||||||
|
"minecraft:netherrack",
|
||||||
|
);
|
||||||
|
pub const NOODLE: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:noodle");
|
||||||
|
pub const NOODLE_RIDGE_A: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:noodle_ridge_a");
|
||||||
|
pub const NOODLE_RIDGE_B: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:noodle_ridge_b");
|
||||||
|
pub const NOODLE_THICKNESS: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:noodle_thickness");
|
||||||
|
pub const OFFSET: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-3i32, &[1f64, 1f64, 1f64, 0f64], "minecraft:offset");
|
||||||
|
pub const ORE_GAP: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-5i32, &[1f64], "minecraft:ore_gap");
|
||||||
|
pub const ORE_VEIN_A: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:ore_vein_a");
|
||||||
|
pub const ORE_VEIN_B: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:ore_vein_b");
|
||||||
|
pub const ORE_VEININESS: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:ore_veininess");
|
||||||
|
pub const PACKED_ICE: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-7i32, &[1f64, 1f64, 1f64, 1f64], "minecraft:packed_ice");
|
||||||
|
pub const PATCH: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
||||||
|
-5i32,
|
||||||
|
&[1f64, 0f64, 0f64, 0f64, 0f64, 0.013333333333333334f64],
|
||||||
|
"minecraft:patch",
|
||||||
|
);
|
||||||
|
pub const PILLAR: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-7i32, &[1f64, 1f64], "minecraft:pillar");
|
||||||
|
pub const PILLAR_RARENESS: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:pillar_rareness");
|
||||||
|
pub const PILLAR_THICKNESS: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:pillar_thickness");
|
||||||
|
pub const POWDER_SNOW: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-6i32, &[1f64, 1f64, 1f64, 1f64], "minecraft:powder_snow");
|
||||||
|
pub const RIDGE: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
||||||
|
-7i32,
|
||||||
|
&[1f64, 2f64, 1f64, 0f64, 0f64, 0f64],
|
||||||
|
"minecraft:ridge",
|
||||||
|
);
|
||||||
|
pub const SOUL_SAND_LAYER: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
||||||
|
-8i32,
|
||||||
|
&[
|
||||||
|
1f64,
|
||||||
|
1f64,
|
||||||
|
1f64,
|
||||||
|
1f64,
|
||||||
|
0f64,
|
||||||
|
0f64,
|
||||||
|
0f64,
|
||||||
|
0f64,
|
||||||
|
0.013333333333333334f64,
|
||||||
|
],
|
||||||
|
"minecraft:soul_sand_layer",
|
||||||
|
);
|
||||||
|
pub const SPAGHETTI_2D: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:spaghetti_2d");
|
||||||
|
pub const SPAGHETTI_2D_ELEVATION: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:spaghetti_2d_elevation");
|
||||||
|
pub const SPAGHETTI_2D_MODULATOR: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-11i32, &[1f64], "minecraft:spaghetti_2d_modulator");
|
||||||
|
pub const SPAGHETTI_2D_THICKNESS: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-11i32, &[1f64], "minecraft:spaghetti_2d_thickness");
|
||||||
|
pub const SPAGHETTI_3D_1: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:spaghetti_3d_1");
|
||||||
|
pub const SPAGHETTI_3D_2: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:spaghetti_3d_2");
|
||||||
|
pub const SPAGHETTI_3D_RARITY: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-11i32, &[1f64], "minecraft:spaghetti_3d_rarity");
|
||||||
|
pub const SPAGHETTI_3D_THICKNESS: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:spaghetti_3d_thickness");
|
||||||
|
pub const SPAGHETTI_ROUGHNESS: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-5i32, &[1f64], "minecraft:spaghetti_roughness");
|
||||||
|
pub const SPAGHETTI_ROUGHNESS_MODULATOR: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:spaghetti_roughness_modulator");
|
||||||
|
pub const SURFACE: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-6i32, &[1f64, 1f64, 1f64], "minecraft:surface");
|
||||||
|
pub const SURFACE_SECONDARY: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
||||||
|
-6i32,
|
||||||
|
&[1f64, 1f64, 0f64, 1f64],
|
||||||
|
"minecraft:surface_secondary",
|
||||||
|
);
|
||||||
|
pub const SURFACE_SWAMP: DoublePerlinNoiseParameters =
|
||||||
|
DoublePerlinNoiseParameters::new(-2i32, &[1f64], "minecraft:surface_swamp");
|
||||||
|
pub const TEMPERATURE: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
||||||
|
-10i32,
|
||||||
|
&[1.5f64, 0f64, 1f64, 0f64, 0f64, 0f64],
|
||||||
|
"minecraft:temperature",
|
||||||
|
);
|
||||||
|
pub const TEMPERATURE_LARGE: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
||||||
|
-12i32,
|
||||||
|
&[1.5f64, 0f64, 1f64, 0f64, 0f64, 0f64],
|
||||||
|
"minecraft:temperature_large",
|
||||||
|
);
|
||||||
|
pub const VEGETATION: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
||||||
|
-8i32,
|
||||||
|
&[1f64, 1f64, 0f64, 0f64, 0f64, 0f64],
|
||||||
|
"minecraft:vegetation",
|
||||||
|
);
|
||||||
|
pub const VEGETATION_LARGE: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
||||||
|
-10i32,
|
||||||
|
&[1f64, 1f64, 0f64, 0f64, 0f64, 0f64],
|
||||||
|
"minecraft:vegetation_large",
|
||||||
|
);
|
||||||
}
|
}
|
||||||
pub const AQUIFER_BARRIER: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-3i32, &[1f64], "minecraft:aquifer_barrier");
|
|
||||||
pub const AQUIFER_FLUID_LEVEL_FLOODEDNESS: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:aquifer_fluid_level_floodedness");
|
|
||||||
pub const AQUIFER_FLUID_LEVEL_SPREAD: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-5i32, &[1f64], "minecraft:aquifer_fluid_level_spread");
|
|
||||||
pub const AQUIFER_LAVA: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-1i32, &[1f64], "minecraft:aquifer_lava");
|
|
||||||
pub const BADLANDS_PILLAR: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
|
||||||
-2i32,
|
|
||||||
&[1f64, 1f64, 1f64, 1f64],
|
|
||||||
"minecraft:badlands_pillar",
|
|
||||||
);
|
|
||||||
pub const BADLANDS_PILLAR_ROOF: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:badlands_pillar_roof");
|
|
||||||
pub const BADLANDS_SURFACE: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-6i32, &[1f64, 1f64, 1f64], "minecraft:badlands_surface");
|
|
||||||
pub const CALCITE: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-9i32, &[1f64, 1f64, 1f64, 1f64], "minecraft:calcite");
|
|
||||||
pub const CAVE_CHEESE: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
|
||||||
-8i32,
|
|
||||||
&[0.5f64, 1f64, 2f64, 1f64, 2f64, 1f64, 0f64, 2f64, 0f64],
|
|
||||||
"minecraft:cave_cheese",
|
|
||||||
);
|
|
||||||
pub const CAVE_ENTRANCE: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-7i32, &[0.4f64, 0.5f64, 1f64], "minecraft:cave_entrance");
|
|
||||||
pub const CAVE_LAYER: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:cave_layer");
|
|
||||||
pub const CLAY_BANDS_OFFSET: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:clay_bands_offset");
|
|
||||||
pub const CONTINENTALNESS: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
|
||||||
-9i32,
|
|
||||||
&[1f64, 1f64, 2f64, 2f64, 2f64, 1f64, 1f64, 1f64, 1f64],
|
|
||||||
"minecraft:continentalness",
|
|
||||||
);
|
|
||||||
pub const CONTINENTALNESS_LARGE: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
|
||||||
-11i32,
|
|
||||||
&[1f64, 1f64, 2f64, 2f64, 2f64, 1f64, 1f64, 1f64, 1f64],
|
|
||||||
"minecraft:continentalness_large",
|
|
||||||
);
|
|
||||||
pub const EROSION: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-9i32, &[1f64, 1f64, 0f64, 1f64, 1f64], "minecraft:erosion");
|
|
||||||
pub const EROSION_LARGE: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
|
||||||
-11i32,
|
|
||||||
&[1f64, 1f64, 0f64, 1f64, 1f64],
|
|
||||||
"minecraft:erosion_large",
|
|
||||||
);
|
|
||||||
pub const GRAVEL: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-8i32, &[1f64, 1f64, 1f64, 1f64], "minecraft:gravel");
|
|
||||||
pub const GRAVEL_LAYER: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
|
||||||
-8i32,
|
|
||||||
&[
|
|
||||||
1f64,
|
|
||||||
1f64,
|
|
||||||
1f64,
|
|
||||||
1f64,
|
|
||||||
0f64,
|
|
||||||
0f64,
|
|
||||||
0f64,
|
|
||||||
0f64,
|
|
||||||
0.013333333333333334f64,
|
|
||||||
],
|
|
||||||
"minecraft:gravel_layer",
|
|
||||||
);
|
|
||||||
pub const ICE: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-4i32, &[1f64, 1f64, 1f64, 1f64], "minecraft:ice");
|
|
||||||
pub const ICEBERG_PILLAR: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-6i32, &[1f64, 1f64, 1f64, 1f64], "minecraft:iceberg_pillar");
|
|
||||||
pub const ICEBERG_PILLAR_ROOF: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-3i32, &[1f64], "minecraft:iceberg_pillar_roof");
|
|
||||||
pub const ICEBERG_SURFACE: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-6i32, &[1f64, 1f64, 1f64], "minecraft:iceberg_surface");
|
|
||||||
pub const JAGGED: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
|
||||||
-16i32,
|
|
||||||
&[
|
|
||||||
1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64,
|
|
||||||
1f64,
|
|
||||||
],
|
|
||||||
"minecraft:jagged",
|
|
||||||
);
|
|
||||||
pub const NETHER_STATE_SELECTOR: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-4i32, &[1f64], "minecraft:nether_state_selector");
|
|
||||||
pub const NETHER_WART: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-3i32, &[1f64, 0f64, 0f64, 0.9f64], "minecraft:nether_wart");
|
|
||||||
pub const NETHERRACK: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-3i32, &[1f64, 0f64, 0f64, 0.35f64], "minecraft:netherrack");
|
|
||||||
pub const NOODLE: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:noodle");
|
|
||||||
pub const NOODLE_RIDGE_A: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:noodle_ridge_a");
|
|
||||||
pub const NOODLE_RIDGE_B: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:noodle_ridge_b");
|
|
||||||
pub const NOODLE_THICKNESS: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:noodle_thickness");
|
|
||||||
pub const OFFSET: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-3i32, &[1f64, 1f64, 1f64, 0f64], "minecraft:offset");
|
|
||||||
pub const ORE_GAP: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-5i32, &[1f64], "minecraft:ore_gap");
|
|
||||||
pub const ORE_VEIN_A: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:ore_vein_a");
|
|
||||||
pub const ORE_VEIN_B: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:ore_vein_b");
|
|
||||||
pub const ORE_VEININESS: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:ore_veininess");
|
|
||||||
pub const PACKED_ICE: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-7i32, &[1f64, 1f64, 1f64, 1f64], "minecraft:packed_ice");
|
|
||||||
pub const PATCH: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
|
||||||
-5i32,
|
|
||||||
&[1f64, 0f64, 0f64, 0f64, 0f64, 0.013333333333333334f64],
|
|
||||||
"minecraft:patch",
|
|
||||||
);
|
|
||||||
pub const PILLAR: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-7i32, &[1f64, 1f64], "minecraft:pillar");
|
|
||||||
pub const PILLAR_RARENESS: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:pillar_rareness");
|
|
||||||
pub const PILLAR_THICKNESS: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:pillar_thickness");
|
|
||||||
pub const POWDER_SNOW: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-6i32, &[1f64, 1f64, 1f64, 1f64], "minecraft:powder_snow");
|
|
||||||
pub const RIDGE: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
|
||||||
-7i32,
|
|
||||||
&[1f64, 2f64, 1f64, 0f64, 0f64, 0f64],
|
|
||||||
"minecraft:ridge",
|
|
||||||
);
|
|
||||||
pub const SOUL_SAND_LAYER: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
|
||||||
-8i32,
|
|
||||||
&[
|
|
||||||
1f64,
|
|
||||||
1f64,
|
|
||||||
1f64,
|
|
||||||
1f64,
|
|
||||||
0f64,
|
|
||||||
0f64,
|
|
||||||
0f64,
|
|
||||||
0f64,
|
|
||||||
0.013333333333333334f64,
|
|
||||||
],
|
|
||||||
"minecraft:soul_sand_layer",
|
|
||||||
);
|
|
||||||
pub const SPAGHETTI_2D: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:spaghetti_2d");
|
|
||||||
pub const SPAGHETTI_2D_ELEVATION: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:spaghetti_2d_elevation");
|
|
||||||
pub const SPAGHETTI_2D_MODULATOR: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-11i32, &[1f64], "minecraft:spaghetti_2d_modulator");
|
|
||||||
pub const SPAGHETTI_2D_THICKNESS: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-11i32, &[1f64], "minecraft:spaghetti_2d_thickness");
|
|
||||||
pub const SPAGHETTI_3D_1: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:spaghetti_3d_1");
|
|
||||||
pub const SPAGHETTI_3D_2: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:spaghetti_3d_2");
|
|
||||||
pub const SPAGHETTI_3D_RARITY: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-11i32, &[1f64], "minecraft:spaghetti_3d_rarity");
|
|
||||||
pub const SPAGHETTI_3D_THICKNESS: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:spaghetti_3d_thickness");
|
|
||||||
pub const SPAGHETTI_ROUGHNESS: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-5i32, &[1f64], "minecraft:spaghetti_roughness");
|
|
||||||
pub const SPAGHETTI_ROUGHNESS_MODULATOR: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:spaghetti_roughness_modulator");
|
|
||||||
pub const SURFACE: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-6i32, &[1f64, 1f64, 1f64], "minecraft:surface");
|
|
||||||
pub const SURFACE_SECONDARY: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
|
||||||
-6i32,
|
|
||||||
&[1f64, 1f64, 0f64, 1f64],
|
|
||||||
"minecraft:surface_secondary",
|
|
||||||
);
|
|
||||||
pub const SURFACE_SWAMP: DoublePerlinNoiseParameters =
|
|
||||||
DoublePerlinNoiseParameters::new(-2i32, &[1f64], "minecraft:surface_swamp");
|
|
||||||
pub const TEMPERATURE: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
|
||||||
-10i32,
|
|
||||||
&[1.5f64, 0f64, 1f64, 0f64, 0f64, 0f64],
|
|
||||||
"minecraft:temperature",
|
|
||||||
);
|
|
||||||
pub const TEMPERATURE_LARGE: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
|
||||||
-12i32,
|
|
||||||
&[1.5f64, 0f64, 1f64, 0f64, 0f64, 0f64],
|
|
||||||
"minecraft:temperature_large",
|
|
||||||
);
|
|
||||||
pub const VEGETATION: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
|
||||||
-8i32,
|
|
||||||
&[1f64, 1f64, 0f64, 0f64, 0f64, 0f64],
|
|
||||||
"minecraft:vegetation",
|
|
||||||
);
|
|
||||||
pub const VEGETATION_LARGE: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
|
||||||
-10i32,
|
|
||||||
&[1f64, 1f64, 0f64, 0f64, 0f64, 0f64],
|
|
||||||
"minecraft:vegetation_large",
|
|
||||||
);
|
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
/* This file is generated. Do not edit manually. */
|
/* This file is generated. Do not edit manually. */
|
||||||
|
use crate::chunk::DoublePerlinNoiseParameters;
|
||||||
pub struct NoiseData {
|
pub struct NoiseData {
|
||||||
pub noise_id: &'static str,
|
pub noise_id: DoublePerlinNoiseParameters,
|
||||||
pub xz_scale: f64,
|
pub xz_scale: f64,
|
||||||
pub y_scale: f64,
|
pub y_scale: f64,
|
||||||
}
|
}
|
||||||
pub struct ShiftedNoiseData {
|
pub struct ShiftedNoiseData {
|
||||||
pub xz_scale: f64,
|
pub xz_scale: f64,
|
||||||
pub y_scale: f64,
|
pub y_scale: f64,
|
||||||
pub noise_id: &'static str,
|
pub noise_id: DoublePerlinNoiseParameters,
|
||||||
}
|
}
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
pub enum WeirdScaledMapper {
|
pub enum WeirdScaledMapper {
|
||||||
@ -53,7 +54,7 @@ impl WeirdScaledMapper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub struct WeirdScaledData {
|
pub struct WeirdScaledData {
|
||||||
pub noise_id: &'static str,
|
pub noise_id: DoublePerlinNoiseParameters,
|
||||||
pub mapper: WeirdScaledMapper,
|
pub mapper: WeirdScaledMapper,
|
||||||
}
|
}
|
||||||
pub struct InterpolatedNoiseSamplerData {
|
pub struct InterpolatedNoiseSamplerData {
|
||||||
@ -185,10 +186,10 @@ pub enum BaseNoiseFunctionComponent {
|
|||||||
data: &'static NoiseData,
|
data: &'static NoiseData,
|
||||||
},
|
},
|
||||||
ShiftA {
|
ShiftA {
|
||||||
noise_id: &'static str,
|
noise_id: DoublePerlinNoiseParameters,
|
||||||
},
|
},
|
||||||
ShiftB {
|
ShiftB {
|
||||||
noise_id: &'static str,
|
noise_id: DoublePerlinNoiseParameters,
|
||||||
},
|
},
|
||||||
ShiftedNoise {
|
ShiftedNoise {
|
||||||
shift_x_index: usize,
|
shift_x_index: usize,
|
||||||
@ -324,7 +325,9 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
operation: BinaryOperation::Mul,
|
operation: BinaryOperation::Mul,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::ShiftA { noise_id: "offset" },
|
BaseNoiseFunctionComponent::ShiftA {
|
||||||
|
noise_id: DoublePerlinNoiseParameters::OFFSET,
|
||||||
|
},
|
||||||
BaseNoiseFunctionComponent::Wrapper {
|
BaseNoiseFunctionComponent::Wrapper {
|
||||||
input_index: 9usize,
|
input_index: 9usize,
|
||||||
wrapper: WrapperType::Cache2D,
|
wrapper: WrapperType::Cache2D,
|
||||||
@ -334,7 +337,9 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
wrapper: WrapperType::CacheFlat,
|
wrapper: WrapperType::CacheFlat,
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Constant { value: 0f64 },
|
BaseNoiseFunctionComponent::Constant { value: 0f64 },
|
||||||
BaseNoiseFunctionComponent::ShiftB { noise_id: "offset" },
|
BaseNoiseFunctionComponent::ShiftB {
|
||||||
|
noise_id: DoublePerlinNoiseParameters::OFFSET,
|
||||||
|
},
|
||||||
BaseNoiseFunctionComponent::Wrapper {
|
BaseNoiseFunctionComponent::Wrapper {
|
||||||
input_index: 13usize,
|
input_index: 13usize,
|
||||||
wrapper: WrapperType::Cache2D,
|
wrapper: WrapperType::Cache2D,
|
||||||
@ -350,7 +355,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
data: &ShiftedNoiseData {
|
data: &ShiftedNoiseData {
|
||||||
xz_scale: 0.25f64,
|
xz_scale: 0.25f64,
|
||||||
y_scale: 0f64,
|
y_scale: 0f64,
|
||||||
noise_id: "continentalness",
|
noise_id: DoublePerlinNoiseParameters::CONTINENTALNESS,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Wrapper {
|
BaseNoiseFunctionComponent::Wrapper {
|
||||||
@ -364,7 +369,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
data: &ShiftedNoiseData {
|
data: &ShiftedNoiseData {
|
||||||
xz_scale: 0.25f64,
|
xz_scale: 0.25f64,
|
||||||
y_scale: 0f64,
|
y_scale: 0f64,
|
||||||
noise_id: "erosion",
|
noise_id: DoublePerlinNoiseParameters::EROSION,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Wrapper {
|
BaseNoiseFunctionComponent::Wrapper {
|
||||||
@ -378,7 +383,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
data: &ShiftedNoiseData {
|
data: &ShiftedNoiseData {
|
||||||
xz_scale: 0.25f64,
|
xz_scale: 0.25f64,
|
||||||
y_scale: 0f64,
|
y_scale: 0f64,
|
||||||
noise_id: "ridge",
|
noise_id: DoublePerlinNoiseParameters::RIDGE,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Wrapper {
|
BaseNoiseFunctionComponent::Wrapper {
|
||||||
@ -2393,7 +2398,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "jagged",
|
noise_id: DoublePerlinNoiseParameters::JAGGED,
|
||||||
xz_scale: 1500f64,
|
xz_scale: 1500f64,
|
||||||
y_scale: 0f64,
|
y_scale: 0f64,
|
||||||
},
|
},
|
||||||
@ -3394,7 +3399,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "cave_entrance",
|
noise_id: DoublePerlinNoiseParameters::CAVE_ENTRANCE,
|
||||||
xz_scale: 0.75f64,
|
xz_scale: 0.75f64,
|
||||||
y_scale: 0.5f64,
|
y_scale: 0.5f64,
|
||||||
},
|
},
|
||||||
@ -3423,7 +3428,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "spaghetti_roughness_modulator",
|
noise_id: DoublePerlinNoiseParameters::SPAGHETTI_ROUGHNESS_MODULATOR,
|
||||||
xz_scale: 1f64,
|
xz_scale: 1f64,
|
||||||
y_scale: 1f64,
|
y_scale: 1f64,
|
||||||
},
|
},
|
||||||
@ -3444,7 +3449,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "spaghetti_roughness",
|
noise_id: DoublePerlinNoiseParameters::SPAGHETTI_ROUGHNESS,
|
||||||
xz_scale: 1f64,
|
xz_scale: 1f64,
|
||||||
y_scale: 1f64,
|
y_scale: 1f64,
|
||||||
},
|
},
|
||||||
@ -3475,7 +3480,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "spaghetti_3d_rarity",
|
noise_id: DoublePerlinNoiseParameters::SPAGHETTI_3D_RARITY,
|
||||||
xz_scale: 2f64,
|
xz_scale: 2f64,
|
||||||
y_scale: 1f64,
|
y_scale: 1f64,
|
||||||
},
|
},
|
||||||
@ -3487,14 +3492,14 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
BaseNoiseFunctionComponent::WeirdScaled {
|
BaseNoiseFunctionComponent::WeirdScaled {
|
||||||
input_index: 68usize,
|
input_index: 68usize,
|
||||||
data: &WeirdScaledData {
|
data: &WeirdScaledData {
|
||||||
noise_id: "spaghetti_3d_1",
|
noise_id: DoublePerlinNoiseParameters::SPAGHETTI_3D_1,
|
||||||
mapper: WeirdScaledMapper::Tunnels,
|
mapper: WeirdScaledMapper::Tunnels,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::WeirdScaled {
|
BaseNoiseFunctionComponent::WeirdScaled {
|
||||||
input_index: 68usize,
|
input_index: 68usize,
|
||||||
data: &WeirdScaledData {
|
data: &WeirdScaledData {
|
||||||
noise_id: "spaghetti_3d_2",
|
noise_id: DoublePerlinNoiseParameters::SPAGHETTI_3D_2,
|
||||||
mapper: WeirdScaledMapper::Tunnels,
|
mapper: WeirdScaledMapper::Tunnels,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -3507,7 +3512,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "spaghetti_3d_thickness",
|
noise_id: DoublePerlinNoiseParameters::SPAGHETTI_3D_THICKNESS,
|
||||||
xz_scale: 1f64,
|
xz_scale: 1f64,
|
||||||
y_scale: 1f64,
|
y_scale: 1f64,
|
||||||
},
|
},
|
||||||
@ -3574,7 +3579,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "cave_layer",
|
noise_id: DoublePerlinNoiseParameters::CAVE_LAYER,
|
||||||
xz_scale: 1f64,
|
xz_scale: 1f64,
|
||||||
y_scale: 8f64,
|
y_scale: 8f64,
|
||||||
},
|
},
|
||||||
@ -3594,7 +3599,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "cave_cheese",
|
noise_id: DoublePerlinNoiseParameters::CAVE_CHEESE,
|
||||||
xz_scale: 1f64,
|
xz_scale: 1f64,
|
||||||
y_scale: 0.6666666666666666f64,
|
y_scale: 0.6666666666666666f64,
|
||||||
},
|
},
|
||||||
@ -3657,7 +3662,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "spaghetti_2d_modulator",
|
noise_id: DoublePerlinNoiseParameters::SPAGHETTI_2D_MODULATOR,
|
||||||
xz_scale: 2f64,
|
xz_scale: 2f64,
|
||||||
y_scale: 1f64,
|
y_scale: 1f64,
|
||||||
},
|
},
|
||||||
@ -3665,13 +3670,13 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
BaseNoiseFunctionComponent::WeirdScaled {
|
BaseNoiseFunctionComponent::WeirdScaled {
|
||||||
input_index: 94usize,
|
input_index: 94usize,
|
||||||
data: &WeirdScaledData {
|
data: &WeirdScaledData {
|
||||||
noise_id: "spaghetti_2d",
|
noise_id: DoublePerlinNoiseParameters::SPAGHETTI_2D,
|
||||||
mapper: WeirdScaledMapper::Caves,
|
mapper: WeirdScaledMapper::Caves,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "spaghetti_2d_thickness",
|
noise_id: DoublePerlinNoiseParameters::SPAGHETTI_2D_THICKNESS,
|
||||||
xz_scale: 2f64,
|
xz_scale: 2f64,
|
||||||
y_scale: 1f64,
|
y_scale: 1f64,
|
||||||
},
|
},
|
||||||
@ -3710,7 +3715,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "spaghetti_2d_elevation",
|
noise_id: DoublePerlinNoiseParameters::SPAGHETTI_2D_ELEVATION,
|
||||||
xz_scale: 1f64,
|
xz_scale: 1f64,
|
||||||
y_scale: 0f64,
|
y_scale: 0f64,
|
||||||
},
|
},
|
||||||
@ -3793,7 +3798,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "pillar",
|
noise_id: DoublePerlinNoiseParameters::PILLAR,
|
||||||
xz_scale: 25f64,
|
xz_scale: 25f64,
|
||||||
y_scale: 0.3f64,
|
y_scale: 0.3f64,
|
||||||
},
|
},
|
||||||
@ -3807,7 +3812,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "pillar_rareness",
|
noise_id: DoublePerlinNoiseParameters::PILLAR_RARENESS,
|
||||||
xz_scale: 1f64,
|
xz_scale: 1f64,
|
||||||
y_scale: 1f64,
|
y_scale: 1f64,
|
||||||
},
|
},
|
||||||
@ -3835,7 +3840,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "pillar_thickness",
|
noise_id: DoublePerlinNoiseParameters::PILLAR_THICKNESS,
|
||||||
xz_scale: 1f64,
|
xz_scale: 1f64,
|
||||||
y_scale: 1f64,
|
y_scale: 1f64,
|
||||||
},
|
},
|
||||||
@ -3969,7 +3974,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "noodle",
|
noise_id: DoublePerlinNoiseParameters::NOODLE,
|
||||||
xz_scale: 1f64,
|
xz_scale: 1f64,
|
||||||
y_scale: 1f64,
|
y_scale: 1f64,
|
||||||
},
|
},
|
||||||
@ -3991,7 +3996,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
BaseNoiseFunctionComponent::Constant { value: 64f64 },
|
BaseNoiseFunctionComponent::Constant { value: 64f64 },
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "noodle_thickness",
|
noise_id: DoublePerlinNoiseParameters::NOODLE_THICKNESS,
|
||||||
xz_scale: 1f64,
|
xz_scale: 1f64,
|
||||||
y_scale: 1f64,
|
y_scale: 1f64,
|
||||||
},
|
},
|
||||||
@ -4025,7 +4030,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "noodle_ridge_a",
|
noise_id: DoublePerlinNoiseParameters::NOODLE_RIDGE_A,
|
||||||
xz_scale: 2.6666666666666665f64,
|
xz_scale: 2.6666666666666665f64,
|
||||||
y_scale: 2.6666666666666665f64,
|
y_scale: 2.6666666666666665f64,
|
||||||
},
|
},
|
||||||
@ -4051,7 +4056,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "noodle_ridge_b",
|
noise_id: DoublePerlinNoiseParameters::NOODLE_RIDGE_B,
|
||||||
xz_scale: 2.6666666666666665f64,
|
xz_scale: 2.6666666666666665f64,
|
||||||
y_scale: 2.6666666666666665f64,
|
y_scale: 2.6666666666666665f64,
|
||||||
},
|
},
|
||||||
@ -4126,35 +4131,35 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "aquifer_barrier",
|
noise_id: DoublePerlinNoiseParameters::AQUIFER_BARRIER,
|
||||||
xz_scale: 1f64,
|
xz_scale: 1f64,
|
||||||
y_scale: 0.5f64,
|
y_scale: 0.5f64,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "aquifer_fluid_level_floodedness",
|
noise_id: DoublePerlinNoiseParameters::AQUIFER_FLUID_LEVEL_FLOODEDNESS,
|
||||||
xz_scale: 1f64,
|
xz_scale: 1f64,
|
||||||
y_scale: 0.67f64,
|
y_scale: 0.67f64,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "aquifer_fluid_level_spread",
|
noise_id: DoublePerlinNoiseParameters::AQUIFER_FLUID_LEVEL_SPREAD,
|
||||||
xz_scale: 1f64,
|
xz_scale: 1f64,
|
||||||
y_scale: 0.7142857142857143f64,
|
y_scale: 0.7142857142857143f64,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "aquifer_lava",
|
noise_id: DoublePerlinNoiseParameters::AQUIFER_LAVA,
|
||||||
xz_scale: 1f64,
|
xz_scale: 1f64,
|
||||||
y_scale: 1f64,
|
y_scale: 1f64,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "ore_veininess",
|
noise_id: DoublePerlinNoiseParameters::ORE_VEININESS,
|
||||||
xz_scale: 1.5f64,
|
xz_scale: 1.5f64,
|
||||||
y_scale: 1.5f64,
|
y_scale: 1.5f64,
|
||||||
},
|
},
|
||||||
@ -4174,7 +4179,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "ore_vein_a",
|
noise_id: DoublePerlinNoiseParameters::ORE_VEIN_A,
|
||||||
xz_scale: 4f64,
|
xz_scale: 4f64,
|
||||||
y_scale: 4f64,
|
y_scale: 4f64,
|
||||||
},
|
},
|
||||||
@ -4200,7 +4205,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "ore_vein_b",
|
noise_id: DoublePerlinNoiseParameters::ORE_VEIN_B,
|
||||||
xz_scale: 4f64,
|
xz_scale: 4f64,
|
||||||
y_scale: 4f64,
|
y_scale: 4f64,
|
||||||
},
|
},
|
||||||
@ -4240,7 +4245,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Noise {
|
BaseNoiseFunctionComponent::Noise {
|
||||||
data: &NoiseData {
|
data: &NoiseData {
|
||||||
noise_id: "ore_gap",
|
noise_id: DoublePerlinNoiseParameters::ORE_GAP,
|
||||||
xz_scale: 1f64,
|
xz_scale: 1f64,
|
||||||
y_scale: 1f64,
|
y_scale: 1f64,
|
||||||
},
|
},
|
||||||
@ -4310,7 +4315,9 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
operation: BinaryOperation::Mul,
|
operation: BinaryOperation::Mul,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::ShiftA { noise_id: "offset" },
|
BaseNoiseFunctionComponent::ShiftA {
|
||||||
|
noise_id: DoublePerlinNoiseParameters::OFFSET,
|
||||||
|
},
|
||||||
BaseNoiseFunctionComponent::Wrapper {
|
BaseNoiseFunctionComponent::Wrapper {
|
||||||
input_index: 9usize,
|
input_index: 9usize,
|
||||||
wrapper: WrapperType::Cache2D,
|
wrapper: WrapperType::Cache2D,
|
||||||
@ -4320,7 +4327,9 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
wrapper: WrapperType::CacheFlat,
|
wrapper: WrapperType::CacheFlat,
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Constant { value: 0f64 },
|
BaseNoiseFunctionComponent::Constant { value: 0f64 },
|
||||||
BaseNoiseFunctionComponent::ShiftB { noise_id: "offset" },
|
BaseNoiseFunctionComponent::ShiftB {
|
||||||
|
noise_id: DoublePerlinNoiseParameters::OFFSET,
|
||||||
|
},
|
||||||
BaseNoiseFunctionComponent::Wrapper {
|
BaseNoiseFunctionComponent::Wrapper {
|
||||||
input_index: 13usize,
|
input_index: 13usize,
|
||||||
wrapper: WrapperType::Cache2D,
|
wrapper: WrapperType::Cache2D,
|
||||||
@ -4336,7 +4345,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
data: &ShiftedNoiseData {
|
data: &ShiftedNoiseData {
|
||||||
xz_scale: 0.25f64,
|
xz_scale: 0.25f64,
|
||||||
y_scale: 0f64,
|
y_scale: 0f64,
|
||||||
noise_id: "continentalness",
|
noise_id: DoublePerlinNoiseParameters::CONTINENTALNESS,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Wrapper {
|
BaseNoiseFunctionComponent::Wrapper {
|
||||||
@ -4350,7 +4359,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
data: &ShiftedNoiseData {
|
data: &ShiftedNoiseData {
|
||||||
xz_scale: 0.25f64,
|
xz_scale: 0.25f64,
|
||||||
y_scale: 0f64,
|
y_scale: 0f64,
|
||||||
noise_id: "erosion",
|
noise_id: DoublePerlinNoiseParameters::EROSION,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Wrapper {
|
BaseNoiseFunctionComponent::Wrapper {
|
||||||
@ -4364,7 +4373,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
data: &ShiftedNoiseData {
|
data: &ShiftedNoiseData {
|
||||||
xz_scale: 0.25f64,
|
xz_scale: 0.25f64,
|
||||||
y_scale: 0f64,
|
y_scale: 0f64,
|
||||||
noise_id: "ridge",
|
noise_id: DoublePerlinNoiseParameters::RIDGE,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Wrapper {
|
BaseNoiseFunctionComponent::Wrapper {
|
||||||
@ -7060,7 +7069,9 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
},
|
},
|
||||||
multi_noise: BaseMultiNoiseRouter {
|
multi_noise: BaseMultiNoiseRouter {
|
||||||
full_component_stack: &[
|
full_component_stack: &[
|
||||||
BaseNoiseFunctionComponent::ShiftA { noise_id: "offset" },
|
BaseNoiseFunctionComponent::ShiftA {
|
||||||
|
noise_id: DoublePerlinNoiseParameters::OFFSET,
|
||||||
|
},
|
||||||
BaseNoiseFunctionComponent::Wrapper {
|
BaseNoiseFunctionComponent::Wrapper {
|
||||||
input_index: 0usize,
|
input_index: 0usize,
|
||||||
wrapper: WrapperType::Cache2D,
|
wrapper: WrapperType::Cache2D,
|
||||||
@ -7070,7 +7081,9 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
wrapper: WrapperType::CacheFlat,
|
wrapper: WrapperType::CacheFlat,
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Constant { value: 0f64 },
|
BaseNoiseFunctionComponent::Constant { value: 0f64 },
|
||||||
BaseNoiseFunctionComponent::ShiftB { noise_id: "offset" },
|
BaseNoiseFunctionComponent::ShiftB {
|
||||||
|
noise_id: DoublePerlinNoiseParameters::OFFSET,
|
||||||
|
},
|
||||||
BaseNoiseFunctionComponent::Wrapper {
|
BaseNoiseFunctionComponent::Wrapper {
|
||||||
input_index: 4usize,
|
input_index: 4usize,
|
||||||
wrapper: WrapperType::Cache2D,
|
wrapper: WrapperType::Cache2D,
|
||||||
@ -7086,7 +7099,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
data: &ShiftedNoiseData {
|
data: &ShiftedNoiseData {
|
||||||
xz_scale: 0.25f64,
|
xz_scale: 0.25f64,
|
||||||
y_scale: 0f64,
|
y_scale: 0f64,
|
||||||
noise_id: "ridge",
|
noise_id: DoublePerlinNoiseParameters::RIDGE,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Wrapper {
|
BaseNoiseFunctionComponent::Wrapper {
|
||||||
@ -7100,7 +7113,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
data: &ShiftedNoiseData {
|
data: &ShiftedNoiseData {
|
||||||
xz_scale: 0.25f64,
|
xz_scale: 0.25f64,
|
||||||
y_scale: 0f64,
|
y_scale: 0f64,
|
||||||
noise_id: "temperature",
|
noise_id: DoublePerlinNoiseParameters::TEMPERATURE,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::ShiftedNoise {
|
BaseNoiseFunctionComponent::ShiftedNoise {
|
||||||
@ -7110,7 +7123,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
data: &ShiftedNoiseData {
|
data: &ShiftedNoiseData {
|
||||||
xz_scale: 0.25f64,
|
xz_scale: 0.25f64,
|
||||||
y_scale: 0f64,
|
y_scale: 0f64,
|
||||||
noise_id: "vegetation",
|
noise_id: DoublePerlinNoiseParameters::VEGETATION,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::ShiftedNoise {
|
BaseNoiseFunctionComponent::ShiftedNoise {
|
||||||
@ -7120,7 +7133,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
data: &ShiftedNoiseData {
|
data: &ShiftedNoiseData {
|
||||||
xz_scale: 0.25f64,
|
xz_scale: 0.25f64,
|
||||||
y_scale: 0f64,
|
y_scale: 0f64,
|
||||||
noise_id: "continentalness",
|
noise_id: DoublePerlinNoiseParameters::CONTINENTALNESS,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Wrapper {
|
BaseNoiseFunctionComponent::Wrapper {
|
||||||
@ -7134,7 +7147,7 @@ pub const OVERWORLD_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
data: &ShiftedNoiseData {
|
data: &ShiftedNoiseData {
|
||||||
xz_scale: 0.25f64,
|
xz_scale: 0.25f64,
|
||||||
y_scale: 0f64,
|
y_scale: 0f64,
|
||||||
noise_id: "erosion",
|
noise_id: DoublePerlinNoiseParameters::EROSION,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::Wrapper {
|
BaseNoiseFunctionComponent::Wrapper {
|
||||||
@ -8973,7 +8986,9 @@ pub const NETHER_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
multi_noise: BaseMultiNoiseRouter {
|
multi_noise: BaseMultiNoiseRouter {
|
||||||
full_component_stack: &[
|
full_component_stack: &[
|
||||||
BaseNoiseFunctionComponent::Constant { value: 0f64 },
|
BaseNoiseFunctionComponent::Constant { value: 0f64 },
|
||||||
BaseNoiseFunctionComponent::ShiftA { noise_id: "offset" },
|
BaseNoiseFunctionComponent::ShiftA {
|
||||||
|
noise_id: DoublePerlinNoiseParameters::OFFSET,
|
||||||
|
},
|
||||||
BaseNoiseFunctionComponent::Wrapper {
|
BaseNoiseFunctionComponent::Wrapper {
|
||||||
input_index: 1usize,
|
input_index: 1usize,
|
||||||
wrapper: WrapperType::Cache2D,
|
wrapper: WrapperType::Cache2D,
|
||||||
@ -8982,7 +8997,9 @@ pub const NETHER_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
input_index: 2usize,
|
input_index: 2usize,
|
||||||
wrapper: WrapperType::CacheFlat,
|
wrapper: WrapperType::CacheFlat,
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::ShiftB { noise_id: "offset" },
|
BaseNoiseFunctionComponent::ShiftB {
|
||||||
|
noise_id: DoublePerlinNoiseParameters::OFFSET,
|
||||||
|
},
|
||||||
BaseNoiseFunctionComponent::Wrapper {
|
BaseNoiseFunctionComponent::Wrapper {
|
||||||
input_index: 4usize,
|
input_index: 4usize,
|
||||||
wrapper: WrapperType::Cache2D,
|
wrapper: WrapperType::Cache2D,
|
||||||
@ -8998,7 +9015,7 @@ pub const NETHER_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
data: &ShiftedNoiseData {
|
data: &ShiftedNoiseData {
|
||||||
xz_scale: 0.25f64,
|
xz_scale: 0.25f64,
|
||||||
y_scale: 0f64,
|
y_scale: 0f64,
|
||||||
noise_id: "temperature",
|
noise_id: DoublePerlinNoiseParameters::TEMPERATURE,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
BaseNoiseFunctionComponent::ShiftedNoise {
|
BaseNoiseFunctionComponent::ShiftedNoise {
|
||||||
@ -9008,7 +9025,7 @@ pub const NETHER_BASE_NOISE_ROUTER: BaseNoiseRouters = BaseNoiseRouters {
|
|||||||
data: &ShiftedNoiseData {
|
data: &ShiftedNoiseData {
|
||||||
xz_scale: 0.25f64,
|
xz_scale: 0.25f64,
|
||||||
y_scale: 0f64,
|
y_scale: 0f64,
|
||||||
noise_id: "vegetation",
|
noise_id: DoublePerlinNoiseParameters::VEGETATION,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@ -8,19 +8,12 @@ pub struct Potion {
|
|||||||
}
|
}
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct Effect {
|
pub struct Effect {
|
||||||
/// The type of the effect.
|
|
||||||
pub effect_type: &'static StatusEffect,
|
pub effect_type: &'static StatusEffect,
|
||||||
/// The duration of the effect in ticks.
|
|
||||||
pub duration: i32,
|
pub duration: i32,
|
||||||
/// The amplifier/level of the effect.
|
|
||||||
pub amplifier: u8,
|
pub amplifier: u8,
|
||||||
/// Whether the effect is ambient (typically granted by Beacons or Conduits).
|
|
||||||
pub ambient: bool,
|
pub ambient: bool,
|
||||||
/// Whether the effect should show particles.
|
|
||||||
pub show_particles: bool,
|
pub show_particles: bool,
|
||||||
/// Whether the effect should show an icon.
|
|
||||||
pub show_icon: bool,
|
pub show_icon: bool,
|
||||||
/// Whether the effect should blend (client blends active effect colors).
|
|
||||||
pub blend: bool,
|
pub blend: bool,
|
||||||
}
|
}
|
||||||
impl Potion {
|
impl Potion {
|
||||||
|
|||||||
@ -3,11 +3,11 @@ use pumpkin_util::version::MinecraftVersion;
|
|||||||
pub type Tag = (&'static [&'static str], &'static [u16]);
|
pub type Tag = (&'static [&'static str], &'static [u16]);
|
||||||
#[derive(Eq, PartialEq, Hash, Debug, Clone, Copy)]
|
#[derive(Eq, PartialEq, Hash, Debug, Clone, Copy)]
|
||||||
pub enum RegistryKey {
|
pub enum RegistryKey {
|
||||||
|
BannerPattern,
|
||||||
|
Block,
|
||||||
CatVariant,
|
CatVariant,
|
||||||
DamageType,
|
DamageType,
|
||||||
Dialog,
|
Dialog,
|
||||||
BannerPattern,
|
|
||||||
Block,
|
|
||||||
DimensionType,
|
DimensionType,
|
||||||
Enchantment,
|
Enchantment,
|
||||||
EntityType,
|
EntityType,
|
||||||
@ -27,8 +27,8 @@ impl RegistryKey {
|
|||||||
"block" => Some(Self::Block),
|
"block" => Some(Self::Block),
|
||||||
"cat_variant" => Some(Self::CatVariant),
|
"cat_variant" => Some(Self::CatVariant),
|
||||||
"damage_type" => Some(Self::DamageType),
|
"damage_type" => Some(Self::DamageType),
|
||||||
"dimension_type" => Some(Self::DimensionType),
|
|
||||||
"dialog" => Some(Self::Dialog),
|
"dialog" => Some(Self::Dialog),
|
||||||
|
"dimension_type" => Some(Self::DimensionType),
|
||||||
"enchantment" => Some(Self::Enchantment),
|
"enchantment" => Some(Self::Enchantment),
|
||||||
"entity_type" => Some(Self::EntityType),
|
"entity_type" => Some(Self::EntityType),
|
||||||
"fluid" => Some(Self::Fluid),
|
"fluid" => Some(Self::Fluid),
|
||||||
@ -48,8 +48,8 @@ impl RegistryKey {
|
|||||||
Self::Block => "block",
|
Self::Block => "block",
|
||||||
Self::CatVariant => "cat_variant",
|
Self::CatVariant => "cat_variant",
|
||||||
Self::DamageType => "damage_type",
|
Self::DamageType => "damage_type",
|
||||||
Self::DimensionType => "dimension_type",
|
|
||||||
Self::Dialog => "dialog",
|
Self::Dialog => "dialog",
|
||||||
|
Self::DimensionType => "dimension_type",
|
||||||
Self::Enchantment => "enchantment",
|
Self::Enchantment => "enchantment",
|
||||||
Self::EntityType => "entity_type",
|
Self::EntityType => "entity_type",
|
||||||
Self::Fluid => "fluid",
|
Self::Fluid => "fluid",
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -58,25 +58,15 @@ pub enum ProtoNoiseFunctionComponent {
|
|||||||
PassThrough(PassThrough),
|
PassThrough(PassThrough),
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct DoublePerlinNoiseBuilder<'a> {
|
pub struct DoublePerlinNoiseBuilder;
|
||||||
base_random_deriver: &'a XoroshiroSplitter,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<'a> DoublePerlinNoiseBuilder<'a> {
|
impl DoublePerlinNoiseBuilder {
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub const fn new(base_random_deriver: &'a XoroshiroSplitter) -> Self {
|
pub fn get_noise_sampler_for_id(
|
||||||
Self {
|
base_random_deriver: &XoroshiroSplitter,
|
||||||
base_random_deriver,
|
parameters: &DoublePerlinNoiseParameters,
|
||||||
}
|
) -> DoublePerlinNoiseSampler {
|
||||||
}
|
let mut random = base_random_deriver.split_string(parameters.id());
|
||||||
|
|
||||||
#[must_use]
|
|
||||||
pub fn get_noise_sampler_for_id(&self, id: &str) -> DoublePerlinNoiseSampler {
|
|
||||||
let parameters = DoublePerlinNoiseParameters::id_to_parameters(id)
|
|
||||||
.unwrap_or_else(|| panic!("Unknown noise id: {id}"));
|
|
||||||
|
|
||||||
// Note that the parameters' id is different than `id`
|
|
||||||
let mut random = self.base_random_deriver.split_string(parameters.id());
|
|
||||||
DoublePerlinNoiseSampler::from_params(&mut random, parameters, false)
|
DoublePerlinNoiseSampler::from_params(&mut random, parameters, false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -141,8 +131,7 @@ impl ProtoNoiseRouters {
|
|||||||
base_stack: &[BaseNoiseFunctionComponent],
|
base_stack: &[BaseNoiseFunctionComponent],
|
||||||
random_config: &GlobalRandomConfig,
|
random_config: &GlobalRandomConfig,
|
||||||
) -> Box<[ProtoNoiseFunctionComponent]> {
|
) -> Box<[ProtoNoiseFunctionComponent]> {
|
||||||
let perlin_noise_builder =
|
let base_random_deriver = &random_config.base_random_deriver;
|
||||||
DoublePerlinNoiseBuilder::new(&random_config.base_random_deriver);
|
|
||||||
|
|
||||||
// Contiguous memory for our function components
|
// Contiguous memory for our function components
|
||||||
let mut stack = Vec::<ProtoNoiseFunctionComponent>::with_capacity(base_stack.len());
|
let mut stack = Vec::<ProtoNoiseFunctionComponent>::with_capacity(base_stack.len());
|
||||||
@ -168,19 +157,28 @@ impl ProtoNoiseRouters {
|
|||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
BaseNoiseFunctionComponent::Noise { data } => {
|
BaseNoiseFunctionComponent::Noise { data } => {
|
||||||
let sampler = perlin_noise_builder.get_noise_sampler_for_id(data.noise_id);
|
let sampler = DoublePerlinNoiseBuilder::get_noise_sampler_for_id(
|
||||||
|
base_random_deriver,
|
||||||
|
&data.noise_id,
|
||||||
|
);
|
||||||
ProtoNoiseFunctionComponent::Independent(
|
ProtoNoiseFunctionComponent::Independent(
|
||||||
IndependentProtoNoiseFunctionComponent::Noise(Noise::new(sampler, data)),
|
IndependentProtoNoiseFunctionComponent::Noise(Noise::new(sampler, data)),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
BaseNoiseFunctionComponent::ShiftA { noise_id } => {
|
BaseNoiseFunctionComponent::ShiftA { noise_id } => {
|
||||||
let sampler = perlin_noise_builder.get_noise_sampler_for_id(noise_id);
|
let sampler = DoublePerlinNoiseBuilder::get_noise_sampler_for_id(
|
||||||
|
base_random_deriver,
|
||||||
|
noise_id,
|
||||||
|
);
|
||||||
ProtoNoiseFunctionComponent::Independent(
|
ProtoNoiseFunctionComponent::Independent(
|
||||||
IndependentProtoNoiseFunctionComponent::ShiftA(ShiftA::new(sampler)),
|
IndependentProtoNoiseFunctionComponent::ShiftA(ShiftA::new(sampler)),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
BaseNoiseFunctionComponent::ShiftB { noise_id } => {
|
BaseNoiseFunctionComponent::ShiftB { noise_id } => {
|
||||||
let sampler = perlin_noise_builder.get_noise_sampler_for_id(noise_id);
|
let sampler = DoublePerlinNoiseBuilder::get_noise_sampler_for_id(
|
||||||
|
base_random_deriver,
|
||||||
|
noise_id,
|
||||||
|
);
|
||||||
ProtoNoiseFunctionComponent::Independent(
|
ProtoNoiseFunctionComponent::Independent(
|
||||||
IndependentProtoNoiseFunctionComponent::ShiftB(ShiftB::new(sampler)),
|
IndependentProtoNoiseFunctionComponent::ShiftB(ShiftB::new(sampler)),
|
||||||
)
|
)
|
||||||
@ -220,7 +218,10 @@ impl ProtoNoiseRouters {
|
|||||||
shift_z_index,
|
shift_z_index,
|
||||||
data,
|
data,
|
||||||
} => {
|
} => {
|
||||||
let sampler = perlin_noise_builder.get_noise_sampler_for_id(data.noise_id);
|
let sampler = DoublePerlinNoiseBuilder::get_noise_sampler_for_id(
|
||||||
|
base_random_deriver,
|
||||||
|
&data.noise_id,
|
||||||
|
);
|
||||||
ProtoNoiseFunctionComponent::Dependent(
|
ProtoNoiseFunctionComponent::Dependent(
|
||||||
DependentProtoNoiseFunctionComponent::ShiftedNoise(ShiftedNoise::new(
|
DependentProtoNoiseFunctionComponent::ShiftedNoise(ShiftedNoise::new(
|
||||||
*shift_x_index,
|
*shift_x_index,
|
||||||
@ -398,7 +399,10 @@ impl ProtoNoiseRouters {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
BaseNoiseFunctionComponent::WeirdScaled { input_index, data } => {
|
BaseNoiseFunctionComponent::WeirdScaled { input_index, data } => {
|
||||||
let sampler = perlin_noise_builder.get_noise_sampler_for_id(data.noise_id);
|
let sampler = DoublePerlinNoiseBuilder::get_noise_sampler_for_id(
|
||||||
|
base_random_deriver,
|
||||||
|
&data.noise_id,
|
||||||
|
);
|
||||||
ProtoNoiseFunctionComponent::Dependent(
|
ProtoNoiseFunctionComponent::Dependent(
|
||||||
DependentProtoNoiseFunctionComponent::WeirdScaled(WeirdScaled::new(
|
DependentProtoNoiseFunctionComponent::WeirdScaled(WeirdScaled::new(
|
||||||
*input_index,
|
*input_index,
|
||||||
|
|||||||
@ -2,6 +2,7 @@ use std::pin::Pin;
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use pumpkin_data::block_properties::is_air;
|
use pumpkin_data::block_properties::is_air;
|
||||||
|
use pumpkin_data::chunk::DoublePerlinNoiseParameters;
|
||||||
use pumpkin_data::chunk_gen_settings::GenerationSettings;
|
use pumpkin_data::chunk_gen_settings::GenerationSettings;
|
||||||
use pumpkin_data::dimension::Dimension;
|
use pumpkin_data::dimension::Dimension;
|
||||||
use pumpkin_data::fluid::{Fluid, FluidState};
|
use pumpkin_data::fluid::{Fluid, FluidState};
|
||||||
@ -173,10 +174,15 @@ impl TerrainCache {
|
|||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn from_random(random_config: &GlobalRandomConfig) -> Self {
|
pub fn from_random(random_config: &GlobalRandomConfig) -> Self {
|
||||||
let random = &random_config.base_random_deriver;
|
let random = &random_config.base_random_deriver;
|
||||||
let noise_builder = DoublePerlinNoiseBuilder::new(&random_config.base_random_deriver);
|
let terrain_builder = SurfaceTerrainBuilder::new(random);
|
||||||
let terrain_builder = SurfaceTerrainBuilder::new(&noise_builder, random);
|
let surface_noise = DoublePerlinNoiseBuilder::get_noise_sampler_for_id(
|
||||||
let surface_noise = noise_builder.get_noise_sampler_for_id("surface");
|
&random_config.base_random_deriver,
|
||||||
let secondary_noise = noise_builder.get_noise_sampler_for_id("surface_secondary");
|
&DoublePerlinNoiseParameters::SURFACE,
|
||||||
|
);
|
||||||
|
let secondary_noise = DoublePerlinNoiseBuilder::get_noise_sampler_for_id(
|
||||||
|
&random_config.base_random_deriver,
|
||||||
|
&DoublePerlinNoiseParameters::SURFACE_SECONDARY,
|
||||||
|
);
|
||||||
Self {
|
Self {
|
||||||
terrain_builder,
|
terrain_builder,
|
||||||
surface_noise,
|
surface_noise,
|
||||||
@ -807,11 +813,9 @@ impl ProtoChunk {
|
|||||||
let min_y = self.bottom_y();
|
let min_y = self.bottom_y();
|
||||||
|
|
||||||
let random = &random_config.base_random_deriver;
|
let random = &random_config.base_random_deriver;
|
||||||
let noise_builder = DoublePerlinNoiseBuilder::new(&random_config.base_random_deriver);
|
|
||||||
let mut context = MaterialRuleContext::new(
|
let mut context = MaterialRuleContext::new(
|
||||||
min_y,
|
min_y,
|
||||||
self.height(),
|
self.height(),
|
||||||
noise_builder,
|
|
||||||
random,
|
random,
|
||||||
&terrain_cache.terrain_builder,
|
&terrain_cache.terrain_builder,
|
||||||
&terrain_cache.surface_noise,
|
&terrain_cache.surface_noise,
|
||||||
|
|||||||
@ -40,7 +40,6 @@ pub struct MaterialRuleContext<'a> {
|
|||||||
pub biome: &'a Biome,
|
pub biome: &'a Biome,
|
||||||
pub run_depth: i32,
|
pub run_depth: i32,
|
||||||
pub secondary_depth: f64,
|
pub secondary_depth: f64,
|
||||||
noise_builder: DoublePerlinNoiseBuilder<'a>,
|
|
||||||
packed_chunk_pos: i64,
|
packed_chunk_pos: i64,
|
||||||
estimated_surface_heights: [i32; 4],
|
estimated_surface_heights: [i32; 4],
|
||||||
last_unique_horizontal_pos_value: i64,
|
last_unique_horizontal_pos_value: i64,
|
||||||
@ -56,11 +55,9 @@ pub struct MaterialRuleContext<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> MaterialRuleContext<'a> {
|
impl<'a> MaterialRuleContext<'a> {
|
||||||
#[expect(clippy::too_many_arguments)]
|
|
||||||
pub const fn new(
|
pub const fn new(
|
||||||
min_y: i8,
|
min_y: i8,
|
||||||
height: u16,
|
height: u16,
|
||||||
noise_builder: DoublePerlinNoiseBuilder<'a>,
|
|
||||||
random_deriver: &'a XoroshiroSplitter,
|
random_deriver: &'a XoroshiroSplitter,
|
||||||
terrain_builder: &'a SurfaceTerrainBuilder,
|
terrain_builder: &'a SurfaceTerrainBuilder,
|
||||||
surface_noise: &'a DoublePerlinNoiseSampler,
|
surface_noise: &'a DoublePerlinNoiseSampler,
|
||||||
@ -88,7 +85,6 @@ impl<'a> MaterialRuleContext<'a> {
|
|||||||
secondary_depth: 0.0,
|
secondary_depth: 0.0,
|
||||||
surface_noise,
|
surface_noise,
|
||||||
secondary_noise,
|
secondary_noise,
|
||||||
noise_builder,
|
|
||||||
stone_depth_below: 0,
|
stone_depth_below: 0,
|
||||||
stone_depth_above: 0,
|
stone_depth_above: 0,
|
||||||
sea_level,
|
sea_level,
|
||||||
@ -301,9 +297,10 @@ pub fn test_noise_threshold(
|
|||||||
context: &mut MaterialRuleContext,
|
context: &mut MaterialRuleContext,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
// TODO: we want to cache these
|
// TODO: we want to cache these
|
||||||
let sampler = context
|
let sampler = DoublePerlinNoiseBuilder::get_noise_sampler_for_id(
|
||||||
.noise_builder
|
context.random_deriver,
|
||||||
.get_noise_sampler_for_id(condition.noise.strip_prefix("minecraft:").unwrap());
|
&condition.noise,
|
||||||
|
);
|
||||||
let value = sampler.sample(context.block_pos_x as f64, 0.0, context.block_pos_z as f64);
|
let value = sampler.sample(context.block_pos_x as f64, 0.0, context.block_pos_z as f64);
|
||||||
value >= condition.min_threshold && value <= condition.max_threshold
|
value >= condition.min_threshold && value <= condition.max_threshold
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
use pumpkin_data::{Block, BlockState, chunk::Biome};
|
use pumpkin_data::{
|
||||||
|
Block, BlockState,
|
||||||
|
chunk::{Biome, DoublePerlinNoiseParameters},
|
||||||
|
};
|
||||||
use pumpkin_util::{
|
use pumpkin_util::{
|
||||||
math::vector3::Vector3,
|
math::vector3::Vector3,
|
||||||
random::{
|
random::{
|
||||||
@ -30,24 +33,39 @@ pub struct SurfaceTerrainBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl SurfaceTerrainBuilder {
|
impl SurfaceTerrainBuilder {
|
||||||
pub fn new(
|
pub fn new(random_deriver: &XoroshiroSplitter) -> Self {
|
||||||
noise_builder: &DoublePerlinNoiseBuilder,
|
|
||||||
random_deriver: &XoroshiroSplitter,
|
|
||||||
) -> Self {
|
|
||||||
Self {
|
Self {
|
||||||
terracotta_bands: Self::create_terracotta_bands(
|
terracotta_bands: Self::create_terracotta_bands(
|
||||||
random_deriver.split_string("minecraft:clay_bands"),
|
random_deriver.split_string("minecraft:clay_bands"),
|
||||||
),
|
),
|
||||||
terracotta_bands_offset_noise: noise_builder
|
terracotta_bands_offset_noise: DoublePerlinNoiseBuilder::get_noise_sampler_for_id(
|
||||||
.get_noise_sampler_for_id("clay_bands_offset"),
|
random_deriver,
|
||||||
badlands_pillar_noise: noise_builder.get_noise_sampler_for_id("badlands_pillar"),
|
&DoublePerlinNoiseParameters::CLAY_BANDS_OFFSET,
|
||||||
badlands_surface_noise: noise_builder.get_noise_sampler_for_id("badlands_surface"),
|
),
|
||||||
badlands_pillar_roof_noise: noise_builder
|
badlands_pillar_noise: DoublePerlinNoiseBuilder::get_noise_sampler_for_id(
|
||||||
.get_noise_sampler_for_id("badlands_pillar_roof"),
|
random_deriver,
|
||||||
iceberg_pillar_noise: noise_builder.get_noise_sampler_for_id("iceberg_pillar"),
|
&DoublePerlinNoiseParameters::BADLANDS_PILLAR,
|
||||||
iceberg_pillar_roof_noise: noise_builder
|
),
|
||||||
.get_noise_sampler_for_id("iceberg_pillar_roof"),
|
badlands_surface_noise: DoublePerlinNoiseBuilder::get_noise_sampler_for_id(
|
||||||
iceberg_surface_noise: noise_builder.get_noise_sampler_for_id("iceberg_surface"),
|
random_deriver,
|
||||||
|
&DoublePerlinNoiseParameters::BADLANDS_SURFACE,
|
||||||
|
),
|
||||||
|
badlands_pillar_roof_noise: DoublePerlinNoiseBuilder::get_noise_sampler_for_id(
|
||||||
|
random_deriver,
|
||||||
|
&DoublePerlinNoiseParameters::BADLANDS_PILLAR_ROOF,
|
||||||
|
),
|
||||||
|
iceberg_pillar_noise: DoublePerlinNoiseBuilder::get_noise_sampler_for_id(
|
||||||
|
random_deriver,
|
||||||
|
&DoublePerlinNoiseParameters::ICEBERG_PILLAR,
|
||||||
|
),
|
||||||
|
iceberg_pillar_roof_noise: DoublePerlinNoiseBuilder::get_noise_sampler_for_id(
|
||||||
|
random_deriver,
|
||||||
|
&DoublePerlinNoiseParameters::ICEBERG_PILLAR_ROOF,
|
||||||
|
),
|
||||||
|
iceberg_surface_noise: DoublePerlinNoiseBuilder::get_noise_sampler_for_id(
|
||||||
|
random_deriver,
|
||||||
|
&DoublePerlinNoiseParameters::ICEBERG_SURFACE,
|
||||||
|
),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user