Package net.minecraft.util
Interface ActionResult
- All Known Implementing Classes:
ActionResult.Fail
,ActionResult.Pass
,ActionResult.PassToDefaultBlockAction
,ActionResult.Success
public interface ActionResult
An enum indicating the hand interaction's result. Methods called on hand interaction,
such as
AbstractBlock.onUse(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.entity.player.PlayerEntity, net.minecraft.util.hit.BlockHitResult)
, return this.- Mappings:
Namespace Name named net/minecraft/util/ActionResult
intermediary net/minecraft/class_1269
official bti
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final record
static final record
static final record
static final record
static final record
static enum
Represents the side that should be considered the source of truth for an arm swing, if any. -
Field Summary
Modifier and TypeFieldDescriptionstatic final ActionResult.Success
Indicates an action is performed but no animation should accompany the performance.static final ActionResult.Fail
Indicates that an action is not performed and prevents other actions from performing.static final ActionResult.Pass
Indicates an action is not performed but allows other actions to perform.static final ActionResult.PassToDefaultBlockAction
Indicates an action is not performed and the default block action should be performed instead.static final ActionResult.Success
Indicates an action is performed and the actor's hand should swing to indicate the performance.static final ActionResult.Success
Indicates an action is performed on the logical server only and the actor's hand should swing to indicate the performance. -
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
Returns whether an action is performed.
-
Field Details
-
SUCCESS
Indicates an action is performed and the actor's hand should swing to indicate the performance.- Mappings:
Namespace Name Mixin selector named SUCCESS
Lnet/minecraft/util/ActionResult;SUCCESS:Lnet/minecraft/util/ActionResult$Success;
intermediary field_5812
Lnet/minecraft/class_1269;field_5812:Lnet/minecraft/class_1269$class_9860;
official a
Lbti;a:Lbti$d;
-
SUCCESS_SERVER
Indicates an action is performed on the logical server only and the actor's hand should swing to indicate the performance.- Mappings:
Namespace Name Mixin selector named SUCCESS_SERVER
Lnet/minecraft/util/ActionResult;SUCCESS_SERVER:Lnet/minecraft/util/ActionResult$Success;
intermediary field_52422
Lnet/minecraft/class_1269;field_52422:Lnet/minecraft/class_1269$class_9860;
official b
Lbti;b:Lbti$d;
-
CONSUME
Indicates an action is performed but no animation should accompany the performance.- Mappings:
Namespace Name Mixin selector named CONSUME
Lnet/minecraft/util/ActionResult;CONSUME:Lnet/minecraft/util/ActionResult$Success;
intermediary field_21466
Lnet/minecraft/class_1269;field_21466:Lnet/minecraft/class_1269$class_9860;
official c
Lbti;c:Lbti$d;
-
FAIL
Indicates that an action is not performed and prevents other actions from performing.- Mappings:
Namespace Name Mixin selector named FAIL
Lnet/minecraft/util/ActionResult;FAIL:Lnet/minecraft/util/ActionResult$Fail;
intermediary field_5814
Lnet/minecraft/class_1269;field_5814:Lnet/minecraft/class_1269$class_9857;
official d
Lbti;d:Lbti$a;
-
PASS
Indicates an action is not performed but allows other actions to perform.- Mappings:
Namespace Name Mixin selector named PASS
Lnet/minecraft/util/ActionResult;PASS:Lnet/minecraft/util/ActionResult$Pass;
intermediary field_5811
Lnet/minecraft/class_1269;field_5811:Lnet/minecraft/class_1269$class_9859;
official e
Lbti;e:Lbti$c;
-
PASS_TO_DEFAULT_BLOCK_ACTION
Indicates an action is not performed and the default block action should be performed instead.- Mappings:
Namespace Name Mixin selector named PASS_TO_DEFAULT_BLOCK_ACTION
Lnet/minecraft/util/ActionResult;PASS_TO_DEFAULT_BLOCK_ACTION:Lnet/minecraft/util/ActionResult$PassToDefaultBlockAction;
intermediary field_52423
Lnet/minecraft/class_1269;field_52423:Lnet/minecraft/class_1269$class_9862;
official f
Lbti;f:Lbti$f;
-
-
Method Details
-
isAccepted
default boolean isAccepted()Returns whether an action is performed.- Returns:
- whether an action is performed
- Mappings:
Namespace Name Mixin selector named isAccepted
Lnet/minecraft/util/ActionResult;isAccepted()Z
intermediary method_23665
Lnet/minecraft/class_1269;method_23665()Z
official a
Lbti;a()Z
-