Class ItemStack
- Namespace
- Obsidian.API.Inventory
- Assembly
- Obsidian.API.dll
public sealed class ItemStack : DataComponentsStorage, IEnumerable<IDataComponent>, IEnumerable, IEquatable<ItemStack>
- Inheritance
-
ItemStack
- Implements
-
- Inherited Members
-
Constructors
ItemStack(Item, int, params List<IDataComponent>)
public ItemStack(Item holder, int count = 1, params List<IDataComponent> components)
Parameters
holder
Item
count
int
components
List<IDataComponent>
Fields
Air
public static readonly ItemStack Air
Field Value
- ItemStack
Properties
Count
public int Count { get; set; }
Property Value
- int
CustomName
public ChatMessage? CustomName { get; }
Property Value
- ChatMessage
Damage
public int Damage { get; }
Property Value
- int
Holder
public Item Holder { get; }
Property Value
- Item
IsAir
public bool IsAir { get; }
Property Value
- bool
ItemName
public ChatMessage? ItemName { get; }
Property Value
- ChatMessage
MaxStackSize
public int MaxStackSize { get; }
Property Value
- int
Type
public Material Type { get; }
Property Value
- Material
Unbreakable
public bool Unbreakable { get; }
Property Value
- bool
Methods
Equals(ItemStack?)
public bool Equals(ItemStack? other)
Parameters
other
ItemStack
Returns
- bool
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
- bool
GetHashCode()
public override int GetHashCode()
Returns
- int
Operators
operator +(ItemStack, ItemStack)
public static ItemStack operator +(ItemStack item, ItemStack value)
Parameters
item
ItemStack
value
ItemStack
Returns
- ItemStack
operator +(ItemStack, int)
public static ItemStack operator +(ItemStack item, int value)
Parameters
item
ItemStack
value
int
Returns
- ItemStack
operator ==(ItemStack?, ItemStack?)
public static bool operator ==(ItemStack? left, ItemStack? right)
Parameters
left
ItemStack
right
ItemStack
Returns
- bool
operator !=(ItemStack?, ItemStack?)
public static bool operator !=(ItemStack? left, ItemStack? right)
Parameters
left
ItemStack
right
ItemStack
Returns
- bool
operator -(ItemStack, int)
public static ItemStack operator -(ItemStack item, int value)
Parameters
item
ItemStack
value
int
Returns
- ItemStack