Skip to main content
Version: 26.2

Block Events

dev.architectury.event.events.common.BlockEvent

Events about blocks being broken, placed, or landed on by a falling block.

Events

EventListener methodReturns
BREAKbreakBlock(Level, BlockPos, BlockState, ServerPlayer)EventResult - interrupt to cancel the break.
PLACEplaceBlock(Level, BlockPos, BlockState, Entity placer)EventResult - interrupt to cancel the placement.
FALLING_LANDonLand(Level, BlockPos, BlockState fallState, BlockState landOn, FallingBlockEntity)void (notification).

For PLACE, the placer may be null (for example, when a dispenser places the block).

Examples

Protect bedrock from being broken:

BlockEvent.BREAK.register((level, pos, state, player) -> {
if (state.is(Blocks.BEDROCK)) {
return EventResult.interruptFalse(); // deny the break
}
return EventResult.pass();
});

React to a falling block landing:

BlockEvent.FALLING_LAND.register((level, pos, fallState, landOn, entity) -> {
// e.g. spawn particles where the block landed
});