Class CombinedInventory
java.lang.Object
de.ellpeck.rockbottom.api.inventory.CombinedInventory
- All Implemented Interfaces:
IInventory,IFilteredInventory,Iterable<ItemInstance>
-
Constructor Summary
Constructors -
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) booleancontainsInv(IInventory inv) booleancontainsItem(ItemInstance inst) booleancontainsResource(IUseInfo info) <T> TexecuteOnInv(int id, BiFunction<IInventory, Integer, T> function) voidfillRandomly(Random random, List<ItemInstance> items) get(int id) intgetActualSlot(IInventory targetInv, int internalSlot) getInputSlots(ItemInstance instance, Direction dir) intgetItemIndex(ItemInstance inst) intgetOutputSlots(Direction dir) intgetSlots(Function<IFilteredInventory, List<Integer>> consumer) iterator()voidvoidnotifyChange(int slot) remove(int id, int amount) voidremoveChangeCallback(BiConsumer<IInventory, Integer> callback) voidvoidset(int id, ItemInstance instance) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
CombinedInventory
-
-
Method Details
-
set
- Specified by:
setin interfaceIInventory
-
executeOnInv
-
add
- Specified by:
addin interfaceIInventory
-
remove
- Specified by:
removein interfaceIInventory
-
get
- Specified by:
getin interfaceIInventory
-
getSlotAmount
public int getSlotAmount()- Specified by:
getSlotAmountin interfaceIInventory
-
notifyChange
public void notifyChange(int slot) - Specified by:
notifyChangein interfaceIInventory
-
addChangeCallback
- Specified by:
addChangeCallbackin interfaceIInventory
-
removeChangeCallback
- Specified by:
removeChangeCallbackin interfaceIInventory
-
addToSlot
- Specified by:
addToSlotin interfaceIInventory
-
containsResource
- Specified by:
containsResourcein interfaceIInventory
-
containsItem
- Specified by:
containsItemin interfaceIInventory
-
getItemIndex
- Specified by:
getItemIndexin interfaceIInventory
-
getNextFreeIndex
public int getNextFreeIndex()- Specified by:
getNextFreeIndexin interfaceIInventory
-
getActualSlot
- Specified by:
getActualSlotin interfaceIInventory
-
containsInv
- Specified by:
containsInvin interfaceIInventory
-
add
- Specified by:
addin interfaceIInventory
-
addExistingFirst
- Specified by:
addExistingFirstin interfaceIInventory
-
fillRandomly
- Specified by:
fillRandomlyin interfaceIInventory
-
iterator
- Specified by:
iteratorin interfaceIterable<ItemInstance>
-
getInputSlots
- Specified by:
getInputSlotsin interfaceIFilteredInventory
-
getOutputSlots
- Specified by:
getOutputSlotsin interfaceIFilteredInventory
-
getSlots
-
save
-
load
-