import { world, BlockPermutation, } from "@minecraft/server";
const eggOffOld = "kicu_mmad:egg_i_l_s_off";
const eggOnOld = "kicu_mmad:egg_i_l_s_on";
const wardOld = "kicu_mmad:l_of_w_l_s";
export const RemoveIfEntityBlockGone = {
    onTick: (event) => {
        if (event.block.typeId in [eggOffOld, eggOnOld, wardOld]) {
            event.block.setPermutation(BlockPermutation.resolve("minecraft:air"));
        }
    },
};
export function runWorldInitEventBeforeEvent(log) {
    world.beforeEvents.worldInitialize.subscribe((initEvent) => {
        initEvent.blockComponentRegistry.registerCustomComponent("kicu_mmad:remove_block_if_entity_gone", RemoveIfEntityBlockGone);
    });
}

//# sourceMappingURL=../../../../../_KiCuMountsBPDebug/kicu/mmad/ESS/WorldInitEvent.js.map
