import { world, system, BlockPermutation, Dimension } from "@minecraft/server";

world.beforeEvents.worldInitialize.subscribe(initEvent => {
  initEvent.blockTypeRegistry.registerCustomComponent("nicothekid:structure_ancient_castle_on_random_tick", {
    onRandomTick: eventData => {
      eventData.block.setPermutation(BlockPermutation.resolve("minecraft:air"));
      eventData.block.dimension.runCommandAsync(`structure load ancient_castle_01 ${eventData.block.location.x - 22} ${eventData.block.location.y - 1} ${eventData.block.location.z - 22}`);
    }
  });
  initEvent.blockTypeRegistry.registerCustomComponent("nicothekid:structure_ancient_castle_on_tick", {
    onTick: eventData => {
      eventData.block.setPermutation(BlockPermutation.resolve("minecraft:air"));
      eventData.block.dimension.runCommandAsync(`structure load ancient_castle_01 ${eventData.block.location.x - 22} ${eventData.block.location.y - 1} ${eventData.block.location.z - 22}`);
    }
  });
});

world.beforeEvents.worldInitialize.subscribe(initEvent => {
  const mineshaftStructureSpawner = [
    "nicothekid:structure_mineshaft_ancient",
    "nicothekid:structure_mineshaft_oak",
    "nicothekid:structure_mineshaft_spruce",
    "nicothekid:structure_msa_arch_way_east",
    "nicothekid:structure_msa_arch_way_north",
    "nicothekid:structure_msa_arch_way_south",
    "nicothekid:structure_msa_arch_way_west",
    "nicothekid:structure_msa_way_east",
    "nicothekid:structure_msa_way_north",
    "nicothekid:structure_msa_way_south",
    "nicothekid:structure_msa_way_west",
    "nicothekid:structure_mso_ground_way_east",
    "nicothekid:structure_mso_ground_way_north",
    "nicothekid:structure_mso_ground_way_south",
    "nicothekid:structure_mso_ground_way_west",
    "nicothekid:structure_mso_way_east",
    "nicothekid:structure_mso_way_north",
    "nicothekid:structure_mso_way_south",
    "nicothekid:structure_mso_way_west",
    "nicothekid:structure_mss_way_east",
    "nicothekid:structure_mss_way_north",
    "nicothekid:structure_mss_way_south",
    "nicothekid:structure_mss_way_west"
  ]
  initEvent.blockTypeRegistry.registerCustomComponent("nicothekid:structure_mineshaft_on_random_tick", {
    onRandomTick: eventData => {
      const block = eventData.block;
      const blockLocation = block.location;
      if (mineshaftStructureSpawner.includes(block.typeId)) {
        let randomChance = Math.random() * (100.0 - 0.0) + 0.0;
        if (block.permutation.matches("nicothekid:structure_mineshaft_ancient")) {
          block.setPermutation(BlockPermutation.resolve("minecraft:air"));
          block.dimension.runCommandAsync(`structure load mineshaft_ancient_01 ${blockLocation.x - 18} ${blockLocation.y - 3} ${blockLocation.z - 18}`);
        }
        if (block.permutation.matches("nicothekid:structure_mineshaft_oak")) {
          block.setPermutation(BlockPermutation.resolve("minecraft:air"));
          block.dimension.runCommandAsync(`structure load mineshaft_oak_01 ${blockLocation.x - 11} ${blockLocation.y - 1} ${blockLocation.z - 11}`);
        }
        if (block.permutation.matches("nicothekid:structure_mineshaft_spruce")) {
          block.setPermutation(BlockPermutation.resolve("minecraft:air"));
          block.dimension.runCommandAsync(`structure load mineshaft_spruce_01 ${blockLocation.x - 14} ${blockLocation.y - 1} ${blockLocation.z - 14}`);
        }
        if (block.permutation.matches("nicothekid:structure_msa_arch_way_east")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 12.7) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 25.4) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_east_02 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 38.1) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_east_03 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 50.8) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_east_04 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 63.5) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_east_05 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 76.2) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_east_06 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 78.8) {
              block.dimension.runCommandAsync(`structure load msa_room_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 81.4) {
              block.dimension.runCommandAsync(`structure load msa_room_east_02 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 84) {
              block.dimension.runCommandAsync(`structure load msa_room_east_03 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 86.6) {
              block.dimension.runCommandAsync(`structure load msa_room_east_04 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 89.2) {
              block.dimension.runCommandAsync(`structure load msa_room_east_05 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 91.8) {
              block.dimension.runCommandAsync(`structure load msa_spider_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 94.4) {
              block.dimension.runCommandAsync(`structure load msa_zombie_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_msa_arch_way_north")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 12.7) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_north_01 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 25.4) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_north_02 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 38.1) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_north_03 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 50.8) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_north_04 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 63.5) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_north_05 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 76.2) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_north_06 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 78.8) {
              block.dimension.runCommandAsync(`structure load msa_room_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 81.4) {
              block.dimension.runCommandAsync(`structure load msa_room_north_02 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 84) {
              block.dimension.runCommandAsync(`structure load msa_room_north_03 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 86.6) {
              block.dimension.runCommandAsync(`structure load msa_room_north_04 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 89.2) {
              block.dimension.runCommandAsync(`structure load msa_room_north_05 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 91.8) {
              block.dimension.runCommandAsync(`structure load msa_spider_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 94.4) {
              block.dimension.runCommandAsync(`structure load msa_zombie_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_msa_arch_way_south")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 12.7) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_south_01 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 25.4) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_south_02 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 38.1) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_south_03 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 50.8) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_south_04 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 63.5) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_south_05 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 76.2) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_south_06 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 78.8) {
              block.dimension.runCommandAsync(`structure load msa_room_south_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 81.4) {
              block.dimension.runCommandAsync(`structure load msa_room_south_02 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 84) {
              block.dimension.runCommandAsync(`structure load msa_room_south_03 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 86.6) {
              block.dimension.runCommandAsync(`structure load msa_room_south_04 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 89.2) {
              block.dimension.runCommandAsync(`structure load msa_room_south_05 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 91.8) {
              block.dimension.runCommandAsync(`structure load msa_spider_south_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 94.4) {
              block.dimension.runCommandAsync(`structure load msa_zombie_south_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_msa_arch_way_west")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 12.7) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_west_01 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 25.4) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_west_02 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 38.1) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_west_03 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 50.8) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_west_04 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 63.5) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_west_05 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 76.2) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_west_06 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 78.8) {
              block.dimension.runCommandAsync(`structure load msa_room_west_01 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 81.4) {
              block.dimension.runCommandAsync(`structure load msa_room_west_02 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 84) {
              block.dimension.runCommandAsync(`structure load msa_room_west_03 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 86.6) {
              block.dimension.runCommandAsync(`structure load msa_room_west_04 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 89.2) {
              block.dimension.runCommandAsync(`structure load msa_room_west_05 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 91.8) {
              block.dimension.runCommandAsync(`structure load msa_spider_west_01 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 94.4) {
              block.dimension.runCommandAsync(`structure load msa_zombie_west_01 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_msa_way_east")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.1) {
              block.dimension.runCommandAsync(`structure load msa_way_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 10.2) {
              block.dimension.runCommandAsync(`structure load msa_way_east_02 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 15.3) {
              block.dimension.runCommandAsync(`structure load msa_way_east_03 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 20.4) {
              block.dimension.runCommandAsync(`structure load msa_way_east_04 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 25) {
              block.dimension.runCommandAsync(`structure load msa_way_east_05 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 30.6) {
              block.dimension.runCommandAsync(`structure load msa_way_east_06 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 35.7) {
              block.dimension.runCommandAsync(`structure load msa_way_east_07 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 40.8) {
              block.dimension.runCommandAsync(`structure load msa_way_east_08 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 45.9) {
              block.dimension.runCommandAsync(`structure load msa_way_east_09 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 51) {
              block.dimension.runCommandAsync(`structure load msa_way_east_10 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 56.1) {
              block.dimension.runCommandAsync(`structure load msa_way_east_11 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 61.2) {
              block.dimension.runCommandAsync(`structure load msa_way_east_12 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 63.8) {
              block.dimension.runCommandAsync(`structure load msa_room_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 66.4) {
              block.dimension.runCommandAsync(`structure load msa_room_east_02 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 69) {
              block.dimension.runCommandAsync(`structure load msa_room_east_03 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 71.6) {
              block.dimension.runCommandAsync(`structure load msa_room_east_04 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 74.2) {
              block.dimension.runCommandAsync(`structure load msa_room_east_05 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 76.8) {
              block.dimension.runCommandAsync(`structure load msa_spider_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 79.4) {
              block.dimension.runCommandAsync(`structure load msa_zombie_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_msa_way_north")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.1) {
              block.dimension.runCommandAsync(`structure load msa_way_north_01 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 10.2) {
              block.dimension.runCommandAsync(`structure load msa_way_north_02 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 15.3) {
              block.dimension.runCommandAsync(`structure load msa_way_north_03 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 20.4) {
              block.dimension.runCommandAsync(`structure load msa_way_north_04 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 25) {
              block.dimension.runCommandAsync(`structure load msa_way_north_05 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 30.6) {
              block.dimension.runCommandAsync(`structure load msa_way_north_06 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 35.7) {
              block.dimension.runCommandAsync(`structure load msa_way_north_07 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 40.8) {
              block.dimension.runCommandAsync(`structure load msa_way_north_08 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 45.9) {
              block.dimension.runCommandAsync(`structure load msa_way_north_09 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 51) {
              block.dimension.runCommandAsync(`structure load msa_way_north_10 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 56.1) {
              block.dimension.runCommandAsync(`structure load msa_way_north_11 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 61.2) {
              block.dimension.runCommandAsync(`structure load msa_way_north_12 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 63.8) {
              block.dimension.runCommandAsync(`structure load msa_room_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 66.4) {
              block.dimension.runCommandAsync(`structure load msa_room_north_02 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 69) {
              block.dimension.runCommandAsync(`structure load msa_room_north_03 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 71.6) {
              block.dimension.runCommandAsync(`structure load msa_room_north_04 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 74.2) {
              block.dimension.runCommandAsync(`structure load msa_room_north_05 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 76.8) {
              block.dimension.runCommandAsync(`structure load msa_spider_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 79.4) {
              block.dimension.runCommandAsync(`structure load msa_zombie_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_msa_way_south")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.1) {
              block.dimension.runCommandAsync(`structure load msa_way_south_01 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 10.2) {
              block.dimension.runCommandAsync(`structure load msa_way_south_02 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 15.3) {
              block.dimension.runCommandAsync(`structure load msa_way_south_03 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 20.4) {
              block.dimension.runCommandAsync(`structure load msa_way_south_04 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 25) {
              block.dimension.runCommandAsync(`structure load msa_way_south_05 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 30.6) {
              block.dimension.runCommandAsync(`structure load msa_way_south_06 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 35.7) {
              block.dimension.runCommandAsync(`structure load msa_way_south_07 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 40.8) {
              block.dimension.runCommandAsync(`structure load msa_way_south_08 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 45.9) {
              block.dimension.runCommandAsync(`structure load msa_way_south_09 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 51) {
              block.dimension.runCommandAsync(`structure load msa_way_south_10 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 56.1) {
              block.dimension.runCommandAsync(`structure load msa_way_south_11 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 61.2) {
              block.dimension.runCommandAsync(`structure load msa_way_south_12 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 63.8) {
              block.dimension.runCommandAsync(`structure load msa_room_south_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 66.4) {
              block.dimension.runCommandAsync(`structure load msa_room_south_02 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 69) {
              block.dimension.runCommandAsync(`structure load msa_room_south_03 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 71.6) {
              block.dimension.runCommandAsync(`structure load msa_room_south_04 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 74.2) {
              block.dimension.runCommandAsync(`structure load msa_room_south_05 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 76.8) {
              block.dimension.runCommandAsync(`structure load msa_spider_south_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 79.4) {
              block.dimension.runCommandAsync(`structure load msa_zombie_south_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_msa_way_west")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.1) {
              block.dimension.runCommandAsync(`structure load msa_way_west_01 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 10.2) {
              block.dimension.runCommandAsync(`structure load msa_way_west_02 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 15.3) {
              block.dimension.runCommandAsync(`structure load msa_way_west_03 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 20.4) {
              block.dimension.runCommandAsync(`structure load msa_way_west_04 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 25) {
              block.dimension.runCommandAsync(`structure load msa_way_west_05 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 30.6) {
              block.dimension.runCommandAsync(`structure load msa_way_west_06 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 35.7) {
              block.dimension.runCommandAsync(`structure load msa_way_west_07 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 40.8) {
              block.dimension.runCommandAsync(`structure load msa_way_west_08 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 45.9) {
              block.dimension.runCommandAsync(`structure load msa_way_west_09 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 51) {
              block.dimension.runCommandAsync(`structure load msa_way_west_10 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 56.1) {
              block.dimension.runCommandAsync(`structure load msa_way_west_11 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 61.2) {
              block.dimension.runCommandAsync(`structure load msa_way_west_12 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 63.8) {
              block.dimension.runCommandAsync(`structure load msa_room_west_01 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 66.4) {
              block.dimension.runCommandAsync(`structure load msa_room_west_02 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 69) {
              block.dimension.runCommandAsync(`structure load msa_room_west_03 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 71.6) {
              block.dimension.runCommandAsync(`structure load msa_room_west_04 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 74.2) {
              block.dimension.runCommandAsync(`structure load msa_room_west_05 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 76.8) {
              block.dimension.runCommandAsync(`structure load msa_spider_west_01 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 79.4) {
              block.dimension.runCommandAsync(`structure load msa_zombie_west_01 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mso_ground_way_east")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 20.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 40.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_east_02 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 60.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_east_03 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 80.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_east_04 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 86.7) {
              block.dimension.runCommandAsync(`structure load mso_ground_room_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 93.4) {
              block.dimension.runCommandAsync(`structure load mso_ground_room_east_02 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 97.7) {
              block.dimension.runCommandAsync(`structure load mso_ground_spider_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 100.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_zombie_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mso_ground_way_north")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 20.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_north_01 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 40.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_north_02 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 60.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_north_03 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 80.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_north_04 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 86.7) {
              block.dimension.runCommandAsync(`structure load mso_ground_room_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 11}`);
            }
            else if (randomChance <= 93.4) {
              block.dimension.runCommandAsync(`structure load mso_ground_room_north_02 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 11}`);
            }
            else if (randomChance <= 97.7) {
              block.dimension.runCommandAsync(`structure load mso_ground_spider_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 11}`);
            }
            else if (randomChance <= 100.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_zombie_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 11}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mso_ground_way_south")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 20.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_south_01 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 40.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_south_02 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 60.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_south_03 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 80) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_south_04 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 86.7) {
              block.dimension.runCommandAsync(`structure load mso_ground_room_south_01 ${blockLocation.x - 6} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 93.4) {
              block.dimension.runCommandAsync(`structure load mso_ground_room_south_02 ${blockLocation.x - 6} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 97.7) {
              block.dimension.runCommandAsync(`structure load mso_ground_spider_south_01 ${blockLocation.x - 6} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 100.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_zombie_south_01 ${blockLocation.x - 6} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mso_ground_way_west")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 20.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_west_01 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 40.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_west_02 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 60.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_west_03 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 80.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_west_04 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 86.7) {
              block.dimension.runCommandAsync(`structure load mso_ground_room_west_01 ${blockLocation.x - 11} ${blockLocation.y - 1} ${blockLocation.z - 6}`);
            }
            else if (randomChance <= 93.4) {
              block.dimension.runCommandAsync(`structure load mso_ground_room_west_02 ${blockLocation.x - 11} ${blockLocation.y - 1} ${blockLocation.z - 6}`);
            }
            else if (randomChance <= 97.7) {
              block.dimension.runCommandAsync(`structure load mso_ground_spider_west_01 ${blockLocation.x - 11} ${blockLocation.y - 1} ${blockLocation.z - 6}`);
            }
            else if (randomChance <= 100.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_zombie_west_01 ${blockLocation.x - 11} ${blockLocation.y - 1} ${blockLocation.z - 6}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mso_way_east")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 6.7) {
              block.dimension.runCommandAsync(`structure load mso_way_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 13.4) {
              block.dimension.runCommandAsync(`structure load mso_way_east_02 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 20.1) {
              block.dimension.runCommandAsync(`structure load mso_way_east_03 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 26.8) {
              block.dimension.runCommandAsync(`structure load mso_way_east_04 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 33.5) {
              block.dimension.runCommandAsync(`structure load mso_way_east_05 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 40.2) {
              block.dimension.runCommandAsync(`structure load mso_way_east_06 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 46.9) {
              block.dimension.runCommandAsync(`structure load mso_way_east_07 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 53.6) {
              block.dimension.runCommandAsync(`structure load mso_way_east_08 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 60.3) {
              block.dimension.runCommandAsync(`structure load mso_way_east_09 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 67) {
              block.dimension.runCommandAsync(`structure load mso_way_east_10 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 70.3) {
              block.dimension.runCommandAsync(`structure load mso_room_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 73.6) {
              block.dimension.runCommandAsync(`structure load mso_room_east_02 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 76.9) {
              block.dimension.runCommandAsync(`structure load mso_spider_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 80.2) {
              block.dimension.runCommandAsync(`structure load mso_zombie_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mso_way_north")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 6.7) {
              block.dimension.runCommandAsync(`structure load mso_way_north_01 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 13.4) {
              block.dimension.runCommandAsync(`structure load mso_way_north_02 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 20.1) {
              block.dimension.runCommandAsync(`structure load mso_way_north_03 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 26.8) {
              block.dimension.runCommandAsync(`structure load mso_way_north_04 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 33.5) {
              block.dimension.runCommandAsync(`structure load mso_way_north_05 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 40.2) {
              block.dimension.runCommandAsync(`structure load mso_way_north_06 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 46.9) {
              block.dimension.runCommandAsync(`structure load mso_way_north_07 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 53.6) {
              block.dimension.runCommandAsync(`structure load mso_way_north_08 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 60.3) {
              block.dimension.runCommandAsync(`structure load mso_way_north_09 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 67) {
              block.dimension.runCommandAsync(`structure load mso_way_north_10 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 70.3) {
              block.dimension.runCommandAsync(`structure load mso_room_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 11}`);
            }
            else if (randomChance <= 73.6) {
              block.dimension.runCommandAsync(`structure load mso_room_north_02 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 11}`);
            }
            else if (randomChance <= 76.9) {
              block.dimension.runCommandAsync(`structure load mso_spider_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 11}`);
            }
            else if (randomChance <= 80.2) {
              block.dimension.runCommandAsync(`structure load mso_zombie_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 11}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mso_way_south")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 6.7) {
              block.dimension.runCommandAsync(`structure load mso_way_south_01 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 13.4) {
              block.dimension.runCommandAsync(`structure load mso_way_south_02 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 20.1) {
              block.dimension.runCommandAsync(`structure load mso_way_south_03 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 26.8) {
              block.dimension.runCommandAsync(`structure load mso_way_south_04 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 33.5) {
              block.dimension.runCommandAsync(`structure load mso_way_south_05 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 40.2) {
              block.dimension.runCommandAsync(`structure load mso_way_south_06 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 46.9) {
              block.dimension.runCommandAsync(`structure load mso_way_south_07 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 53.6) {
              block.dimension.runCommandAsync(`structure load mso_way_south_08 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 60.3) {
              block.dimension.runCommandAsync(`structure load mso_way_south_09 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 67) {
              block.dimension.runCommandAsync(`structure load mso_way_south_10 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 70.3) {
              block.dimension.runCommandAsync(`structure load mso_room_south_01 ${blockLocation.x - 6} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 73.6) {
              block.dimension.runCommandAsync(`structure load mso_room_south_02 ${blockLocation.x - 6} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 76.9) {
              block.dimension.runCommandAsync(`structure load mso_spider_south_01 ${blockLocation.x - 6} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 80.2) {
              block.dimension.runCommandAsync(`structure load mso_zombie_south_01 ${blockLocation.x - 6} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mso_way_west")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 6.7) {
              block.dimension.runCommandAsync(`structure load mso_way_west_01 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 13.4) {
              block.dimension.runCommandAsync(`structure load mso_way_west_02 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 20.1) {
              block.dimension.runCommandAsync(`structure load mso_way_west_03 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 26.8) {
              block.dimension.runCommandAsync(`structure load mso_way_west_04 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 33.5) {
              block.dimension.runCommandAsync(`structure load mso_way_west_05 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 40.2) {
              block.dimension.runCommandAsync(`structure load mso_way_west_06 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 46.9) {
              block.dimension.runCommandAsync(`structure load mso_way_west_07 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 53.6) {
              block.dimension.runCommandAsync(`structure load mso_way_west_08 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 60.3) {
              block.dimension.runCommandAsync(`structure load mso_way_west_09 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 67) {
              block.dimension.runCommandAsync(`structure load mso_way_west_10 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 70.3) {
              block.dimension.runCommandAsync(`structure load mso_room_west_01 ${blockLocation.x - 11} ${blockLocation.y - 1} ${blockLocation.z - 6}`);
            }
            else if (randomChance <= 73.6) {
              block.dimension.runCommandAsync(`structure load mso_room_west_02 ${blockLocation.x - 11} ${blockLocation.y - 1} ${blockLocation.z - 6}`);
            }
            else if (randomChance <= 76.9) {
              block.dimension.runCommandAsync(`structure load mso_spider_west_01 ${blockLocation.x - 11} ${blockLocation.y - 1} ${blockLocation.z - 6}`);
            }
            else if (randomChance <= 80.2) {
              block.dimension.runCommandAsync(`structure load mso_zombie_west_01 ${blockLocation.x - 11} ${blockLocation.y - 1} ${blockLocation.z - 6}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mss_way_east")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.4) {
              block.dimension.runCommandAsync(`structure load mss_way_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 10.8) {
              block.dimension.runCommandAsync(`structure load mss_way_east_02 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 16.2) {
              block.dimension.runCommandAsync(`structure load mss_way_east_03 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 21.6) {
              block.dimension.runCommandAsync(`structure load mss_way_east_04 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 27) {
              block.dimension.runCommandAsync(`structure load mss_way_east_05 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 32.4) {
              block.dimension.runCommandAsync(`structure load mss_way_east_06 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 37.8) {
              block.dimension.runCommandAsync(`structure load mss_way_east_07 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 43.2) {
              block.dimension.runCommandAsync(`structure load mss_way_east_08 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 48.6) {
              block.dimension.runCommandAsync(`structure load mss_way_east_09 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 54) {
              block.dimension.runCommandAsync(`structure load mss_way_east_10 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 59.3) {
              block.dimension.runCommandAsync(`structure load mss_way_east_11 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 64.8) {
              block.dimension.runCommandAsync(`structure load mss_way_east_12 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 67.5) {
              block.dimension.runCommandAsync(`structure load mss_room_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else if (randomChance <= 70.2) {
              block.dimension.runCommandAsync(`structure load mss_room_east_02 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else if (randomChance <= 72.9) {
              block.dimension.runCommandAsync(`structure load mss_room_east_03 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else if (randomChance <= 75.6) {
              block.dimension.runCommandAsync(`structure load mss_room_east_04 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else if (randomChance <= 78.3) {
              block.dimension.runCommandAsync(`structure load mss_spider_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else if (randomChance <= 81) {
              block.dimension.runCommandAsync(`structure load mss_zombie_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mss_way_north")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.4) {
              block.dimension.runCommandAsync(`structure load mss_way_north_01 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 10.8) {
              block.dimension.runCommandAsync(`structure load mss_way_north_02 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 16.2) {
              block.dimension.runCommandAsync(`structure load mss_way_north_03 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 21.6) {
              block.dimension.runCommandAsync(`structure load mss_way_north_04 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 27) {
              block.dimension.runCommandAsync(`structure load mss_way_north_05 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 32.4) {
              block.dimension.runCommandAsync(`structure load mss_way_north_06 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 37.8) {
              block.dimension.runCommandAsync(`structure load mss_way_north_07 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 43.2) {
              block.dimension.runCommandAsync(`structure load mss_way_north_08 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 48.6) {
              block.dimension.runCommandAsync(`structure load mss_way_north_09 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 54) {
              block.dimension.runCommandAsync(`structure load mss_way_north_10 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 59.3) {
              block.dimension.runCommandAsync(`structure load mss_way_north_11 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 64.8) {
              block.dimension.runCommandAsync(`structure load mss_way_north_12 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 67.5) {
              block.dimension.runCommandAsync(`structure load mss_room_north_01 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 70.2) {
              block.dimension.runCommandAsync(`structure load mss_room_north_02 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 72.9) {
              block.dimension.runCommandAsync(`structure load mss_room_north_03 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 75.6) {
              block.dimension.runCommandAsync(`structure load mss_room_north_04 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 78.3) {
              block.dimension.runCommandAsync(`structure load mss_spider_north_01 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 81) {
              block.dimension.runCommandAsync(`structure load mss_zombie_north_01 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mss_way_south")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.4) {
              block.dimension.runCommandAsync(`structure load mss_way_south_01 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 10.8) {
              block.dimension.runCommandAsync(`structure load mss_way_south_02 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 16.2) {
              block.dimension.runCommandAsync(`structure load mss_way_south_03 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 21.6) {
              block.dimension.runCommandAsync(`structure load mss_way_south_04 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 27) {
              block.dimension.runCommandAsync(`structure load mss_way_south_05 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 32.4) {
              block.dimension.runCommandAsync(`structure load mss_way_south_06 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 37.8) {
              block.dimension.runCommandAsync(`structure load mss_way_south_07 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 43.2) {
              block.dimension.runCommandAsync(`structure load mss_way_south_08 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 48.6) {
              block.dimension.runCommandAsync(`structure load mss_way_south_09 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 54) {
              block.dimension.runCommandAsync(`structure load mss_way_south_10 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 59.3) {
              block.dimension.runCommandAsync(`structure load mss_way_south_11 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 64.8) {
              block.dimension.runCommandAsync(`structure load mss_way_south_12 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 67.5) {
              block.dimension.runCommandAsync(`structure load mss_room_south_01 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 70.2) {
              block.dimension.runCommandAsync(`structure load mss_room_south_02 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 72.9) {
              block.dimension.runCommandAsync(`structure load mss_room_south_03 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 75.6) {
              block.dimension.runCommandAsync(`structure load mss_room_south_04 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 78.3) {
              block.dimension.runCommandAsync(`structure load mss_spider_south_01 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 81) {
              block.dimension.runCommandAsync(`structure load mss_zombie_south_01 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mss_way_west")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.4) {
              block.dimension.runCommandAsync(`structure load mss_way_west_01 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 10.8) {
              block.dimension.runCommandAsync(`structure load mss_way_west_02 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 16.2) {
              block.dimension.runCommandAsync(`structure load mss_way_west_03 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 21.6) {
              block.dimension.runCommandAsync(`structure load mss_way_west_04 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 27) {
              block.dimension.runCommandAsync(`structure load mss_way_west_05 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 32.4) {
              block.dimension.runCommandAsync(`structure load mss_way_west_06 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 37.8) {
              block.dimension.runCommandAsync(`structure load mss_way_west_07 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 43.2) {
              block.dimension.runCommandAsync(`structure load mss_way_west_08 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 48.6) {
              block.dimension.runCommandAsync(`structure load mss_way_west_09 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 54) {
              block.dimension.runCommandAsync(`structure load mss_way_west_10 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 59.3) {
              block.dimension.runCommandAsync(`structure load mss_way_west_11 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 64.8) {
              block.dimension.runCommandAsync(`structure load mss_way_west_12 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 67.5) {
              block.dimension.runCommandAsync(`structure load mss_room_west_01 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else if (randomChance <= 70.2) {
              block.dimension.runCommandAsync(`structure load mss_room_west_02 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else if (randomChance <= 72.9) {
              block.dimension.runCommandAsync(`structure load mss_room_west_03 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else if (randomChance <= 75.6) {
              block.dimension.runCommandAsync(`structure load mss_room_west_04 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else if (randomChance <= 78.3) {
              block.dimension.runCommandAsync(`structure load mss_spider_west_01 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else if (randomChance <= 81) {
              block.dimension.runCommandAsync(`structure load mss_zombie_west_01 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else return;
          });
        }
      }
      else return;
    }
  });
  initEvent.blockTypeRegistry.registerCustomComponent("nicothekid:structure_mineshaft_on_tick", {
    onTick: eventData => {
      const block = eventData.block;
      const blockLocation = block.location;
      if (mineshaftStructureSpawner.includes(block.typeId)) {
        let randomChance = Math.random() * (100.0 - 0.0) + 0.0;
        if (block.permutation.matches("nicothekid:structure_mineshaft_ancient")) {
          block.setPermutation(BlockPermutation.resolve("minecraft:air"));
          block.dimension.runCommandAsync(`structure load mineshaft_ancient_01 ${blockLocation.x - 18} ${blockLocation.y - 3} ${blockLocation.z - 18}`);
        }
        if (block.permutation.matches("nicothekid:structure_mineshaft_oak")) {
          block.setPermutation(BlockPermutation.resolve("minecraft:air"));
          block.dimension.runCommandAsync(`structure load mineshaft_oak_01 ${blockLocation.x - 11} ${blockLocation.y - 1} ${blockLocation.z - 11}`);
        }
        if (block.permutation.matches("nicothekid:structure_mineshaft_spruce")) {
          block.setPermutation(BlockPermutation.resolve("minecraft:air"));
          block.dimension.runCommandAsync(`structure load mineshaft_spruce_01 ${blockLocation.x - 14} ${blockLocation.y - 1} ${blockLocation.z - 14}`);
        }
        if (block.permutation.matches("nicothekid:structure_msa_arch_way_east")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 12.7) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 25.4) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_east_02 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 38.1) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_east_03 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 50.8) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_east_04 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 63.5) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_east_05 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 76.2) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_east_06 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 78.8) {
              block.dimension.runCommandAsync(`structure load msa_room_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 81.4) {
              block.dimension.runCommandAsync(`structure load msa_room_east_02 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 84) {
              block.dimension.runCommandAsync(`structure load msa_room_east_03 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 86.6) {
              block.dimension.runCommandAsync(`structure load msa_room_east_04 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 89.2) {
              block.dimension.runCommandAsync(`structure load msa_room_east_05 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 91.8) {
              block.dimension.runCommandAsync(`structure load msa_spider_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 94.4) {
              block.dimension.runCommandAsync(`structure load msa_zombie_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_msa_arch_way_north")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 12.7) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_north_01 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 25.4) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_north_02 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 38.1) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_north_03 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 50.8) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_north_04 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 63.5) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_north_05 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 76.2) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_north_06 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 78.8) {
              block.dimension.runCommandAsync(`structure load msa_room_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 81.4) {
              block.dimension.runCommandAsync(`structure load msa_room_north_02 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 84) {
              block.dimension.runCommandAsync(`structure load msa_room_north_03 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 86.6) {
              block.dimension.runCommandAsync(`structure load msa_room_north_04 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 89.2) {
              block.dimension.runCommandAsync(`structure load msa_room_north_05 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 91.8) {
              block.dimension.runCommandAsync(`structure load msa_spider_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 94.4) {
              block.dimension.runCommandAsync(`structure load msa_zombie_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_msa_arch_way_south")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 12.7) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_south_01 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 25.4) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_south_02 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 38.1) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_south_03 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 50.8) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_south_04 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 63.5) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_south_05 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 76.2) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_south_06 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 78.8) {
              block.dimension.runCommandAsync(`structure load msa_room_south_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 81.4) {
              block.dimension.runCommandAsync(`structure load msa_room_south_02 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 84) {
              block.dimension.runCommandAsync(`structure load msa_room_south_03 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 86.6) {
              block.dimension.runCommandAsync(`structure load msa_room_south_04 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 89.2) {
              block.dimension.runCommandAsync(`structure load msa_room_south_05 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 91.8) {
              block.dimension.runCommandAsync(`structure load msa_spider_south_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 94.4) {
              block.dimension.runCommandAsync(`structure load msa_zombie_south_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_msa_arch_way_west")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 12.7) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_west_01 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 25.4) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_west_02 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 38.1) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_west_03 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 50.8) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_west_04 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 63.5) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_west_05 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 76.2) {
              block.dimension.runCommandAsync(`structure load msa_arch_way_west_06 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 78.8) {
              block.dimension.runCommandAsync(`structure load msa_room_west_01 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 81.4) {
              block.dimension.runCommandAsync(`structure load msa_room_west_02 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 84) {
              block.dimension.runCommandAsync(`structure load msa_room_west_03 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 86.6) {
              block.dimension.runCommandAsync(`structure load msa_room_west_04 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 89.2) {
              block.dimension.runCommandAsync(`structure load msa_room_west_05 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 91.8) {
              block.dimension.runCommandAsync(`structure load msa_spider_west_01 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 94.4) {
              block.dimension.runCommandAsync(`structure load msa_zombie_west_01 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_msa_way_east")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.1) {
              block.dimension.runCommandAsync(`structure load msa_way_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 10.2) {
              block.dimension.runCommandAsync(`structure load msa_way_east_02 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 15.3) {
              block.dimension.runCommandAsync(`structure load msa_way_east_03 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 20.4) {
              block.dimension.runCommandAsync(`structure load msa_way_east_04 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 25) {
              block.dimension.runCommandAsync(`structure load msa_way_east_05 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 30.6) {
              block.dimension.runCommandAsync(`structure load msa_way_east_06 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 35.7) {
              block.dimension.runCommandAsync(`structure load msa_way_east_07 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 40.8) {
              block.dimension.runCommandAsync(`structure load msa_way_east_08 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 45.9) {
              block.dimension.runCommandAsync(`structure load msa_way_east_09 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 51) {
              block.dimension.runCommandAsync(`structure load msa_way_east_10 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 56.1) {
              block.dimension.runCommandAsync(`structure load msa_way_east_11 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 61.2) {
              block.dimension.runCommandAsync(`structure load msa_way_east_12 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 63.8) {
              block.dimension.runCommandAsync(`structure load msa_room_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 66.4) {
              block.dimension.runCommandAsync(`structure load msa_room_east_02 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 69) {
              block.dimension.runCommandAsync(`structure load msa_room_east_03 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 71.6) {
              block.dimension.runCommandAsync(`structure load msa_room_east_04 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 74.2) {
              block.dimension.runCommandAsync(`structure load msa_room_east_05 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 76.8) {
              block.dimension.runCommandAsync(`structure load msa_spider_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 79.4) {
              block.dimension.runCommandAsync(`structure load msa_zombie_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_msa_way_north")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.1) {
              block.dimension.runCommandAsync(`structure load msa_way_north_01 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 10.2) {
              block.dimension.runCommandAsync(`structure load msa_way_north_02 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 15.3) {
              block.dimension.runCommandAsync(`structure load msa_way_north_03 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 20.4) {
              block.dimension.runCommandAsync(`structure load msa_way_north_04 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 25) {
              block.dimension.runCommandAsync(`structure load msa_way_north_05 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 30.6) {
              block.dimension.runCommandAsync(`structure load msa_way_north_06 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 35.7) {
              block.dimension.runCommandAsync(`structure load msa_way_north_07 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 40.8) {
              block.dimension.runCommandAsync(`structure load msa_way_north_08 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 45.9) {
              block.dimension.runCommandAsync(`structure load msa_way_north_09 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 51) {
              block.dimension.runCommandAsync(`structure load msa_way_north_10 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 56.1) {
              block.dimension.runCommandAsync(`structure load msa_way_north_11 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 61.2) {
              block.dimension.runCommandAsync(`structure load msa_way_north_12 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 63.8) {
              block.dimension.runCommandAsync(`structure load msa_room_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 66.4) {
              block.dimension.runCommandAsync(`structure load msa_room_north_02 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 69) {
              block.dimension.runCommandAsync(`structure load msa_room_north_03 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 71.6) {
              block.dimension.runCommandAsync(`structure load msa_room_north_04 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 74.2) {
              block.dimension.runCommandAsync(`structure load msa_room_north_05 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 76.8) {
              block.dimension.runCommandAsync(`structure load msa_spider_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else if (randomChance <= 79.4) {
              block.dimension.runCommandAsync(`structure load msa_zombie_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 10}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_msa_way_south")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.1) {
              block.dimension.runCommandAsync(`structure load msa_way_south_01 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 10.2) {
              block.dimension.runCommandAsync(`structure load msa_way_south_02 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 15.3) {
              block.dimension.runCommandAsync(`structure load msa_way_south_03 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 20.4) {
              block.dimension.runCommandAsync(`structure load msa_way_south_04 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 25) {
              block.dimension.runCommandAsync(`structure load msa_way_south_05 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 30.6) {
              block.dimension.runCommandAsync(`structure load msa_way_south_06 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 35.7) {
              block.dimension.runCommandAsync(`structure load msa_way_south_07 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 40.8) {
              block.dimension.runCommandAsync(`structure load msa_way_south_08 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 45.9) {
              block.dimension.runCommandAsync(`structure load msa_way_south_09 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 51) {
              block.dimension.runCommandAsync(`structure load msa_way_south_10 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 56.1) {
              block.dimension.runCommandAsync(`structure load msa_way_south_11 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 61.2) {
              block.dimension.runCommandAsync(`structure load msa_way_south_12 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 63.8) {
              block.dimension.runCommandAsync(`structure load msa_room_south_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 66.4) {
              block.dimension.runCommandAsync(`structure load msa_room_south_02 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 69) {
              block.dimension.runCommandAsync(`structure load msa_room_south_03 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 71.6) {
              block.dimension.runCommandAsync(`structure load msa_room_south_04 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 74.2) {
              block.dimension.runCommandAsync(`structure load msa_room_south_05 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 76.8) {
              block.dimension.runCommandAsync(`structure load msa_spider_south_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 79.4) {
              block.dimension.runCommandAsync(`structure load msa_zombie_south_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_msa_way_west")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.1) {
              block.dimension.runCommandAsync(`structure load msa_way_west_01 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 10.2) {
              block.dimension.runCommandAsync(`structure load msa_way_west_02 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 15.3) {
              block.dimension.runCommandAsync(`structure load msa_way_west_03 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 20.4) {
              block.dimension.runCommandAsync(`structure load msa_way_west_04 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 25) {
              block.dimension.runCommandAsync(`structure load msa_way_west_05 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 30.6) {
              block.dimension.runCommandAsync(`structure load msa_way_west_06 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 35.7) {
              block.dimension.runCommandAsync(`structure load msa_way_west_07 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 40.8) {
              block.dimension.runCommandAsync(`structure load msa_way_west_08 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 45.9) {
              block.dimension.runCommandAsync(`structure load msa_way_west_09 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 51) {
              block.dimension.runCommandAsync(`structure load msa_way_west_10 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 56.1) {
              block.dimension.runCommandAsync(`structure load msa_way_west_11 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 61.2) {
              block.dimension.runCommandAsync(`structure load msa_way_west_12 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 63.8) {
              block.dimension.runCommandAsync(`structure load msa_room_west_01 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 66.4) {
              block.dimension.runCommandAsync(`structure load msa_room_west_02 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 69) {
              block.dimension.runCommandAsync(`structure load msa_room_west_03 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 71.6) {
              block.dimension.runCommandAsync(`structure load msa_room_west_04 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 74.2) {
              block.dimension.runCommandAsync(`structure load msa_room_west_05 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 76.8) {
              block.dimension.runCommandAsync(`structure load msa_spider_west_01 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 79.4) {
              block.dimension.runCommandAsync(`structure load msa_zombie_west_01 ${blockLocation.x - 10} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mso_ground_way_east")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 20.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 40.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_east_02 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 60.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_east_03 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 80.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_east_04 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 86.7) {
              block.dimension.runCommandAsync(`structure load mso_ground_room_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 93.4) {
              block.dimension.runCommandAsync(`structure load mso_ground_room_east_02 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 97.7) {
              block.dimension.runCommandAsync(`structure load mso_ground_spider_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 100.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_zombie_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mso_ground_way_north")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 20.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_north_01 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 40.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_north_02 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 60.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_north_03 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 80.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_north_04 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 86.7) {
              block.dimension.runCommandAsync(`structure load mso_ground_room_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 11}`);
            }
            else if (randomChance <= 93.4) {
              block.dimension.runCommandAsync(`structure load mso_ground_room_north_02 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 11}`);
            }
            else if (randomChance <= 97.7) {
              block.dimension.runCommandAsync(`structure load mso_ground_spider_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 11}`);
            }
            else if (randomChance <= 100.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_zombie_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 11}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mso_ground_way_south")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 20.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_south_01 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 40.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_south_02 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 60.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_south_03 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 80) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_south_04 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 86.7) {
              block.dimension.runCommandAsync(`structure load mso_ground_room_south_01 ${blockLocation.x - 6} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 93.4) {
              block.dimension.runCommandAsync(`structure load mso_ground_room_south_02 ${blockLocation.x - 6} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 97.7) {
              block.dimension.runCommandAsync(`structure load mso_ground_spider_south_01 ${blockLocation.x - 6} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 100.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_zombie_south_01 ${blockLocation.x - 6} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mso_ground_way_west")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 20.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_west_01 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 40.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_west_02 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 60.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_west_03 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 80.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_way_west_04 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 86.7) {
              block.dimension.runCommandAsync(`structure load mso_ground_room_west_01 ${blockLocation.x - 11} ${blockLocation.y - 1} ${blockLocation.z - 6}`);
            }
            else if (randomChance <= 93.4) {
              block.dimension.runCommandAsync(`structure load mso_ground_room_west_02 ${blockLocation.x - 11} ${blockLocation.y - 1} ${blockLocation.z - 6}`);
            }
            else if (randomChance <= 97.7) {
              block.dimension.runCommandAsync(`structure load mso_ground_spider_west_01 ${blockLocation.x - 11} ${blockLocation.y - 1} ${blockLocation.z - 6}`);
            }
            else if (randomChance <= 100.0) {
              block.dimension.runCommandAsync(`structure load mso_ground_zombie_west_01 ${blockLocation.x - 11} ${blockLocation.y - 1} ${blockLocation.z - 6}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mso_way_east")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 6.7) {
              block.dimension.runCommandAsync(`structure load mso_way_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 13.4) {
              block.dimension.runCommandAsync(`structure load mso_way_east_02 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 20.1) {
              block.dimension.runCommandAsync(`structure load mso_way_east_03 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 26.8) {
              block.dimension.runCommandAsync(`structure load mso_way_east_04 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 33.5) {
              block.dimension.runCommandAsync(`structure load mso_way_east_05 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 40.2) {
              block.dimension.runCommandAsync(`structure load mso_way_east_06 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 46.9) {
              block.dimension.runCommandAsync(`structure load mso_way_east_07 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 53.6) {
              block.dimension.runCommandAsync(`structure load mso_way_east_08 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 60.3) {
              block.dimension.runCommandAsync(`structure load mso_way_east_09 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 67) {
              block.dimension.runCommandAsync(`structure load mso_way_east_10 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 70.3) {
              block.dimension.runCommandAsync(`structure load mso_room_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 73.6) {
              block.dimension.runCommandAsync(`structure load mso_room_east_02 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 76.9) {
              block.dimension.runCommandAsync(`structure load mso_spider_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else if (randomChance <= 80.2) {
              block.dimension.runCommandAsync(`structure load mso_zombie_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 5}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mso_way_north")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 6.7) {
              block.dimension.runCommandAsync(`structure load mso_way_north_01 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 13.4) {
              block.dimension.runCommandAsync(`structure load mso_way_north_02 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 20.1) {
              block.dimension.runCommandAsync(`structure load mso_way_north_03 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 26.8) {
              block.dimension.runCommandAsync(`structure load mso_way_north_04 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 33.5) {
              block.dimension.runCommandAsync(`structure load mso_way_north_05 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 40.2) {
              block.dimension.runCommandAsync(`structure load mso_way_north_06 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 46.9) {
              block.dimension.runCommandAsync(`structure load mso_way_north_07 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 53.6) {
              block.dimension.runCommandAsync(`structure load mso_way_north_08 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 60.3) {
              block.dimension.runCommandAsync(`structure load mso_way_north_09 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 67) {
              block.dimension.runCommandAsync(`structure load mso_way_north_10 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 7}`);
            }
            else if (randomChance <= 70.3) {
              block.dimension.runCommandAsync(`structure load mso_room_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 11}`);
            }
            else if (randomChance <= 73.6) {
              block.dimension.runCommandAsync(`structure load mso_room_north_02 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 11}`);
            }
            else if (randomChance <= 76.9) {
              block.dimension.runCommandAsync(`structure load mso_spider_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 11}`);
            }
            else if (randomChance <= 80.2) {
              block.dimension.runCommandAsync(`structure load mso_zombie_north_01 ${blockLocation.x - 5} ${blockLocation.y - 1} ${blockLocation.z - 11}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mso_way_south")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 6.7) {
              block.dimension.runCommandAsync(`structure load mso_way_south_01 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 13.4) {
              block.dimension.runCommandAsync(`structure load mso_way_south_02 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 20.1) {
              block.dimension.runCommandAsync(`structure load mso_way_south_03 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 26.8) {
              block.dimension.runCommandAsync(`structure load mso_way_south_04 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 33.5) {
              block.dimension.runCommandAsync(`structure load mso_way_south_05 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 40.2) {
              block.dimension.runCommandAsync(`structure load mso_way_south_06 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 46.9) {
              block.dimension.runCommandAsync(`structure load mso_way_south_07 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 53.6) {
              block.dimension.runCommandAsync(`structure load mso_way_south_08 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 60.3) {
              block.dimension.runCommandAsync(`structure load mso_way_south_09 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 67) {
              block.dimension.runCommandAsync(`structure load mso_way_south_10 ${blockLocation.x - 2} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 70.3) {
              block.dimension.runCommandAsync(`structure load mso_room_south_01 ${blockLocation.x - 6} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 73.6) {
              block.dimension.runCommandAsync(`structure load mso_room_south_02 ${blockLocation.x - 6} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 76.9) {
              block.dimension.runCommandAsync(`structure load mso_spider_south_01 ${blockLocation.x - 6} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 80.2) {
              block.dimension.runCommandAsync(`structure load mso_zombie_south_01 ${blockLocation.x - 6} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mso_way_west")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 6.7) {
              block.dimension.runCommandAsync(`structure load mso_way_west_01 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 13.4) {
              block.dimension.runCommandAsync(`structure load mso_way_west_02 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 20.1) {
              block.dimension.runCommandAsync(`structure load mso_way_west_03 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 26.8) {
              block.dimension.runCommandAsync(`structure load mso_way_west_04 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 33.5) {
              block.dimension.runCommandAsync(`structure load mso_way_west_05 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 40.2) {
              block.dimension.runCommandAsync(`structure load mso_way_west_06 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 46.9) {
              block.dimension.runCommandAsync(`structure load mso_way_west_07 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 53.6) {
              block.dimension.runCommandAsync(`structure load mso_way_west_08 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 60.3) {
              block.dimension.runCommandAsync(`structure load mso_way_west_09 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 67) {
              block.dimension.runCommandAsync(`structure load mso_way_west_10 ${blockLocation.x - 7} ${blockLocation.y - 1} ${blockLocation.z - 2}`);
            }
            else if (randomChance <= 70.3) {
              block.dimension.runCommandAsync(`structure load mso_room_west_01 ${blockLocation.x - 11} ${blockLocation.y - 1} ${blockLocation.z - 6}`);
            }
            else if (randomChance <= 73.6) {
              block.dimension.runCommandAsync(`structure load mso_room_west_02 ${blockLocation.x - 11} ${blockLocation.y - 1} ${blockLocation.z - 6}`);
            }
            else if (randomChance <= 76.9) {
              block.dimension.runCommandAsync(`structure load mso_spider_west_01 ${blockLocation.x - 11} ${blockLocation.y - 1} ${blockLocation.z - 6}`);
            }
            else if (randomChance <= 80.2) {
              block.dimension.runCommandAsync(`structure load mso_zombie_west_01 ${blockLocation.x - 11} ${blockLocation.y - 1} ${blockLocation.z - 6}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mss_way_east")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.4) {
              block.dimension.runCommandAsync(`structure load mss_way_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 10.8) {
              block.dimension.runCommandAsync(`structure load mss_way_east_02 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 16.2) {
              block.dimension.runCommandAsync(`structure load mss_way_east_03 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 21.6) {
              block.dimension.runCommandAsync(`structure load mss_way_east_04 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 27) {
              block.dimension.runCommandAsync(`structure load mss_way_east_05 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 32.4) {
              block.dimension.runCommandAsync(`structure load mss_way_east_06 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 37.8) {
              block.dimension.runCommandAsync(`structure load mss_way_east_07 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 43.2) {
              block.dimension.runCommandAsync(`structure load mss_way_east_08 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 48.6) {
              block.dimension.runCommandAsync(`structure load mss_way_east_09 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 54) {
              block.dimension.runCommandAsync(`structure load mss_way_east_10 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 59.3) {
              block.dimension.runCommandAsync(`structure load mss_way_east_11 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 64.8) {
              block.dimension.runCommandAsync(`structure load mss_way_east_12 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 67.5) {
              block.dimension.runCommandAsync(`structure load mss_room_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else if (randomChance <= 70.2) {
              block.dimension.runCommandAsync(`structure load mss_room_east_02 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else if (randomChance <= 72.9) {
              block.dimension.runCommandAsync(`structure load mss_room_east_03 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else if (randomChance <= 75.6) {
              block.dimension.runCommandAsync(`structure load mss_room_east_04 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else if (randomChance <= 78.3) {
              block.dimension.runCommandAsync(`structure load mss_spider_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else if (randomChance <= 81) {
              block.dimension.runCommandAsync(`structure load mss_zombie_east_01 ${blockLocation.x} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mss_way_north")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.4) {
              block.dimension.runCommandAsync(`structure load mss_way_north_01 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 10.8) {
              block.dimension.runCommandAsync(`structure load mss_way_north_02 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 16.2) {
              block.dimension.runCommandAsync(`structure load mss_way_north_03 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 21.6) {
              block.dimension.runCommandAsync(`structure load mss_way_north_04 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 27) {
              block.dimension.runCommandAsync(`structure load mss_way_north_05 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 32.4) {
              block.dimension.runCommandAsync(`structure load mss_way_north_06 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 37.8) {
              block.dimension.runCommandAsync(`structure load mss_way_north_07 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 43.2) {
              block.dimension.runCommandAsync(`structure load mss_way_north_08 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 48.6) {
              block.dimension.runCommandAsync(`structure load mss_way_north_09 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 54) {
              block.dimension.runCommandAsync(`structure load mss_way_north_10 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 59.3) {
              block.dimension.runCommandAsync(`structure load mss_way_north_11 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 64.8) {
              block.dimension.runCommandAsync(`structure load mss_way_north_12 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 67.5) {
              block.dimension.runCommandAsync(`structure load mss_room_north_01 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 70.2) {
              block.dimension.runCommandAsync(`structure load mss_room_north_02 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 72.9) {
              block.dimension.runCommandAsync(`structure load mss_room_north_03 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 75.6) {
              block.dimension.runCommandAsync(`structure load mss_room_north_04 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 78.3) {
              block.dimension.runCommandAsync(`structure load mss_spider_north_01 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else if (randomChance <= 81) {
              block.dimension.runCommandAsync(`structure load mss_zombie_north_01 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z - 8}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mss_way_south")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.4) {
              block.dimension.runCommandAsync(`structure load mss_way_south_01 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 10.8) {
              block.dimension.runCommandAsync(`structure load mss_way_south_02 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 16.2) {
              block.dimension.runCommandAsync(`structure load mss_way_south_03 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 21.6) {
              block.dimension.runCommandAsync(`structure load mss_way_south_04 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 27) {
              block.dimension.runCommandAsync(`structure load mss_way_south_05 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 32.4) {
              block.dimension.runCommandAsync(`structure load mss_way_south_06 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 37.8) {
              block.dimension.runCommandAsync(`structure load mss_way_south_07 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 43.2) {
              block.dimension.runCommandAsync(`structure load mss_way_south_08 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 48.6) {
              block.dimension.runCommandAsync(`structure load mss_way_south_09 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 54) {
              block.dimension.runCommandAsync(`structure load mss_way_south_10 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 59.3) {
              block.dimension.runCommandAsync(`structure load mss_way_south_11 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 64.8) {
              block.dimension.runCommandAsync(`structure load mss_way_south_12 ${blockLocation.x - 1} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 67.5) {
              block.dimension.runCommandAsync(`structure load mss_room_south_01 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 70.2) {
              block.dimension.runCommandAsync(`structure load mss_room_south_02 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 72.9) {
              block.dimension.runCommandAsync(`structure load mss_room_south_03 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 75.6) {
              block.dimension.runCommandAsync(`structure load mss_room_south_04 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 78.3) {
              block.dimension.runCommandAsync(`structure load mss_spider_south_01 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else if (randomChance <= 81) {
              block.dimension.runCommandAsync(`structure load mss_zombie_south_01 ${blockLocation.x - 4} ${blockLocation.y - 1} ${blockLocation.z}`);
            }
            else return;
          });
        }
        if (block.permutation.matches("nicothekid:structure_mss_way_west")) {
          system.run(() => {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.4) {
              block.dimension.runCommandAsync(`structure load mss_way_west_01 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 10.8) {
              block.dimension.runCommandAsync(`structure load mss_way_west_02 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 16.2) {
              block.dimension.runCommandAsync(`structure load mss_way_west_03 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 21.6) {
              block.dimension.runCommandAsync(`structure load mss_way_west_04 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 27) {
              block.dimension.runCommandAsync(`structure load mss_way_west_05 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 32.4) {
              block.dimension.runCommandAsync(`structure load mss_way_west_06 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 37.8) {
              block.dimension.runCommandAsync(`structure load mss_way_west_07 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 43.2) {
              block.dimension.runCommandAsync(`structure load mss_way_west_08 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 48.6) {
              block.dimension.runCommandAsync(`structure load mss_way_west_09 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 54) {
              block.dimension.runCommandAsync(`structure load mss_way_west_10 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 59.3) {
              block.dimension.runCommandAsync(`structure load mss_way_west_11 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 64.8) {
              block.dimension.runCommandAsync(`structure load mss_way_west_12 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 1}`);
            }
            else if (randomChance <= 67.5) {
              block.dimension.runCommandAsync(`structure load mss_room_west_01 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else if (randomChance <= 70.2) {
              block.dimension.runCommandAsync(`structure load mss_room_west_02 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else if (randomChance <= 72.9) {
              block.dimension.runCommandAsync(`structure load mss_room_west_03 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else if (randomChance <= 75.6) {
              block.dimension.runCommandAsync(`structure load mss_room_west_04 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else if (randomChance <= 78.3) {
              block.dimension.runCommandAsync(`structure load mss_spider_west_01 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else if (randomChance <= 81) {
              block.dimension.runCommandAsync(`structure load mss_zombie_west_01 ${blockLocation.x - 8} ${blockLocation.y - 1} ${blockLocation.z - 4}`);
            }
            else return;
          });
        }
      }
      else return;
    }
  });
});