pub struct StructureData {
pub key: Identifier,
pub id: OnceLock<usize>,
pub structure_type: Identifier,
pub allowed_biomes: Vec<Identifier>,
pub spawn_overrides: Vec<StructureSpawnOverrideData>,
pub step: StructureGenerationStep,
pub terrain_adjustment: TerrainAdjustment,
pub config: StructureConfigData,
}Expand description
A registered worldgen structure definition.
Mirrors vanilla’s Structure: common settings are stored here, while
StructureConfigData carries the type-specific codec payload.
Fields§
§key: IdentifierRegistry key, e.g. minecraft:village_plains.
id: OnceLock<usize>Cached registry ID, set during registration for O(1) lookup on hot paths.
structure_type: IdentifierStructure type, e.g. minecraft:jigsaw or minecraft:mineshaft.
allowed_biomes: Vec<Identifier>Biomes this structure can generate in. Tags are resolved at build time.
spawn_overrides: Vec<StructureSpawnOverrideData>Structure-specific mob spawn overrides.
step: StructureGenerationStepGeneration decoration step from the structure JSON.
terrain_adjustment: TerrainAdjustmentTerrain adaptation used by reference inflation and Beardifier.
config: StructureConfigDataType-specific structure config.
Implementations§
Source§impl StructureData
impl StructureData
Sourcepub const fn bb_inflate(&self) -> i32
pub const fn bb_inflate(&self) -> i32
Vanilla inflates the structure start bounding box by 12 for every terrain
adaptation mode except none.
Trait Implementations§
Source§impl Debug for StructureData
impl Debug for StructureData
Auto Trait Implementations§
impl !Freeze for StructureData
impl RefUnwindSafe for StructureData
impl Send for StructureData
impl Sync for StructureData
impl Unpin for StructureData
impl UnsafeUnpin for StructureData
impl UnwindSafe for StructureData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more