Skip to main content

Block Lifecycle

Custom blocks exist as barrier blocks in the world with two distinct phases.

Phases

PhaseWhenCallbacks
PlacedBarrier block exists in worldonPlaced, onPlacedClick, onPlacedInteract, onPlacedBreak
ActiveAfter ignition / fuseonPlace, onTick, onTrigger

Surface click routing is declared in YAML behavior. Override onPlacedClick only for custom logic beyond standard actions.

Config sections

SectionPurpose
displayTitle and description
blockPlaceable/breakable flags, base material, breaking tuning
texturesAsset paths (top, side, bottom)
behaviorSurface clicks — left/right block and air actions
custom_dataExtension-specific tuning (fuse, power, radius, etc.)

Block behavior

behavior:
combustible: true
left_click_block: break
right_click_block: ignite
left_click_air: none
right_click_air: none
ignition_materials:
- FLINT_AND_STEEL
- FIRE_CHARGE
sounds:
place: BLOCK_BEACON_ACTIVATE
ignite: ITEM_FLINTANDSTEEL_USE
Action tokenEffect
noneNo action
breakBreak the placed block
igniteStart fuse / active phase
openOpen extension GUI
handledStrategy handles the click

Persistence

Placed blocks are indexed in placed-blocks.json — see Storage.