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.

@FunctionalInterface public static interface ItemEvents.UseOnCallback
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable net.minecraft.world.InteractionResult
    useOn(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 InteractionResult to indicate that interaction was handler or null to pass it forward to other listeners and vanilla