Interface ItemEvents.UseOnCallback
- 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
Modifier and TypeMethodDescription@Nullable net.minecraft.world.InteractionResultuseOn(net.minecraft.world.item.context.UseOnContext useOnContext) Handles item-side interaction, caused by interacting with block.
-
Method Details
-
useOn
@Nullable net.minecraft.world.InteractionResult useOn(net.minecraft.world.item.context.UseOnContext useOnContext) Handles item-side interaction, caused by interacting with block.- Parameters:
useOnContext- the context of interaction.- Returns:
- any
InteractionResultto indicate that interaction was handler or null to pass it forward to other listeners and vanilla
-