Interface InteractionEvent.RightClickItem
- Enclosing interface:
- InteractionEvent
public static interface InteractionEvent.RightClickItem
-
Method Summary
Modifier and TypeMethodDescriptionCompoundEventResult<net.minecraft.world.item.ItemStack>
click
(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand) Invoked whenever a player uses an item on a block.
-
Method Details
-
click
CompoundEventResult<net.minecraft.world.item.ItemStack> click(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand) Invoked whenever a player uses an item on a block. Equivalent to Forge'sPlayerInteractEvent.RightClickItem
event and Fabric'sUseItemCallback
.- Parameters:
player
- The player right clicking the block.hand
- The hand that is used.- Returns:
- A
EventResult
determining the outcome of the event, the action may be cancelled by the result.
-