import { world } from "@minecraft/server";
import { isMultiple } from "./utils";
const overworld = world.getDimension("overworld");
const scp002TargetMobsEqo = {
    excludeFamilies: [
        "inanimate", "player", "no_scp002_effect", "projectile",
        "arrow", "bullet", "warden", "wither", "ender_dragon"
    ]
};
let tick = 0;
function simulateScp002_mobs() {
    const foundMobs = overworld.getEntities(scp002TargetMobsEqo);
    foundMobs.forEach(entity => {
        entity.runCommand("execute as @s at @s if block ~~0~ lc:dtr_scp002_floor if block ~~1~ lc:dtr_scp002_floor if block ~~2~ lc:dtr_scp002_floor run function scpdtr_func/system/die_in_scp002");
        entity.runCommand("execute as @s at @s if block ~~-1~ lc:dtr_scp002_floor run tp @s ~~-1~");
    });
}
export function simulateScp002() {
    if (isMultiple(tick, 30)) {
        simulateScp002_mobs();
    }
    if (tick > 700 && tick <= 1700 && isMultiple(tick, 5)) {
        overworld.runCommandAsync("execute as @a[m=!c] at @s if block ~~-0.75~ lc:dtr_scp002_floor run tp @s ~~-0.12~");
        overworld.runCommandAsync("execute as @a[m=!c] at @s if block ~~1~ lc:dtr_scp002_floor run damage @s 1 suicide");
        overworld.runCommandAsync("execute as @a[m=!c] at @s if block ~~0~ lc:dtr_scp002_floor run effect @s mining_fatigue 3 1 true");
    }
    if (tick > 1700) {
        tick = 0;
    }
    tick++;
}

//# sourceMappingURL=../../../../_scpdtr_scriptingDebug/scpdtr/copyPasteEverytime/scp002.js.map
