枚举 SlotActionType
- java.lang.Object
-
- java.lang.Enum<SlotActionType>
-
- net.minecraft.screen.slot.SlotActionType
-
- 所有已实现的接口:
Serializable,Comparable<SlotActionType>
public enum SlotActionType extends Enum<SlotActionType>
- Mappings:
Namespace Name official bluintermediary net/minecraft/class_1713named net/minecraft/screen/slot/SlotActionType
-
-
枚举常量概要
枚举常量 枚举常量 说明 CLONEClones the item in the slot.PICKUPPerforms a normal slot click.PICKUP_ALLReplenishes the cursor stack with items from the screen handler.QUICK_CRAFTDrags items between multiple slots.QUICK_MOVEPerforms a shift-click.SWAPExchanges items between a slot and a hotbar slot.THROWThrows the item out of the inventory.
-
构造器概要
构造器 限定符 构造器 说明 privateSlotActionType()
-
-
-
枚举常量详细资料
-
PICKUP
public static final SlotActionType PICKUP
Performs a normal slot click. This can pickup or place items in the slot, possibly merging the cursor stack into the slot, or swapping the slot stack with the cursor stack if they can't be merged.- Mappings:
Namespace Name Mixin selector official aLblu;a:Lblu;intermediary field_7790Lnet/minecraft/class_1713;field_7790:Lnet/minecraft/class_1713;named PICKUPLnet/minecraft/screen/slot/SlotActionType;PICKUP:Lnet/minecraft/screen/slot/SlotActionType;
-
QUICK_MOVE
public static final SlotActionType QUICK_MOVE
Performs a shift-click. This usually quickly moves items between the player's inventory and the open screen handler.- Mappings:
Namespace Name Mixin selector official bLblu;b:Lblu;intermediary field_7794Lnet/minecraft/class_1713;field_7794:Lnet/minecraft/class_1713;named QUICK_MOVELnet/minecraft/screen/slot/SlotActionType;QUICK_MOVE:Lnet/minecraft/screen/slot/SlotActionType;
-
SWAP
public static final SlotActionType SWAP
Exchanges items between a slot and a hotbar slot. This is usually triggered by the player pressing a 1-9 number key while hovering over a slot.When the action type is swap, the click data is the hotbar slot to swap with (0-8).
- Mappings:
Namespace Name Mixin selector official cLblu;c:Lblu;intermediary field_7791Lnet/minecraft/class_1713;field_7791:Lnet/minecraft/class_1713;named SWAPLnet/minecraft/screen/slot/SlotActionType;SWAP:Lnet/minecraft/screen/slot/SlotActionType;
-
CLONE
public static final SlotActionType CLONE
Clones the item in the slot. Usually triggered by middle clicking an item in creative mode.- Mappings:
Namespace Name Mixin selector official dLblu;d:Lblu;intermediary field_7796Lnet/minecraft/class_1713;field_7796:Lnet/minecraft/class_1713;named CLONELnet/minecraft/screen/slot/SlotActionType;CLONE:Lnet/minecraft/screen/slot/SlotActionType;
-
THROW
public static final SlotActionType THROW
Throws the item out of the inventory. This is usually triggered by the player pressing Q while hovering over a slot, or clicking outside the window.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).
- Mappings:
Namespace Name Mixin selector official eLblu;e:Lblu;intermediary field_7795Lnet/minecraft/class_1713;field_7795:Lnet/minecraft/class_1713;named THROWLnet/minecraft/screen/slot/SlotActionType;THROW:Lnet/minecraft/screen/slot/SlotActionType;
-
QUICK_CRAFT
public static final SlotActionType QUICK_CRAFT
Drags items between multiple slots. This is usually triggered by the player clicking and dragging between slots.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.- Mappings:
Namespace Name Mixin selector official fLblu;f:Lblu;intermediary field_7789Lnet/minecraft/class_1713;field_7789:Lnet/minecraft/class_1713;named QUICK_CRAFTLnet/minecraft/screen/slot/SlotActionType;QUICK_CRAFT:Lnet/minecraft/screen/slot/SlotActionType;
-
PICKUP_ALL
public static final SlotActionType PICKUP_ALL
Replenishes the cursor stack with items from the screen handler. This is usually triggered by the player double clicking.- Mappings:
Namespace Name Mixin selector official gLblu;g:Lblu;intermediary field_7793Lnet/minecraft/class_1713;field_7793:Lnet/minecraft/class_1713;named PICKUP_ALLLnet/minecraft/screen/slot/SlotActionType;PICKUP_ALL:Lnet/minecraft/screen/slot/SlotActionType;
-
-
方法详细资料
-
values
public static SlotActionType[] values()
按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。该方法可用于迭代 常量, 如下所示:for (SlotActionType c : SlotActionType.values()) System.out.println(c);
- 返回:
- 按照声明该枚举类型的常量的顺序返回的包含这些常量的数组
-
valueOf
public static SlotActionType valueOf(String name)
返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)- 参数:
name- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException- 如果该枚举类型没有带有指定名称的常量NullPointerException- 如果参数为空值
-
-