import * as mc from "@minecraft/server";
import * as utils from "./utils/index";
import { initItemUpdater } from "./item_updater";
import { initRecipeBoxPlacer } from "./recipe_box_placer";
import { initWeaponPoster } from "./weapon_poster";
import { runAttacks } from "./melee_attack";
import { initArmadilloWeapon } from "./armadillo_weapon";
import { initBoggedAttack } from "./bogged_attack";
import { initBreezeVortex } from "./weapons/breeze";
import { initCamelWeapon } from "./weapons/camel";
import { initDonkeyWeapon } from "./weapons/donkey";
import { initGoatWeapon } from "./weapons/goat";
import { initMuleWeapon } from "./weapons/mule";
import { initRavagerWeapon } from "./weapons/ravager";
import { initWanderingTraderWeapon } from "./weapons/wandering_trader";
async function main() {
    utils.mclog("Hello World!");
    initRecipeBoxPlacer();
    initWeaponPoster();
    initItemUpdater();
    initArmadilloWeapon();
    initBoggedAttack();
    initBreezeVortex();
    initCamelWeapon();
    initDonkeyWeapon();
    initGoatWeapon();
    initMuleWeapon();
    initRavagerWeapon();
    initWanderingTraderWeapon();
    runAttacks();
    mc.system.runInterval(grayscale, 100);
    await utils.waitForWorldLoad();
    utils.overworld.runCommand('function admin/load_teller_scoreboards');
}
function grayscale() {
    utils.overworld.runCommand('playanimation @e[tag=looted] animation.generic.grayscale');
    utils.nether.runCommand('playanimation @e[tag=looted] animation.generic.grayscale');
    utils.end.runCommand('playanimation @e[tag=looted] animation.generic.grayscale');
}
mc.system.run(main);
