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

world.beforeEvents.worldInitialize.subscribe((Initiate) => {
    Initiate.blockComponentRegistry.registerCustomComponent("ecbl_bc:litter", {
        onTick: (e) => {
            const above = e.block.above();
            if (above.isValid() && above.typeId === 'minecraft:leaf_litter') above.setType('minecraft:air');
        }
    });
});