pub struct ItemStack {
pub count: u32,
pub item_id: u32,
pub components_to_add: Vec<DataComponent>,
pub components_to_remove: Vec<DataComponentType>,
}Expand description
A non-empty item stack carried by a Slot.
Fields§
§count: u32Positive item count.
item_id: u32Numeric ID in the minecraft:item registry.
components_to_add: Vec<DataComponent>Typed component values added to or replacing item defaults.
components_to_remove: Vec<DataComponentType>Component types removed from item defaults.
Implementations§
Trait Implementations§
impl StructuralPartialEq for ItemStack
Auto Trait Implementations§
impl Freeze for ItemStack
impl RefUnwindSafe for ItemStack
impl Send for ItemStack
impl Sync for ItemStack
impl Unpin for ItemStack
impl UnsafeUnpin for ItemStack
impl UnwindSafe for ItemStack
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