attack
public ActionResult attack(ItemStack staffStack, World world, LivingEntity attacker, Hand hand)(source)
Called on both the client and the server by Staff Mod, when an entity attacks nothing (left clicks on air) with a staff.
On the logical client, the return values have the following meaning:
SUCCESS: send a packet to the server, and swing hand. This doesn't reset attack cooldown
CONSUME, CONSUME_PARTIAL: send a packet to the server, and don't swing hand. This doesn't reset attack cooldown
PASS: Let Minecraft handle vanilla attack
FAIL: don't send a packet to the server, and don't swing hand. This doesn't reset attack cooldown
On the logical server, the return value is ignored (if used by player) or processed by the caller code (if the attacker is not a player).