public interface IInventory
| Modifier and Type | Method and Description |
|---|---|
ItemInstance |
add(int id,
int amount) |
void |
addChangeCallback(java.util.function.BiConsumer<IInventory,java.lang.Integer> callback) |
ItemInstance |
addToSlot(int slot,
ItemInstance instance,
boolean simulate) |
default boolean |
containsItem(ItemInstance inst) |
default boolean |
containsResource(IUseInfo info) |
ItemInstance |
get(int id) |
default int |
getItemIndex(ItemInstance inst) |
int |
getSlotAmount() |
void |
notifyChange(int slot) |
ItemInstance |
remove(int id,
int amount) |
void |
removeChangeCallback(java.util.function.BiConsumer<IInventory,java.lang.Integer> callback) |
void |
set(int id,
ItemInstance instance) |
void set(int id,
ItemInstance instance)
ItemInstance add(int id, int amount)
ItemInstance remove(int id, int amount)
ItemInstance get(int id)
int getSlotAmount()
void notifyChange(int slot)
void addChangeCallback(java.util.function.BiConsumer<IInventory,java.lang.Integer> callback)
void removeChangeCallback(java.util.function.BiConsumer<IInventory,java.lang.Integer> callback)
ItemInstance addToSlot(int slot, ItemInstance instance, boolean simulate)
default boolean containsResource(IUseInfo info)
default boolean containsItem(ItemInstance inst)
default int getItemIndex(ItemInstance inst)