| Constructor and Description |
|---|
InventoryView(Inventory parent,
int[] slots)
Creates new inventory view
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<Item> |
get(int slot) |
void |
markChanged()
Tells this inventory that something has changed
|
java.util.Optional<Item> |
remove(int slot)
Removes a one count of the item from a slot.
|
boolean |
set(int slot,
Item stack)
Sets
Item in slot |
int |
size()
Gets count of slots
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic InventoryView(Inventory parent, int[] slots)
parent - Parent inventoryslots - Map of slotspublic boolean set(int slot,
Item stack)
InventoryItem in slotpublic java.util.Optional<Item> remove(int slot)
Inventorypublic int size()
Inventorypublic void markChanged()
InventorymarkChanged in interface Inventory