#[repr(transparent)]pub struct BlockState(pub u32);
Tuple Fields§
§0: u32
Implementations§
Source§impl BlockState
impl BlockState
pub const AIR: BlockState
pub const WATER: BlockState
pub const STONE: BlockState
pub fn from(id: u32, data: u16) -> BlockState
pub fn id(&self) -> u32
pub fn kind(&self) -> BlockKind
pub fn simple_type(&self) -> SimpleType
pub fn metadata(&self) -> u8
pub fn full_block(&self) -> bool
pub fn is_water(&self) -> bool
pub fn walk_through(&self) -> bool
pub fn no_motion_effect(&self) -> bool
Trait Implementations§
Source§impl Clone for BlockState
impl Clone for BlockState
Source§fn clone(&self) -> BlockState
fn clone(&self) -> BlockState
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BlockState
impl Debug for BlockState
Source§impl Default for BlockState
impl Default for BlockState
Source§fn default() -> BlockState
fn default() -> BlockState
Returns the “default value” for a type. Read more
Source§impl Hash for BlockState
impl Hash for BlockState
Source§impl PartialEq for BlockState
impl PartialEq for BlockState
impl Copy for BlockState
impl Eq for BlockState
impl StructuralPartialEq for BlockState
Auto Trait Implementations§
impl Freeze for BlockState
impl RefUnwindSafe for BlockState
impl Send for BlockState
impl Sync for BlockState
impl Unpin for BlockState
impl UnwindSafe for BlockState
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,
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 more