use On Block
Called on both the client and the server by Minecraft, when an entity uses the staff on a block. This method may not be called, if the block handles the use event (for example, a chest).
Return
On the logical client:
ActionResult.SUCCESS: sends a packet to the server, and swings hand
ActionResult.CONSUME, ActionResult.CONSUME_PARTIAL, ActionResult.FAIL: sends a packet to the server, and doesn't swing hand
ActionResult.PASS: sends a packet to the server, doesn't swing hand, then interacts with the item using use
On the logical server (if used by player):
ActionResult.SUCCESS: increments player used item stat, triggers item used on block criterion, and swings hand
ActionResult.CONSUME: increments player used item stat, triggers item used on block criterion, and doesn't swing hand
ActionResult.CONSUME_PARTIAL: doesn't increment player used item stat, triggers item used on block criterion, and doesn't swing hand
ActionResult.PASS, ActionResult.FAIL: doesn't increment player used item stat, doesn't trigger item used on block criterion, and doesn't swing hand
Parameters
The item stack used to perform the action
The world the user is in
The entity, which used the staff
The block, on which user used the staff
The side of the block, on which the staff was used