useOnBlock

public ActionResult useOnBlock(ItemStack staffStack, World world, LivingEntity user, BlockPos target, Direction side, Hand hand)(source)

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:

On the logical server (if used by player):

Parameters

staffStack

The item stack used to perform the action

world

The world the user is in

user

The entity, which used the staff

target

The block, on which user used the staff

side

The side of the block, on which the staff was used

hand

The hand of the user, in which the staff is

See also