Add adds the item to the container and replaces the existing one if found, and returns if the operation was successful
(item item.Item, slot item.DataSlot)
| 57 | |
| 58 | // Add adds the item to the container and replaces the existing one if found, and returns if the operation was successful |
| 59 | func (c *Container) SetAt(item item.Item, slot item.DataSlot) { |
| 60 | item.Slot = slot |
| 61 | c.Set(item) |
| 62 | } |
| 63 | |
| 64 | // finds the item at the specified data slot |
| 65 | func (c Container) Slot(slot item.DataSlot) (item.Item, bool) { |