Interface InteractionEvent.LeftClickBlock
- Enclosing interface:
- InteractionEvent
public static interface InteractionEvent.LeftClickBlock
-
Method Summary
Modifier and TypeMethodDescriptionclick
(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 left clicks a block.
-
Method Details
-
click
EventResult 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 left clicks a block. Equivalent to Forge'sPlayerInteractEvent.LeftClickBlock
event and Fabric'sAttackBlockCallback
.- Parameters:
player
- The player left clicking the block.hand
- The hand that is used.pos
- The position of the block in the level. UseEntity.getCommandSenderWorld()
to get the level.face
- The face of the block clicked.- Returns:
- A
EventResult
determining the outcome of the event, the action may be cancelled by the result.
-