枚举 ActionResult

    • 枚举常量详细资料

      • 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 a Larg;a:Larg;
        intermediary field_5812 Lnet/minecraft/class_1269;field_5812:Lnet/minecraft/class_1269;
        named SUCCESS Lnet/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 b Larg;b:Larg;
        intermediary field_21466 Lnet/minecraft/class_1269;field_21466:Lnet/minecraft/class_1269;
        named CONSUME Lnet/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 c Larg;c:Larg;
        intermediary field_5811 Lnet/minecraft/class_1269;field_5811:Lnet/minecraft/class_1269;
        named PASS Lnet/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 d Larg;d:Larg;
        intermediary field_5814 Lnet/minecraft/class_1269;field_5814:Lnet/minecraft/class_1269;
        named FAIL Lnet/minecraft/util/ActionResult;FAIL:Lnet/minecraft/util/ActionResult;
    • 构造器详细资料

      • ActionResult

        private 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 a Larg;a()Z
        intermediary method_23665 Lnet/minecraft/class_1269;method_23665()Z
        named isAccepted Lnet/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 b Larg;b()Z
        intermediary method_23666 Lnet/minecraft/class_1269;method_23666()Z
        named shouldSwingHand Lnet/minecraft/util/ActionResult;shouldSwingHand()Z
      • success

        public static ActionResult success​(boolean swingHand)
        Mappings:
        Namespace Name Mixin selector
        official a Larg;a(Z)Larg;
        intermediary method_29236 Lnet/minecraft/class_1269;method_29236(Z)Lnet/minecraft/class_1269;
        named success Lnet/minecraft/util/ActionResult;success(Z)Lnet/minecraft/util/ActionResult;