Enum MenuSlotBacking
#[non_exhaustive]pub enum MenuSlotBacking {
Player(usize),
BlockEntity {
level: LevelRef,
pos: [i32; 3],
slot: usize,
},
Entity {
entity: EntityRef,
slot: usize,
},
Ender(usize),
CraftGrid(usize),
CraftResult,
Native(usize),
}Expand description
What a menu slot shows: where MenuRef::slot_backing says its stack lives.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Player(usize)
Index .0 of the menu’s player’s ENTITY_ITEMS: the inventory
0..36, the armour 36..40 from feet to head, the off hand 40.
BlockEntity
Slot slot of the block entity at pos, through its ITEMS handler.
Fields
Entity
Slot slot of entity’s ENTITY_ITEMS: a chest minecart’s, a
chest boat’s or a chested mount’s.
Fields
Ender(usize)
Slot .0 of the player’s ender chest.
CraftGrid(usize)
Slot .0 of the player’s inventory crafting grid, 0..4.
CraftResult
The inventory crafting grid’s result, which nothing writes: a craft is a click.
Native(usize)
Slot .0 of a mod’s chest menu (open_menu).
Trait Implementations§
§impl Clone for MenuSlotBacking
impl Clone for MenuSlotBacking
§fn clone(&self) -> MenuSlotBacking
fn clone(&self) -> MenuSlotBacking
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 moreimpl Copy for MenuSlotBacking
§impl Debug for MenuSlotBacking
impl Debug for MenuSlotBacking
impl Eq for MenuSlotBacking
§impl PartialEq for MenuSlotBacking
impl PartialEq for MenuSlotBacking
impl StructuralPartialEq for MenuSlotBacking
Auto Trait Implementations§
impl Freeze for MenuSlotBacking
impl RefUnwindSafe for MenuSlotBacking
impl Send for MenuSlotBacking
impl Sync for MenuSlotBacking
impl Unpin for MenuSlotBacking
impl UnsafeUnpin for MenuSlotBacking
impl UnwindSafe for MenuSlotBacking
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