pub struct StructurePiece {
pub piece_type: Identifier,
pub bounding_box: BoundingBox,
pub gen_depth: i32,
pub orientation: Option<Direction>,
pub payload: StructurePiecePayload,
pub ground_level_delta: i32,
pub junctions: Vec<JigsawJunction>,
pub projection: Option<Projection>,
}Expand description
Vanilla’s StructurePiece runtime state.
Fields§
§piece_type: IdentifierPiece type id (e.g., minecraft:jigsaw).
bounding_box: BoundingBoxWorld-space bounding box.
gen_depth: i32Distance from the start piece in the piece tree.
orientation: Option<Direction>Horizontal orientation; None for unoriented pieces.
payload: StructurePiecePayloadType-specific data used by the structure-piece placement stage.
ground_level_delta: i32Offset from piece minY to ground level. Used by Beardifier. Default 0 for non-jigsaw.
junctions: Vec<JigsawJunction>Junctions for Beardifier terrain adaptation.
projection: Option<Projection>Jigsaw projection. None for non-jigsaw pieces.
Beardifier treats Some(Rigid) and None as terrain-adapting, but skips
Some(TerrainMatching) from the rigid set (still collecting junctions).
Mirrors vanilla’s piece instanceof PoolElementStructurePiece + Projection.RIGID check.
Implementations§
Source§impl StructurePiece
impl StructurePiece
Sourcepub const fn non_jigsaw(
piece_type: Identifier,
bounding_box: BoundingBox,
gen_depth: i32,
orientation: Option<Direction>,
) -> Self
pub const fn non_jigsaw( piece_type: Identifier, bounding_box: BoundingBox, gen_depth: i32, orientation: Option<Direction>, ) -> Self
Creates a non-jigsaw piece with vanilla’s default non-pool metadata.
Trait Implementations§
Source§impl Clone for StructurePiece
impl Clone for StructurePiece
Source§fn clone(&self) -> StructurePiece
fn clone(&self) -> StructurePiece
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StructurePiece
impl RefUnwindSafe for StructurePiece
impl Send for StructurePiece
impl Sync for StructurePiece
impl Unpin for StructurePiece
impl UnsafeUnpin for StructurePiece
impl UnwindSafe for StructurePiece
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>