pub struct CarverBlockIds {
pub air: BlockStateId,
pub cave_air: BlockStateId,
pub lava: BlockStateId,
pub grass_block: BlockStateId,
pub mycelium: BlockStateId,
pub dirt: BlockStateId,
}Expand description
Well-known block state IDs a carver needs. Cached once per apply_carvers
call so the carver loop doesn’t hit the registry in its hot path.
Fields§
§air: BlockStateIdminecraft:air.
cave_air: BlockStateIdminecraft:cave_air (used by the nether carver).
lava: BlockStateIdminecraft:lava (fluid block state).
grass_block: BlockStateIdminecraft:grass_block default state.
mycelium: BlockStateIdminecraft:mycelium default state.
dirt: BlockStateIdminecraft:dirt default state.
Implementations§
Source§impl CarverBlockIds
impl CarverBlockIds
fn load_uncached() -> Self
Sourcepub const fn is_air_like(&self, state: BlockStateId) -> bool
pub const fn is_air_like(&self, state: BlockStateId) -> bool
Returns whether the given state is one of the air variants this
carver uses (i.e. not a fluid). Used by the top-material flow to
decide under_fluid.
Trait Implementations§
Source§impl Clone for CarverBlockIds
impl Clone for CarverBlockIds
Source§fn clone(&self) -> CarverBlockIds
fn clone(&self) -> CarverBlockIds
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 moreimpl Copy for CarverBlockIds
Auto Trait Implementations§
impl Freeze for CarverBlockIds
impl RefUnwindSafe for CarverBlockIds
impl Send for CarverBlockIds
impl Sync for CarverBlockIds
impl Unpin for CarverBlockIds
impl UnsafeUnpin for CarverBlockIds
impl UnwindSafe for CarverBlockIds
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<>>