Contents
Class ResourceSlotTransaction
java.lang.Object
com.hypixel.hytale.server.core.inventory.transaction.SlotTransaction
com.hypixel.hytale.server.core.inventory.transaction.ResourceSlotTransaction
- All Implemented Interfaces:
Transaction
- Since:
- 18/3/17.
- Version:
- 1.0
-
Field Summary
Fields inherited from class SlotTransaction
FAILED_ADD -
Constructor Summary
ConstructorsConstructorDescriptionResourceSlotTransaction(boolean succeeded, ActionType action, short slot, ItemStack slotBefore, ItemStack slotAfter, ItemStack output, boolean allOrNothing, boolean exactAmount, boolean filter, ResourceQuantity query, int remainder, int consumed) -
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.intgetQuery()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
-
ResourceSlotTransaction
public ResourceSlotTransaction(boolean succeeded, @Nonnull ActionType action, short slot, @Nullable ItemStack slotBefore, @Nullable ItemStack slotAfter, @Nullable ItemStack output, boolean allOrNothing, boolean exactAmount, boolean filter, @Nonnull ResourceQuantity query, int remainder, int consumed)
-
-
Method Details
-
getQuery
-
getRemainder
public int getRemainder() -
getConsumed
public int getConsumed() -
toParent
@Nonnull public ResourceSlotTransaction 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 ResourceSlotTransaction 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
-