Interface InteractionEvent.RightClickBlock
- Enclosing interface:
- InteractionEvent
public static interface InteractionEvent.RightClickBlock
-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.InteractionResultclick(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction face) Invoked whenever a player right clicks a block.
-
Method Details
-
click
net.minecraft.world.InteractionResult click(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction face) Invoked whenever a player right clicks a block. Equivalent to Forge'sPlayerInteractEvent.RightClickBlockevent and Fabric'sUseBlockCallback.- Parameters:
player- The player right clicking the block.hand- The hand that is used.pos- The position of the block in the level.face- The face of the block clicked.- Returns:
- The event is canceled if anything else than
InteractionResult.PASSis returned.
-