- Enclosing interface:
ItemEvents
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Method Summary
@Nullable net.minecraft.world.InteractionResult
use(net.minecraft.world.level.Level level,
net.minecraft.world.entity.player.Player player,
net.minecraft.world.InteractionHand interactionHand)
Handles item interaction.
-
Method Details
-
use
@Nullable net.minecraft.world.InteractionResult use(net.minecraft.world.level.Level level,
net.minecraft.world.entity.player.Player player,
net.minecraft.world.InteractionHand interactionHand)
Handles item interaction.
- Parameters:
level - the level in which block resides
player - the player causing the interaction
interactionHand - player's hand used in interaction
- Returns:
- any
InteractionResult to indicate that interaction was handler or null to pass it forward to other listeners and vanilla