Contents
Class MaterialSlotTransaction
java.lang.Object
com.hypixel.hytale.server.core.inventory.transaction.SlotTransaction
com.hypixel.hytale.server.core.inventory.transaction.MaterialSlotTransaction
- All Implemented Interfaces:
Transaction
- Since:
- 18/3/17.
- Version:
- 1.0
-
Field Summary
Fields inherited from class SlotTransaction
FAILED_ADD -
Constructor Summary
ConstructorsConstructorDescriptionMaterialSlotTransaction(MaterialQuantity query, int remainder, SlotTransaction transaction) -
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()inttoParent(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 SlotTransaction
getAction, getOutput, getSlot, getSlotAfter, getSlotBefore, isAllOrNothing, isExactAmount, isFilter, succeeded, wasSlotModified
-
Constructor Details
-
MaterialSlotTransaction
public MaterialSlotTransaction(@Nonnull MaterialQuantity query, int remainder, @Nonnull SlotTransaction transaction)
-
-
Method Details
-
getQuery
-
getRemainder
public int getRemainder() -
getTransaction
-
toParent
@Nonnull public MaterialSlotTransaction 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 classSlotTransaction- Returns:
- A transaction with data about the parent container.
-
fromParent
@Nullable public MaterialSlotTransaction 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 classSlotTransaction- Returns:
- A transaction with data about the parent container or
nullif the transaction doesn't refer to the container at all.
-
toString
- Overrides:
toStringin classSlotTransaction
-