Interface BlockAttackInteractionAware


@Deprecated public interface BlockAttackInteractionAware
Deprecated.
Use AttackBlockCallback instead and check for the block. This gives more control over the different cancellation outcomes.
Convenience interface for blocks which listen to "break interactions" (left-click).
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    onAttackInteraction(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.core.Direction direction)
    Deprecated.
     
  • Method Details

    • onAttackInteraction

      boolean onAttackInteraction(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.core.Direction direction)
      Deprecated.
      Returns:
      True if the block accepted the player and it should no longer be processed.