InteractionResult
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
Implements
Undocumented Interfaces
Comparable<Enum>
Enum Constants
InteractionResult is an enum with 5 constants. They are accessible like so:
Members
Getter
Return Type:
bool
consumesAction() as bool
Return Type:
bool
Getter
Return Type:
bool
shouldAwardStats() as bool
Return Type:
bool
Getter
Return Type:
bool
shouldSwing() as bool
Return Type:
bool
static sidedSuccess(successSide as bool) as InteractionResult
Returns true if
successSide
is true, this can be used to return SUCCESS
on the client, but CONSUME
on the server.Returns: <constant:minecraft:world/interactionresult:success> if successSide
is true, otherwise <constant:minecraft:world/interactionresult:consume>.
Parameters:
successSide: bool
Type: bool
- Is the current side the success side.
Return Type:
InteractionResult