finds the item at the specified data slot
(slot item.DataSlot)
| 63 | |
| 64 | // finds the item at the specified data slot |
| 65 | func (c Container) Slot(slot item.DataSlot) (item.Item, bool) { |
| 66 | for _, item := range c { |
| 67 | if item.Slot == slot { |
| 68 | return item, true |
| 69 | } |
| 70 | } |
| 71 | return item.Air, false |
| 72 | } |
| 73 | |
| 74 | func (c *Container) Merge(slot item.DataSlot, carriedItem *item.Item) { |
| 75 | if carriedItem.Is(item.Air) { |