枚举 ActionResult
- java.lang.Object
-
- java.lang.Enum<ActionResult>
-
- net.minecraft.util.ActionResult
-
- 所有已实现的接口:
Serializable,Comparable<ActionResult>
public enum ActionResult extends Enum<ActionResult>
- Mappings:
Namespace Name official argintermediary net/minecraft/class_1269named net/minecraft/util/ActionResult
-
-
枚举常量概要
枚举常量 枚举常量 说明 CONSUMEIndicates an action is performed but no animation should accompany the performance.FAILIndicates that an action is not performed and prevents other actions from performing.PASSIndicates an action is not performed but allows other actions to perform.SUCCESSIndicates an action is performed and the actor's hand should swing to indicate the performance.
-
构造器概要
构造器 限定符 构造器 说明 privateActionResult()
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanisAccepted()Returns whether an action is performed.booleanshouldSwingHand()Returns whether an actor should have a hand-swinging animation on action performance.static ActionResultsuccess(boolean swingHand)static ActionResultvalueOf(String name)返回带有指定名称的该类型的枚举常量。static ActionResult[]values()按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。
-
-
-
枚举常量详细资料
-
SUCCESS
public static final ActionResult SUCCESS
Indicates an action is performed and the actor's hand should swing to indicate the performance.- Mappings:
Namespace Name Mixin selector official aLarg;a:Larg;intermediary field_5812Lnet/minecraft/class_1269;field_5812:Lnet/minecraft/class_1269;named SUCCESSLnet/minecraft/util/ActionResult;SUCCESS:Lnet/minecraft/util/ActionResult;
-
CONSUME
public static final ActionResult CONSUME
Indicates an action is performed but no animation should accompany the performance.- Mappings:
Namespace Name Mixin selector official bLarg;b:Larg;intermediary field_21466Lnet/minecraft/class_1269;field_21466:Lnet/minecraft/class_1269;named CONSUMELnet/minecraft/util/ActionResult;CONSUME:Lnet/minecraft/util/ActionResult;
-
PASS
public static final ActionResult PASS
Indicates an action is not performed but allows other actions to perform.- Mappings:
Namespace Name Mixin selector official cLarg;c:Larg;intermediary field_5811Lnet/minecraft/class_1269;field_5811:Lnet/minecraft/class_1269;named PASSLnet/minecraft/util/ActionResult;PASS:Lnet/minecraft/util/ActionResult;
-
FAIL
public static final ActionResult FAIL
Indicates that an action is not performed and prevents other actions from performing.- Mappings:
Namespace Name Mixin selector official dLarg;d:Larg;intermediary field_5814Lnet/minecraft/class_1269;field_5814:Lnet/minecraft/class_1269;named FAILLnet/minecraft/util/ActionResult;FAIL:Lnet/minecraft/util/ActionResult;
-
-
方法详细资料
-
values
public static ActionResult[] values()
按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。该方法可用于迭代 常量, 如下所示:for (ActionResult c : ActionResult.values()) System.out.println(c);
- 返回:
- 按照声明该枚举类型的常量的顺序返回的包含这些常量的数组
-
valueOf
public static ActionResult valueOf(String name)
返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)- 参数:
name- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException- 如果该枚举类型没有带有指定名称的常量NullPointerException- 如果参数为空值
-
isAccepted
public boolean isAccepted()
Returns whether an action is performed.- Mappings:
Namespace Name Mixin selector official aLarg;a()Zintermediary method_23665Lnet/minecraft/class_1269;method_23665()Znamed isAcceptedLnet/minecraft/util/ActionResult;isAccepted()Z
-
shouldSwingHand
public boolean shouldSwingHand()
Returns whether an actor should have a hand-swinging animation on action performance.- Mappings:
Namespace Name Mixin selector official bLarg;b()Zintermediary method_23666Lnet/minecraft/class_1269;method_23666()Znamed shouldSwingHandLnet/minecraft/util/ActionResult;shouldSwingHand()Z
-
success
public static ActionResult success(boolean swingHand)
- Mappings:
Namespace Name Mixin selector official aLarg;a(Z)Larg;intermediary method_29236Lnet/minecraft/class_1269;method_29236(Z)Lnet/minecraft/class_1269;named successLnet/minecraft/util/ActionResult;success(Z)Lnet/minecraft/util/ActionResult;
-
-