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

system.beforeEvents.startup.subscribe(initEvent => {
    initEvent.blockComponentRegistry.registerCustomComponent("brewinandchewin:scarlet_stage1", {
        onTick: result => {
            result.block.dimension.runCommand(`execute positioned ${result.block.center().x} ${result.block.center().y} ${result.block.center().z} run setblock ~~~ brewinandchewin:semiripe_scarlet_cheese_wheel`)
        }
    })
    initEvent.blockComponentRegistry.registerCustomComponent("brewinandchewin:scarlet_stage2", {
        onTick: result => {
            result.block.dimension.runCommand(`execute positioned ${result.block.center().x} ${result.block.center().y} ${result.block.center().z} run setblock ~~~ brewinandchewin:scarlet_cheese_wheel`)
        }
    })
});

system.beforeEvents.startup.subscribe(initEvent => {
    initEvent.blockComponentRegistry.registerCustomComponent("brewinandchewin:flaxen_stage1", {
        onTick: result => {
            result.block.dimension.runCommand(`execute positioned ${result.block.center().x} ${result.block.center().y} ${result.block.center().z} run setblock ~~~ brewinandchewin:semiripe_flaxen_cheese_wheel`)
        }
    })
    initEvent.blockComponentRegistry.registerCustomComponent("brewinandchewin:flaxen_stage2", {
        onTick: result => {
            result.block.dimension.runCommand(`execute positioned ${result.block.center().x} ${result.block.center().y} ${result.block.center().z} run setblock ~~~ brewinandchewin:flaxen_cheese_wheel`)
        }
    })
})