public class CombinedInventory extends java.lang.Object implements IInventory
| Constructor and Description |
|---|
CombinedInventory(IInventory... inventories) |
| 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) |
<T> T |
executeOnInv(int id,
java.util.function.BiFunction<IInventory,java.lang.Integer,T> function) |
ItemInstance |
get(int id) |
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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontainsItem, containsResource, getItemIndexpublic CombinedInventory(IInventory... inventories)
public void set(int id,
ItemInstance instance)
set in interface IInventorypublic <T> T executeOnInv(int id,
java.util.function.BiFunction<IInventory,java.lang.Integer,T> function)
public ItemInstance add(int id, int amount)
add in interface IInventorypublic ItemInstance remove(int id, int amount)
remove in interface IInventorypublic void notifyChange(int slot)
notifyChange in interface IInventorypublic void addChangeCallback(java.util.function.BiConsumer<IInventory,java.lang.Integer> callback)
addChangeCallback in interface IInventorypublic void removeChangeCallback(java.util.function.BiConsumer<IInventory,java.lang.Integer> callback)
removeChangeCallback in interface IInventorypublic ItemInstance addToSlot(int slot, ItemInstance instance, boolean simulate)
addToSlot in interface IInventorypublic int getSlotAmount()
getSlotAmount in interface IInventorypublic ItemInstance get(int id)
get in interface IInventory