import * as mc from "@minecraft/server"
const { world, system } = mc;

system.beforeEvents.startup.subscribe(initEvent => {
    initEvent.blockComponentRegistry.registerCustomComponent("brewinandchewin:crate", {
        //Делает то же самое, что и max:smoke.s
        onTick: result => {
            result.block.dimension.runCommand(`execute positioned ${result.block.center().x} ${result.block.center().y} ${result.block.center().z} run function crate`)
        }
    })
})