Interface InteractionEvents.UseBlock

Enclosing class:
InteractionEvents
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 InteractionEvents.UseBlock
A player is about to use (right-click) a block, with whatever is in the hand. PASS lets the game go on; anything else is the use's result and stops it there (neither the block nor the item is used): SUCCESS swings the arm, CONSUME and FAIL don't.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.InteractionResult
    onUseBlock(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult hit)
     
  • Method Details

    • onUseBlock

      net.minecraft.world.InteractionResult onUseBlock(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult hit)