API reference / @jsprismarine/prismarine / inventory/ItemContainer
inventory/ItemContainer
Classes
Functions
slotCountOf()
slotCountOf(
size):number
Defined in: packages/prismarine/src/inventory/ItemContainer.ts:31
A number of slots as a whole count: a fraction rounds down, and a negative or non-finite number is no slots at all.
Parameters
size
number
Returns
number
stacksWith()
stacksWith(
held,incoming):boolean
Defined in: packages/prismarine/src/inventory/ItemContainer.ts:20
Whether two stacks would sit in one slot: the same item with the same data, whatever their counts and stack network ids, which is Java's ItemStack.isSameItemSameComponents. A named or enchanted stack does not take in a plain one.
Parameters
held
incoming
Returns
boolean
Java Source
ItemStack.isSameItemSameComponents