pub struct Beardifier {
rigids: Vec<Rigid>,
junctions: Vec<JigsawJunction>,
affected_box: Option<BoundingBox>,
}Expand description
Computes terrain density contributions from nearby structure pieces and junctions.
Built per-chunk from the chunk’s own starts plus referenced neighbor starts (mirrors
vanilla’s StructureManager.startsForStructure). Queried per-block by NoiseChunk::fill
after the outer density-function ops, matching vanilla’s cacheAllInCell(add(final_density, beardifier)) integration.
Fields§
§rigids: Vec<Rigid>§junctions: Vec<JigsawJunction>§affected_box: Option<BoundingBox>Union of all piece/junction bounding boxes inflated by 24. Points outside this box get 0.0 without iterating pieces.
Implementations§
Source§impl Beardifier
impl Beardifier
Sourcepub fn for_structures_in_chunk<'a, I>(
starts: I,
chunk_x: i32,
chunk_z: i32,
) -> Selfwhere
I: IntoIterator<Item = &'a StructureStart>,
pub fn for_structures_in_chunk<'a, I>(
starts: I,
chunk_x: i32,
chunk_z: i32,
) -> Selfwhere
I: IntoIterator<Item = &'a StructureStart>,
Collect rigid pieces and junctions from structure starts that affect this chunk.
starts should yield every StructureStart whose pieces could affect this chunk —
typically the chunk’s own starts plus all referenced neighbor starts (vanilla collects
these via StructureManager.startsForStructure).
chunk_x and chunk_z are chunk coordinates (not block coordinates).
Mirrors vanilla’s forStructuresInChunk:
- Non-jigsaw pieces (
projection: None) → added as rigid withground_level_delta = 0. - Jigsaw RIGID pieces → added as rigid with stored
ground_level_delta, junctions collected. - Jigsaw
TERRAIN_MATCHINGpieces → not added as rigid; junctions still collected.
Auto Trait Implementations§
impl Freeze for Beardifier
impl RefUnwindSafe for Beardifier
impl Send for Beardifier
impl Sync for Beardifier
impl Unpin for Beardifier
impl UnsafeUnpin for Beardifier
impl UnwindSafe for Beardifier
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
§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> ⓘ
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> ⓘ
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 moreArc<SyncMutex<>>