import { system as te, world as ae } from "@minecraft/server";
function n(e, t) {
  let a = e.getComponent("inventory");
  if (a == null) return !1;
  let r = a.inventorySize,
    i = a.container;
  for (let m = 0; m < r; m++) {
    let d = i.getItem(m);
    if (d?.typeId == t && d.typeId == t) return !0;
  }
}
function p(e, t) {
  let a = e.getComponent("inventory");
  if (a == null) return !1;
  let r = a.inventorySize,
    i = a.container;
  for (let m = 0; m < r; m++) {
    let d = i.getItem(m);
    if (d?.typeId.includes(t) && d.typeId.includes(t)) return !0;
  }
}
import { GameMode as K } from "@minecraft/server";
var ee = {
  entry: ["00", "chat.advancementpack"],
  achievement: ["01", "chat.achievement.earn"],
  task: ["02", "chat.advancement.task"],
  challenge: ["03", "chat.advancement.challenge"],
  goal: ["04", "chat.advancement.goal"],
};
function o(e, t, a, r, i, m, d) {
  if (!e.isValid() || e.hasTag(i)) return;
  if (e.matches({ gameMode: K.creative })) {
    if (e.hasTag("has_shown_creative_warning")) return;
    x(e, "creative_toast_hidden"), e.addTag("has_shown_creative_warning");
    return;
  }
  let c = ee[a];
  c != null &&
    (m == null || !m
      ? e.sendMessage(`_r4ui:toast_0.header.${c[0]}.body.${t}.slideshow_0.${r}`)
      : e.sendMessage(
          `_r4ui:toast_0.header.${c[0]}.body.${t}.slideshow_1.${r}`
        ),
    d != null && e.addExperience(d),
    e.runCommand(
      `tellraw @a {"rawtext":[{"translate":"${c[1]}","with":{"rawtext":[{"selector":"@s"},{"translate":"r4ui.toast.body.${t}"}]}}]}`
    ),
    e.playSound("ui.toast.woosh"),
    a == "challenge" && e.playSound("ui.toast.challenge_complete"),
    e.addTag(i));
}
function x(e, t) {
  e.isValid() &&
    (e.sendMessage(`_r4ui:toast_1.tip.${t}`), e.playSound("ui.toast.woosh"));
}
te.runInterval(() => {
  ae.getPlayers({ tags: ["adv0"], excludeTags: ["ach6"] }).forEach((e) => {
    var t = n(e, "minecraft:iron_ingot");
    t && o(e, "006", "achievement", "textures/items/iron_ingot", "ach6");
  });
}, 5);
import { system as re, world as oe } from "@minecraft/server";
re.runInterval(() => {
  oe.getPlayers({ tags: ["adv0"], excludeTags: ["ach9"] }).forEach((e) => {
    var t = n(e, "minecraft:cake");
    t && o(e, "009", "achievement", "textures/items/cake", "ach9");
  });
}, 5);
import { system as ie, world as ne } from "@minecraft/server";
ie.runInterval(() => {
  ne.getPlayers({ tags: ["adv0"], excludeTags: ["ach25"] }).forEach((e) => {
    var t = n(e, "minecraft:blaze_rod");
    t && o(e, "025", "achievement", "textures/items/blaze_rod", "ach25");
  });
}, 5);
import { system as se, world as me } from "@minecraft/server";
se.runInterval(() => {
  me.getPlayers({ tags: ["adv0"], excludeTags: ["ach35"] }).forEach((e) => {
    var t = p(e, "bookshelf");
    t && o(e, "035", "achievement", "3080192", "ach35");
  });
}, 5);
import { system as de, world as ce } from "@minecraft/server";
de.runInterval(() => {
  ce.getPlayers({ tags: ["adv0"], excludeTags: ["ach17"] }).forEach((e) => {
    var t = e.hasTag("breed_cow"),
      a = e.hasTag("breed_mooshroom");
    (t || a) && o(e, "017", "achievement", "textures/items/wheat", "ach17");
  });
}, 5);
import { system as fe, world as le } from "@minecraft/server";
fe.runInterval(() => {
  le.getPlayers({ tags: ["adv0"], excludeTags: ["ach10"] }).forEach((e) => {
    var t = n(e, "minecraft:stone_pickaxe");
    t && o(e, "010", "achievement", "textures/items/stone_pickaxe", "ach10");
  });
}, 5);
import { system as he, world as _e } from "@minecraft/server";
he.runInterval(() => {
  _e.getPlayers({ tags: ["adv0"], excludeTags: ["ach5"] }).forEach((e) => {
    var t = p(e, "furnace"),
      a = n(e, "minecraft:smoker");
    (t || a) && o(e, "005", "achievement", "3997696", "ach5");
  });
}, 5);
import { system as ue, world as ve } from "@minecraft/server";
ue.runInterval(() => {
  ve.getPlayers({ tags: ["adv0"], excludeTags: ["ach7"] }).forEach((e) => {
    var t = n(e, "minecraft:wooden_hoe");
    t && o(e, "007", "achievement", "textures/items/wood_hoe", "ach7");
  });
}, 5);
import { system as ge, world as pe } from "@minecraft/server";
ge.runInterval(() => {
  pe.getPlayers({ tags: ["adv0"], excludeTags: ["ach4"] }).forEach((e) => {
    var t = n(e, "minecraft:wooden_pickaxe");
    t && o(e, "004", "achievement", "textures/items/wood_pickaxe", "ach4");
  });
}, 5);
import { system as be, world as we } from "@minecraft/server";
be.runInterval(() => {
  we.getPlayers({ tags: ["adv0"], excludeTags: ["ach14"] }).forEach((e) => {
    var t = n(e, "minecraft:wooden_sword");
    t && o(e, "014", "achievement", "textures/items/wood_sword", "ach14");
  });
}, 5);
import { system as ke, world as Te } from "@minecraft/server";
ke.runInterval(() => {
  Te.getPlayers({ tags: ["adv0"], excludeTags: ["ach3"] }).forEach((e) => {
    var t = n(e, "minecraft:crafting_table");
    t && o(e, "003", "achievement", "3801088", "ach3");
  });
}, 5);
import { system as xe, world as ye } from "@minecraft/server";
xe.runInterval(() => {
  ye.getPlayers({ tags: ["adv0"], excludeTags: ["ach12"] }).forEach((e) => {
    var t = n(e, "minecraft:cooked_cod"),
      a = n(e, "minecraft:cooked_salmon");
    (t || a) && o(e, "012", "achievement", "textures/items/fish_raw", "ach12");
  });
}, 5);
import { system as Ie, world as Ee } from "@minecraft/server";
Ie.runInterval(() => {
  Ee.getPlayers({ tags: ["adv0"], excludeTags: ["ach20"] }).forEach((e) => {
    var t = n(e, "minecraft:diamond");
    t && o(e, "020", "achievement", "textures/items/diamond", "adv20");
  });
}, 5);
import { world as Ae } from "@minecraft/server";
Ae.afterEvents.entitySpawn.subscribe((e) => {
  let { entity: t } = e;
  t.typeId != "minecraft:item" ||
    t.getComponent("item").itemStack.typeId != "minecraft:diamond" ||
    o(
      t.dimension.getPlayers({
        location: t.location,
        maxDistance: 4,
        closest: 1,
      })[0],
      "021",
      "achievement",
      "textures/items/diamond",
      "ach21"
    );
});
import { system as Pe, world as Se } from "@minecraft/server";
Pe.runInterval(() => {
  Se.getPlayers({ tags: ["adv0"], excludeTags: ["ach33"] }).forEach((e) => {
    var t = n(e, "minecraft:enchanting_table");
    t && o(e, "033", "achievement", "7602176", "ach33");
  });
}, 5);
import { system as ze, world as De } from "@minecraft/server";
ze.runInterval(() => {
  De.getPlayers({
    tags: [
      "adv0",
      "biome_bamboo_jungle",
      "biome_bamboo_jungle_hills",
      "biome_beach",
      "biome_birch_forest",
      "biome_birch_forest_hills",
      "biome_birch_forest_hills_mutated",
      "biome_birch_forest_mutated",
      "biome_cold_beach",
      "biome_cold_ocean",
      "biome_cold_taiga",
      "biome_cold_taiga_hills",
      "biome_cold_taiga_mutated",
      "biome_deep_cold_ocean",
      "biome_deep_frozen_ocean",
      "biome_deep_lukewarm_ocean",
      "biome_deep_ocean",
      "biome_deep_warm_ocean",
      "biome_desert",
      "biome_desert_hills",
      "biome_desert_mutated",
      "biome_extreme_hills",
      "biome_extreme_hills_edge",
      "biome_extreme_hills_forest",
      "biome_extreme_hills_mutated",
      "biome_extreme_hills_mutated_forest",
      "biome_flower_forest",
      "biome_forest",
      "biome_forest_hills",
      "biome_frozen_ocean",
      "biome_frozen_river",
      "biome_ice_mountains",
      "biome_ice_plains",
      "biome_ice_plains_spikes",
      "biome_jungle",
      "biome_jungle_edge",
      "biome_jungle_edge_mutated",
      "biome_jungle_hills",
      "biome_jungle_mutated",
      "biome_lukewarm_ocean",
      "biome_mega_spruce_taiga",
      "biome_mega_spruce_taiga_hills",
      "biome_mega_taiga",
      "biome_mega_taiga_hills",
      "biome_mesa",
      "biome_mesa_bryce",
      "biome_mesa_plateau",
      "biome_mesa_plateau_mutated",
      "biome_mesa_plateau_stone",
      "biome_mesa_plateau_stone_mutated",
      "biome_mushroom_island",
      "biome_mushroom_island_shore",
      "biome_ocean",
      "biome_plains",
      "biome_river",
      "biome_roofed_forest",
      "biome_roofed_forest_mutated",
      "biome_savanna",
      "biome_savanna_mutated",
      "biome_savanna_plateau",
      "biome_savanna_plateau_mutated",
      "biome_stone_beach",
      "biome_swamp",
      "biome_swamp_mutated",
      "biome_taiga",
      "biome_taiga_hills",
      "biome_taiga_mutated",
      "biome_warm_ocean",
      "biome_meadow",
    ],
    excludeTags: ["ach32"],
  }).forEach((e) => {
    o(e, "032", "challenge", "textures/items/diamond_boots", "ach32");
  });
}, 5);
import { EntityDamageCause as Be, world as Me } from "@minecraft/server";
Me.afterEvents.entityHurt.subscribe((e) => {
  let { damageSource: t, hurtEntity: a } = e;
  a.typeId != "minecraft:pig" ||
    t.cause != Be.fall ||
    a.dimension
      .getPlayers({ tags: ["riding_pig"], excludeTags: ["ach18"], closest: 1 })
      .forEach((r) => {
        o(r, "018", "achievement", "textures/items/saddle", "ach18");
      });
});
import { system as Ce, world as Ve } from "@minecraft/server";
var l,
  s = class {
    constructor(t, a, r) {
      (this.x = t), (this.y = a), (this.z = r);
    }
    length() {
      return Math.hypot(this.x, this.y, this.z);
    }
    lengthSquared() {
      return this.x ** 2 + this.y ** 2 + this.z ** 2;
    }
    normalized() {
      let t = this.length(),
        a = this.x / t,
        r = this.y / t,
        i = this.z / t;
      return new l(a, r, i);
    }
    static add(t, a) {
      let r = new l(t.x, t.y, t.z);
      return (r.x += a.x), (r.y += a.y), (r.z += a.z), r;
    }
    static cross(t, a) {
      return new l(
        t.y * a.z - t.z * a.y,
        t.z * a.x - t.x * a.z,
        t.x * a.y - t.y * a.x
      );
    }
    static distance(t, a) {
      let r = a.x - t.x,
        i = a.y - t.y,
        m = a.z - t.z;
      return Math.ceil(Math.hypot(r, i, m));
    }
    static divide(t, a) {
      let r = new l(t.x, t.y, t.z);
      return (
        typeof a == "number"
          ? ((r.x /= a), (r.y /= a), (r.z /= a))
          : ((r.x /= a.x), (r.y /= a.y), (r.z /= a.z)),
        r
      );
    }
    static lerp(t, a, r) {
      let i = new l(t.x, t.y, t.z);
      return (
        (i.x += (a.x - t.x) * r),
        (i.y += (a.y - t.y) * r),
        (i.z += (a.z - t.z) * r),
        i
      );
    }
    static max(t, a) {
      let r = [t, a],
        i = r.map(({ x: h, y: g, z: _ }) => new l(h, g, _).length()),
        m = Math.max(...i),
        d = i.indexOf(m),
        c = r[d];
      return new l(c.x, c.y, c.z);
    }
    static min(t, a) {
      let r = [t, a],
        i = r.map(({ x: h, y: g, z: _ }) => new l(h, g, _).length()),
        m = Math.min(...i),
        d = i.indexOf(m),
        c = r[d];
      return new l(c.x, c.y, c.z);
    }
    static multiply(t, a) {
      let r = new l(t.x, t.y, t.z);
      return (
        typeof a == "number"
          ? ((r.x *= a), (r.y *= a), (r.z *= a))
          : ((r.x *= a.x), (r.y *= a.y), (r.z *= a.z)),
        r
      );
    }
    static slerp(t, a, r) {
      function i(h, g) {
        return h.map((_, v) => h[v] * g[v]).reduce((_, v) => _ + v);
      }
      let m = Math.acos(i([t.x, t.y, t.z], [a.x, a.y, a.z])),
        d = Math.sin(m * (1 - r)) / Math.sin(m),
        c = Math.sin(m * r) / Math.sin(m);
      return new l(t.x * d + a.x * c, t.y * d + a.y * c, t.z * d + a.z * c);
    }
    static subtract(t, a) {
      let r = new l(t.x, t.y, t.z);
      return (r.x -= a.x), (r.y -= a.y), (r.z -= a.z), r;
    }
    floor() {
      return new l(Math.floor(this.x), Math.floor(this.y), Math.floor(this.z));
    }
    above() {
      return new l(this.x, this.y + 1, this.z);
    }
    between(t) {
      let a = t.x - this.x,
        r = t.y - this.y,
        i = t.z - this.z,
        m = [];
      for (let d = 0; d <= a; d++) {
        let c = d + this.x;
        for (let h = 0; h <= r; h++) {
          let g = h + this.y;
          for (let _ = 0; _ <= i; _++) {
            let v = _ + this.z;
            m.push(new l(c, g, v));
          }
        }
      }
      return m;
    }
    equals(t) {
      return this.x === t.x && this.y === t.y && this.z === t.z;
    }
    offset(t, a, r) {
      return new l(t + this.x, a + this.y, r + this.z);
    }
    isNear(t, a) {
      return l.distance(this, t) <= a;
    }
  };
