attack Block
Called on both the client and the server by Fabric API, when an entity attacks a block.
On the logical client, the return values have the following meaning:
SUCCESS: Cancel vanilla block breaking, send a packet to the server, spawn block breaking particles, and swing hand. This doesn't reset the block breaking cooldown
CONSUME, CONSUME_PARTIAL: Cancel vanilla block breaking, send a packet to the server, don't spawn block breaking particles, and don't swing hand. This doesn't reset the block breaking cooldown
PASS: Let Minecraft handle vanilla block breaking
FAIL: Cancel vanilla block breaking, don't send a packet to the server, don't spawn block breaking particles, and don't swing hand. This doesn't reset the block breaking cooldown
On the logical server, the return values have the following meaning (if used by player):
SUCCESS, CONSUME, CONSUME_PARTIAL, FAIL: Cancel vanilla block breaking, and notify the client
PASS: Let Minecraft handle vanilla block breaking
On the logical server, the return values are processed by the caller code (if the attacker is not a player).
Parameters
The item stack used to perform the action
The world the attacker is in
The entity, which attacked with the staff
The block the attacker attacked
The side of the block, which was attacked