Contents
Class MaterialTransaction
java.lang.Object
com.hypixel.hytale.server.core.inventory.transaction.ListTransaction<MaterialSlotTransaction>
com.hypixel.hytale.server.core.inventory.transaction.MaterialTransaction
- All Implemented Interfaces:
Transaction
- Since:
- 2020/01/29
- Version:
- 1.0
-
Field Summary
Fields inherited from class ListTransaction
EMPTY_FAILED_TRANSACTION, EMPTY_SUCCESSFUL_TRANSACTION -
Constructor Summary
ConstructorsConstructorDescriptionMaterialTransaction(boolean succeeded, ActionType action, MaterialQuantity material, int remainder, boolean allOrNothing, boolean exactAmount, boolean filter, List<MaterialSlotTransaction> 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.intbooleanbooleanbooleanisFilter()toParent(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()Methods inherited from class ListTransaction
getEmptyTransaction, getList, size, succeeded, wasSlotModified
-
Constructor Details
-
MaterialTransaction
public MaterialTransaction(boolean succeeded, @Nonnull ActionType action, @Nonnull MaterialQuantity material, int remainder, boolean allOrNothing, boolean exactAmount, boolean filter, @Nonnull List<MaterialSlotTransaction> slotTransactions)
-
-
Method Details
-
getAction
-
getMaterial
-
getRemainder
public int getRemainder() -
isAllOrNothing
public boolean isAllOrNothing() -
isExactAmount
public boolean isExactAmount() -
isFilter
public boolean isFilter() -
toParent
@Nonnull public MaterialTransaction 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- Overrides:
toParentin classListTransaction<MaterialSlotTransaction>- Returns:
- A transaction with data about the parent container.
-
fromParent
@Nullable public MaterialTransaction 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- Overrides:
fromParentin classListTransaction<MaterialSlotTransaction>- Returns:
- A transaction with data about the parent container or
nullif the transaction doesn't refer to the container at all.
-
toString
- Overrides:
toStringin classListTransaction<MaterialSlotTransaction>
-