Contents
Class ItemStackTransaction
java.lang.Object
com.hypixel.hytale.server.core.inventory.transaction.ItemStackTransaction
- All Implemented Interfaces:
Transaction
- Since:
- 2020/01/29
- Version:
- 1.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionItemStackTransaction(boolean succeeded, ActionType action, ItemStack query, ItemStack remainder, boolean allOrNothing, boolean filter, List<ItemStackSlotTransaction> slotTransactions) -
Method Summary
Modifier and TypeMethodDescriptionfromParent(ItemContainer parent, short start, ItemContainer container) Transforms this transactions data from referencing about a slot in the provided parent to a slot in the provided container.getQuery()booleanbooleanisFilter()booleantoParent(ItemContainer parent, short start, ItemContainer container) Transforms this transactions data from referencing about a slot in the provided container to a slot in the provided parent.toString()booleanwasSlotModified(short slot)
-
Field Details
-
FAILED_ADD
-
-
Constructor Details
-
ItemStackTransaction
public ItemStackTransaction(boolean succeeded, @Nullable ActionType action, @Nullable ItemStack query, @Nullable ItemStack remainder, boolean allOrNothing, boolean filter, @Nonnull List<ItemStackSlotTransaction> slotTransactions)
-
-
Method Details
-
succeeded
public boolean succeeded()- Specified by:
succeededin interfaceTransaction
-
wasSlotModified
public boolean wasSlotModified(short slot) - Specified by:
wasSlotModifiedin interfaceTransaction
-
getAction
-
getQuery
-
getRemainder
-
isAllOrNothing
public boolean isAllOrNothing() -
isFilter
public boolean isFilter() -
getSlotTransactions
-
toParent
@Nonnull public ItemStackTransaction toParent(ItemContainer parent, short start, ItemContainer container) Description copied from interface:TransactionTransforms this transactions data from referencing about a slot in the provided container to a slot in the provided parent.- Specified by:
toParentin interfaceTransaction- Returns:
- A transaction with data about the parent container.
-
fromParent
@Nullable public ItemStackTransaction fromParent(ItemContainer parent, short start, @Nonnull ItemContainer container) Description copied from interface:TransactionTransforms this transactions data from referencing about a slot in the provided parent to a slot in the provided container.- Specified by:
fromParentin interfaceTransaction- Returns:
- A transaction with data about the parent container or
nullif the transaction doesn't refer to the container at all.
-
toString
-