Struct ModEnergyBuffer
pub struct ModEnergyBuffer {
pub capacity: i32,
pub max_insert: i32,
pub max_extract: i32,
pub insert_faces: [bool; 6],
pub extract_faces: [bool; 6],
}Expand description
The energy buffer of a mod block’s block entity (NeoForge’s
SimpleEnergyHandler): its capacity, the most one insert and one extract
moves, and the faces a fill may come through and a drain may leave by.
The amount is not here: it lives in the entity’s saved compound, under
energy, so it survives restarts and the block’s own tick reads it.
Fields§
§capacity: i32§max_insert: i32The most one insert moves; 0 takes none.
max_extract: i32The most one extract moves; 0 gives none.
insert_faces: [bool; 6]The faces, by Direction number, a fill may come through.
extract_faces: [bool; 6]The faces a drain may leave by.
Trait Implementations§
§impl Clone for ModEnergyBuffer
impl Clone for ModEnergyBuffer
§fn clone(&self) -> ModEnergyBuffer
fn clone(&self) -> ModEnergyBuffer
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 ModEnergyBuffer
impl Debug for ModEnergyBuffer
§impl Default for ModEnergyBuffer
impl Default for ModEnergyBuffer
§fn default() -> ModEnergyBuffer
fn default() -> ModEnergyBuffer
Returns the “default value” for a type. Read more
impl Eq for ModEnergyBuffer
§impl PartialEq for ModEnergyBuffer
impl PartialEq for ModEnergyBuffer
impl StructuralPartialEq for ModEnergyBuffer
Auto Trait Implementations§
impl Freeze for ModEnergyBuffer
impl RefUnwindSafe for ModEnergyBuffer
impl Send for ModEnergyBuffer
impl Sync for ModEnergyBuffer
impl Unpin for ModEnergyBuffer
impl UnsafeUnpin for ModEnergyBuffer
impl UnwindSafe for ModEnergyBuffer
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