#[repr(u8)]pub enum BlockFlag {
Opaque = 1,
Grass = 2,
Foliage = 4,
Birch = 8,
Spruce = 16,
Water = 32,
WallSign = 64,
}Expand description
Flags describing special properties of BlockTypes
Variants§
Opaque = 1
The block type is opaque
Grass = 2
The block type is colored using biome grass colors
Foliage = 4
The block type is colored using biome foliage colors
Birch = 8
The block type is birch foliage
Spruce = 16
The block type is spruce foliage
Water = 32
The block type is colored using biome water colors
WallSign = 64
The block type is a wall sign
The WallSign flag is used to distinguish wall signs from freestanding or -hanging signs.
Trait Implementations§
Source§impl BitFlag for BlockFlag
impl BitFlag for BlockFlag
Source§fn empty() -> BitFlags<Self>
fn empty() -> BitFlags<Self>
Create a
BitFlags with no flags set (in other words, with a value of 0). Read moreSource§fn from_bits(bits: Self::Numeric) -> Result<BitFlags<Self>, FromBitsError<Self>>
fn from_bits(bits: Self::Numeric) -> Result<BitFlags<Self>, FromBitsError<Self>>
Create a
BitFlags if the raw value provided does not contain
any illegal flags. Read moreSource§fn from_bits_truncate(bits: Self::Numeric) -> BitFlags<Self>
fn from_bits_truncate(bits: Self::Numeric) -> BitFlags<Self>
Create a
BitFlags from an underlying bitwise value. If any
invalid bits are set, ignore them. Read moreSource§unsafe fn from_bits_unchecked(bits: Self::Numeric) -> BitFlags<Self>
unsafe fn from_bits_unchecked(bits: Self::Numeric) -> BitFlags<Self>
Create a
BitFlags unsafely, without checking if the bits form
a valid bit pattern for the type. Read moreSource§impl<'de> Deserialize<'de> for BlockFlag
impl<'de> Deserialize<'de> for BlockFlag
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl RawBitFlags for BlockFlag
impl RawBitFlags for BlockFlag
impl Copy for BlockFlag
impl StructuralPartialEq for BlockFlag
Auto Trait Implementations§
impl Freeze for BlockFlag
impl RefUnwindSafe for BlockFlag
impl Send for BlockFlag
impl Sync for BlockFlag
impl Unpin for BlockFlag
impl UnsafeUnpin for BlockFlag
impl UnwindSafe for BlockFlag
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