Interface in @minecraft/server
A block an explosion broke.
import type { BlockExplodeAfterEvent } from '@minecraft/server';Subscribe to it with world.afterEvents.blockExplode.
Example
Section titled “Example”import { world, type BlockExplodeAfterEvent } from '@minecraft/server';
world.afterEvents.blockExplode.subscribe((event: BlockExplodeAfterEvent) => { console.log('blockExplode', event.block.typeId, event.dimension.id, event.explodedBlockPermutation.typeId);});import { world } from '@minecraft/server';
world.afterEvents.blockExplode.subscribe((event) => { console.log('blockExplode', event.block.typeId, event.dimension.id, event.explodedBlockPermutation.typeId);});Properties
Section titled “Properties”read-only
readonly block: Block;Where it was; air now.
Types
dimension
Section titled “dimension”read-only
readonly dimension: Dimension;Types
explodedBlockPermutation
Section titled “explodedBlockPermutation”read-only
readonly explodedBlockPermutation: BlockPermutation;What it was before.
Types
source
Section titled “source”read-only
readonly source: Entity | undefined;The creeper or other thing that went off.
Types
Used by
Section titled “Used by”WorldAfterEvents.blockExplode, BlockExplodeAfterEventSignal.subscribe, BlockExplodeAfterEventSignal.unsubscribe