chore: replace String with PlacedFeatures enum
This commit is contained in:
parent
8f562b3d78
commit
c7a9d5935a
@ -1,3 +1,4 @@
|
|||||||
|
use heck::ToPascalCase;
|
||||||
use std::{collections::BTreeMap, fs};
|
use std::{collections::BTreeMap, fs};
|
||||||
|
|
||||||
use heck::ToShoutySnakeCase;
|
use heck::ToShoutySnakeCase;
|
||||||
@ -225,7 +226,22 @@ pub fn build() -> TokenStream {
|
|||||||
let temperature = biome.temperature;
|
let temperature = biome.temperature;
|
||||||
let downfall = biome.downfall;
|
let downfall = biome.downfall;
|
||||||
// let carvers = &biome.carvers;
|
// let carvers = &biome.carvers;
|
||||||
let features = &biome.features;
|
let features: Vec<TokenStream> = biome
|
||||||
|
.features
|
||||||
|
.iter()
|
||||||
|
.map(|step| {
|
||||||
|
let step_features: Vec<TokenStream> = step
|
||||||
|
.iter()
|
||||||
|
.map(|f| {
|
||||||
|
let name = f.strip_prefix("minecraft:").unwrap_or(f);
|
||||||
|
let variant_name = format_ident!("{}", name.to_pascal_case());
|
||||||
|
quote! { crate::placed_feature::PlacedFeature::#variant_name }
|
||||||
|
})
|
||||||
|
.collect();
|
||||||
|
quote! { &[#(#step_features),*] }
|
||||||
|
})
|
||||||
|
.collect();
|
||||||
|
|
||||||
let creature_spawn_probability = &biome.creature_spawn_probability.unwrap_or(0.1);
|
let creature_spawn_probability = &biome.creature_spawn_probability.unwrap_or(0.1);
|
||||||
|
|
||||||
let temperature_modifier = biome
|
let temperature_modifier = biome
|
||||||
@ -317,7 +333,7 @@ pub fn build() -> TokenStream {
|
|||||||
#temperature_modifier,
|
#temperature_modifier,
|
||||||
#downfall
|
#downfall
|
||||||
),
|
),
|
||||||
features: &[#(&[#(#features),*]),*],
|
features: &[#(#features),*],
|
||||||
creature_spawn_probability: #creature_spawn_probability,
|
creature_spawn_probability: #creature_spawn_probability,
|
||||||
spawners: #spawners,
|
spawners: #spawners,
|
||||||
spawn_costs: phf::phf_map! {
|
spawn_costs: phf::phf_map! {
|
||||||
@ -347,7 +363,7 @@ pub fn build() -> TokenStream {
|
|||||||
pub registry_id: &'static str,
|
pub registry_id: &'static str,
|
||||||
pub weather: Weather,
|
pub weather: Weather,
|
||||||
// carvers: &'static [&str],
|
// carvers: &'static [&str],
|
||||||
pub features: &'static [&'static [&'static str]],
|
pub features: &'static [&'static [crate::placed_feature::PlacedFeature]],
|
||||||
pub creature_spawn_probability: f32,
|
pub creature_spawn_probability: f32,
|
||||||
pub spawners: SpawnGroups,
|
pub spawners: SpawnGroups,
|
||||||
pub spawn_costs: phf::Map<&'static str, SpawnCosts>,
|
pub spawn_costs: phf::Map<&'static str, SpawnCosts>,
|
||||||
|
|||||||
@ -1432,13 +1432,13 @@ fn get_be_data_from_nbt<R: Read + Seek>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
pumpkin_nbt::tag::NbtTag::Int(v) => v.to_string(),
|
pumpkin_nbt::tag::NbtTag::Int(v) => v.to_string(),
|
||||||
pumpkin_nbt::tag::NbtTag::String(v) => v,
|
pumpkin_nbt::tag::NbtTag::String(v) => v.into(),
|
||||||
_ => {
|
_ => {
|
||||||
panic!("Unexpected type for {}. Value: {val:?}", &key);
|
panic!("Unexpected type for {}. Value: {val:?}", &key);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
(key, unpacked)
|
(key.into(), unpacked)
|
||||||
})
|
})
|
||||||
.collect::<BTreeMap<_, _>>();
|
.collect::<BTreeMap<_, _>>();
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
|
use heck::ToPascalCase;
|
||||||
use proc_macro2::TokenStream;
|
use proc_macro2::TokenStream;
|
||||||
use quote::quote;
|
use quote::{format_ident, quote};
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
|
|
||||||
@ -1447,19 +1448,22 @@ fn value_to_inline_placed_feature(v: &Value) -> TokenStream {
|
|||||||
/// – `v` – a JSON string (named reference) or object (inline placed feature).
|
/// – `v` – a JSON string (named reference) or object (inline placed feature).
|
||||||
///
|
///
|
||||||
/// # Returns
|
/// # Returns
|
||||||
/// `PlacedFeatureWrapper::Named` for a string value or `PlacedFeatureWrapper::Direct` for an inline object; defaults to `PlacedFeatureWrapper::Named("")` for other types.
|
/// `PlacedFeatureWrapper::Named` for a string value or `PlacedFeatureWrapper::Direct` for an inline object; defaults to `PlacedFeatureWrapper::Named(pumpkin_data::placed_feature::PlacedFeature::Acacia)` for other types.
|
||||||
fn value_to_placed_feature_wrapper(v: &Value) -> TokenStream {
|
fn value_to_placed_feature_wrapper(v: &Value) -> TokenStream {
|
||||||
match v {
|
match v {
|
||||||
Value::String(s) => {
|
Value::String(s) => {
|
||||||
let name = s.strip_prefix("minecraft:").unwrap_or(s);
|
let name = s.strip_prefix("minecraft:").unwrap_or(s);
|
||||||
quote! { PlacedFeatureWrapper::Named(#name.to_string()) }
|
let variant_name = format_ident!("{}", name.to_pascal_case());
|
||||||
|
quote! { PlacedFeatureWrapper::Named(pumpkin_data::placed_feature::PlacedFeature::#variant_name) }
|
||||||
}
|
}
|
||||||
Value::Object(_) => {
|
Value::Object(_) => {
|
||||||
// It might be a PlacedFeature object
|
// It might be a PlacedFeature object
|
||||||
let pf = value_to_inline_placed_feature(v);
|
let pf = value_to_inline_placed_feature(v);
|
||||||
quote! { PlacedFeatureWrapper::Direct(#pf) }
|
quote! { PlacedFeatureWrapper::Direct(#pf) }
|
||||||
}
|
}
|
||||||
_ => quote! { PlacedFeatureWrapper::Named(String::new()) },
|
_ => {
|
||||||
|
quote! { PlacedFeatureWrapper::Named(pumpkin_data::placed_feature::PlacedFeature::Acacia) }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -124,6 +124,7 @@ pub fn main() {
|
|||||||
(potion::build, "potion.rs"),
|
(potion::build, "potion.rs"),
|
||||||
(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_enum, "placed_feature.rs"),
|
||||||
(placed_feature::build, "placed_features_generated.rs"),
|
(placed_feature::build, "placed_features_generated.rs"),
|
||||||
(
|
(
|
||||||
configured_feature::build,
|
configured_feature::build,
|
||||||
|
|||||||
@ -1,8 +1,61 @@
|
|||||||
|
use heck::ToPascalCase;
|
||||||
use proc_macro2::TokenStream;
|
use proc_macro2::TokenStream;
|
||||||
use quote::quote;
|
use quote::{format_ident, quote};
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
|
|
||||||
|
/// Reads `placed_feature.json` and emits the complete `PlacedFeature` enum `TokenStream`.
|
||||||
|
pub fn build_enum() -> TokenStream {
|
||||||
|
let json_content = fs::read_to_string("../assets/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 mut from_name_arms = Vec::new();
|
||||||
|
let mut to_name_arms = Vec::new();
|
||||||
|
|
||||||
|
let variants: Vec<TokenStream> = json
|
||||||
|
.as_object()
|
||||||
|
.unwrap()
|
||||||
|
.iter()
|
||||||
|
.map(|(name, _)| {
|
||||||
|
let variant_name = format_ident!("{}", name.to_pascal_case());
|
||||||
|
from_name_arms.push(quote! {
|
||||||
|
#name => Some(Self::#variant_name),
|
||||||
|
});
|
||||||
|
to_name_arms.push(quote! {
|
||||||
|
Self::#variant_name => #name,
|
||||||
|
});
|
||||||
|
quote! {
|
||||||
|
#variant_name,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.collect();
|
||||||
|
|
||||||
|
quote! {
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||||
|
pub enum PlacedFeature {
|
||||||
|
#(#variants)*
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PlacedFeature {
|
||||||
|
pub fn from_name(name: &str) -> Option<Self> {
|
||||||
|
let name = name.strip_prefix("minecraft:").unwrap_or(name);
|
||||||
|
match name {
|
||||||
|
#(#from_name_arms)*
|
||||||
|
_ => None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub const fn to_name(&self) -> &'static str {
|
||||||
|
match self {
|
||||||
|
#(#to_name_arms)*
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Reads `placed_feature.json` and emits the complete `build_placed_features()` function `TokenStream`.
|
/// Reads `placed_feature.json` and emits the complete `build_placed_features()` function `TokenStream`.
|
||||||
pub fn build() -> TokenStream {
|
pub fn build() -> TokenStream {
|
||||||
let json_content = fs::read_to_string("../assets/placed_feature.json")
|
let json_content = fs::read_to_string("../assets/placed_feature.json")
|
||||||
@ -15,16 +68,17 @@ pub fn build() -> TokenStream {
|
|||||||
.unwrap()
|
.unwrap()
|
||||||
.iter()
|
.iter()
|
||||||
.map(|(name, value)| {
|
.map(|(name, value)| {
|
||||||
|
let variant_name = format_ident!("{}", name.to_pascal_case());
|
||||||
let pf = value_to_placed_feature(value);
|
let pf = value_to_placed_feature(value);
|
||||||
quote! {
|
quote! {
|
||||||
map.insert(#name.to_string(), #pf);
|
map.insert(pumpkin_data::placed_feature::PlacedFeature::#variant_name, #pf);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
quote! {
|
quote! {
|
||||||
#[allow(clippy::all, unused_imports, dead_code)]
|
#[allow(clippy::all, unused_imports, dead_code)]
|
||||||
fn build_placed_features() -> std::collections::HashMap<String, PlacedFeature> {
|
fn build_placed_features() -> std::collections::HashMap<pumpkin_data::placed_feature::PlacedFeature, PlacedFeature> {
|
||||||
use crate::generation::block_predicate::{
|
use crate::generation::block_predicate::{
|
||||||
AllOfBlockPredicate, AnyOfBlockPredicate, BlockPredicate,
|
AllOfBlockPredicate, AnyOfBlockPredicate, BlockPredicate,
|
||||||
HasSturdyFacePredicate, InsideWorldBoundsBlockPredicate,
|
HasSturdyFacePredicate, InsideWorldBoundsBlockPredicate,
|
||||||
|
|||||||
@ -43,6 +43,7 @@ default = [
|
|||||||
"chunk_gen_settings",
|
"chunk_gen_settings",
|
||||||
"carver",
|
"carver",
|
||||||
"villager",
|
"villager",
|
||||||
|
"placed_feature",
|
||||||
]
|
]
|
||||||
|
|
||||||
item = []
|
item = []
|
||||||
@ -90,6 +91,7 @@ entity_type = ["sound"]
|
|||||||
spawn_egg = []
|
spawn_egg = []
|
||||||
world_event = []
|
world_event = []
|
||||||
message_type = []
|
message_type = []
|
||||||
|
placed_feature = []
|
||||||
block = []
|
block = []
|
||||||
item_id_remap = []
|
item_id_remap = []
|
||||||
entity_id_remap = []
|
entity_id_remap = []
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -285,15 +285,21 @@ fn build_configured_features() -> std::collections::HashMap<String, ConfiguredFe
|
|||||||
ConfiguredFeature::RandomSelector(RandomFeature {
|
ConfiguredFeature::RandomSelector(RandomFeature {
|
||||||
features: vec![
|
features: vec![
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fancy_oak_checked".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FancyOakChecked,
|
||||||
|
),
|
||||||
chance: 0.05f32,
|
chance: 0.05f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("jungle_bush".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::JungleBush,
|
||||||
|
),
|
||||||
chance: 0.15f32,
|
chance: 0.15f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("mega_jungle_tree_checked".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::MegaJungleTreeChecked,
|
||||||
|
),
|
||||||
chance: 0.7f32,
|
chance: 0.7f32,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -398,19 +404,27 @@ fn build_configured_features() -> std::collections::HashMap<String, ConfiguredFe
|
|||||||
ConfiguredFeature::RandomSelector(RandomFeature {
|
ConfiguredFeature::RandomSelector(RandomFeature {
|
||||||
features: vec![
|
features: vec![
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fallen_super_birch_tree".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FallenSuperBirchTree,
|
||||||
|
),
|
||||||
chance: 0.00625f32,
|
chance: 0.00625f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("super_birch_bees_0002".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::SuperBirchBees0002,
|
||||||
|
),
|
||||||
chance: 0.5f32,
|
chance: 0.5f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fallen_birch_tree".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FallenBirchTree,
|
||||||
|
),
|
||||||
chance: 0.0125f32,
|
chance: 0.0125f32,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: Box::new(PlacedFeatureWrapper::Named("birch_bees_0002".to_string())),
|
default: Box::new(PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::BirchBees0002,
|
||||||
|
)),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
map.insert(
|
map.insert(
|
||||||
@ -890,27 +904,39 @@ fn build_configured_features() -> std::collections::HashMap<String, ConfiguredFe
|
|||||||
chance: 0.05f32,
|
chance: 0.05f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("dark_oak_leaf_litter".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::DarkOakLeafLitter,
|
||||||
|
),
|
||||||
chance: 0.6666667f32,
|
chance: 0.6666667f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fallen_birch_tree".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FallenBirchTree,
|
||||||
|
),
|
||||||
chance: 0.0025f32,
|
chance: 0.0025f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("birch_leaf_litter".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::BirchLeafLitter,
|
||||||
|
),
|
||||||
chance: 0.2f32,
|
chance: 0.2f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fallen_oak_tree".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FallenOakTree,
|
||||||
|
),
|
||||||
chance: 0.0125f32,
|
chance: 0.0125f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fancy_oak_leaf_litter".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FancyOakLeafLitter,
|
||||||
|
),
|
||||||
chance: 0.1f32,
|
chance: 0.1f32,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: Box::new(PlacedFeatureWrapper::Named("oak_leaf_litter".to_string())),
|
default: Box::new(PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::OakLeafLitter,
|
||||||
|
)),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
map . insert ("dark_oak" . to_string () , ConfiguredFeature :: Tree (Box :: new (TreeFeature { trunk_provider : BlockStateProvider :: Simple (SimpleStateProvider { state : { let mut props = std :: collections :: HashMap :: new () ; props . insert ("axis" . to_string () , "y" . to_string ()) ; BlockStateCodec { name : & pumpkin_data :: Block :: DARK_OAK_LOG , properties : Some (props) , } . get_state () } }) , trunk_placer : TrunkPlacer { base_height : 6u8 , height_rand_a : 2u8 , height_rand_b : 1u8 , r#type : TrunkType :: DarkOak (DarkOakTrunkPlacer) , } , foliage_provider : BlockStateProvider :: Simple (SimpleStateProvider { state : { let mut props = std :: collections :: HashMap :: new () ; props . insert ("waterlogged" . to_string () , "false" . to_string ()) ; props . insert ("persistent" . to_string () , "false" . to_string ()) ; props . insert ("distance" . to_string () , "7" . to_string ()) ; BlockStateCodec { name : & pumpkin_data :: Block :: DARK_OAK_LEAVES , properties : Some (props) , } . get_state () } }) , foliage_placer : FoliagePlacer { radius : IntProvider :: Constant (0i32) , offset : IntProvider :: Constant (0i32) , r#type : FoliageType :: DarkOak (DarkOakFoliagePlacer) } , minimum_size : FeatureSize { min_clipped_height : None , r#type : FeatureSizeType :: ThreeLayersFeatureSize (ThreeLayersFeatureSize { limit : 1u8 , upper_limit : 1u8 , lower_size : 0u8 , middle_size : 1u8 , upper_size : 2u8 , }) } , ignore_vines : true , below_trunk_provider : BlockStateProvider :: Rule (RuleBasedBlockStateProvider { fallback : None , rules : vec ! [BlockStateRule { if_true : BlockPredicate :: Not (NotBlockPredicate { predicate : Box :: new (BlockPredicate :: MatchingBlockTag (MatchingBlockTagPredicate { offset : OffsetBlocksBlockPredicate { offset : None } , tag : pumpkin_data :: tag :: Block :: MINECRAFT_CANNOT_REPLACE_BELOW_TREE_TRUNK , })) , }) , then : BlockStateProvider :: Simple (SimpleStateProvider { state : pumpkin_data :: Block :: DIRT . default_state }) }] , }) , decorators : vec ! [] , root_placer : None , }))) ;
|
map . insert ("dark_oak" . to_string () , ConfiguredFeature :: Tree (Box :: new (TreeFeature { trunk_provider : BlockStateProvider :: Simple (SimpleStateProvider { state : { let mut props = std :: collections :: HashMap :: new () ; props . insert ("axis" . to_string () , "y" . to_string ()) ; BlockStateCodec { name : & pumpkin_data :: Block :: DARK_OAK_LOG , properties : Some (props) , } . get_state () } }) , trunk_placer : TrunkPlacer { base_height : 6u8 , height_rand_a : 2u8 , height_rand_b : 1u8 , r#type : TrunkType :: DarkOak (DarkOakTrunkPlacer) , } , foliage_provider : BlockStateProvider :: Simple (SimpleStateProvider { state : { let mut props = std :: collections :: HashMap :: new () ; props . insert ("waterlogged" . to_string () , "false" . to_string ()) ; props . insert ("persistent" . to_string () , "false" . to_string ()) ; props . insert ("distance" . to_string () , "7" . to_string ()) ; BlockStateCodec { name : & pumpkin_data :: Block :: DARK_OAK_LEAVES , properties : Some (props) , } . get_state () } }) , foliage_placer : FoliagePlacer { radius : IntProvider :: Constant (0i32) , offset : IntProvider :: Constant (0i32) , r#type : FoliageType :: DarkOak (DarkOakFoliagePlacer) } , minimum_size : FeatureSize { min_clipped_height : None , r#type : FeatureSizeType :: ThreeLayersFeatureSize (ThreeLayersFeatureSize { limit : 1u8 , upper_limit : 1u8 , lower_size : 0u8 , middle_size : 1u8 , upper_size : 2u8 , }) } , ignore_vines : true , below_trunk_provider : BlockStateProvider :: Rule (RuleBasedBlockStateProvider { fallback : None , rules : vec ! [BlockStateRule { if_true : BlockPredicate :: Not (NotBlockPredicate { predicate : Box :: new (BlockPredicate :: MatchingBlockTag (MatchingBlockTagPredicate { offset : OffsetBlocksBlockPredicate { offset : None } , tag : pumpkin_data :: tag :: Block :: MINECRAFT_CANNOT_REPLACE_BELOW_TREE_TRUNK , })) , }) , then : BlockStateProvider :: Simple (SimpleStateProvider { state : pumpkin_data :: Block :: DIRT . default_state }) }] , }) , decorators : vec ! [] , root_placer : None , }))) ;
|
||||||
@ -2549,20 +2575,28 @@ fn build_configured_features() -> std::collections::HashMap<String, ConfiguredFe
|
|||||||
"mangrove_vegetation".to_string(),
|
"mangrove_vegetation".to_string(),
|
||||||
ConfiguredFeature::RandomSelector(RandomFeature {
|
ConfiguredFeature::RandomSelector(RandomFeature {
|
||||||
features: vec![RandomFeatureEntry {
|
features: vec![RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("tall_mangrove_checked".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::TallMangroveChecked,
|
||||||
|
),
|
||||||
chance: 0.85f32,
|
chance: 0.85f32,
|
||||||
}],
|
}],
|
||||||
default: Box::new(PlacedFeatureWrapper::Named("mangrove_checked".to_string())),
|
default: Box::new(PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::MangroveChecked,
|
||||||
|
)),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
map.insert(
|
map.insert(
|
||||||
"meadow_trees".to_string(),
|
"meadow_trees".to_string(),
|
||||||
ConfiguredFeature::RandomSelector(RandomFeature {
|
ConfiguredFeature::RandomSelector(RandomFeature {
|
||||||
features: vec![RandomFeatureEntry {
|
features: vec![RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fancy_oak_bees".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FancyOakBees,
|
||||||
|
),
|
||||||
chance: 0.5f32,
|
chance: 0.5f32,
|
||||||
}],
|
}],
|
||||||
default: Box::new(PlacedFeatureWrapper::Named("super_birch_bees".to_string())),
|
default: Box::new(PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::SuperBirchBees,
|
||||||
|
)),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
map . insert ("mega_jungle_tree" . to_string () , ConfiguredFeature :: Tree (Box :: new (TreeFeature { trunk_provider : BlockStateProvider :: Simple (SimpleStateProvider { state : { let mut props = std :: collections :: HashMap :: new () ; props . insert ("axis" . to_string () , "y" . to_string ()) ; BlockStateCodec { name : & pumpkin_data :: Block :: JUNGLE_LOG , properties : Some (props) , } . get_state () } }) , trunk_placer : TrunkPlacer { base_height : 10u8 , height_rand_a : 2u8 , height_rand_b : 19u8 , r#type : TrunkType :: MegaJungle (MegaJungleTrunkPlacer) , } , foliage_provider : BlockStateProvider :: Simple (SimpleStateProvider { state : { let mut props = std :: collections :: HashMap :: new () ; props . insert ("waterlogged" . to_string () , "false" . to_string ()) ; props . insert ("persistent" . to_string () , "false" . to_string ()) ; props . insert ("distance" . to_string () , "7" . to_string ()) ; BlockStateCodec { name : & pumpkin_data :: Block :: JUNGLE_LEAVES , properties : Some (props) , } . get_state () } }) , foliage_placer : FoliagePlacer { radius : IntProvider :: Constant (2i32) , offset : IntProvider :: Constant (0i32) , r#type : FoliageType :: Jungle (JungleFoliagePlacer { height : 2i32 }) } , minimum_size : FeatureSize { min_clipped_height : None , r#type : FeatureSizeType :: TwoLayersFeatureSize (TwoLayersFeatureSize { limit : 1u8 , lower_size : 1u8 , upper_size : 2u8 , }) } , ignore_vines : false , below_trunk_provider : BlockStateProvider :: Rule (RuleBasedBlockStateProvider { fallback : None , rules : vec ! [BlockStateRule { if_true : BlockPredicate :: Not (NotBlockPredicate { predicate : Box :: new (BlockPredicate :: MatchingBlockTag (MatchingBlockTagPredicate { offset : OffsetBlocksBlockPredicate { offset : None } , tag : pumpkin_data :: tag :: Block :: MINECRAFT_CANNOT_REPLACE_BELOW_TREE_TRUNK , })) , }) , then : BlockStateProvider :: Simple (SimpleStateProvider { state : pumpkin_data :: Block :: DIRT . default_state }) }] , }) , decorators : vec ! [TreeDecorator :: TrunkVine (TrunkVineTreeDecorator) , TreeDecorator :: LeaveVine (LeavesVineTreeDecorator { probability : 0.25f32 })] , root_placer : None , }))) ;
|
map . insert ("mega_jungle_tree" . to_string () , ConfiguredFeature :: Tree (Box :: new (TreeFeature { trunk_provider : BlockStateProvider :: Simple (SimpleStateProvider { state : { let mut props = std :: collections :: HashMap :: new () ; props . insert ("axis" . to_string () , "y" . to_string ()) ; BlockStateCodec { name : & pumpkin_data :: Block :: JUNGLE_LOG , properties : Some (props) , } . get_state () } }) , trunk_placer : TrunkPlacer { base_height : 10u8 , height_rand_a : 2u8 , height_rand_b : 19u8 , r#type : TrunkType :: MegaJungle (MegaJungleTrunkPlacer) , } , foliage_provider : BlockStateProvider :: Simple (SimpleStateProvider { state : { let mut props = std :: collections :: HashMap :: new () ; props . insert ("waterlogged" . to_string () , "false" . to_string ()) ; props . insert ("persistent" . to_string () , "false" . to_string ()) ; props . insert ("distance" . to_string () , "7" . to_string ()) ; BlockStateCodec { name : & pumpkin_data :: Block :: JUNGLE_LEAVES , properties : Some (props) , } . get_state () } }) , foliage_placer : FoliagePlacer { radius : IntProvider :: Constant (2i32) , offset : IntProvider :: Constant (0i32) , r#type : FoliageType :: Jungle (JungleFoliagePlacer { height : 2i32 }) } , minimum_size : FeatureSize { min_clipped_height : None , r#type : FeatureSizeType :: TwoLayersFeatureSize (TwoLayersFeatureSize { limit : 1u8 , lower_size : 1u8 , upper_size : 2u8 , }) } , ignore_vines : false , below_trunk_provider : BlockStateProvider :: Rule (RuleBasedBlockStateProvider { fallback : None , rules : vec ! [BlockStateRule { if_true : BlockPredicate :: Not (NotBlockPredicate { predicate : Box :: new (BlockPredicate :: MatchingBlockTag (MatchingBlockTagPredicate { offset : OffsetBlocksBlockPredicate { offset : None } , tag : pumpkin_data :: tag :: Block :: MINECRAFT_CANNOT_REPLACE_BELOW_TREE_TRUNK , })) , }) , then : BlockStateProvider :: Simple (SimpleStateProvider { state : pumpkin_data :: Block :: DIRT . default_state }) }] , }) , decorators : vec ! [TreeDecorator :: TrunkVine (TrunkVineTreeDecorator) , TreeDecorator :: LeaveVine (LeavesVineTreeDecorator { probability : 0.25f32 })] , root_placer : None , }))) ;
|
||||||
@ -3334,15 +3368,21 @@ fn build_configured_features() -> std::collections::HashMap<String, ConfiguredFe
|
|||||||
ConfiguredFeature::RandomSelector(RandomFeature {
|
ConfiguredFeature::RandomSelector(RandomFeature {
|
||||||
features: vec![
|
features: vec![
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("pale_oak_creaking_checked".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::PaleOakCreakingChecked,
|
||||||
|
),
|
||||||
chance: 0.1f32,
|
chance: 0.1f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("pale_oak_checked".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::PaleOakChecked,
|
||||||
|
),
|
||||||
chance: 0.9f32,
|
chance: 0.9f32,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: Box::new(PlacedFeatureWrapper::Named("pale_oak_checked".to_string())),
|
default: Box::new(PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::PaleOakChecked,
|
||||||
|
)),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
map.insert(
|
map.insert(
|
||||||
@ -3994,20 +4034,28 @@ fn build_configured_features() -> std::collections::HashMap<String, ConfiguredFe
|
|||||||
"trees_badlands".to_string(),
|
"trees_badlands".to_string(),
|
||||||
ConfiguredFeature::RandomSelector(RandomFeature {
|
ConfiguredFeature::RandomSelector(RandomFeature {
|
||||||
features: vec![RandomFeatureEntry {
|
features: vec![RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fallen_oak_tree".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FallenOakTree,
|
||||||
|
),
|
||||||
chance: 0.0125f32,
|
chance: 0.0125f32,
|
||||||
}],
|
}],
|
||||||
default: Box::new(PlacedFeatureWrapper::Named("oak_leaf_litter".to_string())),
|
default: Box::new(PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::OakLeafLitter,
|
||||||
|
)),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
map.insert(
|
map.insert(
|
||||||
"trees_birch".to_string(),
|
"trees_birch".to_string(),
|
||||||
ConfiguredFeature::RandomSelector(RandomFeature {
|
ConfiguredFeature::RandomSelector(RandomFeature {
|
||||||
features: vec![RandomFeatureEntry {
|
features: vec![RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fallen_birch_tree".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FallenBirchTree,
|
||||||
|
),
|
||||||
chance: 0.0125f32,
|
chance: 0.0125f32,
|
||||||
}],
|
}],
|
||||||
default: Box::new(PlacedFeatureWrapper::Named("birch_bees_0002".to_string())),
|
default: Box::new(PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::BirchBees0002,
|
||||||
|
)),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
map.insert(
|
map.insert(
|
||||||
@ -4015,26 +4063,32 @@ fn build_configured_features() -> std::collections::HashMap<String, ConfiguredFe
|
|||||||
ConfiguredFeature::RandomSelector(RandomFeature {
|
ConfiguredFeature::RandomSelector(RandomFeature {
|
||||||
features: vec![
|
features: vec![
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fallen_birch_tree".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FallenBirchTree,
|
||||||
|
),
|
||||||
chance: 0.0025f32,
|
chance: 0.0025f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("birch_bees_0002_leaf_litter".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::BirchBees0002LeafLitter,
|
||||||
|
),
|
||||||
chance: 0.2f32,
|
chance: 0.2f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named(
|
feature: PlacedFeatureWrapper::Named(
|
||||||
"fancy_oak_bees_0002_leaf_litter".to_string(),
|
pumpkin_data::placed_feature::PlacedFeature::FancyOakBees0002LeafLitter,
|
||||||
),
|
),
|
||||||
chance: 0.1f32,
|
chance: 0.1f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fallen_oak_tree".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FallenOakTree,
|
||||||
|
),
|
||||||
chance: 0.0125f32,
|
chance: 0.0125f32,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: Box::new(PlacedFeatureWrapper::Named(
|
default: Box::new(PlacedFeatureWrapper::Named(
|
||||||
"oak_bees_0002_leaf_litter".to_string(),
|
pumpkin_data::placed_feature::PlacedFeature::OakBees0002LeafLitter,
|
||||||
)),
|
)),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
@ -4043,29 +4097,41 @@ fn build_configured_features() -> std::collections::HashMap<String, ConfiguredFe
|
|||||||
ConfiguredFeature::RandomSelector(RandomFeature {
|
ConfiguredFeature::RandomSelector(RandomFeature {
|
||||||
features: vec![
|
features: vec![
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fallen_birch_tree".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FallenBirchTree,
|
||||||
|
),
|
||||||
chance: 0.0025f32,
|
chance: 0.0025f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("birch_bees_002".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::BirchBees002,
|
||||||
|
),
|
||||||
chance: 0.2f32,
|
chance: 0.2f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fancy_oak_bees_002".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FancyOakBees002,
|
||||||
|
),
|
||||||
chance: 0.1f32,
|
chance: 0.1f32,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: Box::new(PlacedFeatureWrapper::Named("oak_bees_002".to_string())),
|
default: Box::new(PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::OakBees002,
|
||||||
|
)),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
map.insert(
|
map.insert(
|
||||||
"trees_grove".to_string(),
|
"trees_grove".to_string(),
|
||||||
ConfiguredFeature::RandomSelector(RandomFeature {
|
ConfiguredFeature::RandomSelector(RandomFeature {
|
||||||
features: vec![RandomFeatureEntry {
|
features: vec![RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("pine_on_snow".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::PineOnSnow,
|
||||||
|
),
|
||||||
chance: 0.33333334f32,
|
chance: 0.33333334f32,
|
||||||
}],
|
}],
|
||||||
default: Box::new(PlacedFeatureWrapper::Named("spruce_on_snow".to_string())),
|
default: Box::new(PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::SpruceOnSnow,
|
||||||
|
)),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
map.insert(
|
map.insert(
|
||||||
@ -4073,23 +4139,33 @@ fn build_configured_features() -> std::collections::HashMap<String, ConfiguredFe
|
|||||||
ConfiguredFeature::RandomSelector(RandomFeature {
|
ConfiguredFeature::RandomSelector(RandomFeature {
|
||||||
features: vec![
|
features: vec![
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fancy_oak_checked".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FancyOakChecked,
|
||||||
|
),
|
||||||
chance: 0.1f32,
|
chance: 0.1f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("jungle_bush".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::JungleBush,
|
||||||
|
),
|
||||||
chance: 0.5f32,
|
chance: 0.5f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("mega_jungle_tree_checked".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::MegaJungleTreeChecked,
|
||||||
|
),
|
||||||
chance: 0.33333334f32,
|
chance: 0.33333334f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fallen_jungle_tree".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FallenJungleTree,
|
||||||
|
),
|
||||||
chance: 0.0125f32,
|
chance: 0.0125f32,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: Box::new(PlacedFeatureWrapper::Named("jungle_tree".to_string())),
|
default: Box::new(PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::JungleTree,
|
||||||
|
)),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
map.insert(
|
map.insert(
|
||||||
@ -4097,23 +4173,33 @@ fn build_configured_features() -> std::collections::HashMap<String, ConfiguredFe
|
|||||||
ConfiguredFeature::RandomSelector(RandomFeature {
|
ConfiguredFeature::RandomSelector(RandomFeature {
|
||||||
features: vec![
|
features: vec![
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("mega_spruce_checked".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::MegaSpruceChecked,
|
||||||
|
),
|
||||||
chance: 0.025641026f32,
|
chance: 0.025641026f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("mega_pine_checked".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::MegaPineChecked,
|
||||||
|
),
|
||||||
chance: 0.30769232f32,
|
chance: 0.30769232f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("pine_checked".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::PineChecked,
|
||||||
|
),
|
||||||
chance: 0.33333334f32,
|
chance: 0.33333334f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fallen_spruce_tree".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FallenSpruceTree,
|
||||||
|
),
|
||||||
chance: 0.0125f32,
|
chance: 0.0125f32,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: Box::new(PlacedFeatureWrapper::Named("spruce_checked".to_string())),
|
default: Box::new(PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::SpruceChecked,
|
||||||
|
)),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
map.insert(
|
map.insert(
|
||||||
@ -4121,19 +4207,27 @@ fn build_configured_features() -> std::collections::HashMap<String, ConfiguredFe
|
|||||||
ConfiguredFeature::RandomSelector(RandomFeature {
|
ConfiguredFeature::RandomSelector(RandomFeature {
|
||||||
features: vec![
|
features: vec![
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("mega_spruce_checked".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::MegaSpruceChecked,
|
||||||
|
),
|
||||||
chance: 0.33333334f32,
|
chance: 0.33333334f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("pine_checked".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::PineChecked,
|
||||||
|
),
|
||||||
chance: 0.33333334f32,
|
chance: 0.33333334f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fallen_spruce_tree".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FallenSpruceTree,
|
||||||
|
),
|
||||||
chance: 0.0125f32,
|
chance: 0.0125f32,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: Box::new(PlacedFeatureWrapper::Named("spruce_checked".to_string())),
|
default: Box::new(PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::SpruceChecked,
|
||||||
|
)),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
map.insert(
|
map.insert(
|
||||||
@ -4148,7 +4242,9 @@ fn build_configured_features() -> std::collections::HashMap<String, ConfiguredFe
|
|||||||
chance: 0.33333334f32,
|
chance: 0.33333334f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fallen_oak_tree".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FallenOakTree,
|
||||||
|
),
|
||||||
chance: 0.0125f32,
|
chance: 0.0125f32,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -4163,25 +4259,35 @@ fn build_configured_features() -> std::collections::HashMap<String, ConfiguredFe
|
|||||||
ConfiguredFeature::RandomSelector(RandomFeature {
|
ConfiguredFeature::RandomSelector(RandomFeature {
|
||||||
features: vec![
|
features: vec![
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("acacia_checked".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::AcaciaChecked,
|
||||||
|
),
|
||||||
chance: 0.8f32,
|
chance: 0.8f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fallen_oak_tree".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FallenOakTree,
|
||||||
|
),
|
||||||
chance: 0.0125f32,
|
chance: 0.0125f32,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: Box::new(PlacedFeatureWrapper::Named("oak_checked".to_string())),
|
default: Box::new(PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::OakChecked,
|
||||||
|
)),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
map.insert(
|
map.insert(
|
||||||
"trees_snowy".to_string(),
|
"trees_snowy".to_string(),
|
||||||
ConfiguredFeature::RandomSelector(RandomFeature {
|
ConfiguredFeature::RandomSelector(RandomFeature {
|
||||||
features: vec![RandomFeatureEntry {
|
features: vec![RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fallen_spruce_tree".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FallenSpruceTree,
|
||||||
|
),
|
||||||
chance: 0.0125f32,
|
chance: 0.0125f32,
|
||||||
}],
|
}],
|
||||||
default: Box::new(PlacedFeatureWrapper::Named("spruce_checked".to_string())),
|
default: Box::new(PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::SpruceChecked,
|
||||||
|
)),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
map.insert(
|
map.insert(
|
||||||
@ -4189,19 +4295,27 @@ fn build_configured_features() -> std::collections::HashMap<String, ConfiguredFe
|
|||||||
ConfiguredFeature::RandomSelector(RandomFeature {
|
ConfiguredFeature::RandomSelector(RandomFeature {
|
||||||
features: vec![
|
features: vec![
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fancy_oak_checked".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FancyOakChecked,
|
||||||
|
),
|
||||||
chance: 0.1f32,
|
chance: 0.1f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("jungle_bush".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::JungleBush,
|
||||||
|
),
|
||||||
chance: 0.5f32,
|
chance: 0.5f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fallen_jungle_tree".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FallenJungleTree,
|
||||||
|
),
|
||||||
chance: 0.0125f32,
|
chance: 0.0125f32,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: Box::new(PlacedFeatureWrapper::Named("jungle_tree".to_string())),
|
default: Box::new(PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::JungleTree,
|
||||||
|
)),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
map.insert(
|
map.insert(
|
||||||
@ -4209,25 +4323,35 @@ fn build_configured_features() -> std::collections::HashMap<String, ConfiguredFe
|
|||||||
ConfiguredFeature::RandomSelector(RandomFeature {
|
ConfiguredFeature::RandomSelector(RandomFeature {
|
||||||
features: vec![
|
features: vec![
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("pine_checked".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::PineChecked,
|
||||||
|
),
|
||||||
chance: 0.33333334f32,
|
chance: 0.33333334f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fallen_spruce_tree".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FallenSpruceTree,
|
||||||
|
),
|
||||||
chance: 0.0125f32,
|
chance: 0.0125f32,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: Box::new(PlacedFeatureWrapper::Named("spruce_checked".to_string())),
|
default: Box::new(PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::SpruceChecked,
|
||||||
|
)),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
map.insert(
|
map.insert(
|
||||||
"trees_water".to_string(),
|
"trees_water".to_string(),
|
||||||
ConfiguredFeature::RandomSelector(RandomFeature {
|
ConfiguredFeature::RandomSelector(RandomFeature {
|
||||||
features: vec![RandomFeatureEntry {
|
features: vec![RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fancy_oak_checked".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FancyOakChecked,
|
||||||
|
),
|
||||||
chance: 0.1f32,
|
chance: 0.1f32,
|
||||||
}],
|
}],
|
||||||
default: Box::new(PlacedFeatureWrapper::Named("oak_checked".to_string())),
|
default: Box::new(PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::OakChecked,
|
||||||
|
)),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
map.insert(
|
map.insert(
|
||||||
@ -4235,23 +4359,33 @@ fn build_configured_features() -> std::collections::HashMap<String, ConfiguredFe
|
|||||||
ConfiguredFeature::RandomSelector(RandomFeature {
|
ConfiguredFeature::RandomSelector(RandomFeature {
|
||||||
features: vec![
|
features: vec![
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fallen_spruce_tree".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FallenSpruceTree,
|
||||||
|
),
|
||||||
chance: 0.008325f32,
|
chance: 0.008325f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("spruce_checked".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::SpruceChecked,
|
||||||
|
),
|
||||||
chance: 0.666f32,
|
chance: 0.666f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fancy_oak_checked".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FancyOakChecked,
|
||||||
|
),
|
||||||
chance: 0.1f32,
|
chance: 0.1f32,
|
||||||
},
|
},
|
||||||
RandomFeatureEntry {
|
RandomFeatureEntry {
|
||||||
feature: PlacedFeatureWrapper::Named("fallen_oak_tree".to_string()),
|
feature: PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::FallenOakTree,
|
||||||
|
),
|
||||||
chance: 0.0125f32,
|
chance: 0.0125f32,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: Box::new(PlacedFeatureWrapper::Named("oak_checked".to_string())),
|
default: Box::new(PlacedFeatureWrapper::Named(
|
||||||
|
pumpkin_data::placed_feature::PlacedFeature::OakChecked,
|
||||||
|
)),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
map.insert(
|
map.insert(
|
||||||
|
|||||||
790
pumpkin-data/src/generated/placed_feature.rs
Normal file
790
pumpkin-data/src/generated/placed_feature.rs
Normal file
@ -0,0 +1,790 @@
|
|||||||
|
/* This file is generated. Do not edit manually. */
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||||
|
pub enum PlacedFeature {
|
||||||
|
Acacia,
|
||||||
|
AcaciaChecked,
|
||||||
|
AmethystGeode,
|
||||||
|
Bamboo,
|
||||||
|
BambooLight,
|
||||||
|
BambooVegetation,
|
||||||
|
BasaltBlobs,
|
||||||
|
BasaltPillar,
|
||||||
|
BirchBees0002,
|
||||||
|
BirchBees0002LeafLitter,
|
||||||
|
BirchBees002,
|
||||||
|
BirchChecked,
|
||||||
|
BirchLeafLitter,
|
||||||
|
BirchTall,
|
||||||
|
BlackstoneBlobs,
|
||||||
|
BlueIce,
|
||||||
|
BrownMushroomNether,
|
||||||
|
BrownMushroomNormal,
|
||||||
|
BrownMushroomOldGrowth,
|
||||||
|
BrownMushroomSwamp,
|
||||||
|
BrownMushroomTaiga,
|
||||||
|
CaveVines,
|
||||||
|
CherryBees005,
|
||||||
|
CherryChecked,
|
||||||
|
ChorusPlant,
|
||||||
|
ClassicVinesCaveFeature,
|
||||||
|
CrimsonForestVegetation,
|
||||||
|
CrimsonFungi,
|
||||||
|
DarkForestVegetation,
|
||||||
|
DarkOakChecked,
|
||||||
|
DarkOakLeafLitter,
|
||||||
|
Delta,
|
||||||
|
DesertWell,
|
||||||
|
DiskClay,
|
||||||
|
DiskGrass,
|
||||||
|
DiskGravel,
|
||||||
|
DiskSand,
|
||||||
|
DripstoneCluster,
|
||||||
|
EndGatewayReturn,
|
||||||
|
EndIslandDecorated,
|
||||||
|
EndPlatform,
|
||||||
|
EndSpike,
|
||||||
|
FallenBirchTree,
|
||||||
|
FallenJungleTree,
|
||||||
|
FallenOakTree,
|
||||||
|
FallenSpruceTree,
|
||||||
|
FallenSuperBirchTree,
|
||||||
|
FancyOakBees,
|
||||||
|
FancyOakBees0002LeafLitter,
|
||||||
|
FancyOakBees002,
|
||||||
|
FancyOakChecked,
|
||||||
|
FancyOakLeafLitter,
|
||||||
|
FlowerCherry,
|
||||||
|
FlowerDefault,
|
||||||
|
FlowerFlowerForest,
|
||||||
|
FlowerForestFlowers,
|
||||||
|
FlowerMeadow,
|
||||||
|
FlowerPaleGarden,
|
||||||
|
FlowerPlain,
|
||||||
|
FlowerPlains,
|
||||||
|
FlowerSwamp,
|
||||||
|
FlowerWarm,
|
||||||
|
ForestFlowers,
|
||||||
|
ForestRock,
|
||||||
|
FossilLower,
|
||||||
|
FossilUpper,
|
||||||
|
FreezeTopLayer,
|
||||||
|
GlowLichen,
|
||||||
|
Glowstone,
|
||||||
|
GlowstoneExtra,
|
||||||
|
GrassBonemeal,
|
||||||
|
IcePatch,
|
||||||
|
IceSpike,
|
||||||
|
IcebergBlue,
|
||||||
|
IcebergPacked,
|
||||||
|
JungleBush,
|
||||||
|
JungleTree,
|
||||||
|
KelpCold,
|
||||||
|
KelpWarm,
|
||||||
|
LakeLavaSurface,
|
||||||
|
LakeLavaUnderground,
|
||||||
|
LargeBasaltColumns,
|
||||||
|
LargeDripstone,
|
||||||
|
LushCavesCeilingVegetation,
|
||||||
|
LushCavesClay,
|
||||||
|
LushCavesVegetation,
|
||||||
|
MangroveChecked,
|
||||||
|
MegaJungleTreeChecked,
|
||||||
|
MegaPineChecked,
|
||||||
|
MegaSpruceChecked,
|
||||||
|
MonsterRoom,
|
||||||
|
MonsterRoomDeep,
|
||||||
|
MushroomIslandVegetation,
|
||||||
|
NetherSprouts,
|
||||||
|
Oak,
|
||||||
|
OakBees0002LeafLitter,
|
||||||
|
OakBees002,
|
||||||
|
OakChecked,
|
||||||
|
OakLeafLitter,
|
||||||
|
OreAncientDebrisLarge,
|
||||||
|
OreAndesiteLower,
|
||||||
|
OreAndesiteUpper,
|
||||||
|
OreBlackstone,
|
||||||
|
OreClay,
|
||||||
|
OreCoalLower,
|
||||||
|
OreCoalUpper,
|
||||||
|
OreCopper,
|
||||||
|
OreCopperLarge,
|
||||||
|
OreDebrisSmall,
|
||||||
|
OreDiamond,
|
||||||
|
OreDiamondBuried,
|
||||||
|
OreDiamondLarge,
|
||||||
|
OreDiamondMedium,
|
||||||
|
OreDioriteLower,
|
||||||
|
OreDioriteUpper,
|
||||||
|
OreDirt,
|
||||||
|
OreEmerald,
|
||||||
|
OreGold,
|
||||||
|
OreGoldDeltas,
|
||||||
|
OreGoldExtra,
|
||||||
|
OreGoldLower,
|
||||||
|
OreGoldNether,
|
||||||
|
OreGraniteLower,
|
||||||
|
OreGraniteUpper,
|
||||||
|
OreGravel,
|
||||||
|
OreGravelNether,
|
||||||
|
OreInfested,
|
||||||
|
OreIronMiddle,
|
||||||
|
OreIronSmall,
|
||||||
|
OreIronUpper,
|
||||||
|
OreLapis,
|
||||||
|
OreLapisBuried,
|
||||||
|
OreMagma,
|
||||||
|
OreQuartzDeltas,
|
||||||
|
OreQuartzNether,
|
||||||
|
OreRedstone,
|
||||||
|
OreRedstoneLower,
|
||||||
|
OreSoulSand,
|
||||||
|
OreTuff,
|
||||||
|
PaleGardenFlowers,
|
||||||
|
PaleGardenVegetation,
|
||||||
|
PaleMossPatch,
|
||||||
|
PaleOakChecked,
|
||||||
|
PaleOakCreakingChecked,
|
||||||
|
PatchBerryBush,
|
||||||
|
PatchBerryCommon,
|
||||||
|
PatchBerryRare,
|
||||||
|
PatchBush,
|
||||||
|
PatchCactus,
|
||||||
|
PatchCactusDecorated,
|
||||||
|
PatchCactusDesert,
|
||||||
|
PatchCrimsonRoots,
|
||||||
|
PatchDeadBush,
|
||||||
|
PatchDeadBush2,
|
||||||
|
PatchDeadBushBadlands,
|
||||||
|
PatchDryGrassBadlands,
|
||||||
|
PatchDryGrassDesert,
|
||||||
|
PatchFire,
|
||||||
|
PatchFireflyBushNearWater,
|
||||||
|
PatchFireflyBushNearWaterSwamp,
|
||||||
|
PatchFireflyBushSwamp,
|
||||||
|
PatchGrassBadlands,
|
||||||
|
PatchGrassForest,
|
||||||
|
PatchGrassJungle,
|
||||||
|
PatchGrassMeadow,
|
||||||
|
PatchGrassNormal,
|
||||||
|
PatchGrassPlain,
|
||||||
|
PatchGrassSavanna,
|
||||||
|
PatchGrassTaiga,
|
||||||
|
PatchGrassTaiga2,
|
||||||
|
PatchLargeFern,
|
||||||
|
PatchLeafLitter,
|
||||||
|
PatchMelon,
|
||||||
|
PatchMelonSparse,
|
||||||
|
PatchPumpkin,
|
||||||
|
PatchSoulFire,
|
||||||
|
PatchSugarCane,
|
||||||
|
PatchSugarCaneBadlands,
|
||||||
|
PatchSugarCaneDesert,
|
||||||
|
PatchSugarCaneSwamp,
|
||||||
|
PatchSunflower,
|
||||||
|
PatchTaigaGrass,
|
||||||
|
PatchTallGrass,
|
||||||
|
PatchTallGrass2,
|
||||||
|
PatchWaterlily,
|
||||||
|
PileHay,
|
||||||
|
PileIce,
|
||||||
|
PileMelon,
|
||||||
|
PilePumpkin,
|
||||||
|
PileSnow,
|
||||||
|
Pine,
|
||||||
|
PineChecked,
|
||||||
|
PineOnSnow,
|
||||||
|
PointedDripstone,
|
||||||
|
RedMushroomNether,
|
||||||
|
RedMushroomNormal,
|
||||||
|
RedMushroomOldGrowth,
|
||||||
|
RedMushroomSwamp,
|
||||||
|
RedMushroomTaiga,
|
||||||
|
RootedAzaleaTree,
|
||||||
|
SculkPatchAncientCity,
|
||||||
|
SculkPatchDeepDark,
|
||||||
|
SculkVein,
|
||||||
|
SeaPickle,
|
||||||
|
SeagrassCold,
|
||||||
|
SeagrassDeep,
|
||||||
|
SeagrassDeepCold,
|
||||||
|
SeagrassDeepWarm,
|
||||||
|
SeagrassNormal,
|
||||||
|
SeagrassRiver,
|
||||||
|
SeagrassSwamp,
|
||||||
|
SeagrassWarm,
|
||||||
|
SmallBasaltColumns,
|
||||||
|
SporeBlossom,
|
||||||
|
SpringClosed,
|
||||||
|
SpringClosedDouble,
|
||||||
|
SpringDelta,
|
||||||
|
SpringLava,
|
||||||
|
SpringLavaFrozen,
|
||||||
|
SpringOpen,
|
||||||
|
SpringWater,
|
||||||
|
Spruce,
|
||||||
|
SpruceChecked,
|
||||||
|
SpruceOnSnow,
|
||||||
|
SuperBirchBees,
|
||||||
|
SuperBirchBees0002,
|
||||||
|
TallMangroveChecked,
|
||||||
|
TreesBadlands,
|
||||||
|
TreesBirch,
|
||||||
|
TreesBirchAndOakLeafLitter,
|
||||||
|
TreesCherry,
|
||||||
|
TreesFlowerForest,
|
||||||
|
TreesGrove,
|
||||||
|
TreesJungle,
|
||||||
|
TreesMangrove,
|
||||||
|
TreesMeadow,
|
||||||
|
TreesOldGrowthPineTaiga,
|
||||||
|
TreesOldGrowthSpruceTaiga,
|
||||||
|
TreesPlains,
|
||||||
|
TreesSavanna,
|
||||||
|
TreesSnowy,
|
||||||
|
TreesSparseJungle,
|
||||||
|
TreesSwamp,
|
||||||
|
TreesTaiga,
|
||||||
|
TreesWater,
|
||||||
|
TreesWindsweptForest,
|
||||||
|
TreesWindsweptHills,
|
||||||
|
TreesWindsweptSavanna,
|
||||||
|
TwistingVines,
|
||||||
|
UnderwaterMagma,
|
||||||
|
Vines,
|
||||||
|
VoidStartPlatform,
|
||||||
|
WarmOceanVegetation,
|
||||||
|
WarpedForestVegetation,
|
||||||
|
WarpedFungi,
|
||||||
|
WeepingVines,
|
||||||
|
WildflowersBirchForest,
|
||||||
|
WildflowersMeadow,
|
||||||
|
}
|
||||||
|
impl PlacedFeature {
|
||||||
|
pub fn from_name(name: &str) -> Option<Self> {
|
||||||
|
let name = name.strip_prefix("minecraft:").unwrap_or(name);
|
||||||
|
match name {
|
||||||
|
"acacia" => Some(Self::Acacia),
|
||||||
|
"acacia_checked" => Some(Self::AcaciaChecked),
|
||||||
|
"amethyst_geode" => Some(Self::AmethystGeode),
|
||||||
|
"bamboo" => Some(Self::Bamboo),
|
||||||
|
"bamboo_light" => Some(Self::BambooLight),
|
||||||
|
"bamboo_vegetation" => Some(Self::BambooVegetation),
|
||||||
|
"basalt_blobs" => Some(Self::BasaltBlobs),
|
||||||
|
"basalt_pillar" => Some(Self::BasaltPillar),
|
||||||
|
"birch_bees_0002" => Some(Self::BirchBees0002),
|
||||||
|
"birch_bees_0002_leaf_litter" => Some(Self::BirchBees0002LeafLitter),
|
||||||
|
"birch_bees_002" => Some(Self::BirchBees002),
|
||||||
|
"birch_checked" => Some(Self::BirchChecked),
|
||||||
|
"birch_leaf_litter" => Some(Self::BirchLeafLitter),
|
||||||
|
"birch_tall" => Some(Self::BirchTall),
|
||||||
|
"blackstone_blobs" => Some(Self::BlackstoneBlobs),
|
||||||
|
"blue_ice" => Some(Self::BlueIce),
|
||||||
|
"brown_mushroom_nether" => Some(Self::BrownMushroomNether),
|
||||||
|
"brown_mushroom_normal" => Some(Self::BrownMushroomNormal),
|
||||||
|
"brown_mushroom_old_growth" => Some(Self::BrownMushroomOldGrowth),
|
||||||
|
"brown_mushroom_swamp" => Some(Self::BrownMushroomSwamp),
|
||||||
|
"brown_mushroom_taiga" => Some(Self::BrownMushroomTaiga),
|
||||||
|
"cave_vines" => Some(Self::CaveVines),
|
||||||
|
"cherry_bees_005" => Some(Self::CherryBees005),
|
||||||
|
"cherry_checked" => Some(Self::CherryChecked),
|
||||||
|
"chorus_plant" => Some(Self::ChorusPlant),
|
||||||
|
"classic_vines_cave_feature" => Some(Self::ClassicVinesCaveFeature),
|
||||||
|
"crimson_forest_vegetation" => Some(Self::CrimsonForestVegetation),
|
||||||
|
"crimson_fungi" => Some(Self::CrimsonFungi),
|
||||||
|
"dark_forest_vegetation" => Some(Self::DarkForestVegetation),
|
||||||
|
"dark_oak_checked" => Some(Self::DarkOakChecked),
|
||||||
|
"dark_oak_leaf_litter" => Some(Self::DarkOakLeafLitter),
|
||||||
|
"delta" => Some(Self::Delta),
|
||||||
|
"desert_well" => Some(Self::DesertWell),
|
||||||
|
"disk_clay" => Some(Self::DiskClay),
|
||||||
|
"disk_grass" => Some(Self::DiskGrass),
|
||||||
|
"disk_gravel" => Some(Self::DiskGravel),
|
||||||
|
"disk_sand" => Some(Self::DiskSand),
|
||||||
|
"dripstone_cluster" => Some(Self::DripstoneCluster),
|
||||||
|
"end_gateway_return" => Some(Self::EndGatewayReturn),
|
||||||
|
"end_island_decorated" => Some(Self::EndIslandDecorated),
|
||||||
|
"end_platform" => Some(Self::EndPlatform),
|
||||||
|
"end_spike" => Some(Self::EndSpike),
|
||||||
|
"fallen_birch_tree" => Some(Self::FallenBirchTree),
|
||||||
|
"fallen_jungle_tree" => Some(Self::FallenJungleTree),
|
||||||
|
"fallen_oak_tree" => Some(Self::FallenOakTree),
|
||||||
|
"fallen_spruce_tree" => Some(Self::FallenSpruceTree),
|
||||||
|
"fallen_super_birch_tree" => Some(Self::FallenSuperBirchTree),
|
||||||
|
"fancy_oak_bees" => Some(Self::FancyOakBees),
|
||||||
|
"fancy_oak_bees_0002_leaf_litter" => Some(Self::FancyOakBees0002LeafLitter),
|
||||||
|
"fancy_oak_bees_002" => Some(Self::FancyOakBees002),
|
||||||
|
"fancy_oak_checked" => Some(Self::FancyOakChecked),
|
||||||
|
"fancy_oak_leaf_litter" => Some(Self::FancyOakLeafLitter),
|
||||||
|
"flower_cherry" => Some(Self::FlowerCherry),
|
||||||
|
"flower_default" => Some(Self::FlowerDefault),
|
||||||
|
"flower_flower_forest" => Some(Self::FlowerFlowerForest),
|
||||||
|
"flower_forest_flowers" => Some(Self::FlowerForestFlowers),
|
||||||
|
"flower_meadow" => Some(Self::FlowerMeadow),
|
||||||
|
"flower_pale_garden" => Some(Self::FlowerPaleGarden),
|
||||||
|
"flower_plain" => Some(Self::FlowerPlain),
|
||||||
|
"flower_plains" => Some(Self::FlowerPlains),
|
||||||
|
"flower_swamp" => Some(Self::FlowerSwamp),
|
||||||
|
"flower_warm" => Some(Self::FlowerWarm),
|
||||||
|
"forest_flowers" => Some(Self::ForestFlowers),
|
||||||
|
"forest_rock" => Some(Self::ForestRock),
|
||||||
|
"fossil_lower" => Some(Self::FossilLower),
|
||||||
|
"fossil_upper" => Some(Self::FossilUpper),
|
||||||
|
"freeze_top_layer" => Some(Self::FreezeTopLayer),
|
||||||
|
"glow_lichen" => Some(Self::GlowLichen),
|
||||||
|
"glowstone" => Some(Self::Glowstone),
|
||||||
|
"glowstone_extra" => Some(Self::GlowstoneExtra),
|
||||||
|
"grass_bonemeal" => Some(Self::GrassBonemeal),
|
||||||
|
"ice_patch" => Some(Self::IcePatch),
|
||||||
|
"ice_spike" => Some(Self::IceSpike),
|
||||||
|
"iceberg_blue" => Some(Self::IcebergBlue),
|
||||||
|
"iceberg_packed" => Some(Self::IcebergPacked),
|
||||||
|
"jungle_bush" => Some(Self::JungleBush),
|
||||||
|
"jungle_tree" => Some(Self::JungleTree),
|
||||||
|
"kelp_cold" => Some(Self::KelpCold),
|
||||||
|
"kelp_warm" => Some(Self::KelpWarm),
|
||||||
|
"lake_lava_surface" => Some(Self::LakeLavaSurface),
|
||||||
|
"lake_lava_underground" => Some(Self::LakeLavaUnderground),
|
||||||
|
"large_basalt_columns" => Some(Self::LargeBasaltColumns),
|
||||||
|
"large_dripstone" => Some(Self::LargeDripstone),
|
||||||
|
"lush_caves_ceiling_vegetation" => Some(Self::LushCavesCeilingVegetation),
|
||||||
|
"lush_caves_clay" => Some(Self::LushCavesClay),
|
||||||
|
"lush_caves_vegetation" => Some(Self::LushCavesVegetation),
|
||||||
|
"mangrove_checked" => Some(Self::MangroveChecked),
|
||||||
|
"mega_jungle_tree_checked" => Some(Self::MegaJungleTreeChecked),
|
||||||
|
"mega_pine_checked" => Some(Self::MegaPineChecked),
|
||||||
|
"mega_spruce_checked" => Some(Self::MegaSpruceChecked),
|
||||||
|
"monster_room" => Some(Self::MonsterRoom),
|
||||||
|
"monster_room_deep" => Some(Self::MonsterRoomDeep),
|
||||||
|
"mushroom_island_vegetation" => Some(Self::MushroomIslandVegetation),
|
||||||
|
"nether_sprouts" => Some(Self::NetherSprouts),
|
||||||
|
"oak" => Some(Self::Oak),
|
||||||
|
"oak_bees_0002_leaf_litter" => Some(Self::OakBees0002LeafLitter),
|
||||||
|
"oak_bees_002" => Some(Self::OakBees002),
|
||||||
|
"oak_checked" => Some(Self::OakChecked),
|
||||||
|
"oak_leaf_litter" => Some(Self::OakLeafLitter),
|
||||||
|
"ore_ancient_debris_large" => Some(Self::OreAncientDebrisLarge),
|
||||||
|
"ore_andesite_lower" => Some(Self::OreAndesiteLower),
|
||||||
|
"ore_andesite_upper" => Some(Self::OreAndesiteUpper),
|
||||||
|
"ore_blackstone" => Some(Self::OreBlackstone),
|
||||||
|
"ore_clay" => Some(Self::OreClay),
|
||||||
|
"ore_coal_lower" => Some(Self::OreCoalLower),
|
||||||
|
"ore_coal_upper" => Some(Self::OreCoalUpper),
|
||||||
|
"ore_copper" => Some(Self::OreCopper),
|
||||||
|
"ore_copper_large" => Some(Self::OreCopperLarge),
|
||||||
|
"ore_debris_small" => Some(Self::OreDebrisSmall),
|
||||||
|
"ore_diamond" => Some(Self::OreDiamond),
|
||||||
|
"ore_diamond_buried" => Some(Self::OreDiamondBuried),
|
||||||
|
"ore_diamond_large" => Some(Self::OreDiamondLarge),
|
||||||
|
"ore_diamond_medium" => Some(Self::OreDiamondMedium),
|
||||||
|
"ore_diorite_lower" => Some(Self::OreDioriteLower),
|
||||||
|
"ore_diorite_upper" => Some(Self::OreDioriteUpper),
|
||||||
|
"ore_dirt" => Some(Self::OreDirt),
|
||||||
|
"ore_emerald" => Some(Self::OreEmerald),
|
||||||
|
"ore_gold" => Some(Self::OreGold),
|
||||||
|
"ore_gold_deltas" => Some(Self::OreGoldDeltas),
|
||||||
|
"ore_gold_extra" => Some(Self::OreGoldExtra),
|
||||||
|
"ore_gold_lower" => Some(Self::OreGoldLower),
|
||||||
|
"ore_gold_nether" => Some(Self::OreGoldNether),
|
||||||
|
"ore_granite_lower" => Some(Self::OreGraniteLower),
|
||||||
|
"ore_granite_upper" => Some(Self::OreGraniteUpper),
|
||||||
|
"ore_gravel" => Some(Self::OreGravel),
|
||||||
|
"ore_gravel_nether" => Some(Self::OreGravelNether),
|
||||||
|
"ore_infested" => Some(Self::OreInfested),
|
||||||
|
"ore_iron_middle" => Some(Self::OreIronMiddle),
|
||||||
|
"ore_iron_small" => Some(Self::OreIronSmall),
|
||||||
|
"ore_iron_upper" => Some(Self::OreIronUpper),
|
||||||
|
"ore_lapis" => Some(Self::OreLapis),
|
||||||
|
"ore_lapis_buried" => Some(Self::OreLapisBuried),
|
||||||
|
"ore_magma" => Some(Self::OreMagma),
|
||||||
|
"ore_quartz_deltas" => Some(Self::OreQuartzDeltas),
|
||||||
|
"ore_quartz_nether" => Some(Self::OreQuartzNether),
|
||||||
|
"ore_redstone" => Some(Self::OreRedstone),
|
||||||
|
"ore_redstone_lower" => Some(Self::OreRedstoneLower),
|
||||||
|
"ore_soul_sand" => Some(Self::OreSoulSand),
|
||||||
|
"ore_tuff" => Some(Self::OreTuff),
|
||||||
|
"pale_garden_flowers" => Some(Self::PaleGardenFlowers),
|
||||||
|
"pale_garden_vegetation" => Some(Self::PaleGardenVegetation),
|
||||||
|
"pale_moss_patch" => Some(Self::PaleMossPatch),
|
||||||
|
"pale_oak_checked" => Some(Self::PaleOakChecked),
|
||||||
|
"pale_oak_creaking_checked" => Some(Self::PaleOakCreakingChecked),
|
||||||
|
"patch_berry_bush" => Some(Self::PatchBerryBush),
|
||||||
|
"patch_berry_common" => Some(Self::PatchBerryCommon),
|
||||||
|
"patch_berry_rare" => Some(Self::PatchBerryRare),
|
||||||
|
"patch_bush" => Some(Self::PatchBush),
|
||||||
|
"patch_cactus" => Some(Self::PatchCactus),
|
||||||
|
"patch_cactus_decorated" => Some(Self::PatchCactusDecorated),
|
||||||
|
"patch_cactus_desert" => Some(Self::PatchCactusDesert),
|
||||||
|
"patch_crimson_roots" => Some(Self::PatchCrimsonRoots),
|
||||||
|
"patch_dead_bush" => Some(Self::PatchDeadBush),
|
||||||
|
"patch_dead_bush_2" => Some(Self::PatchDeadBush2),
|
||||||
|
"patch_dead_bush_badlands" => Some(Self::PatchDeadBushBadlands),
|
||||||
|
"patch_dry_grass_badlands" => Some(Self::PatchDryGrassBadlands),
|
||||||
|
"patch_dry_grass_desert" => Some(Self::PatchDryGrassDesert),
|
||||||
|
"patch_fire" => Some(Self::PatchFire),
|
||||||
|
"patch_firefly_bush_near_water" => Some(Self::PatchFireflyBushNearWater),
|
||||||
|
"patch_firefly_bush_near_water_swamp" => Some(Self::PatchFireflyBushNearWaterSwamp),
|
||||||
|
"patch_firefly_bush_swamp" => Some(Self::PatchFireflyBushSwamp),
|
||||||
|
"patch_grass_badlands" => Some(Self::PatchGrassBadlands),
|
||||||
|
"patch_grass_forest" => Some(Self::PatchGrassForest),
|
||||||
|
"patch_grass_jungle" => Some(Self::PatchGrassJungle),
|
||||||
|
"patch_grass_meadow" => Some(Self::PatchGrassMeadow),
|
||||||
|
"patch_grass_normal" => Some(Self::PatchGrassNormal),
|
||||||
|
"patch_grass_plain" => Some(Self::PatchGrassPlain),
|
||||||
|
"patch_grass_savanna" => Some(Self::PatchGrassSavanna),
|
||||||
|
"patch_grass_taiga" => Some(Self::PatchGrassTaiga),
|
||||||
|
"patch_grass_taiga_2" => Some(Self::PatchGrassTaiga2),
|
||||||
|
"patch_large_fern" => Some(Self::PatchLargeFern),
|
||||||
|
"patch_leaf_litter" => Some(Self::PatchLeafLitter),
|
||||||
|
"patch_melon" => Some(Self::PatchMelon),
|
||||||
|
"patch_melon_sparse" => Some(Self::PatchMelonSparse),
|
||||||
|
"patch_pumpkin" => Some(Self::PatchPumpkin),
|
||||||
|
"patch_soul_fire" => Some(Self::PatchSoulFire),
|
||||||
|
"patch_sugar_cane" => Some(Self::PatchSugarCane),
|
||||||
|
"patch_sugar_cane_badlands" => Some(Self::PatchSugarCaneBadlands),
|
||||||
|
"patch_sugar_cane_desert" => Some(Self::PatchSugarCaneDesert),
|
||||||
|
"patch_sugar_cane_swamp" => Some(Self::PatchSugarCaneSwamp),
|
||||||
|
"patch_sunflower" => Some(Self::PatchSunflower),
|
||||||
|
"patch_taiga_grass" => Some(Self::PatchTaigaGrass),
|
||||||
|
"patch_tall_grass" => Some(Self::PatchTallGrass),
|
||||||
|
"patch_tall_grass_2" => Some(Self::PatchTallGrass2),
|
||||||
|
"patch_waterlily" => Some(Self::PatchWaterlily),
|
||||||
|
"pile_hay" => Some(Self::PileHay),
|
||||||
|
"pile_ice" => Some(Self::PileIce),
|
||||||
|
"pile_melon" => Some(Self::PileMelon),
|
||||||
|
"pile_pumpkin" => Some(Self::PilePumpkin),
|
||||||
|
"pile_snow" => Some(Self::PileSnow),
|
||||||
|
"pine" => Some(Self::Pine),
|
||||||
|
"pine_checked" => Some(Self::PineChecked),
|
||||||
|
"pine_on_snow" => Some(Self::PineOnSnow),
|
||||||
|
"pointed_dripstone" => Some(Self::PointedDripstone),
|
||||||
|
"red_mushroom_nether" => Some(Self::RedMushroomNether),
|
||||||
|
"red_mushroom_normal" => Some(Self::RedMushroomNormal),
|
||||||
|
"red_mushroom_old_growth" => Some(Self::RedMushroomOldGrowth),
|
||||||
|
"red_mushroom_swamp" => Some(Self::RedMushroomSwamp),
|
||||||
|
"red_mushroom_taiga" => Some(Self::RedMushroomTaiga),
|
||||||
|
"rooted_azalea_tree" => Some(Self::RootedAzaleaTree),
|
||||||
|
"sculk_patch_ancient_city" => Some(Self::SculkPatchAncientCity),
|
||||||
|
"sculk_patch_deep_dark" => Some(Self::SculkPatchDeepDark),
|
||||||
|
"sculk_vein" => Some(Self::SculkVein),
|
||||||
|
"sea_pickle" => Some(Self::SeaPickle),
|
||||||
|
"seagrass_cold" => Some(Self::SeagrassCold),
|
||||||
|
"seagrass_deep" => Some(Self::SeagrassDeep),
|
||||||
|
"seagrass_deep_cold" => Some(Self::SeagrassDeepCold),
|
||||||
|
"seagrass_deep_warm" => Some(Self::SeagrassDeepWarm),
|
||||||
|
"seagrass_normal" => Some(Self::SeagrassNormal),
|
||||||
|
"seagrass_river" => Some(Self::SeagrassRiver),
|
||||||
|
"seagrass_swamp" => Some(Self::SeagrassSwamp),
|
||||||
|
"seagrass_warm" => Some(Self::SeagrassWarm),
|
||||||
|
"small_basalt_columns" => Some(Self::SmallBasaltColumns),
|
||||||
|
"spore_blossom" => Some(Self::SporeBlossom),
|
||||||
|
"spring_closed" => Some(Self::SpringClosed),
|
||||||
|
"spring_closed_double" => Some(Self::SpringClosedDouble),
|
||||||
|
"spring_delta" => Some(Self::SpringDelta),
|
||||||
|
"spring_lava" => Some(Self::SpringLava),
|
||||||
|
"spring_lava_frozen" => Some(Self::SpringLavaFrozen),
|
||||||
|
"spring_open" => Some(Self::SpringOpen),
|
||||||
|
"spring_water" => Some(Self::SpringWater),
|
||||||
|
"spruce" => Some(Self::Spruce),
|
||||||
|
"spruce_checked" => Some(Self::SpruceChecked),
|
||||||
|
"spruce_on_snow" => Some(Self::SpruceOnSnow),
|
||||||
|
"super_birch_bees" => Some(Self::SuperBirchBees),
|
||||||
|
"super_birch_bees_0002" => Some(Self::SuperBirchBees0002),
|
||||||
|
"tall_mangrove_checked" => Some(Self::TallMangroveChecked),
|
||||||
|
"trees_badlands" => Some(Self::TreesBadlands),
|
||||||
|
"trees_birch" => Some(Self::TreesBirch),
|
||||||
|
"trees_birch_and_oak_leaf_litter" => Some(Self::TreesBirchAndOakLeafLitter),
|
||||||
|
"trees_cherry" => Some(Self::TreesCherry),
|
||||||
|
"trees_flower_forest" => Some(Self::TreesFlowerForest),
|
||||||
|
"trees_grove" => Some(Self::TreesGrove),
|
||||||
|
"trees_jungle" => Some(Self::TreesJungle),
|
||||||
|
"trees_mangrove" => Some(Self::TreesMangrove),
|
||||||
|
"trees_meadow" => Some(Self::TreesMeadow),
|
||||||
|
"trees_old_growth_pine_taiga" => Some(Self::TreesOldGrowthPineTaiga),
|
||||||
|
"trees_old_growth_spruce_taiga" => Some(Self::TreesOldGrowthSpruceTaiga),
|
||||||
|
"trees_plains" => Some(Self::TreesPlains),
|
||||||
|
"trees_savanna" => Some(Self::TreesSavanna),
|
||||||
|
"trees_snowy" => Some(Self::TreesSnowy),
|
||||||
|
"trees_sparse_jungle" => Some(Self::TreesSparseJungle),
|
||||||
|
"trees_swamp" => Some(Self::TreesSwamp),
|
||||||
|
"trees_taiga" => Some(Self::TreesTaiga),
|
||||||
|
"trees_water" => Some(Self::TreesWater),
|
||||||
|
"trees_windswept_forest" => Some(Self::TreesWindsweptForest),
|
||||||
|
"trees_windswept_hills" => Some(Self::TreesWindsweptHills),
|
||||||
|
"trees_windswept_savanna" => Some(Self::TreesWindsweptSavanna),
|
||||||
|
"twisting_vines" => Some(Self::TwistingVines),
|
||||||
|
"underwater_magma" => Some(Self::UnderwaterMagma),
|
||||||
|
"vines" => Some(Self::Vines),
|
||||||
|
"void_start_platform" => Some(Self::VoidStartPlatform),
|
||||||
|
"warm_ocean_vegetation" => Some(Self::WarmOceanVegetation),
|
||||||
|
"warped_forest_vegetation" => Some(Self::WarpedForestVegetation),
|
||||||
|
"warped_fungi" => Some(Self::WarpedFungi),
|
||||||
|
"weeping_vines" => Some(Self::WeepingVines),
|
||||||
|
"wildflowers_birch_forest" => Some(Self::WildflowersBirchForest),
|
||||||
|
"wildflowers_meadow" => Some(Self::WildflowersMeadow),
|
||||||
|
_ => None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pub const fn to_name(&self) -> &'static str {
|
||||||
|
match self {
|
||||||
|
Self::Acacia => "acacia",
|
||||||
|
Self::AcaciaChecked => "acacia_checked",
|
||||||
|
Self::AmethystGeode => "amethyst_geode",
|
||||||
|
Self::Bamboo => "bamboo",
|
||||||
|
Self::BambooLight => "bamboo_light",
|
||||||
|
Self::BambooVegetation => "bamboo_vegetation",
|
||||||
|
Self::BasaltBlobs => "basalt_blobs",
|
||||||
|
Self::BasaltPillar => "basalt_pillar",
|
||||||
|
Self::BirchBees0002 => "birch_bees_0002",
|
||||||
|
Self::BirchBees0002LeafLitter => "birch_bees_0002_leaf_litter",
|
||||||
|
Self::BirchBees002 => "birch_bees_002",
|
||||||
|
Self::BirchChecked => "birch_checked",
|
||||||
|
Self::BirchLeafLitter => "birch_leaf_litter",
|
||||||
|
Self::BirchTall => "birch_tall",
|
||||||
|
Self::BlackstoneBlobs => "blackstone_blobs",
|
||||||
|
Self::BlueIce => "blue_ice",
|
||||||
|
Self::BrownMushroomNether => "brown_mushroom_nether",
|
||||||
|
Self::BrownMushroomNormal => "brown_mushroom_normal",
|
||||||
|
Self::BrownMushroomOldGrowth => "brown_mushroom_old_growth",
|
||||||
|
Self::BrownMushroomSwamp => "brown_mushroom_swamp",
|
||||||
|
Self::BrownMushroomTaiga => "brown_mushroom_taiga",
|
||||||
|
Self::CaveVines => "cave_vines",
|
||||||
|
Self::CherryBees005 => "cherry_bees_005",
|
||||||
|
Self::CherryChecked => "cherry_checked",
|
||||||
|
Self::ChorusPlant => "chorus_plant",
|
||||||
|
Self::ClassicVinesCaveFeature => "classic_vines_cave_feature",
|
||||||
|
Self::CrimsonForestVegetation => "crimson_forest_vegetation",
|
||||||
|
Self::CrimsonFungi => "crimson_fungi",
|
||||||
|
Self::DarkForestVegetation => "dark_forest_vegetation",
|
||||||
|
Self::DarkOakChecked => "dark_oak_checked",
|
||||||
|
Self::DarkOakLeafLitter => "dark_oak_leaf_litter",
|
||||||
|
Self::Delta => "delta",
|
||||||
|
Self::DesertWell => "desert_well",
|
||||||
|
Self::DiskClay => "disk_clay",
|
||||||
|
Self::DiskGrass => "disk_grass",
|
||||||
|
Self::DiskGravel => "disk_gravel",
|
||||||
|
Self::DiskSand => "disk_sand",
|
||||||
|
Self::DripstoneCluster => "dripstone_cluster",
|
||||||
|
Self::EndGatewayReturn => "end_gateway_return",
|
||||||
|
Self::EndIslandDecorated => "end_island_decorated",
|
||||||
|
Self::EndPlatform => "end_platform",
|
||||||
|
Self::EndSpike => "end_spike",
|
||||||
|
Self::FallenBirchTree => "fallen_birch_tree",
|
||||||
|
Self::FallenJungleTree => "fallen_jungle_tree",
|
||||||
|
Self::FallenOakTree => "fallen_oak_tree",
|
||||||
|
Self::FallenSpruceTree => "fallen_spruce_tree",
|
||||||
|
Self::FallenSuperBirchTree => "fallen_super_birch_tree",
|
||||||
|
Self::FancyOakBees => "fancy_oak_bees",
|
||||||
|
Self::FancyOakBees0002LeafLitter => "fancy_oak_bees_0002_leaf_litter",
|
||||||
|
Self::FancyOakBees002 => "fancy_oak_bees_002",
|
||||||
|
Self::FancyOakChecked => "fancy_oak_checked",
|
||||||
|
Self::FancyOakLeafLitter => "fancy_oak_leaf_litter",
|
||||||
|
Self::FlowerCherry => "flower_cherry",
|
||||||
|
Self::FlowerDefault => "flower_default",
|
||||||
|
Self::FlowerFlowerForest => "flower_flower_forest",
|
||||||
|
Self::FlowerForestFlowers => "flower_forest_flowers",
|
||||||
|
Self::FlowerMeadow => "flower_meadow",
|
||||||
|
Self::FlowerPaleGarden => "flower_pale_garden",
|
||||||
|
Self::FlowerPlain => "flower_plain",
|
||||||
|
Self::FlowerPlains => "flower_plains",
|
||||||
|
Self::FlowerSwamp => "flower_swamp",
|
||||||
|
Self::FlowerWarm => "flower_warm",
|
||||||
|
Self::ForestFlowers => "forest_flowers",
|
||||||
|
Self::ForestRock => "forest_rock",
|
||||||
|
Self::FossilLower => "fossil_lower",
|
||||||
|
Self::FossilUpper => "fossil_upper",
|
||||||
|
Self::FreezeTopLayer => "freeze_top_layer",
|
||||||
|
Self::GlowLichen => "glow_lichen",
|
||||||
|
Self::Glowstone => "glowstone",
|
||||||
|
Self::GlowstoneExtra => "glowstone_extra",
|
||||||
|
Self::GrassBonemeal => "grass_bonemeal",
|
||||||
|
Self::IcePatch => "ice_patch",
|
||||||
|
Self::IceSpike => "ice_spike",
|
||||||
|
Self::IcebergBlue => "iceberg_blue",
|
||||||
|
Self::IcebergPacked => "iceberg_packed",
|
||||||
|
Self::JungleBush => "jungle_bush",
|
||||||
|
Self::JungleTree => "jungle_tree",
|
||||||
|
Self::KelpCold => "kelp_cold",
|
||||||
|
Self::KelpWarm => "kelp_warm",
|
||||||
|
Self::LakeLavaSurface => "lake_lava_surface",
|
||||||
|
Self::LakeLavaUnderground => "lake_lava_underground",
|
||||||
|
Self::LargeBasaltColumns => "large_basalt_columns",
|
||||||
|
Self::LargeDripstone => "large_dripstone",
|
||||||
|
Self::LushCavesCeilingVegetation => "lush_caves_ceiling_vegetation",
|
||||||
|
Self::LushCavesClay => "lush_caves_clay",
|
||||||
|
Self::LushCavesVegetation => "lush_caves_vegetation",
|
||||||
|
Self::MangroveChecked => "mangrove_checked",
|
||||||
|
Self::MegaJungleTreeChecked => "mega_jungle_tree_checked",
|
||||||
|
Self::MegaPineChecked => "mega_pine_checked",
|
||||||
|
Self::MegaSpruceChecked => "mega_spruce_checked",
|
||||||
|
Self::MonsterRoom => "monster_room",
|
||||||
|
Self::MonsterRoomDeep => "monster_room_deep",
|
||||||
|
Self::MushroomIslandVegetation => "mushroom_island_vegetation",
|
||||||
|
Self::NetherSprouts => "nether_sprouts",
|
||||||
|
Self::Oak => "oak",
|
||||||
|
Self::OakBees0002LeafLitter => "oak_bees_0002_leaf_litter",
|
||||||
|
Self::OakBees002 => "oak_bees_002",
|
||||||
|
Self::OakChecked => "oak_checked",
|
||||||
|
Self::OakLeafLitter => "oak_leaf_litter",
|
||||||
|
Self::OreAncientDebrisLarge => "ore_ancient_debris_large",
|
||||||
|
Self::OreAndesiteLower => "ore_andesite_lower",
|
||||||
|
Self::OreAndesiteUpper => "ore_andesite_upper",
|
||||||
|
Self::OreBlackstone => "ore_blackstone",
|
||||||
|
Self::OreClay => "ore_clay",
|
||||||
|
Self::OreCoalLower => "ore_coal_lower",
|
||||||
|
Self::OreCoalUpper => "ore_coal_upper",
|
||||||
|
Self::OreCopper => "ore_copper",
|
||||||
|
Self::OreCopperLarge => "ore_copper_large",
|
||||||
|
Self::OreDebrisSmall => "ore_debris_small",
|
||||||
|
Self::OreDiamond => "ore_diamond",
|
||||||
|
Self::OreDiamondBuried => "ore_diamond_buried",
|
||||||
|
Self::OreDiamondLarge => "ore_diamond_large",
|
||||||
|
Self::OreDiamondMedium => "ore_diamond_medium",
|
||||||
|
Self::OreDioriteLower => "ore_diorite_lower",
|
||||||
|
Self::OreDioriteUpper => "ore_diorite_upper",
|
||||||
|
Self::OreDirt => "ore_dirt",
|
||||||
|
Self::OreEmerald => "ore_emerald",
|
||||||
|
Self::OreGold => "ore_gold",
|
||||||
|
Self::OreGoldDeltas => "ore_gold_deltas",
|
||||||
|
Self::OreGoldExtra => "ore_gold_extra",
|
||||||
|
Self::OreGoldLower => "ore_gold_lower",
|
||||||
|
Self::OreGoldNether => "ore_gold_nether",
|
||||||
|
Self::OreGraniteLower => "ore_granite_lower",
|
||||||
|
Self::OreGraniteUpper => "ore_granite_upper",
|
||||||
|
Self::OreGravel => "ore_gravel",
|
||||||
|
Self::OreGravelNether => "ore_gravel_nether",
|
||||||
|
Self::OreInfested => "ore_infested",
|
||||||
|
Self::OreIronMiddle => "ore_iron_middle",
|
||||||
|
Self::OreIronSmall => "ore_iron_small",
|
||||||
|
Self::OreIronUpper => "ore_iron_upper",
|
||||||
|
Self::OreLapis => "ore_lapis",
|
||||||
|
Self::OreLapisBuried => "ore_lapis_buried",
|
||||||
|
Self::OreMagma => "ore_magma",
|
||||||
|
Self::OreQuartzDeltas => "ore_quartz_deltas",
|
||||||
|
Self::OreQuartzNether => "ore_quartz_nether",
|
||||||
|
Self::OreRedstone => "ore_redstone",
|
||||||
|
Self::OreRedstoneLower => "ore_redstone_lower",
|
||||||
|
Self::OreSoulSand => "ore_soul_sand",
|
||||||
|
Self::OreTuff => "ore_tuff",
|
||||||
|
Self::PaleGardenFlowers => "pale_garden_flowers",
|
||||||
|
Self::PaleGardenVegetation => "pale_garden_vegetation",
|
||||||
|
Self::PaleMossPatch => "pale_moss_patch",
|
||||||
|
Self::PaleOakChecked => "pale_oak_checked",
|
||||||
|
Self::PaleOakCreakingChecked => "pale_oak_creaking_checked",
|
||||||
|
Self::PatchBerryBush => "patch_berry_bush",
|
||||||
|
Self::PatchBerryCommon => "patch_berry_common",
|
||||||
|
Self::PatchBerryRare => "patch_berry_rare",
|
||||||
|
Self::PatchBush => "patch_bush",
|
||||||
|
Self::PatchCactus => "patch_cactus",
|
||||||
|
Self::PatchCactusDecorated => "patch_cactus_decorated",
|
||||||
|
Self::PatchCactusDesert => "patch_cactus_desert",
|
||||||
|
Self::PatchCrimsonRoots => "patch_crimson_roots",
|
||||||
|
Self::PatchDeadBush => "patch_dead_bush",
|
||||||
|
Self::PatchDeadBush2 => "patch_dead_bush_2",
|
||||||
|
Self::PatchDeadBushBadlands => "patch_dead_bush_badlands",
|
||||||
|
Self::PatchDryGrassBadlands => "patch_dry_grass_badlands",
|
||||||
|
Self::PatchDryGrassDesert => "patch_dry_grass_desert",
|
||||||
|
Self::PatchFire => "patch_fire",
|
||||||
|
Self::PatchFireflyBushNearWater => "patch_firefly_bush_near_water",
|
||||||
|
Self::PatchFireflyBushNearWaterSwamp => "patch_firefly_bush_near_water_swamp",
|
||||||
|
Self::PatchFireflyBushSwamp => "patch_firefly_bush_swamp",
|
||||||
|
Self::PatchGrassBadlands => "patch_grass_badlands",
|
||||||
|
Self::PatchGrassForest => "patch_grass_forest",
|
||||||
|
Self::PatchGrassJungle => "patch_grass_jungle",
|
||||||
|
Self::PatchGrassMeadow => "patch_grass_meadow",
|
||||||
|
Self::PatchGrassNormal => "patch_grass_normal",
|
||||||
|
Self::PatchGrassPlain => "patch_grass_plain",
|
||||||
|
Self::PatchGrassSavanna => "patch_grass_savanna",
|
||||||
|
Self::PatchGrassTaiga => "patch_grass_taiga",
|
||||||
|
Self::PatchGrassTaiga2 => "patch_grass_taiga_2",
|
||||||
|
Self::PatchLargeFern => "patch_large_fern",
|
||||||
|
Self::PatchLeafLitter => "patch_leaf_litter",
|
||||||
|
Self::PatchMelon => "patch_melon",
|
||||||
|
Self::PatchMelonSparse => "patch_melon_sparse",
|
||||||
|
Self::PatchPumpkin => "patch_pumpkin",
|
||||||
|
Self::PatchSoulFire => "patch_soul_fire",
|
||||||
|
Self::PatchSugarCane => "patch_sugar_cane",
|
||||||
|
Self::PatchSugarCaneBadlands => "patch_sugar_cane_badlands",
|
||||||
|
Self::PatchSugarCaneDesert => "patch_sugar_cane_desert",
|
||||||
|
Self::PatchSugarCaneSwamp => "patch_sugar_cane_swamp",
|
||||||
|
Self::PatchSunflower => "patch_sunflower",
|
||||||
|
Self::PatchTaigaGrass => "patch_taiga_grass",
|
||||||
|
Self::PatchTallGrass => "patch_tall_grass",
|
||||||
|
Self::PatchTallGrass2 => "patch_tall_grass_2",
|
||||||
|
Self::PatchWaterlily => "patch_waterlily",
|
||||||
|
Self::PileHay => "pile_hay",
|
||||||
|
Self::PileIce => "pile_ice",
|
||||||
|
Self::PileMelon => "pile_melon",
|
||||||
|
Self::PilePumpkin => "pile_pumpkin",
|
||||||
|
Self::PileSnow => "pile_snow",
|
||||||
|
Self::Pine => "pine",
|
||||||
|
Self::PineChecked => "pine_checked",
|
||||||
|
Self::PineOnSnow => "pine_on_snow",
|
||||||
|
Self::PointedDripstone => "pointed_dripstone",
|
||||||
|
Self::RedMushroomNether => "red_mushroom_nether",
|
||||||
|
Self::RedMushroomNormal => "red_mushroom_normal",
|
||||||
|
Self::RedMushroomOldGrowth => "red_mushroom_old_growth",
|
||||||
|
Self::RedMushroomSwamp => "red_mushroom_swamp",
|
||||||
|
Self::RedMushroomTaiga => "red_mushroom_taiga",
|
||||||
|
Self::RootedAzaleaTree => "rooted_azalea_tree",
|
||||||
|
Self::SculkPatchAncientCity => "sculk_patch_ancient_city",
|
||||||
|
Self::SculkPatchDeepDark => "sculk_patch_deep_dark",
|
||||||
|
Self::SculkVein => "sculk_vein",
|
||||||
|
Self::SeaPickle => "sea_pickle",
|
||||||
|
Self::SeagrassCold => "seagrass_cold",
|
||||||
|
Self::SeagrassDeep => "seagrass_deep",
|
||||||
|
Self::SeagrassDeepCold => "seagrass_deep_cold",
|
||||||
|
Self::SeagrassDeepWarm => "seagrass_deep_warm",
|
||||||
|
Self::SeagrassNormal => "seagrass_normal",
|
||||||
|
Self::SeagrassRiver => "seagrass_river",
|
||||||
|
Self::SeagrassSwamp => "seagrass_swamp",
|
||||||
|
Self::SeagrassWarm => "seagrass_warm",
|
||||||
|
Self::SmallBasaltColumns => "small_basalt_columns",
|
||||||
|
Self::SporeBlossom => "spore_blossom",
|
||||||
|
Self::SpringClosed => "spring_closed",
|
||||||
|
Self::SpringClosedDouble => "spring_closed_double",
|
||||||
|
Self::SpringDelta => "spring_delta",
|
||||||
|
Self::SpringLava => "spring_lava",
|
||||||
|
Self::SpringLavaFrozen => "spring_lava_frozen",
|
||||||
|
Self::SpringOpen => "spring_open",
|
||||||
|
Self::SpringWater => "spring_water",
|
||||||
|
Self::Spruce => "spruce",
|
||||||
|
Self::SpruceChecked => "spruce_checked",
|
||||||
|
Self::SpruceOnSnow => "spruce_on_snow",
|
||||||
|
Self::SuperBirchBees => "super_birch_bees",
|
||||||
|
Self::SuperBirchBees0002 => "super_birch_bees_0002",
|
||||||
|
Self::TallMangroveChecked => "tall_mangrove_checked",
|
||||||
|
Self::TreesBadlands => "trees_badlands",
|
||||||
|
Self::TreesBirch => "trees_birch",
|
||||||
|
Self::TreesBirchAndOakLeafLitter => "trees_birch_and_oak_leaf_litter",
|
||||||
|
Self::TreesCherry => "trees_cherry",
|
||||||
|
Self::TreesFlowerForest => "trees_flower_forest",
|
||||||
|
Self::TreesGrove => "trees_grove",
|
||||||
|
Self::TreesJungle => "trees_jungle",
|
||||||
|
Self::TreesMangrove => "trees_mangrove",
|
||||||
|
Self::TreesMeadow => "trees_meadow",
|
||||||
|
Self::TreesOldGrowthPineTaiga => "trees_old_growth_pine_taiga",
|
||||||
|
Self::TreesOldGrowthSpruceTaiga => "trees_old_growth_spruce_taiga",
|
||||||
|
Self::TreesPlains => "trees_plains",
|
||||||
|
Self::TreesSavanna => "trees_savanna",
|
||||||
|
Self::TreesSnowy => "trees_snowy",
|
||||||
|
Self::TreesSparseJungle => "trees_sparse_jungle",
|
||||||
|
Self::TreesSwamp => "trees_swamp",
|
||||||
|
Self::TreesTaiga => "trees_taiga",
|
||||||
|
Self::TreesWater => "trees_water",
|
||||||
|
Self::TreesWindsweptForest => "trees_windswept_forest",
|
||||||
|
Self::TreesWindsweptHills => "trees_windswept_hills",
|
||||||
|
Self::TreesWindsweptSavanna => "trees_windswept_savanna",
|
||||||
|
Self::TwistingVines => "twisting_vines",
|
||||||
|
Self::UnderwaterMagma => "underwater_magma",
|
||||||
|
Self::Vines => "vines",
|
||||||
|
Self::VoidStartPlatform => "void_start_platform",
|
||||||
|
Self::WarmOceanVegetation => "warm_ocean_vegetation",
|
||||||
|
Self::WarpedForestVegetation => "warped_forest_vegetation",
|
||||||
|
Self::WarpedFungi => "warped_fungi",
|
||||||
|
Self::WeepingVines => "weeping_vines",
|
||||||
|
Self::WildflowersBirchForest => "wildflowers_birch_forest",
|
||||||
|
Self::WildflowersMeadow => "wildflowers_meadow",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@ -184,6 +184,10 @@ pub mod world {
|
|||||||
pub use super::world_event::*;
|
pub use super::world_event::*;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[rustfmt::skip]
|
||||||
|
#[path = "generated/placed_feature.rs"]
|
||||||
|
pub mod placed_feature;
|
||||||
|
|
||||||
#[cfg(feature = "scoreboard")]
|
#[cfg(feature = "scoreboard")]
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
#[path = "generated/scoreboard_slot.rs"]
|
#[path = "generated/scoreboard_slot.rs"]
|
||||||
|
|||||||
@ -150,7 +150,7 @@ impl ConfiguredFeature {
|
|||||||
block_registry: &dyn WorldPortalExt,
|
block_registry: &dyn WorldPortalExt,
|
||||||
min_y: i8,
|
min_y: i8,
|
||||||
height: u16,
|
height: u16,
|
||||||
feature_name: &str, // This placed feature
|
feature_name: pumpkin_data::placed_feature::PlacedFeature, // This placed feature
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -23,7 +23,7 @@ impl BambooFeature {
|
|||||||
block_registry: &dyn WorldPortalExt,
|
block_registry: &dyn WorldPortalExt,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str, // This placed feature
|
_feature: pumpkin_data::placed_feature::PlacedFeature, // This placed feature
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -25,7 +25,7 @@ impl BasaltColumnsFeature {
|
|||||||
_block_registry: &dyn WorldPortalExt,
|
_block_registry: &dyn WorldPortalExt,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height_limit: u16,
|
_height_limit: u16,
|
||||||
_feature: &str,
|
_feature: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -30,7 +30,7 @@ impl BlockColumnFeature {
|
|||||||
block_registry: &dyn WorldPortalExt,
|
block_registry: &dyn WorldPortalExt,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str, // This placed feature
|
_feature: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -20,7 +20,7 @@ impl ChorusPlantFeature {
|
|||||||
chunk: &mut T,
|
chunk: &mut T,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str,
|
_feature: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -17,7 +17,7 @@ impl CoralClawFeature {
|
|||||||
block_registry: &dyn WorldPortalExt,
|
block_registry: &dyn WorldPortalExt,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str, // This placed feature
|
_feature: pumpkin_data::placed_feature::PlacedFeature, // This placed feature
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -17,7 +17,7 @@ impl CoralMushroomFeature {
|
|||||||
block_registry: &dyn WorldPortalExt,
|
block_registry: &dyn WorldPortalExt,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str, // This placed feature
|
_feature: pumpkin_data::placed_feature::PlacedFeature, // This placed feature
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -17,7 +17,7 @@ impl CoralTreeFeature {
|
|||||||
block_registry: &dyn WorldPortalExt,
|
block_registry: &dyn WorldPortalExt,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str, // This placed feature
|
_feature: pumpkin_data::placed_feature::PlacedFeature, // This placed feature
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -19,7 +19,7 @@ impl DesertWellFeature {
|
|||||||
chunk: &mut T,
|
chunk: &mut T,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str, // This placed feature
|
_feature: pumpkin_data::placed_feature::PlacedFeature, // This placed feature
|
||||||
_random: &mut RandomGenerator,
|
_random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -22,7 +22,7 @@ impl DiskFeature {
|
|||||||
block_registry: &dyn WorldPortalExt,
|
block_registry: &dyn WorldPortalExt,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str,
|
_feature: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -14,7 +14,7 @@ impl EndIslandFeature {
|
|||||||
chunk: &mut T,
|
chunk: &mut T,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str,
|
_feature: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -17,7 +17,7 @@ impl EndPlatformFeature {
|
|||||||
_block_registry: &dyn WorldPortalExt,
|
_block_registry: &dyn WorldPortalExt,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str, // This placed feature
|
_feature: pumpkin_data::placed_feature::PlacedFeature, // This placed feature
|
||||||
_random: &mut RandomGenerator,
|
_random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -40,7 +40,7 @@ impl EndSpikeFeature {
|
|||||||
_block_registry: &dyn WorldPortalExt,
|
_block_registry: &dyn WorldPortalExt,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str, // This placed feature
|
_feature: pumpkin_data::placed_feature::PlacedFeature, // This placed feature
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -12,7 +12,7 @@ impl FallenTreeFeature {
|
|||||||
_chunk: &mut ProtoChunk,
|
_chunk: &mut ProtoChunk,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str, // This placed feature
|
_feature: pumpkin_data::placed_feature::PlacedFeature, // This placed feature
|
||||||
_random: &mut RandomGenerator,
|
_random: &mut RandomGenerator,
|
||||||
_pos: BlockPos,
|
_pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -14,7 +14,7 @@ impl FreezeTopLayerFeature {
|
|||||||
chunk: &mut T,
|
chunk: &mut T,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature_name: &str,
|
_feature_name: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
_random: &mut RandomGenerator,
|
_random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -105,7 +105,7 @@ impl GeodeFeature {
|
|||||||
_block_registry: &dyn WorldPortalExt,
|
_block_registry: &dyn WorldPortalExt,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature_name: &str,
|
_feature_name: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -14,7 +14,7 @@ impl GlowstoneBlobFeature {
|
|||||||
chunk: &mut T,
|
chunk: &mut T,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str,
|
_feature: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -14,7 +14,7 @@ impl IceSpikeFeature {
|
|||||||
chunk: &mut T,
|
chunk: &mut T,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str,
|
_feature: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -20,7 +20,7 @@ impl IcebergFeature {
|
|||||||
chunk: &mut T,
|
chunk: &mut T,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str,
|
_feature: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -16,7 +16,7 @@ impl KelpFeature {
|
|||||||
chunk: &mut T,
|
chunk: &mut T,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str,
|
_feature: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -26,7 +26,7 @@ impl DungeonFeature {
|
|||||||
chunk: &mut T,
|
chunk: &mut T,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str,
|
_feature: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -21,7 +21,7 @@ impl NetherForestVegetationFeature {
|
|||||||
block_registry: &dyn WorldPortalExt,
|
block_registry: &dyn WorldPortalExt,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str,
|
_feature: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -21,7 +21,7 @@ impl ReplaceBlobsFeature {
|
|||||||
_block_registry: &dyn WorldPortalExt,
|
_block_registry: &dyn WorldPortalExt,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str, // This placed feature
|
_feature: pumpkin_data::placed_feature::PlacedFeature, // This placed feature
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -28,7 +28,7 @@ impl OreFeature {
|
|||||||
_block_registry: &dyn WorldPortalExt,
|
_block_registry: &dyn WorldPortalExt,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str, // This placed feature
|
_feature: pumpkin_data::placed_feature::PlacedFeature, // This placed feature
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -19,7 +19,7 @@ impl RandomBooleanFeature {
|
|||||||
block_registry: &dyn WorldPortalExt,
|
block_registry: &dyn WorldPortalExt,
|
||||||
min_y: i8,
|
min_y: i8,
|
||||||
height: u16,
|
height: u16,
|
||||||
feature_name: &str, // This placed feature
|
feature_name: pumpkin_data::placed_feature::PlacedFeature, // This placed feature
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -21,7 +21,7 @@ impl RandomPatchFeature {
|
|||||||
block_registry: &dyn WorldPortalExt,
|
block_registry: &dyn WorldPortalExt,
|
||||||
min_y: i8,
|
min_y: i8,
|
||||||
height: u16,
|
height: u16,
|
||||||
feature: &str,
|
feature: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -24,7 +24,7 @@ impl RandomFeature {
|
|||||||
block_registry: &dyn WorldPortalExt,
|
block_registry: &dyn WorldPortalExt,
|
||||||
min_y: i8,
|
min_y: i8,
|
||||||
height: u16,
|
height: u16,
|
||||||
feature_name: &str, // This placed feature
|
feature_name: pumpkin_data::placed_feature::PlacedFeature, // This placed feature
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -32,7 +32,7 @@ impl RootSystemFeature {
|
|||||||
block_registry: &dyn WorldPortalExt,
|
block_registry: &dyn WorldPortalExt,
|
||||||
min_y: i8,
|
min_y: i8,
|
||||||
height: u16,
|
height: u16,
|
||||||
feature_name: &str,
|
feature_name: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -22,7 +22,7 @@ impl ScatteredOreFeature {
|
|||||||
_block_registry: &dyn WorldPortalExt,
|
_block_registry: &dyn WorldPortalExt,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str,
|
_feature: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -18,7 +18,7 @@ impl SeaPickleFeature {
|
|||||||
chunk: &mut T,
|
chunk: &mut T,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str, // This placed feature
|
_feature: pumpkin_data::placed_feature::PlacedFeature, // This placed feature
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -18,7 +18,7 @@ impl SeagrassFeature {
|
|||||||
chunk: &mut T,
|
chunk: &mut T,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str, // This placed feature
|
_feature: pumpkin_data::placed_feature::PlacedFeature, // This placed feature
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -18,7 +18,7 @@ impl SimpleRandomFeature {
|
|||||||
block_registry: &dyn WorldPortalExt,
|
block_registry: &dyn WorldPortalExt,
|
||||||
min_y: i8,
|
min_y: i8,
|
||||||
height: u16,
|
height: u16,
|
||||||
feature_name: &str, // This placed feature
|
feature_name: pumpkin_data::placed_feature::PlacedFeature, // This placed feature
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -42,7 +42,7 @@ impl TreeFeature {
|
|||||||
chunk: &mut T,
|
chunk: &mut T,
|
||||||
min_y: i8,
|
min_y: i8,
|
||||||
height: u16,
|
height: u16,
|
||||||
feature_name: &str, // This placed feature
|
feature_name: pumpkin_data::placed_feature::PlacedFeature, // This placed feature
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
@ -90,7 +90,7 @@ impl TreeFeature {
|
|||||||
chunk: &mut T,
|
chunk: &mut T,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature_name: &str, // This placed feature
|
_feature_name: pumpkin_data::placed_feature::PlacedFeature, // This placed feature
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> (Vec<BlockPos>, Vec<BlockPos>, Vec<BlockPos>) {
|
) -> (Vec<BlockPos>, Vec<BlockPos>, Vec<BlockPos>) {
|
||||||
|
|||||||
@ -18,7 +18,7 @@ impl TwistingVinesFeature {
|
|||||||
chunk: &mut T,
|
chunk: &mut T,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature_name: &str,
|
_feature_name: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -79,7 +79,7 @@ impl UnderwaterMagmaFeature {
|
|||||||
chunk: &mut T,
|
chunk: &mut T,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature_name: &str,
|
_feature_name: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -44,7 +44,7 @@ impl VegetationPatchFeature {
|
|||||||
block_registry: &dyn WorldPortalExt,
|
block_registry: &dyn WorldPortalExt,
|
||||||
min_y: i8,
|
min_y: i8,
|
||||||
height: u16,
|
height: u16,
|
||||||
feature_name: &str,
|
feature_name: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
@ -200,7 +200,7 @@ impl VegetationPatchFeature {
|
|||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
min_y: i8,
|
min_y: i8,
|
||||||
height: u16,
|
height: u16,
|
||||||
feature_name: &str,
|
feature_name: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
surface: &HashSet<BlockPos>,
|
surface: &HashSet<BlockPos>,
|
||||||
) {
|
) {
|
||||||
let opposite_dir = self.surface_direction().opposite();
|
let opposite_dir = self.surface_direction().opposite();
|
||||||
|
|||||||
@ -14,7 +14,7 @@ impl VinesFeature {
|
|||||||
_block_registry: &dyn WorldPortalExt,
|
_block_registry: &dyn WorldPortalExt,
|
||||||
_min_y: i8,
|
_min_y: i8,
|
||||||
_height: u16,
|
_height: u16,
|
||||||
_feature: &str,
|
_feature: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
_random: &mut RandomGenerator,
|
_random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -23,7 +23,7 @@ impl WaterloggedVegetationPatchFeature {
|
|||||||
block_registry: &dyn WorldPortalExt,
|
block_registry: &dyn WorldPortalExt,
|
||||||
min_y: i8,
|
min_y: i8,
|
||||||
height: u16,
|
height: u16,
|
||||||
feature_name: &str,
|
feature_name: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
@ -101,7 +101,7 @@ impl WaterloggedVegetationPatchFeature {
|
|||||||
block_registry: &dyn WorldPortalExt,
|
block_registry: &dyn WorldPortalExt,
|
||||||
min_y: i8,
|
min_y: i8,
|
||||||
height: u16,
|
height: u16,
|
||||||
feature_name: &str,
|
feature_name: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
placement_pos: BlockPos,
|
placement_pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
|||||||
@ -19,20 +19,19 @@ use crate::world::WorldPortalExt;
|
|||||||
|
|
||||||
use super::configured_features::{CONFIGURED_FEATURES, ConfiguredFeature};
|
use super::configured_features::{CONFIGURED_FEATURES, ConfiguredFeature};
|
||||||
|
|
||||||
pub static PLACED_FEATURES: LazyLock<HashMap<String, PlacedFeature>> =
|
pub static PLACED_FEATURES: LazyLock<
|
||||||
LazyLock::new(build_placed_features);
|
HashMap<pumpkin_data::placed_feature::PlacedFeature, PlacedFeature>,
|
||||||
|
> = LazyLock::new(build_placed_features);
|
||||||
|
|
||||||
pub enum PlacedFeatureWrapper {
|
pub enum PlacedFeatureWrapper {
|
||||||
Direct(PlacedFeature),
|
Direct(PlacedFeature),
|
||||||
Named(String),
|
Named(pumpkin_data::placed_feature::PlacedFeature),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PlacedFeatureWrapper {
|
impl PlacedFeatureWrapper {
|
||||||
pub fn get(&self) -> &PlacedFeature {
|
pub fn get(&self) -> &PlacedFeature {
|
||||||
match self {
|
match self {
|
||||||
Self::Named(name) => PLACED_FEATURES
|
Self::Named(name) => PLACED_FEATURES.get(name).unwrap(),
|
||||||
.get(name.strip_prefix("minecraft:").unwrap_or(name))
|
|
||||||
.unwrap(),
|
|
||||||
Self::Direct(feature) => feature,
|
Self::Direct(feature) => feature,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -57,7 +56,7 @@ impl PlacedFeature {
|
|||||||
block_registry: &dyn WorldPortalExt,
|
block_registry: &dyn WorldPortalExt,
|
||||||
min_y: i8,
|
min_y: i8,
|
||||||
height: u16,
|
height: u16,
|
||||||
feature_name: &str, // This placed feature
|
feature_name: pumpkin_data::placed_feature::PlacedFeature, // This placed feature
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
@ -132,7 +131,7 @@ impl PlacementModifier {
|
|||||||
block_registry: &dyn WorldPortalExt,
|
block_registry: &dyn WorldPortalExt,
|
||||||
min_y: i8,
|
min_y: i8,
|
||||||
height: u16,
|
height: u16,
|
||||||
feature: &str,
|
feature: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> Box<dyn Iterator<Item = BlockPos>> {
|
) -> Box<dyn Iterator<Item = BlockPos>> {
|
||||||
@ -340,7 +339,7 @@ impl ConditionalPlacementModifier for BlockFilterPlacementModifier {
|
|||||||
fn should_place<T: GenerationCache>(
|
fn should_place<T: GenerationCache>(
|
||||||
&self,
|
&self,
|
||||||
block_registry: &dyn WorldPortalExt,
|
block_registry: &dyn WorldPortalExt,
|
||||||
_feature: &str,
|
_feature: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
chunk: &T,
|
chunk: &T,
|
||||||
_random: &mut RandomGenerator,
|
_random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
@ -359,7 +358,7 @@ impl ConditionalPlacementModifier for SurfaceThresholdFilterPlacementModifier {
|
|||||||
fn should_place<T: GenerationCache>(
|
fn should_place<T: GenerationCache>(
|
||||||
&self,
|
&self,
|
||||||
_block_registry: &dyn WorldPortalExt,
|
_block_registry: &dyn WorldPortalExt,
|
||||||
_feature: &str,
|
_feature: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
chunk: &T,
|
chunk: &T,
|
||||||
_random: &mut RandomGenerator,
|
_random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
@ -379,7 +378,7 @@ impl ConditionalPlacementModifier for RarityFilterPlacementModifier {
|
|||||||
fn should_place<T: GenerationCache>(
|
fn should_place<T: GenerationCache>(
|
||||||
&self,
|
&self,
|
||||||
_block_registry: &dyn WorldPortalExt,
|
_block_registry: &dyn WorldPortalExt,
|
||||||
_feature: &str,
|
_feature: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
_chunk: &T,
|
_chunk: &T,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
_pos: BlockPos,
|
_pos: BlockPos,
|
||||||
@ -419,7 +418,7 @@ impl ConditionalPlacementModifier for SurfaceWaterDepthFilterPlacementModifier {
|
|||||||
fn should_place<T: GenerationCache>(
|
fn should_place<T: GenerationCache>(
|
||||||
&self,
|
&self,
|
||||||
_block_registry: &dyn WorldPortalExt,
|
_block_registry: &dyn WorldPortalExt,
|
||||||
_feature: &str,
|
_feature: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
chunk: &T,
|
chunk: &T,
|
||||||
_random: &mut RandomGenerator,
|
_random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
@ -436,16 +435,15 @@ impl ConditionalPlacementModifier for BiomePlacementModifier {
|
|||||||
fn should_place<T: GenerationCache>(
|
fn should_place<T: GenerationCache>(
|
||||||
&self,
|
&self,
|
||||||
_block_registry: &dyn WorldPortalExt,
|
_block_registry: &dyn WorldPortalExt,
|
||||||
this_feature: &str,
|
this_feature: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
chunk: &T,
|
chunk: &T,
|
||||||
_random: &mut RandomGenerator,
|
_random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
let name = format!("minecraft:{this_feature}");
|
|
||||||
let biome = chunk.get_biome_for_terrain_gen(pos.0.x, pos.0.y, pos.0.z);
|
let biome = chunk.get_biome_for_terrain_gen(pos.0.x, pos.0.y, pos.0.z);
|
||||||
|
|
||||||
for feature in biome.features {
|
for step in biome.features {
|
||||||
if feature.contains(&&*name) {
|
if step.contains(&this_feature) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -512,7 +510,7 @@ pub trait ConditionalPlacementModifier {
|
|||||||
&self,
|
&self,
|
||||||
block_registry: &dyn WorldPortalExt,
|
block_registry: &dyn WorldPortalExt,
|
||||||
chunk: &T,
|
chunk: &T,
|
||||||
feature: &str,
|
feature: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
) -> Box<dyn Iterator<Item = BlockPos>> {
|
) -> Box<dyn Iterator<Item = BlockPos>> {
|
||||||
@ -526,7 +524,7 @@ pub trait ConditionalPlacementModifier {
|
|||||||
fn should_place<T: GenerationCache>(
|
fn should_place<T: GenerationCache>(
|
||||||
&self,
|
&self,
|
||||||
block_registry: &dyn WorldPortalExt,
|
block_registry: &dyn WorldPortalExt,
|
||||||
feature: &str,
|
feature: pumpkin_data::placed_feature::PlacedFeature,
|
||||||
chunk: &T,
|
chunk: &T,
|
||||||
random: &mut RandomGenerator,
|
random: &mut RandomGenerator,
|
||||||
pos: BlockPos,
|
pos: BlockPos,
|
||||||
|
|||||||
@ -995,8 +995,7 @@ impl ProtoChunk {
|
|||||||
&& let Some(features_at_step) = biome.features.get(step)
|
&& let Some(features_at_step) = biome.features.get(step)
|
||||||
{
|
{
|
||||||
for &feature_id in *features_at_step {
|
for &feature_id in *features_at_step {
|
||||||
features_to_run
|
features_to_run.push(feature_id);
|
||||||
.push(feature_id.strip_prefix("minecraft:").unwrap_or(feature_id));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1004,8 +1003,8 @@ impl ProtoChunk {
|
|||||||
features_to_run.sort_unstable();
|
features_to_run.sort_unstable();
|
||||||
features_to_run.dedup();
|
features_to_run.dedup();
|
||||||
|
|
||||||
for (p, feature_id) in features_to_run.into_iter().enumerate() {
|
for (p, feature_enum) in features_to_run.into_iter().enumerate() {
|
||||||
if let Some(feature) = PLACED_FEATURES.get(feature_id) {
|
if let Some(feature) = PLACED_FEATURES.get(&feature_enum) {
|
||||||
let decorator_seed = get_decorator_seed(population_seed, p as u64, step as u64);
|
let decorator_seed = get_decorator_seed(population_seed, p as u64, step as u64);
|
||||||
let mut random =
|
let mut random =
|
||||||
RandomGenerator::Xoroshiro(Xoroshiro::from_seed(decorator_seed));
|
RandomGenerator::Xoroshiro(Xoroshiro::from_seed(decorator_seed));
|
||||||
@ -1015,7 +1014,7 @@ impl ProtoChunk {
|
|||||||
block_registry,
|
block_registry,
|
||||||
min_y as i8,
|
min_y as i8,
|
||||||
height as u16,
|
height as u16,
|
||||||
feature_id,
|
feature_enum,
|
||||||
&mut random,
|
&mut random,
|
||||||
origin_pos,
|
origin_pos,
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user