addItem
addItem(
entity,stack):number
Puts stack in the entity’s bag: into the stacks it can merge with
first, then into empty slots, each up to the item’s max stack. Returns
the count it took, which is less than asked where the bag is full, and
none on an entity with no bag.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
entity |
Entity |
stack |
ItemStack |
Returns
Section titled “Returns”number