
import { system, world } from "@minecraft/server";


// set below grass
world.beforeEvents.worldInitialize.subscribe((Initiate) => {
    Initiate.blockComponentRegistry.registerCustomComponent("ecbl_bc:set_below_grass", {
        onTick: (e) => {
            const below = e.block.below();
            if (below.typeId === 'minecraft:dirt') below.setType('minecraft:grass_block');
        }
    });
});