l = s;
s.back = new l(0, 0, -1);
s.down = new l(0, -1, 0);
s.forward = new l(0, 0, 1);
s.left = new l(-1, 0, 0);
s.one = new l(1, 1, 1);
s.right = new l(1, 0, 0);
s.up = new l(0, 1, 0);
s.zero = new l(0, 0, 0);
function y(e, t, a) {
  let r = Math.min(e.x, t.x),
    i = Math.min(e.y, t.y),
    m = Math.min(e.z, t.z),
    d = Math.max(e.x, t.x),
    c = Math.max(e.y, t.y),
    h = Math.max(e.z, t.z),
    g = [];
  for (let _ = r; _ <= d; _++)
    for (let v = i; v <= c; v++)
      for (let b = m; b <= h; b++)
        try {
          let k = a.getBlock({ x: _, y: v, z: b });
          k?.isAir || g.push(k);
        } catch {}
  return g;
}
function w(e, t, a, r) {
  let i = Math.min(e.x, t.x),
    m = Math.min(e.y, t.y),
    d = Math.min(e.z, t.z),
    c = Math.max(e.x, t.x),
    h = Math.max(e.y, t.y),
    g = Math.max(e.z, t.z);
  for (let _ = i; _ <= c; _++)
    for (let v = m; v <= h; v++)
      for (let b = d; b <= g; b++)
        try {
          let k = a.getBlock({ x: _, y: v, z: b });
          if (k?.typeId == r) return k;
        } catch {}
}
Ce.runInterval(() => {
  Ve.getPlayers({ tags: ["adv0"], excludeTags: ["ach31"] }).forEach((e) => {
    let t = w(
      s.subtract(e.location, new s(10, 7, 10)),
      s.add(e.location, new s(10, 7, 10)),
      e.dimension,
      "minecraft:beacon"
    );
    if (t == null) return;
    let a = y(
      s.subtract(t.location, new s(-4, -1, -4)),
      s.subtract(t.location, new s(4, 4, 4)),
      t.dimension
    );
    if (a.length < 164) return;
    let r = 0;
    a.forEach((i) => {
      (i.getItemStack()?.typeId != "minecraft:iron_block" &&
        i.getItemStack()?.typeId != "minecraft:gold_block" &&
        i.getItemStack()?.typeId != "minecraft:emerald_block" &&
        i.getItemStack()?.typeId != "minecraft:diamond_block" &&
        i.getItemStack()?.typeId != "minecraft:netherite_block") ||
        (r += 1);
    }),
      !(r < 164) && o(e, "031", "goal", "9043968", "ach31");
  });
}, 250);
import { world as je } from "@minecraft/server";
je.afterEvents.entityDie.subscribe((e) => {
  let { damageSource: t, deadEntity: a } = e,
    r = t.damagingEntity,
    i = t.damagingProjectile,
    m = a.typeId;
  r == null ||
    i == null ||
    r.typeId != "minecraft:player" ||
    i.typeId != "minecraft:fireball" ||
    m != "minecraft:ghast" ||
    r.hasTag("ach23") ||
    o(r, "023", "challenge", "textures/items/fireball", "ach23");
});
import { system as Ue, world as He } from "@minecraft/server";
Ue.runInterval(() => {
  He.getPlayers({ tags: ["adv0"], excludeTags: ["ach16"] }).forEach((e) => {
    e.hasTag("killed_cow") &&
      o(e, "016", "achievement", "textures/items/leather", "ach16");
  });
}, 5);
import { system as $e, world as qe } from "@minecraft/server";
$e.runInterval(() => {
  qe.getPlayers({ tags: ["adv0"], excludeTags: ["ach15"] }).forEach((e) => {
    var t = e.hasTag("killed_blaze"),
      a = e.hasTag("killed_cave_spider"),
      r = e.hasTag("killed_creeper"),
      i = e.hasTag("killed_drowned"),
      m = e.hasTag("killed_elder_guardian"),
      d = e.hasTag("killed_ender_dragon"),
      c = e.hasTag("killed_enderman"),
      h = e.hasTag("killed_endermite"),
      g = e.hasTag("killed_evocation_illager"),
      _ = e.hasTag("killed_ghast"),
      v = e.hasTag("killed_guardian"),
      b = e.hasTag("killed_husk"),
      k = e.hasTag("killed_magma_cube"),
      I = e.hasTag("killed_phantom"),
      E = e.hasTag("killed_piglin"),
      A = e.hasTag("killed_piglin_brute"),
      P = e.hasTag("killed_pillager"),
      S = e.hasTag("killed_ravager"),
      z = e.hasTag("killed_shulker"),
      D = e.hasTag("killed_silverfish"),
      B = e.hasTag("killed_skeleton"),
      M = e.hasTag("killed_slime"),
      C = e.hasTag("killed_stray"),
      V = e.hasTag("killed_spider"),
      j = e.hasTag("killed_vex"),
      U = e.hasTag("killed_vindicator"),
      X = e.hasTag("killed_witch"),
      Z = e.hasTag("killed_wither_skeleton"),
      N = e.hasTag("killed_wither"),
      G = e.hasTag("killed_zombie_pigman"),
      J = e.hasTag("killed_zombie_villager"),
      Q = e.hasTag("killed_zombie");
    (t ||
      a ||
      r ||
      i ||
      m ||
      d ||
      c ||
      h ||
      g ||
      _ ||
      v ||
      b ||
      k ||
      I ||
      E ||
      A ||
      P ||
      S ||
      z ||
      D ||
      B ||
      M ||
      C ||
      V ||
      j ||
      U ||
      X ||
      Z ||
      N ||
      G ||
      J ||
      Q) &&
      o(e, "015", "achievement", "textures/items/iron_sword", "ach15");
  });
}, 5);
import { system as Fe, world as Oe } from "@minecraft/server";
Fe.runInterval(() => {
  Oe.getPlayers({ tags: ["adv0"], excludeTags: ["ach30"] }).forEach((e) => {
    e.hasTag("killed_wither") && o(e, "030", "achievement", "9437185", "ach30");
  });
}, 5);
import { system as We, world as Le } from "@minecraft/server";
We.runInterval(() => {
  Le.getPlayers({ tags: ["adv0"], excludeTags: ["ach8"] }).forEach((e) => {
    var t = n(e, "minecraft:bread");
    t && o(e, "008", "achievement", "textures/items/bread", "ach8");
  });
}, 5);
import { system as Re, world as Ye } from "@minecraft/server";
Re.runInterval(() => {
  Ye.getPlayers({ tags: ["adv0"], excludeTags: ["ach2"] }).forEach((e) => {
    var t = p(e, "_log");
    t && o(e, "002", "achievement", "1114112", "ach2");
  });
}, 5);
import { system as Xe, world as Ze } from "@minecraft/server";
function Ne(e, t) {
  var a = s.distance(t, e.location);
  a < 1e3 || o(e, "013", "achievement", "4325376", "ach13");
}
Xe.runInterval(() => {
  Ze.getPlayers({ tags: ["adv0"], excludeTags: ["ach13"] }).forEach((e) => {
    e.hasTag("riding_minecart")
      ? Ne(e, e.getDynamicProperty("adv:railDist"))
      : e.setDynamicProperty("adv:railDist", e.location);
  });
}, 5);
import { world as Ge } from "@minecraft/server";
Ge.afterEvents.entityHurt.subscribe((e) => {
  let { damage: t, damageSource: a, hurtEntity: r } = e,
    i = a.damagingEntity;
  i?.typeId != "minecraft:player" ||
    i.hasTag("ach34") ||
    r.matches({ families: ["inanimate"], excludeFamilies: ["mob"] }) ||
    t < 35 ||
    o(i, "034", "challenge", "textures/items/netherite_sword", "ach34");
});
import { system as Je, world as Qe } from "@minecraft/server";
Je.runInterval(() => {
  Qe.getPlayers({ tags: ["adv0"], excludeTags: ["ach11"] }).forEach((e) => {
    e.hasTag("consumed_enchanted_golden_apple") &&
      o(e, "011", "challenge", "textures/items/apple_golden", "ach11");
  });
}, 5);
import { world as Ke } from "@minecraft/server";
Ke.afterEvents.playerDimensionChange.subscribe((e) => {
  let { toDimension: t, player: a } = e;
  a.hasTag("ach22") ||
    (t.id == "minecraft:nether" &&
      o(a, "022", "achievement", "textures/items/flint_and_steel", "ach22"));
});
import { system as et, world as tt } from "@minecraft/server";
et.runInterval(() => {
  tt.getPlayers({ tags: ["adv0"], excludeTags: ["ach26"] }).forEach((e) => {
    var t = p(e, "potion");
    t &&
      o(e, "026", "achievement", "textures/items/potion_bottle_heal", "ach26");
  });
}, 5);
import { world as at } from "@minecraft/server";
at.afterEvents.entityDie.subscribe((e) => {
  let { damageSource: t, deadEntity: a } = e,
    r = t.damagingEntity,
    i = t.damagingProjectile;
  if (
    !(r == null || i == null) &&
    !r.hasTag("ach19") &&
    !(
      r.typeId != "minecraft:player" ||
      i.typeId != "minecraft:arrow" ||
      !a.matches({ families: ["skeleton"] })
    )
  ) {
    var m = s.distance(r.location, a.location);
    m < 50 || o(r, "019", "challenge", "textures/items/arrow", "ach19");
  }
});
import { world as rt } from "@minecraft/server";
rt.afterEvents.playerDimensionChange.subscribe((e) => {
  let { toDimension: t, player: a } = e;
  a.hasTag("ach27") ||
    (t.id == "minecraft:the_end" &&
      o(a, "027", "achievement", "7929856", "ach27"));
});
import { world as ot } from "@minecraft/server";
import { world as H } from "@minecraft/server";
function u(e, t, a = !0) {
  let r = e.getTags().filter((i) => i.startsWith(t));
  if (!(r.length < 1)) {
    for (let i of r) e.removeTag(i);
    a &&
      e.name == "r4isen1920" &&
      e.sendMessage(`Removed ${r.length} '${t}*' tags.`);
  }
}
H.afterEvents.entityDie.subscribe((e) => {
  let { damageSource: t, deadEntity: a } = e,
    r = t.damagingEntity,
    i = t.damagingProjectile,
    m = a.typeId;
  if (
    !(
      r == null ||
      i == null ||
      r.typeId != "minecraft:player" ||
      i.typeId != "minecraft:arrow" ||
      r.getComponent("inventory").container.getItem(r.selectedSlot).typeId !=
        "minecraft:crossbow"
    )
  ) {
    var c = m.replace("minecraft:", "");
    r.addTag(`crossbow_hit_${c}`);
  }
});
H.afterEvents.itemStartUse.subscribe((e) => {
  let { itemStack: t, source: a } = e;
  t.typeId == "minecraft:crossbow" && u(a, "crossbow_hit_");
});
function $(e) {
  return e.getTags().filter((a) => a.startsWith("crossbow_hit_")).length;
}
ot.afterEvents.entityDie.subscribe((e) => {
  let { damageSource: t } = e;
  try {
    let r = t.damagingEntity;
    if (r == null || r.hasTag("adv37")) return;
    var a = $(r);
    if (a < 5) return;
    o(r, "037", "challenge", "textures/items/crossbow_standby", "adv37");
  } catch {}
});
import { system as it, world as nt } from "@minecraft/server";
it.runInterval(() => {
  nt.getPlayers({ tags: ["adv0"], excludeTags: ["adv38"] }).forEach((e) => {
    if (!e.isSneaking) return;
    let t = e.dimension,
      a = t.getEntities({
        location: e.location,
        maxDistance: 16,
        families: ["warden"],
      }),
      r = w(
        s.subtract(e.location, new s(4, 4, 4)),
        s.add(e.location, new s(4, 4, 4)),
        t,
        "minecraft:sculk_sensor"
      );
    (a.typeId == "minecraft:sculk_sensor" ||
      r?.typeId == "minecraft:sculk_sensor") &&
      o(e, "038", "task", "-20119552", "adv38");
  });
}, 50);
import { world as st } from "@minecraft/server";
st.afterEvents.projectileHitBlock.subscribe((e) => {
  let { source: t } = e,
    a = e.getBlockHit();
  try {
    if (
      a.block.getItemStack()?.typeId != "minecraft:target" ||
      t?.typeId != "minecraft:player" ||
      t?.hasTag("adv39")
    )
      return;
  } catch {
    return;
  }
  let r = a.faceLocation,
    i = 0.4,
    m = 0.6;
  var d = !1;
  switch (a.face) {
    case "Up":
      if (r.x > i && r.x < m && r.z > i && r.z < m) {
        d = !0;
        break;
      }
    case "Down":
      if (r.x > i && r.x < m && r.z > i && r.z < m) {
        d = !0;
        break;
      }
    case "North":
      if (r.x > i && r.x < m && r.y > i && r.y < m) {
        d = !0;
        break;
      }
    case "South":
      if (r.x > i && r.x < m && r.y > i && r.y < m) {
        d = !0;
        break;
      }
    case "West":
      if (r.y > i && r.y < m && r.z > i && r.z < m) {
        d = !0;
        break;
      }
    case "East":
      if (r.y > i && r.y < m && r.z > i && r.z < m) {
        d = !0;
        break;
      }
  }
  if (d) {
    var c = s.distance(t.location, a.block.location);
    c < 15 || o(t, "039", "challenge", "-15663104", "adv39");
  }
});
import { system as mt, world as dt } from "@minecraft/server";
mt.runInterval(() => {
  dt.getPlayers({ tags: ["adv0"], excludeTags: ["adv40"] }).forEach((e) => {
    var t = n(e, "minecraft:decorated_pot");
    t && o(e, "040", "task", "-36110336", "adv40");
  });
}, 5);
import { system as ct, world as ft } from "@minecraft/server";
ct.runInterval(() => {
  ft.getPlayers({ tags: ["adv0"], excludeTags: ["adv41"] }).forEach((e) => {
    if (e.isFalling && !e.isGliding) {
      var t = s.distance(e.getDynamicProperty("adv:fallDist"), e.location);
      if (t < 379) return;
      o(e, "041", "task", "textures/items/bucket_water", "adv41");
    } else e.setDynamicProperty("adv:fallDist", e.location);
  });
}, 5);
import { world as lt } from "@minecraft/server";
lt.afterEvents.effectAdd.subscribe((e) => {
  let { effect: t, entity: a } = e;
  try {
    if (t.typeId != "hero_of_the_village" || a.typeId != "minecraft:player")
      return;
  } catch {
    return;
  }
  a.hasTag("adv42") ||
    o(
      a,
      "042",
      "challenge",
      "textures/advancement/icons/illager_banner",
      "adv42"
    );
});
import { system as ht, world as _t } from "@minecraft/server";
ht.runInterval(() => {
  _t.getPlayers({ tags: ["adv0"], excludeTags: ["adv43"] }).forEach((e) => {
    try {
      var t = e.dimension.getBlock(
        s.subtract(e.location, new s(0, 1, 0))
      ).isAir;
    } catch {
      return;
    }
    if (t) {
      var a =
          e.dimension.getBlock(s.add(e.location, new s(1, 0, 0))).typeId ==
          "minecraft:honey_block",
        r =
          e.dimension.getBlock(s.add(e.location, new s(-1, 0, 0))).typeId ==
          "minecraft:honey_block",
        i =
          e.dimension.getBlock(s.add(e.location, new s(0, 0, 1))).typeId ==
          "minecraft:honey_block",
        m =
          e.dimension.getBlock(s.add(e.location, new s(0, 0, -1))).typeId ==
          "minecraft:honey_block";
      (a || r || i || m) && o(e, "043", "task", "-14417920", "adv43");
    }
  });
}, 20);
import { system as ut, world as vt } from "@minecraft/server";
ut.runInterval(() => {
  vt.getPlayers({
    tags: [
      "adv0",
      "killed_blaze",
      "killed_cave_spider",
      "killed_creeper",
      "killed_drowned",
      "killed_elder_guardian",
      "killed_ender_dragon",
      "killed_enderman",
      "killed_endermite",
      "killed_evocation_illager",
      "killed_ghast",
      "killed_guardian",
      "killed_husk",
      "killed_magma_cube",
      "killed_phantom",
      "killed_piglin",
      "killed_piglin_brute",
      "killed_pillager",
      "killed_ravager",
      "killed_shulker",
      "killed_silverfish",
      "killed_skeleton",
      "killed_slime",
      "killed_stray",
      "killed_spider",
      "killed_vex",
      "killed_vindicator",
      "killed_witch",
      "killed_wither_skeleton",
      "killed_wither",
      "killed_zombie_pigman",
      "killed_zombie_villager",
      "killed_zombie",
    ],
    excludeTags: ["adv45"],
  }).forEach((e) => {
    o(e, "045", "challenge", "textures/items/diamond_sword", "adv45");
  });
}, 5);
import { world as gt } from "@minecraft/server";
gt.afterEvents.entityDie.subscribe((e) => {
  let { damageSource: t, deadEntity: a } = e;
  try {
    if (!a.matches({ families: ["mob"] })) return;
  } catch {
    return;
  }
  let r = t.damagingEntity;
  r == null ||
    r?.hasTag("adv46") ||
    w(
      s.subtract(a.location, new s(4, 4, 4)),
      s.add(a.location, new s(4, 4, 4)),
      a.dimension,
      "minecraft:sculk_catalyst"
    )?.typeId != "minecraft:sculk_catalyst" ||
    o(r, "046", "challenge", "-30146560", "adv46");
});
import { world as pt } from "@minecraft/server";
pt.afterEvents.entitySpawn.subscribe((e) => {
  let { entity: t } = e;
  t.typeId != "minecraft:lightning_bolt" ||
    w(
      s.subtract(t.location, new s(1, 1, 1)),
      s.add(t.location, new s(1, 1, 1)),
      t.dimension,
      "minecraft:lightning_rod"
    )?.typeId != "minecraft:lightning_rod" ||
    t.dimension.getEntities({
      location: t.location,
      maxDistance: 6,
      families: ["villager"],
    }).length < 1 ||
    t.dimension
      .getPlayers({
        location: t.location,
        maxDistance: 30,
        tags: ["adv0"],
        excludeTags: ["adv47"],
      })
      .forEach((i) => {
        o(i, "047", "task", "-20447232	", "adv47");
      });
});
import { world as bt } from "@minecraft/server";
bt.afterEvents.itemUse.subscribe((e) => {
  let { itemStack: t, source: a } = e;
  a.hasTag("adv48") ||
    (t.typeId == "minecraft:crossbow" &&
      o(a, "048", "task", "textures/items/crossbow_standby", "adv48"));
});
import { world as wt } from "@minecraft/server";
wt.afterEvents.itemUseOn.subscribe((e) => {
  let { itemStack: t, block: a, source: r } = e;
  a.getItemStack()?.typeId != "minecraft:jukebox" ||
    r.hasTag("adv49") ||
    !t?.typeId.startsWith("minecraft:music_disc") ||
    (r.getDynamicProperty("adv:currentBiome") == "meadow" &&
      o(r, "049", "task", "5505024", "adv49"));
});
import { world as kt } from "@minecraft/server";
kt.afterEvents.playerPlaceBlock.subscribe((e) => {
  let { block: t, dimension: a, player: r } = e;
  if (!r.hasTag("adv50")) {
    var i =
        a.getBlock(s.add(t.location, new s(1, 0, 0))).typeId ==
        "minecraft:chiseled_bookshelf",
      m =
        a.getBlock(s.add(t.location, new s(-1, 0, 0))).typeId ==
        "minecraft:chiseled_bookshelf",
      d =
        a.getBlock(s.add(t.location, new s(0, 0, 1))).typeId ==
        "minecraft:chiseled_bookshelf",
      c =
        a.getBlock(s.add(t.location, new s(0, 0, -1))).typeId ==
        "minecraft:chiseled_bookshelf";
    (i || m || d || c) && o(r, "050", "task", "-34471936", "adv50");
  }
});
import { system as Tt, world as xt } from "@minecraft/server";
Tt.runInterval(() => {
  xt.getPlayers({ tags: ["adv0"], excludeTags: ["adv52"] }).forEach((e) => {
    var t = p(e, "sherd");
    t && o(e, "052", "task", "textures/items/brush", "adv52", !0);
  });
}, 5);
import { world as yt } from "@minecraft/server";
yt.afterEvents.itemReleaseUse.subscribe((e) => {
  let { itemStack: t, source: a } = e;
  a.hasTag("adv53") ||
    (t.typeId == "minecraft:bow" &&
      o(a, "053", "task", "textures/items/bow_standby", "adv53"));
});
import { system as It, world as Et } from "@minecraft/server";
It.runInterval(() => {
  Et.getPlayers({ tags: ["adv0"] }).forEach((e) => {
    if (e.isSleeping)
      e.onScreenDisplay.setTitle("_r4ui:"),
        o(e, "054", "task", "textures/advancement/icons/red_bed", "adv54");
    else {
      if (!e.hasTag("adv54")) return;
      e.onScreenDisplay.setTitle("_r4ui:clear_");
    }
  });
}, 1);
import { world as At } from "@minecraft/server";
At.afterEvents.itemStartUse.subscribe((e) => {
  let { itemStack: t, source: a } = e;
  if (t.typeId != "minecraft:spyglass" || a.hasTag("adv56")) return;
  let r = a.getEntitiesFromViewDirection({ maxDistance: 64 });
  r == null;
  for (let i of r) {
    if (i.entity.typeId != "minecraft:ender_dragon") return;
    o(a, "056", "task", "textures/items/spyglass", "adv56");
    break;
  }
});
import { world as Pt } from "@minecraft/server";
Pt.afterEvents.itemStartUse.subscribe((e) => {
  let { itemStack: t, source: a } = e;
  if (t.typeId != "minecraft:spyglass" || a.hasTag("adv57")) return;
  let r = a.getEntitiesFromViewDirection({ maxDistance: 64 });
  r == null;
  for (let i of r) {
    if (i.entity.typeId != "minecraft:ghast") return;
    o(a, "057", "task", "textures/items/spyglass", "adv57");
    break;
  }
});
import { world as St } from "@minecraft/server";
St.afterEvents.itemStartUse.subscribe((e) => {
  let { itemStack: t, source: a } = e;
  if (t.typeId != "minecraft:spyglass" || a.hasTag("adv58")) return;
  let r = a.getEntitiesFromViewDirection({ maxDistance: 64 });
  r == null;
  for (let i of r) {
    if (i.entity.typeId != "minecraft:parrot") return;
    o(a, "058", "task", "textures/items/spyglass", "adv58");
    break;
  }
});
import {
  EntityInitializationCause as zt,
  world as Dt,
} from "@minecraft/server";
Dt.afterEvents.entitySpawn.subscribe((e) => {
  let { cause: t, entity: a } = e;
  a.typeId == "minecraft:iron_golem" &&
    t == zt.Event &&
    a.dimension
      .getPlayers({
        location: a.location,
        maxDistance: 16,
        tags: ["adv0"],
        excludeTags: ["adv59"],
      })
      .forEach((r) => {
        o(r, "059", "goal", "-10158080", "adv59");
      });
});
import { world as Bt } from "@minecraft/server";
Bt.afterEvents.entityHurt.subscribe((e) => {
  let { damageSource: t } = e,
    a = t.damagingEntity,
    r = t.damagingProjectile;
  a == null ||
    r == null ||
    a.typeId != "minecraft:player" ||
    r.typeId != "minecraft:thrown_trident" ||
    a.hasTag("adv60") ||
    o(a, "060", "task", "textures/items/trident", "adv60");
});
import {
  EquipmentSlot as q,
  system as Mt,
  world as F,
} from "@minecraft/server";
F.afterEvents.entityHurt.subscribe((e) => {
  let { damage: t, hurtEntity: a } = e;
  if (a.typeId != "minecraft:player" || !a.hasTag("has_totem")) return;
  let r = a.getComponent("health").currentValue;
  ((r / a.getComponent("health").effectiveMax) * 100 < 15 || t > r) &&
    (o(a, "061", "goal", "textures/items/totem", "adv61"),
    a.removeTag("has_totem"));
});
Mt.runInterval(() => {
  F.getPlayers({ tags: ["adv0"], excludeTags: ["adv61"] }).forEach((e) => {
    var t = e.getComponent("equippable"),
      a = t.getEquipment(q.Mainhand),
      r = t.getEquipment(q.Offhand);
    a?.typeId == "minecraft:totem_of_undying" ||
    r?.typeId == "minecraft:totem_of_undying"
      ? e.addTag("has_totem")
      : e.removeTag("has_totem");
  });
}, 5);
import { system as Ct, world as Vt } from "@minecraft/server";
Ct.runInterval(() => {
  Vt.getPlayers({ tags: ["adv0"], excludeTags: ["adv64"] }).forEach((e) => {
    var t = n(e, "minecraft:spire_armor_trim_smithing_template"),
      a = n(e, "minecraft:snout_armor_trim_smithing_template"),
      r = n(e, "minecraft:rib_armor_trim_smithing_template"),
      i = n(e, "minecraft:ward_armor_trim_smithing_template"),
      m = n(e, "minecraft:silence_armor_trim_smithing_template"),
      d = n(e, "minecraft:vex_armor_trim_smithing_template"),
      c = n(e, "minecraft:tide_armor_trim_smithing_template"),
      h = n(e, "minecraft:wayfinder_armor_trim_smithing_template");
    !t ||
      !a ||
      !r ||
      !i ||
      !m ||
      !d | !c | !h ||
      o(
        e,
        "064",
        "challenge",
        "textures/items/dune_armor_trim_smithing_template",
        "adv64"
      );
  });
}, 5);
import { world as jt } from "@minecraft/server";
jt.afterEvents.itemUseOn.subscribe((e) => {
  let { block: t, source: a } = e;
  if (
    !(
      t.getItemStack()?.typeId != "minecraft:smithing_table" ||
      a.hasTag("adv65")
    )
  ) {
    var r = p(a, "armor_trim_smithing_template");
    r &&
      o(
        a,
        "065",
        "task",
        "textures/items/dune_armor_trim_smithing_template",
        "adv65"
      );
  }
});
import { world as Ut } from "@minecraft/server";
Ut.afterEvents.entityDie.subscribe((e) => {
  let { damageSource: t } = e;
  try {
    let a = t.damagingEntity;
    if (a == null || a.hasTag("adv66") || !a.hasTag("crossbow_hit_phantom"))
      return;
    a.hasTag("crossbow_hit_phantom_2")
      ? o(a, "066", "challenge", "textures/items/crossbow_standby", "adv66")
      : a.addTag("crossbow_hit_phantom_2");
  } catch {}
});
import { world as Ht } from "@minecraft/server";
Ht.afterEvents.entitySpawn.subscribe((e) => {
  let { cause: t, entity: a } = e;
  if (t != "Transformed" || a.typeId != "minecraft:witch") return;
  let r = a.dimension.getPlayers({ closest: 1, excludeTags: ["adv67"] });
  for (let i of r) o(i, "067", "task", "textures/items/trident", "adv67");
});
import { world as $t } from "@minecraft/server";
$t.afterEvents.effectAdd.subscribe((e) => {
  let { effect: t, entity: a } = e;
  try {
    if (t.typeId != "bad_omen" || a.typeId != "minecraft:player") return;
  } catch {
    return;
  }
  a.hasTag("adv68") ||
    o(a, "068", "task", "textures/advancement/icons/illager_banner", "adv68");
});
import {
  EquipmentSlot as qt,
  system as Ft,
  world as Ot,
} from "@minecraft/server";
Ft.runInterval(() => {
  Ot.getPlayers({ tags: ["adv0"], excludeTags: ["adv69"] }).forEach((e) => {
    try {
      var t = e.dimension.getBlock(
        s.subtract(e.location, new s(0, 1, 0))
      ).typeId;
    } catch {
      return;
    }
    t != "minecraft:powder_snow" ||
      e.getComponent("equippable").getEquipment(qt.Feet).typeId !=
        "minecraft:leather_boots" ||
      o(e, "069", "task", "textures/advancement/icons/leather_boots", "adv69");
  });
}, 20);
import { system as Wt, world as Lt } from "@minecraft/server";
Wt.runInterval(() => {
  Lt.getPlayers({ tags: ["adv0", "killed_pillager"] }).forEach((e) => {
    e.hasTag("adv70") ||
      o(e, "070", "task", "textures/items/crossbow_standby", "adv70");
  });
}, 5);
import { system as Rt, world as Yt } from "@minecraft/server";
Rt.runInterval(() => {
  Yt.getPlayers({ tags: ["adv0"], excludeTags: ["adv97"] }).forEach((e) => {
    var t = n(e, "minecraft:dragon_breath");
    t && o(e, "097", "goal", "textures/items/dragons_breath", "adv97");
  });
}, 5);
import { system as Xt, world as Zt } from "@minecraft/server";
Xt.runInterval(() => {
  Zt.getPlayers({ tags: ["adv0"], excludeTags: ["adv98"] }).forEach((e) => {
    var t = n(e, "minecraft:dragon_egg");
    t && o(e, "098", "goal", "7995392", "adv98");
  });
}, 5);
import { system as Nt, world as Gt } from "@minecraft/server";
Nt.runInterval(() => {
  Gt.getPlayers({ tags: ["adv0"], excludeTags: ["adv99"] }).forEach((e) => {
    var t = n(e, "minecraft:elytra");
    t && o(e, "099", "goal", "textures/items/elytra", "adv99");
  });
}, 5);
import { world as Jt } from "@minecraft/server";
Jt.afterEvents.itemUse.subscribe((e) => {
  let { itemStack: t, source: a } = e;
  a.hasTag("adv100") ||
    t.typeId != "minecraft:ender_pearl" ||
    a.getBlockFromViewDirection().block.typeId != "minecraft:end_gateway" ||
    o(a, "100", "achievement", "textures/items/ender_pearl", "adv100");
});
import { system as Qt, world as Kt } from "@minecraft/server";
Qt.runInterval(() => {
  Kt.getPlayers({ tags: ["adv0"], excludeTags: ["adv102"] }).forEach((e) => {
    e.hasTag("killed_ender_dragon") &&
      o(
        e,
        "102",
        "achievement",
        "textures/advancement/icons/dragon_head",
        "adv102"
      );
  });
}, 5);
import { system as ea, world as ta } from "@minecraft/server";
function aa(e, t) {
  var a = s.distance(t, e.location);
  a < 50 ||
    o(e, "103", "challenge", "textures/items/shulker_shell", "adv103", !0);
}
ea.runInterval(() => {
  ta.getPlayers({ tags: ["adv0"], excludeTags: ["adv103"] }).forEach((e) => {
    e.getEffect("levitation")
      ? aa(e, e.getDynamicProperty("adv:levitationPos"))
      : e.setDynamicProperty("adv:levitationPos", e.location);
  });
}, 5);
import { world as ra } from "@minecraft/server";
ra.afterEvents.entitySpawn.subscribe((e) => {
  let { entity: t } = e;
  t.typeId == "minecraft:ender_dragon" &&
    t.dimension
      .getPlayers({
        location: t.location,
        maxDistance: 64,
        tags: ["adv0", "killed_ender_dragon"],
        excludeTags: ["adv104"],
      })
      .forEach((a) => {
        o(a, "104", "goal", "textures/items/end_crystal", "adv104");
      });
});
import { system as oa, world as ia } from "@minecraft/server";
oa.runInterval(() => {
  ia.getPlayers({ tags: ["adv0"], excludeTags: ["adv73"] }).forEach((e) => {
    var t = n(e, "minecraft:axolotl_bucket");
    t && o(e, "073", "task", "textures/items/bucket_axolotl", "adv73");
  });
}, 5);
import { system as na, world as sa } from "@minecraft/server";
na.runInterval(() => {
  sa.getPlayers({
    tags: [
      "adv0",
      "consumed_apple",
      "consumed_baked_potato",
      "consumed_beef",
      "consumed_beetroot",
      "consumed_beetroot_soup",
      "consumed_bread",
      "consumed_carrot",
      "consumed_chicken",
      "consumed_chorus_fruit",
      "consumed_cod",
      "consumed_cooked_beef",
      "consumed_cooked_chicken",
      "consumed_cooked_cod",
      "consumed_cooked_mutton",
      "consumed_cooked_porkchop",
      "consumed_cooked_rabbit",
      "consumed_cooked_salmon",
      "consumed_cookie",
      "consumed_dried_kelp",
      "consumed_enchanted_golden_apple",
      "consumed_golden_apple",
      "consumed_golden_carrot",
      "consumed_honey_bottle",
      "consumed_melon_slice",
      "consumed_mushroom_stew",
      "consumed_mutton",
      "consumed_poisonous_potato",
      "consumed_porkchop",
      "consumed_potato",
      "consumed_pufferfish",
      "consumed_pumpkin_pie",
      "consumed_rabbit",
      "consumed_rabbit_stew",
      "consumed_rotten_flesh",
      "consumed_salmon",
      "consumed_spider_eye",
      "consumed_suspicious_stew",
      "consumed_sweet_berries",
      "consumed_tropical_fish",
    ],
    excludeTags: ["adv74"],
  }).forEach((e) => {
    o(e, "074", "challenge", "textures/items/apple", "adv74");
  });
}, 5);
import { system as ma, world as da } from "@minecraft/server";
ma.runInterval(() => {
  da.getPlayers({
    tags: [
      "adv0",
      "breed_armadillo",
      "breed_axolotl",
      "breed_bee",
      "breed_camel",
      "breed_cat",
      "breed_chicken",
      "breed_cow",
      "breed_donkey",
      "breed_fox",
      "breed_frog",
      "breed_goat",
      "breed_hoglin",
      "breed_horse",
      "breed_llama",
      "breed_mooshroom",
      "breed_mule",
      "breed_ocelot",
      "breed_panda",
      "breed_pig",
      "breed_rabbit",
      "breed_sheep",
      "breed_sniffer",
      "breed_strider",
      "breed_trader_llama",
      "breed_turtle",
      "breed_wolf",
    ],
    excludeTags: ["adv75"],
  }).forEach((e) => {
    e.hasTag("adv75") ||
      o(e, "075", "challenge", "textures/items/carrot_golden", "adv75");
  });
}, 5);
import { system as ca, world as fa } from "@minecraft/server";
ca.runInterval(() => {
  fa.getPlayers({ tags: ["adv0"], excludeTags: ["adv76"] }).forEach((e) => {
    var t = e.hasTag("breed_armadillo"),
      a = e.hasTag("breed_axolotl"),
      r = e.hasTag("breed_bee"),
      i = e.hasTag("breed_camel"),
      m = e.hasTag("breed_cat"),
      d = e.hasTag("breed_chicken"),
      c = e.hasTag("breed_cow"),
      h = e.hasTag("breed_donkey"),
      g = e.hasTag("breed_fox"),
      _ = e.hasTag("breed_frog"),
      v = e.hasTag("breed_goat"),
      b = e.hasTag("breed_hoglin"),
      k = e.hasTag("breed_horse"),
      I = e.hasTag("breed_llama"),
      E = e.hasTag("breed_mooshroom"),
      A = e.hasTag("breed_mule"),
      P = e.hasTag("breed_ocelot"),
      S = e.hasTag("breed_panda"),
      z = e.hasTag("breed_pig"),
      D = e.hasTag("breed_rabbit"),
      B = e.hasTag("breed_sheep"),
      M = e.hasTag("breed_sniffer"),
      C = e.hasTag("breed_strider"),
      V = e.hasTag("breed_trader_llama"),
      j = e.hasTag("breed_turtle"),
      U = e.hasTag("breed_wolf");
    (t ||
      a ||
      r ||
      i ||
      m ||
      d ||
      c ||
      h ||
      g ||
      _ ||
      v ||
      b ||
      k ||
      I ||
      E ||
      A ||
      P ||
      S ||
      z ||
      D ||
      B ||
      M ||
      C ||
      V ||
      j ||
      U) &&
      o(e, "076", "achievement", "textures/items/wheat", "adv76", !0);
  });
}, 5);
import { system as la, world as ha } from "@minecraft/server";
la.runInterval(() => {
  ha.getPlayers({
    tags: [
      "adv0",
      "tamed_cat_white",
      "tamed_cat_tuxedo",
      "tamed_cat_red",
      "tamed_cat_siamese",
      "tamed_cat_british",
      "tamed_cat_calico",
      "tamed_cat_persian",
      "tamed_cat_ragdoll",
      "tamed_cat_tabby",
      "tamed_cat_black",
      "tamed_cat_jellie",
    ],
    excludeTags: ["adv77"],
  }).forEach((e) => {
    o(e, "077", "challenge", "textures/items/fish_raw", "adv77");
  });
}, 5);
import { world as _a } from "@minecraft/server";
_a.afterEvents.itemUse.subscribe((e) => {
  let { itemStack: t, source: a } = e;
  a.hasTag("adv79") ||
    (t.typeId == "minecraft:fishing_rod" &&
      o(a, "079", "task", "textures/items/fishing_rod_uncast", "adv79"));
});
import { system as ua, world as va } from "@minecraft/server";
ua.runInterval(() => {
  va.getPlayers({ tags: ["adv0"] }).forEach((e) => {
    if (!e.hasTag("adv80")) {
      var t = n(e, "minecraft:ochre_froglight"),
        a = n(e, "minecraft:pearlescent_froglight"),
        r = n(e, "minecraft:verdant_froglight");
      t && a && r && o(e, "080", "task", "-30736384", "adv80", !0);
    }
  });
}, 5);
import { world as ga } from "@minecraft/server";
ga.afterEvents.itemUseOn.subscribe((e) => {
  let { block: t, itemStack: a, source: r } = e;
  r.hasTag("adv83") ||
    !t.getItemStack()?.typeId.includes("sign") ||
    a.typeId != "minecraft:glow_ink_sac" ||
    o(r, "083", "task", "textures/items/dye_powder_glow", "adv83");
});
import { system as pa, world as ba } from "@minecraft/server";
pa.runInterval(() => {
  ba.getPlayers({ tags: ["adv0"], excludeTags: ["adv084"] }).forEach((e) => {
    var t = n(e, "minecraft:netherite_hoe");
    t && o(e, "084", "challenge", "textures/items/netherite_hoe", "adv084");
  });
}, 5);
import { system as wa, world as ka } from "@minecraft/server";
wa.runInterval(() => {
  ka.getPlayers({ tags: ["adv0"], excludeTags: ["adv90"] }).forEach((e) => {
    var t = n(e, "minecraft:honey_bottle");
    t && o(e, "090", "task", "textures/items/honey_bottle", "adv90");
  });
}, 5);
import { system as Ta, world as xa } from "@minecraft/server";
Ta.runInterval(() => {
  xa.getPlayers({ tags: ["adv0"], excludeTags: ["adv91"] }).forEach((e) => {
    var t = n(e, "minecraft:bee_nest");
    t && o(e, "091", "task", "-14286848", "adv91");
  });
}, 5);
import { system as ya, world as Ia } from "@minecraft/server";
ya.runInterval(() => {
  Ia.getPlayers({ tags: ["adv0"], excludeTags: ["adv92"] }).forEach((e) => {
    var t = n(e, "minecraft:cod_bucket"),
      a = n(e, "minecraft:pufferfish_bucket"),
      r = n(e, "minecraft:salmon_bucket"),
      i = n(e, "minecraft:tadpole_bucket"),
      m = n(e, "minecraft:tropical_fish_bucket"),
      d = n(e, "minecraft:axolotl_bucket");
    (t || a || r || i || m || d) &&
      o(e, "092", "task", "textures/items/bucket_cod", "adv92");
  });
}, 5);
import { system as Ea, world as Aa } from "@minecraft/server";
Ea.runInterval(() => {
  Aa.getPlayers({ tags: ["adv0"], excludeTags: ["adv93"] }).forEach((e) => {
    var t = n(e, "minecraft:tadpole_bucket");
    t && o(e, "093", "task", "textures/items/bucket_tadpole", "adv93");
  });
}, 5);
import { system as Pa, world as Sa } from "@minecraft/server";
Pa.runInterval(() => {
  Sa.getPlayers({ tags: ["adv0"], excludeTags: ["adv94"] }).forEach((e) => {
    var t = e.hasTag("tamed_donkey"),
      a = e.hasTag("tamed_horse"),
      r = e.hasTag("tamed_llama"),
      i = e.hasTag("tamed_mule"),
      m = e.hasTag("tamed_ocelot"),
      d = e.hasTag("tamed_parrot"),
      c = e.hasTag("tamed_wolf");
    (t || a || r || i || m || d || c) &&
      o(e, "094", "task", "textures/items/bone", "adv94");
  });
}, 5);
import { world as za } from "@minecraft/server";
za.afterEvents.itemUseOn.subscribe((e) => {
  let { block: t, itemStack: a, source: r } = e;
  r.hasTag("adv95") ||
    !t.getItemStack()?.typeId.includes("copper") ||
    !a.typeId.includes("axe") ||
    o(r, "095", "task", "textures/items/stone_axe", "adv95");
});
import { world as Da } from "@minecraft/server";
Da.afterEvents.itemUseOn.subscribe((e) => {
  let { itemStack: t, source: a } = e;
  a.hasTag("adv96") ||
    (t.typeId == "minecraft:honeycomb" &&
      o(a, "096", "task", "textures/items/honeycomb", "adv96"));
});
import { world as Ba } from "@minecraft/server";
Ba.afterEvents.effectAdd.subscribe((e) => {
  let { entity: t } = e;
  t.typeId == "minecraft:player" &&
    (t.hasTag("adv108") ||
      (f(t, "absorption") &&
        f(t, "bad_omen") &&
        f(t, "blindness") &&
        f(t, "conduit_power") &&
        f(t, "darkness") &&
        f(t, "fire_resistance") &&
        f(t, "haste") &&
        f(t, "hero_of_the_village") &&
        f(t, "hunger") &&
        f(t, "invisibility") &&
        f(t, "jump_boost") &&
        f(t, "levitation") &&
        f(t, "mining_fatigue") &&
        f(t, "nausea") &&
        f(t, "night_vision") &&
        f(t, "poison") &&
        f(t, "regeneration") &&
        f(t, "resistance") &&
        f(t, "slow_falling") &&
        f(t, "slowness") &&
        f(t, "speed") &&
        f(t, "strength") &&
        f(t, "water_breathing") &&
        f(t, "weakness") &&
        f(t, "wither") &&
        o(
          t,
          "108",
          "challenge",
          "textures/items/bucket_empty",
          "adv108",
          !1,
          1e3
        )));
});
function f(e, t) {
  return e.getEffect(t);
}
import { world as Ma } from "@minecraft/server";
Ma.afterEvents.effectAdd.subscribe((e) => {
  let { entity: t } = e;
  t.typeId == "minecraft:player" &&
    (t.hasTag("adv107") ||
      (f(t, "fire_resistance") &&
        f(t, "invisibility") &&
        f(t, "jump_boost") &&
        f(t, "night_vision") &&
        f(t, "poison") &&
        f(t, "regeneration") &&
        f(t, "resistance") &&
        f(t, "slow_falling") &&
        f(t, "slowness") &&
        f(t, "speed") &&
        f(t, "strength") &&
        f(t, "water_breathing") &&
        f(t, "weakness") &&
        o(
          t,
          "107",
          "challenge",
          "textures/items/bucket_milk",
          "adv107",
          !1,
          100
        )));
});
import { world as Ca } from "@minecraft/server";
Ca.afterEvents.itemUseOn.subscribe((e) => {
  let { block: t, itemStack: a, source: r } = e;
  r.hasTag("adv123") ||
    !t.getItemStack()?.typeId != "minecraft:respawn_anchor" ||
    a.typeId != "minecraft:glowstone" ||
    o(r, "123", "task", "-17825792", "adv123", !0);
});
import { system as Va, world as ja } from "@minecraft/server";
Va.runInterval(() => {
  ja.getPlayers({ tags: ["adv0"], excludeTags: ["adv109"] }).forEach((e) => {
    let t = w(
      s.subtract(e.location, new s(5, 4, 5)),
      s.add(e.location, new s(5, 4, 5)),
      e.dimension,
      "minecraft:beacon"
    );
    if (t == null) return;
    let a = y(
      s.subtract(t.location, new s(1, 1, 1)),
      s.add(t.location, new s(1, 1, 1)),
      t.dimension
    );
    if (a.length < 9) return;
    let r = 0;
    a.forEach((i) => {
      (i.getItemStack()?.typeId != "minecraft:iron_block" &&
        i.getItemStack()?.typeId != "minecraft:gold_block" &&
        i.getItemStack()?.typeId != "minecraft:emerald_block" &&
        i.getItemStack()?.typeId != "minecraft:diamond_block" &&
        i.getItemStack()?.typeId != "minecraft:netherite_block") ||
        (r += 1);
    }),
      !(r < 9) && o(e, "109", "task", "9043968", "adv109");
  });
}, 250);
import { system as Ua, world as Ha } from "@minecraft/server";
Ua.runInterval(() => {
  Ha.getPlayers({
    tags: [
      "adv0",
      "biome_basalt_deltas",
      "biome_crimson_forest",
      "biome_nether_wastes",
      "biome_soulsand_valle",
      "biome_warped_forest",
    ],
    excludeTags: ["adv126"],
  }).forEach((e) => {
    o(
      e,
      "126",
      "challenge",
      "textures/items/netherite_boots",
      "adv126",
      !1,
      500
    );
  });
}, 5);
import { world as $a } from "@minecraft/server";
$a.afterEvents.playerDimensionChange.subscribe((e) => {
  let { fromLocation: t, toLocation: a, toDimension: r, player: i } = e;
  if (
    !i.hasTag("adv117") &&
    (r.id == "minecraft:nether" && i.setDynamicProperty("adv:netherDist", t),
    r.id == "minecraft:overworld")
  ) {
    var m = s.distance(i.getDynamicProperty("adv:netherDist"), a);
    m >= 7e3 && o(i, "117", "challenge", "textures/items/map_empty", "adv117");
  }
});
import { system as qa, world as Fa } from "@minecraft/server";
qa.runInterval(() => {
  Fa.getPlayers({ tags: ["adv0"], excludeTags: ["adv112"] }).forEach((e) => {
    var t = n(e, "minecraft:skull:1");
    t &&
      o(
        e,
        "112",
        "task",
        "textures/advancement/icons/wither_skeleton_skull",
        "adv112"
      );
  });
}, 5);
import { system as Oa, world as Wa } from "@minecraft/server";
Oa.runInterval(() => {
  Wa.getPlayers({ tags: ["adv0"], excludeTags: ["adv120"] }).forEach((e) => {
    var t = n(e, "minecraft:netherite_helmet"),
      a = n(e, "minecraft:netherite_chestplate"),
      r = n(e, "minecraft:netherite_leggings"),
      i = n(e, "minecraft:netherite_boots");
    t &&
      a &&
      r &&
      i &&
      o(
        e,
        "120",
        "challenge",
        "textures/items/netherite_chestplate",
        "adv120",
        !1,
        100
      );
  });
}, 5);
import { system as La, world as Ra } from "@minecraft/server";
La.runInterval(() => {
  Ra.getPlayers({ tags: ["adv0"], excludeTags: ["adv119"] }).forEach((e) => {
    var t = n(e, "minecraft:ancient_debris");
    t && o(e, "119", "task", "-17760256", "adv119");
  });
}, 5);
import { system as Ya, world as Xa } from "@minecraft/server";
Ya.runInterval(() => {
  Xa.getPlayers({ tags: ["adv0"], excludeTags: ["adv122"] }).forEach((e) => {
    var t = n(e, "minecraft:crying_obsidian");
    t && o(e, "122", "task", "-18939904", "adv122");
  });
}, 5);
import { system as Za, world as Na } from "@minecraft/server";
Za.runInterval(() => {
  Na.getPlayers({ tags: ["adv0"], excludeTags: ["adv125"] }).forEach((e) => {
    if (e.dimension.id == "minecraft:overworld")
      if (e.hasTag("riding_strider"))
        if (
          (e.runCommand("execute if block ~~-1~ lava [] run tag @s add inLava"),
          e.runCommand(
            "execute unless block ~~-1~ lava [] run tag @s remove inLava"
          ),
          e.hasTag("inLava"))
        ) {
          let t = e.getDynamicProperty("adv:striderDist");
          if (s.distance(t, e.location) < 50) return;
          o(
            e,
            "125",
            "task",
            "textures/items/warped_fungus_on_a_stick",
            "adv125"
          );
        } else e.setDynamicProperty("adv:striderDist", e.location);
      else
        e.removeTag("inLava"),
          e.setDynamicProperty("adv:striderDist", e.location);
  });
}, 5);
import { world as Ga } from "@minecraft/server";
Ga.afterEvents.itemUse.subscribe((e) => {
  let { itemStack: t, source: a } = e;
  a.hasTag("adv124") ||
    !a.hasTag("riding_strider") ||
    (t.typeId == "minecraft:warped_fungus_on_a_stick" &&
      o(
        player,
        "124",
        "task",
        "textures/items/warped_fungus_on_a_stick",
        "adv124"
      ));
});
import { world as Ja } from "@minecraft/server";
Ja.afterEvents.entityDie.subscribe((e) => {
  let { damageSource: t, deadEntity: a } = e,
    r = t.damagingEntity,
    i = a.typeId;
  r != null &&
    (r.typeId != "minecraft:player" ||
      r.dimension.id != "minecraft:overworld" ||
      i != "minecraft:ghast" ||
      r.hasTag("adv118") ||
      o(r, "118", "challenge", "textures/items/ghast_tear", "adv118"));
});
import { world as Qa } from "@minecraft/server";
Qa.afterEvents.entitySpawn.subscribe((e) => {
  let { entity: t } = e;
  t.typeId == "minecraft:wither" &&
    t.dimension
      .getPlayers({
        location: t.location,
        maxDistance: 64,
        excludeTags: ["adv116"],
      })
      .forEach((a) => {
        o(a, "116", "achievement", "33325056", "adv116");
      });
});
import {
  EquipmentSlot as O,
  system as Ka,
  world as er,
} from "@minecraft/server";
Ka.runInterval(() => {
  er.getPlayers({ tags: ["adv0"], excludeTags: ["adv131"] }).forEach((e) => {
    var t = e.getComponent("equippable"),
      a = t.getEquipment(O.Mainhand),
      r = t.getEquipment(O.Offhand);
    a?.typeId != "minecraft:shield" && r?.typeId != "minecraft:shield";
  });
}, 5);
import { system as tr, world as ar } from "@minecraft/server";
tr.runInterval(() => {
  ar.getPlayers({ tags: ["adv0"], excludeTags: ["adv136"] }).forEach((e) => {
    var t = n(e, "minecraft:obsidian");
    t && o(e, "136", "task", "3211264", "adv136");
  });
}, 5);
import { system as rr, world as or } from "@minecraft/server";
rr.runInterval(() => {
  or.getPlayers({ tags: ["adv0"], excludeTags: ["adv137"] }).forEach((e) => {
    var t = n(e, "minecraft:iron_pickaxe");
    t && o(e, "137", "task", "textures/items/iron_pickaxe", "adv137");
  });
}, 5);
import { system as ir, world as nr } from "@minecraft/server";
ir.runInterval(() => {
  nr.getPlayers({ tags: ["adv0"], excludeTags: ["adv138"] }).forEach((e) => {
    var t = n(e, "minecraft:lava_bucket");
    t && o(e, "138", "task", "textures/items/bucket_lava", "adv138");
  });
}, 5);
import { system as sr, world as mr } from "@minecraft/server";
sr.runInterval(() => {
  mr.getPlayers({ tags: ["adv0"], excludeTags: ["adv140"] }).forEach((e) => {
    var t = n(e, "minecraft:blackstone"),
      a = n(e, "minecraft:cobblestone"),
      r = n(e, "minecraft:cobbled_deepslate");
    (t || a || r) &&
      o(e, "140", "task", "textures/items/wood_pickaxe", "adv140");
  });
}, 5);
import { system as dr, world as cr } from "@minecraft/server";
dr.runInterval(() => {
  cr.getPlayers({ tags: ["adv0"], excludeTags: ["adv141"] }).forEach((e) => {
    var t = n(e, "minecraft:iron_helmet"),
      a = n(e, "minecraft:iron_chestplate"),
      r = n(e, "minecraft:iron_leggings"),
      i = n(e, "minecraft:iron_boots");
    (t || a || r || i) &&
      o(e, "141", "task", "textures/items/iron_chestplate", "adv141");
  });
}, 5);
import { system as fr, world as lr } from "@minecraft/server";
fr.runInterval(() => {
  lr.getPlayers({ tags: ["adv0"], excludeTags: ["adv143"] }).forEach((e) => {
    var t = n(e, "minecraft:diamond_helmet"),
      a = n(e, "minecraft:diamond_chestplate"),
      r = n(e, "minecraft:diamond_leggings"),
      i = n(e, "minecraft:diamond_boots");
    (t || a || r || i) &&
      o(e, "143", "task", "textures/items/diamond_chestplate", "adv143");
  });
}, 5);
import { GameMode as hr, system as W, world as L } from "@minecraft/server";
var _r = [
  { id: "ach1", name: "openInventory" },
  { id: "ach2", name: "mineWood" },
  { id: "ach3", name: "buildWorkBench" },
  { id: "ach4", name: "buildPickaxe" },
  { id: "ach5", name: "buildFurnace" },
  { id: "ach6", name: "acquireIron" },
  { id: "ach7", name: "buildHoe" },
  { id: "ach8", name: "makeBread" },
  { id: "ach9", name: "bakeCake" },
  { id: "ach10", name: "buildBetterPickaxe" },
  { id: "ach11", name: "overpowered" },
  { id: "ach12", name: "cookFish" },
  { id: "ach13", name: "onARail" },
  { id: "ach14", name: "buildSword" },
  { id: "ach15", name: "killEnemy" },
  { id: "ach16", name: "killCow" },
  { id: "ach17", name: "breedCow" },
  { id: "ach18", name: "flyPig" },
  { id: "ach19", name: "snipeSkeleton" },
  { id: "ach20", name: "diamonds" },
  { id: "ach21", name: "diamondsToYou" },
  { id: "ach22", name: "portal" },
  { id: "ach23", name: "ghast" },
  { id: "ach24", name: "ghastOverworld" },
  { id: "ach25", name: "blazeRod" },
  { id: "ach26", name: "potion" },
  { id: "ach27", name: "theEnd" },
  { id: "ach28", name: "theEnd2" },
  { id: "ach29", name: "spawnWither" },
  { id: "ach30", name: "killWither" },
  { id: "ach31", name: "fullBeacon" },
  { id: "ach32", name: "exploreAllBiomes" },
  { id: "ach33", name: "enchantments" },
  { id: "ach34", name: "overkill" },
  { id: "ach35", name: "bookcase" },
];
function ur(e) {
  var t = [];
  for (let a of _r) e.hasTag(a.id) && t.push(a);
  return t;
}
var vr = [
  { id: "adv36", name: "adventuring_time" },
  { id: "adv37", name: "arbalistic" },
  { id: "adv38", name: "avoid_vibration" },
  { id: "adv39", name: "bullseye" },
  { id: "adv40", name: "craft_decorated_pot_using_only_sherds" },
  { id: "adv41", name: "fall_from_world_height" },
  { id: "adv42", name: "hero_of_the_village" },
  { id: "adv43", name: "honey_block_slide" },
  { id: "adv44", name: "kill_a_mob" },
  { id: "adv45", name: "kill_all_mobs" },
  { id: "adv46", name: "kill_mob_near_sculk_catalyst" },
  { id: "adv47", name: "lightning_rod_with_villager_no_fire" },
  { id: "adv48", name: "ol_betsy" },
  { id: "adv49", name: "play_jukebox_in_meadows" },
  { id: "adv50", name: "read_power_of_chiseled_bookshelf" },
  { id: "adv51", name: "root" },
  { id: "adv52", name: "salvage_sherd" },
  { id: "adv53", name: "shoot_arrow" },
  { id: "adv54", name: "sleep_in_bed" },
  { id: "adv55", name: "sniper_duel" },
  { id: "adv56", name: "spyglass_at_dragon" },
  { id: "adv57", name: "spyglass_at_ghast" },
  { id: "adv58", name: "spyglass_at_parrot" },
  { id: "adv59", name: "summon_iron_golem" },
  { id: "adv60", name: "throw_trident" },
  { id: "adv61", name: "totem_of_undying" },
  { id: "adv62", name: "trade" },
  { id: "adv63", name: "trade_at_world_height" },
  { id: "adv64", name: "trim_with_all_exclusive_armor_patterns" },
  { id: "adv65", name: "trim_with_any_armor_pattern" },
  { id: "adv66", name: "two_birds_one_arrow" },
  { id: "adv67", name: "very_very_frightening" },
  { id: "adv68", name: "voluntary_exile" },
  { id: "adv69", name: "walk_on_powder_snow_with_leather_boots" },
  { id: "adv70", name: "whos_the_pillager_now" },
];
function gr(e) {
  var t = [];
  for (let a of vr) e.hasTag(a.id) && t.push(a);
  return t;
}
var pr = [
  { id: "adv71", name: "allay_deliver_cake_to_note_block" },
  { id: "adv72", name: "allay_deliver_item_to_player" },
  { id: "adv73", name: "axolotl_in_a_bucket" },
  { id: "adv74", name: "balanced_diet" },
  { id: "adv75", name: "bred_all_animals" },
  { id: "adv76", name: "breed_an_animal" },
  { id: "adv77", name: "complete_catalogue" },
  { id: "adv78", name: "feed_snifflet" },
  { id: "adv79", name: "fishy_business" },
  { id: "adv80", name: "froglights" },
  { id: "adv81", name: "kill_axolotl_target" },
  { id: "adv82", name: "leash_all_frog_variants" },
  { id: "adv83", name: "make_a_sign_glow" },
  { id: "adv84", name: "obtain_netherite_hoe" },
  { id: "adv85", name: "obtain_sniffer_egg" },
  { id: "adv86", name: "plant_any_sniffer_seed" },
  { id: "adv87", name: "plant_seed" },
  { id: "adv88", name: "ride_a_boat_with_a_goat" },
  { id: "adv89", name: "root" },
  { id: "adv90", name: "safely_harvest_honey" },
  { id: "adv91", name: "silk_touch_nest" },
  { id: "adv92", name: "tactical_fishing" },
  { id: "adv93", name: "tadpole_in_a_bucket" },
  { id: "adv94", name: "tame_an_animal" },
  { id: "adv95", name: "wax_off" },
  { id: "adv96", name: "wax_on" },
];
function br(e) {
  var t = [];
  for (let a of pr) e.hasTag(a.id) && t.push(a);
  return t;
}
var wr = [
  { id: "adv97", name: "dragon_breath" },
  { id: "adv98", name: "dragon_egg" },
  { id: "adv99", name: "elytra" },
  { id: "adv100", name: "enter_end_gateway" },
  { id: "adv101", name: "find_end_city" },
  { id: "adv102", name: "kill_dragon" },
  { id: "adv103", name: "levitate" },
  { id: "adv104", name: "respawn_dragon" },
  { id: "adv105", name: "root" },
];
function kr(e) {
  var t = [];
  for (let a of wr) e.hasTag(a.id) && t.push(a);
  return t;
}
var Tr = [
  { id: "adv106", name: "brew_potion" },
  { id: "adv107", name: "all_potions" },
  { id: "adv108", name: "all_effects" },
  { id: "adv109", name: "create_beacon" },
  { id: "adv110", name: "create_full_beacon" },
  { id: "adv111", name: "find_fortress" },
  { id: "adv112", name: "get_wither_skull" },
  { id: "adv113", name: "obtain_blaze_rod" },
  { id: "adv114", name: "return_to_sender" },
  { id: "adv115", name: "root" },
  { id: "adv116", name: "summon_wither" },
  { id: "adv117", name: "fast_travel" },
  { id: "adv118", name: "uneasy_alliance" },
  { id: "adv119", name: "obtain_ancient_debris" },
  { id: "adv120", name: "netherite_armor" },
  { id: "adv121", name: "use_lodestone" },
  { id: "adv122", name: "obtain_crying_obsidian" },
  { id: "adv123", name: "charge_respawn_anchor" },
  { id: "adv124", name: "ride_strider" },
  { id: "adv125", name: "ride_strider_in_overworld_lava" },
  { id: "adv126", name: "explore_nether" },
  { id: "adv127", name: "find_bastion" },
  { id: "adv128", name: "loot_bastion" },
  { id: "adv129", name: "distract_piglin" },
];
function xr(e) {
  var t = [];
  for (let a of Tr) e.hasTag(a.id) && t.push(a);
  return t;
}
var yr = [
  { id: "adv130", name: "cure_zombie_villager" },
  { id: "adv131", name: "deflect_arrow" },
  { id: "adv132", name: "enchant_item" },
  { id: "adv133", name: "enter_the_end" },
  { id: "adv134", name: "enter_the_nether" },
  { id: "adv135", name: "follow_ender_eye" },
  { id: "adv136", name: "form_obsidian" },
  { id: "adv137", name: "iron_tools" },
  { id: "adv138", name: "lava_bucket" },
  { id: "adv139", name: "mine_diamond" },
  { id: "adv140", name: "mine_stone" },
  { id: "adv141", name: "obtain_armor" },
  { id: "adv142", name: "root" },
  { id: "adv143", name: "shiny_gear" },
  { id: "adv144", name: "smelt_iron" },
  { id: "adv145", name: "upgrade_tools" },
];
function Ir(e) {
  var t = [];
  for (let a of yr) e.hasTag(a.id) && t.push(a);
  return t;
}
function Er(e) {
  e.dimension.getEntities({
    type: "adv:dialogue_handler",
    location: e.location,
    maxDistance: 48,
    closest: 1,
  }).length <= 0 &&
    e.dimension.spawnEntity(
      "adv:dialogue_handler",
      s.add(e.location, new s(0, 8, 0))
    );
}
function T(e, t) {
  let a = [],
    r = [],
    i = "",
    m = ".1b;";
  switch (t) {
    case "achievements":
      (a = ur(e)), (i = "_r4ui:legacy_tab:openInventory.1b;");
      break;
    case "adventure":
      (a = gr(e)), (i = "_r4ui:adventure_tab:root.1b;");
      break;
    case "husbandry":
      (a = br(e)), (i = "_r4ui:husbandry_tab:root.1b;");
      break;
    case "end":
      (a = kr(e)), (i = "_r4ui:the_end_tab:root.1b;");
      break;
    case "nether":
      (a = xr(e)), (i = "_r4ui:nether_tab:root.1b;");
      break;
    case "story":
      (a = Ir(e)), (i = "_r4ui:story_tab:root.1b;");
      break;
    default:
      i = "_r4ui:empty:";
      break;
  }
  for (let c of a) r.push(c.name + m);
  let d =
    i +
    JSON.stringify(r)
      .replace("[", "")
      .replace("]", "")
      .replace(/,/gi, "")
      .replace(/"/gi, "");
  e.name == "r4isen1920" && e.sendMessage(" " + d),
    e.runCommand(
      `dialogue open @e[type=adv:dialogue_handler,c=1] @s _r4ui:${t}_tab`
    ),
    e.onScreenDisplay.setTitle(d);
}
L.afterEvents.itemUse.subscribe((e) => {
  let { itemStack: t, source: a } = e;
  if (t.typeId == "adv:log_book")
    if (a.matches({ gameMode: hr.creative }))
      x(a, "log_book_survival_only_access");
    else {
      if (
        (a.playSound("random.orb", { volume: 0.5, pitch: 0.75 }),
        T(a, "story"),
        a.hasTag("has_shown_log_book_ui"))
      )
        return;
      x(a, "log_book_ui"), a.addTag("has_shown_log_book_ui");
    }
});
W.runInterval(() => {
  L.getAllPlayers().forEach((e) => {
    Er(e);
  });
}, 5);
W.afterEvents.scriptEventReceive.subscribe((e) => {
  let { id: t, message: a, sourceEntity: r } = e;
  if (r.typeId == "minecraft:player")
    switch ((t != "adv:open_screen", a)) {
      case "achievements":
        T(r, "achievements");
        break;
      case "adventure":
        T(r, "adventure");
        break;
      case "husbandry":
        T(r, "husbandry");
        break;
      case "end":
        T(r, "end");
        break;
      case "nether":
        T(r, "nether");
        break;
      case "story":
        T(r, "story");
        break;
      default:
        T(r, "empty");
        break;
    }
});
import { system as Ar } from "@minecraft/server";
Ar.afterEvents.scriptEventReceive.subscribe((e) => {
  let { id: t, sourceEntity: a } = e;
  if (a.typeId == "minecraft:player")
    switch (t) {
      case "adv:init":
        u(a, "adv"),
          a.addTag("adv0"),
          u(a, "ach"),
          u(a, "biome_"),
          u(a, "breed_"),
          u(a, "consumed_"),
          u(a, "killed_"),
          u(a, "tamed_"),
          a.dimension.getEntities({ tags: ["tamed"] }).forEach((r) => {
            r.removeTag("tamed");
          }),
          a.removeTag("has_given_log_book"),
          a.removeTag("has_shown_log_book_ui"),
          a.removeTag("has_shown_creative_warning");
        break;
      case "adv:init_adv":
        u(a, "adv"), a.addTag("adv0");
        break;
      case "adv:init_ach":
        u(a, "ach");
        break;
      case "adv:init_biome":
        u(a, "biome_");
        break;
      case "adv:init_breeds":
        u(a, "breed_");
        break;
      case "adv:init_consumed":
        u(a, "consumed_");
        break;
      case "adv:init_killed":
        u(a, "killed_");
        break;
      case "adv:init_tamed":
        u(a, "tamed_"),
          a.dimension.getEntities({ tags: ["tamed"] }).forEach((r) => {
            r.removeTag("tamed");
          });
        break;
    }
});
import { ItemStack as Pr, world as Sr } from "@minecraft/server";
Sr.afterEvents.playerSpawn.subscribe((e) => {
  let { initialSpawn: t, player: a } = e;
  t &&
    (a.addTag("adv0"),
    x(a, "setup"),
    a.removeTag("has_shown_creative_warning"),
    !a.hasTag("has_given_log_book") &&
      (x(a, "log_book"),
      a.getComponent("inventory").container.addItem(new Pr("adv:log_book", 1)),
      a.addTag("has_given_log_book"),
      a.runCommand("gamemode s @s[m=c]")));
});
import { world as zr } from "@minecraft/server";
zr.afterEvents.projectileHitEntity.subscribe((e) => {
  let { projectile: t, source: a } = e,
    r = e.getEntityHit().entity;
  a?.typeId != "minecraft:player" ||
    t.typeId != "minecraft:arrow" ||
    r.matches({ families: ["inanimate"], excludeFamilies: ["mob"] }) ||
    a.playSound("random.orb", { pitch: 0.5, volume: 0.25 });
});
import { system as R, world as Dr } from "@minecraft/server";
var Br = {
  1: ["bamboo_jungle"],
  2: ["bamboo_jungle_hills"],
  3: ["beach"],
  4: ["birch_forest"],
  5: ["birch_forest_hills"],
  6: ["birch_forest_hills_mutated"],
  7: ["birch_forest_mutated"],
  8: ["cold_beach"],
  9: ["cold_ocean"],
  10: ["cold_taiga"],
  11: ["cold_taiga_hills"],
  12: ["cold_taiga_mutated"],
  13: ["deep_cold_ocean"],
  14: ["deep_frozen_ocean"],
  15: ["deep_lukewarm_ocean"],
  16: ["deep_ocean"],
  17: ["deep_warm_ocean"],
  18: ["desert"],
  19: ["desert_hills"],
  20: ["desert_mutated"],
  21: ["extreme_hills"],
  22: ["extreme_hills_edge"],
  23: ["extreme_hills_forest"],
  24: ["extreme_hills_mutated"],
  25: ["extreme_hills_mutated_forest"],
  26: ["bamboo_flower_forest"],
  27: ["forest"],
  28: ["forest_hills"],
  29: ["forest_ocean"],
  30: ["forest_river"],
  31: ["ice_mountains"],
  32: ["ice_plains"],
  33: ["ice_plains_spikes"],
  34: ["jungle"],
  35: ["jungle_edge"],
  36: ["jungle_edge_mutated"],
  37: ["jungle_hills"],
  38: ["jungle_mutated"],
  39: ["lukewarm_ocean"],
  40: ["mega_spruce_taiga"],
  41: ["mega_spruce_taiga_hills"],
  42: ["mega_taiga"],
  43: ["mega_taiga_hills"],
  44: ["mesa"],
  45: ["mesa_bryce"],
  46: ["mesa_plateau"],
  47: ["mesa_plateau_mutated"],
  48: ["mesa_plateau_stone"],
  49: ["mesa_plateau_stone_mutated"],
  50: ["mushroom_island"],
  51: ["mushroom_island_shore"],
  52: ["ocean"],
  53: ["plains"],
  54: ["river"],
  55: ["roofed_forest"],
  56: ["roofed_forest_mutated"],
  57: ["savanna"],
  58: ["savanna_mutated"],
  59: ["savanna_plateau"],
  60: ["savanna_plateau_mutated"],
  61: ["stone_beach"],
  62: ["sunflower_plains"],
  63: ["swamp"],
  64: ["swamp_mutated"],
  65: ["taiga"],
  66: ["taiga_hills"],
  67: ["taiga_mutated"],
  68: ["warm_ocean"],
  69: ["basalt_deltas"],
  70: ["crimson_forest"],
  71: ["nether_wastes"],
  72: ["soulsand_valley"],
  73: ["warped_forest"],
  74: ["meadow"],
};
R.afterEvents.scriptEventReceive.subscribe((e) => {
  let { sourceEntity: t } = e;
  if (t.typeId != "adv:detect_biome") return;
  let r = t.getProperty("adv:biome_check"),
    i = Br[r];
  i != null &&
    (t.dimension
      .getPlayers({ location: t.location, maxDistance: 2, closest: 1 })
      .forEach((m) => {
        m.addTag(`biome_${i}`),
          m.setDynamicProperty("adv:currentBiome", `${i}`);
      }),
    r > 0 && t.remove());
});
function Mr(e) {
  try {
    e.dimension.spawnEntity("adv:detect_biome", e.location);
  } catch {}
}
R.runInterval(() => {
  Dr.getPlayers({ tags: ["adv0"] }).forEach((e) => {
    Mr(e);
  });
}, 75);
import {
  EntityInitializationCause as Cr,
  world as Vr,
} from "@minecraft/server";
Vr.afterEvents.entitySpawn.subscribe((e) => {
  let { cause: t, entity: a } = e;
  t == Cr.Born &&
    a.dimension.getPlayers({ tags: ["adv0"], closest: 1 }).forEach((r) => {
      var i = a.typeId.replace("minecraft:", "");
      r.addTag(`breed_${i}`);
    });
});
import { world as jr } from "@minecraft/server";
jr.afterEvents.itemCompleteUse.subscribe((e) => {
  let { itemStack: t, source: a } = e,
    r = t.typeId;
  if (r.startsWith("minecraft:")) {
    var i = r.replace("minecraft:", "");
    a.addTag(`consumed_${i}`);
  }
});
import { world as Y } from "@minecraft/server";
Y.afterEvents.entityDie.subscribe((e) => {
  let { damageSource: t, deadEntity: a } = e,
    r = t.damagingEntity;
  if (r == null || r.typeId != "minecraft:player") return;
  let i = a.typeId,
    m =
      a.matches({ families: ["monster"] }) || a.matches({ families: ["cow"] });
  if (
    i.startsWith("minecraft:") &&
    !(
      i == "minecraft:item" ||
      i == "minecraft:ender_dragon" ||
      i == "minecraft:wither" ||
      !m
    )
  ) {
    var d = i.replace("minecraft:", "");
    r.addTag(`killed_${d}`);
  }
});
Y.afterEvents.entityHurt.subscribe((e) => {
  let { damage: t, damageSource: a, hurtEntity: r } = e,
    i = a.damagingEntity;
  if (i == null || i.typeId != "minecraft:player") return;
  let m = r.typeId,
    d = r.getComponent("health").currentValue,
    c = (d / r.getComponent("health").effectiveMax) * 100;
  if (
    m != "minecraft:item" &&
    !(m != "minecraft:ender_dragon" && m != "minecraft:wither") &&
    (c < 3 || t > d)
  ) {
    var h = m.replace("minecraft:", "");
    i.addTag(`killed_${h}`), r.kill();
  }
});
import { system as Ur, world as Hr } from "@minecraft/server";
Ur.runInterval(() => {
  Hr.getPlayers({ tags: ["adv0"] }).forEach((e) => {
    let t = e.getComponent("riding");
    if (t == null) {
      u(e, "riding_", !1);
      return;
    }
    var r = t.entityRidingOn.typeId.replace("minecraft:", "");
    e.addTag(`riding_${r}`);
  });
}, 5);
