- Enclosing interface:
BlockEvents
- 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
@Nullable net.minecraft.world.InteractionResult
useWithoutItem(net.minecraft.world.level.block.state.BlockState blockState,
net.minecraft.world.level.Level level,
net.minecraft.core.BlockPos blockPos,
net.minecraft.world.entity.player.Player player,
net.minecraft.world.phys.BlockHitResult blockHitResult)
Handles block-side interaction, which doesn't require any held item stack.
-
Method Details
-
useWithoutItem
@Nullable net.minecraft.world.InteractionResult useWithoutItem(net.minecraft.world.level.block.state.BlockState blockState,
net.minecraft.world.level.Level level,
net.minecraft.core.BlockPos blockPos,
net.minecraft.world.entity.player.Player player,
net.minecraft.world.phys.BlockHitResult blockHitResult)
Handles block-side interaction, which doesn't require any held item stack.
- Parameters:
blockState - the interacted block state
level - the level in which block resides
blockPos - the position of the block
player - the player causing the interaction
blockHitResult - the hit-result pointing at interacted block
- Returns:
- any
InteractionResult to indicate that interaction was handler or null to pass it forward to other listeners and vanilla