pub struct Fluid {
pub kind: FluidKind,
pub level: u8,
}Expand description
A fluid occupying a block state.
Fields§
§kind: FluidKindKind of fluid.
level: u8Vanilla level value (0 = source, 1..=7 flowing, 8..=15 falling). Waterlogged / always-wet
blocks report 0.
Implementations§
Source§impl Fluid
impl Fluid
Sourcepub const fn amount(self) -> u8
pub const fn amount(self) -> u8
Vanilla FluidState amount 1..=8: source 8, flowing 8 - level, falling 8
(FluidBlock.getFluidState maps level >= 8 to falling with amount 8).
Trait Implementations§
impl Copy for Fluid
impl Eq for Fluid
impl StructuralPartialEq for Fluid
Auto Trait Implementations§
impl Forget for Fluid
impl Freeze for Fluid
impl RefUnwindSafe for Fluid
impl Send for Fluid
impl Sync for Fluid
impl Unpin for Fluid
impl UnsafeUnpin for Fluid
impl UnwindSafe for Fluid
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