Contents
Class ItemStackSlotTransaction
java.lang.Object
com.hypixel.hytale.server.core.inventory.transaction.SlotTransaction
com.hypixel.hytale.server.core.inventory.transaction.ItemStackSlotTransaction
- All Implemented Interfaces:
Transaction
- Since:
- 18/3/17.
- Version:
- 1.0
-
Field Summary
Fields inherited from class SlotTransaction
FAILED_ADD -
Constructor Summary
ConstructorsConstructorDescriptionItemStackSlotTransaction(boolean succeeded, ActionType action, short slot, ItemStack slotBefore, ItemStack slotAfter, ItemStack output, boolean allOrNothing, boolean exactAmount, boolean filter, boolean addToExistingSlot, ItemStack query, ItemStack remainder) -
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()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()Methods inherited from class SlotTransaction
getAction, getOutput, getSlot, getSlotAfter, getSlotBefore, isAllOrNothing, isExactAmount, isFilter, succeeded, wasSlotModified
-
Constructor Details
-
ItemStackSlotTransaction
public ItemStackSlotTransaction(boolean succeeded, @Nonnull ActionType action, short slot, @Nullable ItemStack slotBefore, @Nullable ItemStack slotAfter, @Nullable ItemStack output, boolean allOrNothing, boolean exactAmount, boolean filter, boolean addToExistingSlot, @Nullable ItemStack query, @Nullable ItemStack remainder)
-
-
Method Details
-
isAddToExistingSlot
public boolean isAddToExistingSlot() -
getQuery
-
getRemainder
-
toParent
@Nonnull public ItemStackSlotTransaction 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 ItemStackSlotTransaction 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
-