Interface TransactionType
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents a type of transaction that you can apply to an
AbstractInventory.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TransactionTypeAdds an item to the inventory.static final TransactionTypeTakes an item from the inventory. -
Method Summary
Modifier and TypeMethodDescriptionprocess(AbstractInventory inventory, ItemStack itemStack) process(AbstractInventory inventory, ItemStack itemStack, TransactionType.SlotPredicate slotPredicate) process(AbstractInventory inventory, ItemStack itemStack, TransactionType.SlotPredicate slotPredicate, int start, int end, int step)
-
Field Details
-
ADD
Adds an item to the inventory. Can either take an air slot or be stacked. -
TAKE
Takes an item from the inventory. Can either transform items to air or reduce their amount.
-
-
Method Details
-
process
it.unimi.dsi.fastutil.Pair<ItemStack, Map<Integer, ItemStack>> process(AbstractInventory inventory, ItemStack itemStack, TransactionType.SlotPredicate slotPredicate, int start, int end, int step) -
process
default it.unimi.dsi.fastutil.Pair<ItemStack, Map<Integer, ItemStack>> process(AbstractInventory inventory, ItemStack itemStack, TransactionType.SlotPredicate slotPredicate) -
process
-