Guide 1 Docs 2 Reference 3

Function of BlockSpec

blockSpec.on_use

The hooks. Writing one is what asks for it — there is no flag beside on_random_tick saying the random pass may land here.

blockSpec.on_use((block: BlockAt, player: Player?, held: string?, base: (...any) -> any) -> Used?) → ?

Parameters

(blockBlockAt, player: Player?, held: string?, base: (...any) -> any) -> Usedoptional

Returns

?