Interface BlockAttackInteractionAware
Deprecated.
Convenience interface for blocks which listen to "break interactions" (left-click).
-
Method Summary
Modifier and TypeMethodDescriptionbooleanonAttackInteraction(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.
-
AttackBlockCallbackinstead and check for the block. This gives more control over the different cancellation outcomes.