public enum SlotActionType extends Enum<SlotActionType>
Enum Constant and Description |
---|
CLONE
Clones the item in the slot.
|
PICKUP
Performs a normal slot click.
|
PICKUP_ALL
Replenishes the cursor stack with items from the screen handler.
|
QUICK_CRAFT
Drags items between multiple slots.
|
QUICK_MOVE
Performs a shift-click.
|
SWAP
Exchanges items between a slot and a hotbar slot.
|
THROW
Throws the item out of the inventory.
|
Modifier and Type | Method and Description |
---|---|
static SlotActionType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SlotActionType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SlotActionType PICKUP
public static final SlotActionType QUICK_MOVE
public static final SlotActionType SWAP
When the action type is swap, the click data is the hotbar slot to swap with (0-8).
public static final SlotActionType CLONE
public static final SlotActionType THROW
When the action type is throw, the click data determines whether to throw a whole stack (1) or a single item from that stack (0).
public static final SlotActionType QUICK_CRAFT
This action happens in 3 stages. Stage 0 signals that the drag has begun, and stage 2 signals that the drag has ended. In between multiple stage 1s signal which slots were dragged on.
The stage is packed into the click data along with the mouse button that was clicked. See ScreenHandler.packQuickCraftData(int, int)
for details.
public static final SlotActionType PICKUP_ALL
public static SlotActionType[] values()
for (SlotActionType c : SlotActionType.values()) System.out.println(c);
public static SlotActionType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null