Struct FluidResource
pub struct FluidResource(/* private fields */);Expand description
A fluid and its components, without an amount, as NeoForge’s FluidResource: what a tank
holds. An empty tank holds none.
Implementations§
§impl FluidResource
impl FluidResource
pub fn of(stack: &FluidStack) -> FluidResource
pub fn of(stack: &FluidStack) -> FluidResource
What stack is, whatever its amount.
pub fn fluid(&self) -> &FluidIdentity
pub fn fluid(&self) -> &FluidIdentity
The resolved key or unresolved saved identity.
pub fn to_stack(&self, amount: u32) -> FluidStack
pub fn to_stack(&self, amount: u32) -> FluidStack
amount millibuckets of it as a stack.
pub fn matches(&self, stack: &FluidStack) -> bool
pub fn matches(&self, stack: &FluidStack) -> bool
Whether stack is this fluid with these components.
Trait Implementations§
§impl Clone for FluidResource
impl Clone for FluidResource
§fn clone(&self) -> FluidResource
fn clone(&self) -> FluidResource
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 more§impl Debug for FluidResource
impl Debug for FluidResource
impl Eq for FluidResource
§impl PartialEq for FluidResource
impl PartialEq for FluidResource
Auto Trait Implementations§
impl Freeze for FluidResource
impl RefUnwindSafe for FluidResource
impl Send for FluidResource
impl Sync for FluidResource
impl Unpin for FluidResource
impl UnsafeUnpin for FluidResource
impl UnwindSafe for FluidResource
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