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/ActionResultintermediary net/minecraft/class_1269official bsl
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic enumRepresents the side that should be considered the source of truth for an arm swing, if any. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ActionResult.SuccessIndicates an action is performed but no animation should accompany the performance.static final ActionResult.FailIndicates that an action is not performed and prevents other actions from performing.static final ActionResult.PassIndicates an action is not performed but allows other actions to perform.static final ActionResult.PassToDefaultBlockActionIndicates an action is not performed and the default block action should be performed instead.static final ActionResult.SuccessIndicates an action is performed and the actor's hand should swing to indicate the performance.static final ActionResult.SuccessIndicates 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 booleanReturns 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 SUCCESSLnet/minecraft/util/ActionResult;SUCCESS:Lnet/minecraft/util/ActionResult$Success;intermediary field_5812Lnet/minecraft/class_1269;field_5812:Lnet/minecraft/class_1269$class_9860;official aLbsl;a:Lbsl$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_SERVERLnet/minecraft/util/ActionResult;SUCCESS_SERVER:Lnet/minecraft/util/ActionResult$Success;intermediary field_52422Lnet/minecraft/class_1269;field_52422:Lnet/minecraft/class_1269$class_9860;official bLbsl;b:Lbsl$d;
-
CONSUME
Indicates an action is performed but no animation should accompany the performance.- Mappings:
Namespace Name Mixin selector named CONSUMELnet/minecraft/util/ActionResult;CONSUME:Lnet/minecraft/util/ActionResult$Success;intermediary field_21466Lnet/minecraft/class_1269;field_21466:Lnet/minecraft/class_1269$class_9860;official cLbsl;c:Lbsl$d;
-
FAIL
Indicates that an action is not performed and prevents other actions from performing.- Mappings:
Namespace Name Mixin selector named FAILLnet/minecraft/util/ActionResult;FAIL:Lnet/minecraft/util/ActionResult$Fail;intermediary field_5814Lnet/minecraft/class_1269;field_5814:Lnet/minecraft/class_1269$class_9857;official dLbsl;d:Lbsl$a;
-
PASS
Indicates an action is not performed but allows other actions to perform.- Mappings:
Namespace Name Mixin selector named PASSLnet/minecraft/util/ActionResult;PASS:Lnet/minecraft/util/ActionResult$Pass;intermediary field_5811Lnet/minecraft/class_1269;field_5811:Lnet/minecraft/class_1269$class_9859;official eLbsl;e:Lbsl$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_ACTIONLnet/minecraft/util/ActionResult;PASS_TO_DEFAULT_BLOCK_ACTION:Lnet/minecraft/util/ActionResult$PassToDefaultBlockAction;intermediary field_52423Lnet/minecraft/class_1269;field_52423:Lnet/minecraft/class_1269$class_9862;official fLbsl;f:Lbsl$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 isAcceptedLnet/minecraft/util/ActionResult;isAccepted()Zintermediary method_23665Lnet/minecraft/class_1269;method_23665()Zofficial aLbsl;a()Z
-