import { system } from "@minecraft/server";
export function emitDynamicLight(strength, player, duration = 2) {
    const { x, y, z } = player.location;
    system.run(() => {
        player.dimension.runCommand(`fill ${x} ${y} ${z} ${x} ${y + 3} ${z} minecraft:light_block["block_light_level"=${strength}] replace minecraft:air`);
    });
    system.runTimeout(() => {
        player.dimension.runCommand(`fill ${x} ${y} ${z} ${x} ${y + 3} ${z} minecraft:air replace minecraft:light_block["block_light_level"=${strength}]`);
    }, duration);
}
