Interface IInventory
- All Superinterfaces:
Iterable<ItemInstance>
- All Known Subinterfaces:
IFilteredInventory
- All Known Implementing Classes:
AbstractInventory,BasicFilteredInventory,CombinedInventory,Inventory,TileInventory
-
Method Summary
Modifier and TypeMethodDescriptionadd(int id, int amount) add(ItemInstance instance, boolean simulate) voidaddChangeCallback(BiConsumer<IInventory, Integer> callback) addExistingFirst(ItemInstance instance, boolean simulate) addToSlot(int slot, ItemInstance instance, boolean simulate) voidclear()default booleancontainsInv(IInventory inv) booleancontainsItem(ItemInstance inst) booleancontainsResource(IUseInfo info) voidfillRandomly(Random random, List<ItemInstance> items) get(int id) default intgetActualSlot(IInventory inv, int slot) intgetItemIndex(ItemInstance inst) intintvoidnotifyChange(int slot) remove(int id, int amount) voidremoveChangeCallback(BiConsumer<IInventory, Integer> callback) voidset(int id, ItemInstance instance) Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
set
-
add
-
remove
-
get
-
getSlotAmount
int getSlotAmount() -
notifyChange
void notifyChange(int slot) -
addChangeCallback
-
removeChangeCallback
-
addToSlot
-
containsResource
-
containsItem
-
getItemIndex
-
getNextFreeIndex
int getNextFreeIndex() -
getActualSlot
-
containsInv
-
add
-
addExistingFirst
-
fillRandomly
-
clear
void clear()
-