Interface InteractionEvent.RightClickItem
- Enclosing interface:
- InteractionEvent
public static interface InteractionEvent.RightClickItem
-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.InteractionResultHolder<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
net.minecraft.world.InteractionResultHolder<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:
- Whenever the return is not
InteractionResult.PASS
, the result value is used and the event is canceled.
-