import { system, BlockPermutation } from "@minecraft/server";
import { spawnItemStack } from "../../ntk_functions.js";

const BlockMineshaftSpawnerOnTickComponent = {
  onTick({ block }, { params }) {
    for (const child of params) {
      const eventChance = child.event_chance ?? 100;
      const blockType = child.block_type;
      const ancientMineshaftSpawner = [
        "ntk:structure_mineshaft_ancient",
        "ntk:structure_msa_arch_way_east",
        "ntk:structure_msa_arch_way_north",
        "ntk:structure_msa_arch_way_south",
        "ntk:structure_msa_arch_way_west",
        "ntk:structure_msa_way_east",
        "ntk:structure_msa_way_north",
        "ntk:structure_msa_way_south",
        "ntk:structure_msa_way_west"
      ];
      const birchWoodMineshaftSpawner = [
        "ntk:structure_mineshaft_birch",
        "ntk:structure_msb_ground_way_east",
        "ntk:structure_msb_ground_way_north",
        "ntk:structure_msb_ground_way_south",
        "ntk:structure_msb_ground_way_west",
        "ntk:structure_msb_way_east",
        "ntk:structure_msb_way_north",
        "ntk:structure_msb_way_south",
        "ntk:structure_msb_way_west"
      ];
      const oakWoodMineshaftSpawner = [
        "ntk:structure_mineshaft_oak",
        "ntk:structure_mso_ground_way_east",
        "ntk:structure_mso_ground_way_north",
        "ntk:structure_mso_ground_way_south",
        "ntk:structure_mso_ground_way_west",
        "ntk:structure_mso_way_east",
        "ntk:structure_mso_way_north",
        "ntk:structure_mso_way_south",
        "ntk:structure_mso_way_west"
      ];
      const spruceWoodMineshaftSpawner = [
        "ntk:structure_mineshaft_spruce",
        "ntk:structure_mss_way_east",
        "ntk:structure_mss_way_north",
        "ntk:structure_mss_way_south",
        "ntk:structure_mss_way_west"
      ];
      if (Math.random() * 100 <= eventChance){
        if (ancientMineshaftSpawner.includes(blockType)) {
          let randomChance = Math.random() * (100.0 - 0.0) + 0.0;
          if (block.permutation.matches("ntk:structure_mineshaft_ancient")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/am_center_01" ${block.location.x - 18} ${block.location.y - 3} ${block.location.z - 18}`);
          }
          if (block.permutation.matches("ntk:structure_msa_arch_way_east")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 12.7) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 25.4) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_east_02" ${block.location.x} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 38.1) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_east_03" ${block.location.x} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 50.8) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_east_04" ${block.location.x} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 63.5) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_east_05" ${block.location.x} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 76.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_east_06" ${block.location.x} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 78.8) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 81.4) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_east_02" ${block.location.x} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 84.0) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_east_03" ${block.location.x} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 86.6) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_east_04" ${block.location.x} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 89.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_east_05" ${block.location.x} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 90.8) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_spider_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 92.4) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_zombie_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 5}`);
            }
          }
          if (block.permutation.matches("ntk:structure_msa_arch_way_north")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 12.7) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_north_01" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 25.4) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_north_02" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 38.1) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_north_03" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 50.8) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_north_04" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 63.5) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_north_05" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 76.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_north_06" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 78.8) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_north_01" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z - 10}`);
            }
            else if (randomChance <= 81.4) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_north_02" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z - 10}`);
            }
            else if (randomChance <= 84.0) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_north_03" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z - 10}`);
            }
            else if (randomChance <= 86.6) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_north_04" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z - 10}`);
            }
            else if (randomChance <= 89.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_north_05" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z - 10}`);
            }
            else if (randomChance <= 90.8) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_spider_north_01" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z - 10}`);
            }
            else if (randomChance <= 92.4) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_zombie_north_01" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z - 10}`);
            }
          }
          if (block.permutation.matches("ntk:structure_msa_arch_way_south")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 12.7) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_south_01" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 25.4) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_south_02" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 38.1) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_south_03" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 50.8) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_south_04" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 63.5) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_south_05" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 76.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_south_06" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 78.8) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_south_01" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 81.4) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_south_02" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 84.0) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_south_03" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 86.6) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_south_04" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 89.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_south_05" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 90.8) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_spider_south_01" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 92.4) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_zombie_south_01" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z}`);
            }
          }
          if (block.permutation.matches("ntk:structure_msa_arch_way_west")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 12.7) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_west_01" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 25.4) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_west_02" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 38.1) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_west_03" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 50.8) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_west_04" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 63.5) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_west_05" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 76.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_arched_way_west_06" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 78.8) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_west_01" ${block.location.x - 10} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 81.4) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_west_02" ${block.location.x - 10} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 84.0) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_west_03" ${block.location.x - 10} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 86.6) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_west_04" ${block.location.x - 10} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 89.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_west_05" ${block.location.x - 10} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 90.8) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_spider_west_01" ${block.location.x - 10} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 92.4) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_zombie_west_01" ${block.location.x - 10} ${block.location.y - 1} ${block.location.z - 5}`);
            }
          }
          if (block.permutation.matches("ntk:structure_msa_way_east")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.1) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 10.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_east_02" ${block.location.x} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 15.3) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_east_03" ${block.location.x} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 20.4) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_east_04" ${block.location.x} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 25.0) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_east_05" ${block.location.x} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 30.6) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_east_06" ${block.location.x} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 35.7) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_east_07" ${block.location.x} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 40.8) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_east_08" ${block.location.x} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 45.9) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_east_09" ${block.location.x} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 51.0) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_east_10" ${block.location.x} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 56.1) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_east_11" ${block.location.x} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 61.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_east_12" ${block.location.x} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 63.8) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 66.4) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_east_02" ${block.location.x} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 69.0) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_east_03" ${block.location.x} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 71.6) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_east_04" ${block.location.x} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 74.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_east_05" ${block.location.x} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 75.7) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_spider_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 77.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_zombie_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 5}`);
            }
          }
          if (block.permutation.matches("ntk:structure_msa_way_north")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.1) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_north_01" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 10.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_north_02" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 15.3) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_north_03" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 20.4) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_north_04" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 25.0) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_north_05" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 30.6) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_north_06" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 35.7) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_north_07" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 40.8) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_north_08" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 45.9) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_north_09" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 51.0) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_north_10" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 56.1) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_north_11" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 61.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_north_12" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 63.8) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_north_01" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z - 10}`);
            }
            else if (randomChance <= 66.4) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_north_02" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z - 10}`);
            }
            else if (randomChance <= 69.0) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_north_03" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z - 10}`);
            }
            else if (randomChance <= 71.6) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_north_04" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z - 10}`);
            }
            else if (randomChance <= 74.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_north_05" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z - 10}`);
            }
            else if (randomChance <= 75.7) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_spider_north_01" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z - 10}`);
            }
            else if (randomChance <= 77.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_zombie_north_01" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z - 10}`);
            }
          }
          if (block.permutation.matches("ntk:structure_msa_way_south")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.1) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_south_01" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 10.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_south_02" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 15.3) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_south_03" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 20.4) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_south_04" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 25.0) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_south_05" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 30.6) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_south_06" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 35.7) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_south_07" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 40.8) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_south_08" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 45.9) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_south_09" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 51.0) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_south_10" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 56.1) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_south_11" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 61.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_south_12" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 63.8) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_south_01" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 66.4) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_south_02" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 69.0) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_south_03" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 71.6) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_south_04" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 74.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_south_05" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 75.7) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_spider_south_01" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 77.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_zombie_south_01" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z}`);
            }
          }
          if (block.permutation.matches("ntk:structure_msa_way_west")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.1) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_west_01" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 10.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_west_02" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 15.3) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_west_03" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 20.4) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_west_04" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 25.0) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_west_05" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 30.6) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_west_06" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 35.7) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_west_07" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 40.8) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_west_08" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 45.9) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_west_09" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 51.0) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_west_10" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 56.1) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_west_11" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 61.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/passageway/am_way_west_12" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 63.8) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_west_01" ${block.location.x - 10} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 66.4) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_west_02" ${block.location.x - 10} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 69.0) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_west_03" ${block.location.x - 10} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 71.6) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_west_04" ${block.location.x - 10} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 74.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_station_west_05" ${block.location.x - 10} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 75.7) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_spider_west_01" ${block.location.x - 10} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 77.2) {
              block.dimension.runCommand(`structure load "nmm/ancient_mineshaft/station/am_zombie_west_01" ${block.location.x - 10} ${block.location.y - 1} ${block.location.z - 5}`);
            }
          }
        }
        if (birchWoodMineshaftSpawner.includes(blockType)) {
          let randomChance = Math.random() * (100.0 - 0.0) + 0.0;
          if (block.permutation.matches("ntk:structure_mineshaft_birch")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/bwm_main_01" ${block.location.x - 4} ${block.location.y - 31} ${block.location.z - 5}`);
          }
          if (block.permutation.matches("ntk:structure_msb_ground_way_east")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 20.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_vestibule_way_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 40.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_vestibule_way_east_02" ${block.location.x} ${block.location.y - 6} ${block.location.z - 1}`);
            }
            else if (randomChance <= 60.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_vestibule_way_east_03" ${block.location.x} ${block.location.y - 6} ${block.location.z - 1}`);
            }
            else if (randomChance <= 80.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_vestibule_way_east_04" ${block.location.x} ${block.location.y - 6} ${block.location.z - 1}`);
            }
            else if (randomChance <= 100.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_vestibule_way_east_05" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
          }
          if (block.permutation.matches("ntk:structure_msb_ground_way_north")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 20.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_vestibule_way_north_01" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 40.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_vestibule_way_north_02" ${block.location.x - 1} ${block.location.y - 6} ${block.location.z - 6}`);
            }
            else if (randomChance <= 60.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_vestibule_way_north_03" ${block.location.x - 1} ${block.location.y - 6} ${block.location.z - 6}`);
            }
            else if (randomChance <= 80.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_vestibule_way_north_04" ${block.location.x - 1} ${block.location.y - 6} ${block.location.z - 6}`);
            }
            else if (randomChance <= 100.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_vestibule_way_north_05" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 6}`);
            }
          }
          if (block.permutation.matches("ntk:structure_msb_ground_way_south")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 20.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_vestibule_way_south_01" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 40.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_vestibule_way_south_02" ${block.location.x - 1} ${block.location.y - 6} ${block.location.z}`);
            }
            else if (randomChance <= 60.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_vestibule_way_south_03" ${block.location.x - 1} ${block.location.y - 6} ${block.location.z}`);
            }
            else if (randomChance <= 80.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_vestibule_way_south_04" ${block.location.x - 1} ${block.location.y - 6} ${block.location.z}`);
            }
            else if (randomChance <= 100.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_vestibule_way_south_05" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z}`);
            }
          }
          if (block.permutation.matches("ntk:structure_msb_ground_way_west")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 20.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_vestibule_way_west_01" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 40.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_vestibule_way_west_02" ${block.location.x - 6} ${block.location.y - 6} ${block.location.z - 1}`);
            }
            else if (randomChance <= 60.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_vestibule_way_west_03" ${block.location.x - 6} ${block.location.y - 6} ${block.location.z - 1}`);
            }
            else if (randomChance <= 80.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_vestibule_way_west_04" ${block.location.x - 6} ${block.location.y - 6} ${block.location.z - 1}`);
            }
            else if (randomChance <= 100.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_vestibule_way_west_05" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z - 1}`);
            }
          }
          if (block.permutation.matches("ntk:structure_msb_way_east")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.8) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 11.6) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_east_02" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 17.4) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_east_03" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 23.2) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_east_04" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 29.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_east_05" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 34.8) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_east_06" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 40.6) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_east_07" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 46.4) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_east_08" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 52.2) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_east_09" ${block.location.x} ${block.location.y - 6} ${block.location.z - 1}`);
            }
            else if (randomChance <= 58.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_east_10" ${block.location.x} ${block.location.y - 6} ${block.location.z - 1}`);
            }
            else if (randomChance <= 60.6) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 3}`);
            }
            else if (randomChance <= 63.2) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_east_02" ${block.location.x} ${block.location.y - 1} ${block.location.z - 3}`);
            }
            else if (randomChance <= 65.8) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_east_03" ${block.location.x} ${block.location.y - 1} ${block.location.z - 3}`);
            }
            else if (randomChance <= 68.4) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_east_04" ${block.location.x} ${block.location.y - 1} ${block.location.z - 3}`);
            }
            else if (randomChance <= 71.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_east_05" ${block.location.x} ${block.location.y - 1} ${block.location.z - 3}`);
            }
            else if (randomChance <= 73.6) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_east_06" ${block.location.x} ${block.location.y - 1} ${block.location.z - 3}`);
            }
            else if (randomChance <= 74.8) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_trial_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 3}`);
            }
            else if (randomChance <= 76.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_spider_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 3}`);
            }
            else if (randomChance <= 77.2) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_zombie_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 3}`);
            }
          }
          if (block.permutation.matches("ntk:structure_msb_way_north")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.8) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_north_01" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 11.6) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_north_02" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 17.4) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_north_03" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 23.2) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_north_04" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 29.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_north_05" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 34.8) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_north_06" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 40.6) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_north_07" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 46.4) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_north_08" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 52.2) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_north_09" ${block.location.x - 1} ${block.location.y - 6} ${block.location.z - 6}`);
            }
            else if (randomChance <= 58.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_north_10" ${block.location.x - 1} ${block.location.y - 6} ${block.location.z - 6}`);
            }
            else if (randomChance <= 60.6) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_north_01" ${block.location.x - 3} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 63.2) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_north_02" ${block.location.x - 3} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 65.8) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_north_03" ${block.location.x - 3} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 68.4) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_north_04" ${block.location.x - 3} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 71.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_north_05" ${block.location.x - 3} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 73.6) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_north_06" ${block.location.x - 3} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 74.8) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_trial_north_01" ${block.location.x - 3} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 76.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_spider_north_01" ${block.location.x - 3} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 77.2) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_zombie_north_01" ${block.location.x - 3} ${block.location.y - 1} ${block.location.z - 6}`);
            }
          }
          if (block.permutation.matches("ntk:structure_msb_way_south")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.8) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_south_01" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 11.6) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_south_02" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 17.4) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_south_03" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 23.2) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_south_04" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 29.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_south_05" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 34.8) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_south_06" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 40.6) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_south_07" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 46.4) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_south_08" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 52.2) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_south_09" ${block.location.x - 1} ${block.location.y - 6} ${block.location.z}`);
            }
            else if (randomChance <= 58.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_south_10" ${block.location.x - 1} ${block.location.y - 6} ${block.location.z}`);
            }
            else if (randomChance <= 60.6) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_south_01" ${block.location.x - 3} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 63.2) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_south_02" ${block.location.x - 3} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 65.8) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_south_03" ${block.location.x - 3} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 68.4) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_south_04" ${block.location.x - 3} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 71.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_south_05" ${block.location.x - 3} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 73.6) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_south_06" ${block.location.x - 3} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 74.8) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_trial_south_01" ${block.location.x - 3} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 76.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_spider_south_01" ${block.location.x - 3} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 77.2) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_zombie_south_01" ${block.location.x - 3} ${block.location.y - 1} ${block.location.z}`);
            }
          }
          if (block.permutation.matches("ntk:structure_msb_way_west")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.8) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_west_01" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 11.6) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_west_02" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 17.4) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_west_03" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 23.2) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_west_04" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 29.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_west_05" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 34.8) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_west_06" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 40.6) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_west_07" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 46.4) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_west_08" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 52.2) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_west_09" ${block.location.x - 6} ${block.location.y - 6} ${block.location.z - 1}`);
            }
            else if (randomChance <= 58.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/passageway/bwm_way_west_10" ${block.location.x - 6} ${block.location.y - 6} ${block.location.z - 1}`);
            }
            else if (randomChance <= 60.6) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_west_01" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z - 3}`);
            }
            else if (randomChance <= 63.2) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_west_02" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z - 3}`);
            }
            else if (randomChance <= 65.8) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_west_03" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z - 3}`);
            }
            else if (randomChance <= 68.4) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_west_04" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z - 3}`);
            }
            else if (randomChance <= 71.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_west_05" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z - 3}`);
            }
            else if (randomChance <= 73.6) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_station_west_06" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z - 3}`);
            }
            else if (randomChance <= 74.8) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_trial_west_01" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z - 3}`);
            }
            else if (randomChance <= 76.0) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_spider_west_01" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z - 3}`);
            }
            else if (randomChance <= 77.2) {
              block.dimension.runCommand(`structure load "nmm/birch_wood_mineshaft/station/bwm_zombie_west_01" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z - 3}`);
            }
          }
        }
        if (oakWoodMineshaftSpawner.includes(blockType)) {
          let randomChance = Math.random() * (100.0 - 0.0) + 0.0;
          if (block.permutation.matches("ntk:structure_mineshaft_oak")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/owm_center_01" ${block.location.x - 11} ${block.location.y - 1} ${block.location.z - 11}`);
          }
          if (block.permutation.matches("ntk:structure_mso_ground_way_east")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 20.6) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_vestibule_way_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 41.2) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_vestibule_way_east_02" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 61.8) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_vestibule_way_east_03" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 82.4) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_vestibule_way_east_04" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 88.7) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_vestibule_station_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 95.0) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_vestibule_station_east_02" ${block.location.x} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 97.6) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_vestibule_spider_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 100.0) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_vestibule_zombie_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 5}`);
            }
          }
          if (block.permutation.matches("ntk:structure_mso_ground_way_north")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 20.6) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_vestibule_way_north_01" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 7}`);
            }
            else if (randomChance <= 41.2) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_vestibule_way_north_02" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 7}`);
            }
            else if (randomChance <= 61.8) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_vestibule_way_north_03" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 7}`);
            }
            else if (randomChance <= 82.4) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_vestibule_way_north_04" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 7}`);
            }
            else if (randomChance <= 88.7) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_vestibule_station_north_01" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z - 11}`);
            }
            else if (randomChance <= 95.0) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_vestibule_station_north_02" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z - 11}`);
            }
            else if (randomChance <= 97.6) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_vestibule_spider_north_01" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z - 11}`);
            }
            else if (randomChance <= 100.0) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_vestibule_zombie_north_01" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z - 11}`);
            }
          }
          if (block.permutation.matches("ntk:structure_mso_ground_way_south")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 20.6) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_vestibule_way_south_01" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 41.2) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_vestibule_way_south_02" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 61.8) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_vestibule_way_south_03" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 82.4) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_vestibule_way_south_04" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 88.7) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_vestibule_station_south_01" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 95.0) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_vestibule_station_south_02" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 97.6) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_vestibule_spider_south_01" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 100.0) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_vestibule_zombie_south_01" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z}`);
            }
          }
          if (block.permutation.matches("ntk:structure_mso_ground_way_west")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 20.6) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_vestibule_way_west_01" ${block.location.x - 7} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 41.2) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_vestibule_way_west_02" ${block.location.x - 7} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 61.8) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_vestibule_way_west_03" ${block.location.x - 7} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 82.4) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_vestibule_way_west_04" ${block.location.x - 7} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 88.7) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_vestibule_station_west_01" ${block.location.x - 11} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 95.0) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_vestibule_station_west_02" ${block.location.x - 11} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 97.6) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_vestibule_spider_west_01" ${block.location.x - 11} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 100.0) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_vestibule_zombie_west_01" ${block.location.x - 11} ${block.location.y - 1} ${block.location.z - 6}`);
            }
          }
          if (block.permutation.matches("ntk:structure_mso_way_east")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 6.7) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 13.4) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_east_02" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 20.1) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_east_03" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 26.8) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_east_04" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 33.5) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_east_05" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 40.2) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_east_06" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 46.9) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_east_07" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 53.6) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_east_08" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 60.3) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_east_09" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 67.0) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_east_10" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 69.7) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_station_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 72.4) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_station_east_02" ${block.location.x} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 74.4) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_spider_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 5}`);
            }
            else if (randomChance <= 76.4) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_zombie_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 5}`);
            }
          }
          if (block.permutation.matches("ntk:structure_mso_way_north")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 6.7) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_north_01" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 7}`);
            }
            else if (randomChance <= 13.4) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_north_02" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 7}`);
            }
            else if (randomChance <= 20.1) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_north_03" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 7}`);
            }
            else if (randomChance <= 26.8) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_north_04" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 7}`);
            }
            else if (randomChance <= 33.5) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_north_05" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 7}`);
            }
            else if (randomChance <= 40.2) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_north_06" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 7}`);
            }
            else if (randomChance <= 46.9) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_north_07" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 7}`);
            }
            else if (randomChance <= 53.6) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_north_08" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 7}`);
            }
            else if (randomChance <= 60.3) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_north_09" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 7}`);
            }
            else if (randomChance <= 67.0) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_north_10" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 7}`);
            }
            else if (randomChance <= 69.7) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_station_north_01" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z - 11}`);
            }
            else if (randomChance <= 72.4) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_station_north_02" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z - 11}`);
            }
            else if (randomChance <= 74.4) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_spider_north_01" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z - 11}`);
            }
            else if (randomChance <= 76.4) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_zombie_north_01" ${block.location.x - 5} ${block.location.y - 1} ${block.location.z - 11}`);
            }
          }
          if (block.permutation.matches("ntk:structure_mso_way_south")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 6.7) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_south_01" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 13.4) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_south_02" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 20.1) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_south_03" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 26.8) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_south_04" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 33.5) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_south_05" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 40.2) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_south_06" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 46.9) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_south_07" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 53.6) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_south_08" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 60.3) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_south_09" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 67.0) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_south_10" ${block.location.x - 2} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 69.7) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_station_south_01" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 72.4) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_station_south_02" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 74.4) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_spider_south_01" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 76.4) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_zombie_south_01" ${block.location.x - 6} ${block.location.y - 1} ${block.location.z}`);
            }
          }
          if (block.permutation.matches("ntk:structure_mso_way_west")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 6.7) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_west_01" ${block.location.x - 7} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 13.4) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_west_02" ${block.location.x - 7} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 20.1) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_west_03" ${block.location.x - 7} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 26.8) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_west_04" ${block.location.x - 7} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 33.5) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_west_05" ${block.location.x - 7} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 40.2) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_west_06" ${block.location.x - 7} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 46.9) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_west_07" ${block.location.x - 7} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 53.6) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_west_08" ${block.location.x - 7} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 60.3) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_west_09" ${block.location.x - 7} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 67.0) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/passageway/owm_way_west_10" ${block.location.x - 7} ${block.location.y - 1} ${block.location.z - 2}`);
            }
            else if (randomChance <= 69.7) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_station_west_01" ${block.location.x - 11} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 72.4) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_station_west_02" ${block.location.x - 11} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 74.4) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_spider_west_01" ${block.location.x - 11} ${block.location.y - 1} ${block.location.z - 6}`);
            }
            else if (randomChance <= 76.4) {
              block.dimension.runCommand(`structure load "nmm/oak_wood_mineshaft/station/owm_zombie_west_01" ${block.location.x - 11} ${block.location.y - 1} ${block.location.z - 6}`);
            }
          }
        }
        if (spruceWoodMineshaftSpawner.includes(blockType)) {
          let randomChance = Math.random() * (100.0 - 0.0) + 0.0;
          if (block.permutation.matches("ntk:structure_mineshaft_spruce")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/swm_center_01" ${block.location.x - 14} ${block.location.y - 1} ${block.location.z - 14}`);
          }
          if (block.permutation.matches("ntk:structure_mss_way_east")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.4) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 10.8) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_east_02" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 16.2) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_east_03" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 21.6) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_east_04" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 27.0) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_east_05" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 32.4) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_east_06" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 37.8) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_east_07" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 43.2) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_east_08" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 48.6) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_east_09" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 54.0) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_east_10" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 59.3) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_east_11" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 64.8) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_east_12" ${block.location.x} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 67.0) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_station_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 4}`);
            }
            else if (randomChance <= 69.2) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_station_east_02" ${block.location.x} ${block.location.y - 1} ${block.location.z - 4}`);
            }
            else if (randomChance <= 71.4) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_station_east_03" ${block.location.x} ${block.location.y - 1} ${block.location.z - 4}`);
            }
            else if (randomChance <= 73.6) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_station_east_04" ${block.location.x} ${block.location.y - 1} ${block.location.z - 4}`);
            }
            else if (randomChance <= 75.2) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_spider_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 4}`);
            }
            else if (randomChance <= 76.8) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_zombie_east_01" ${block.location.x} ${block.location.y - 1} ${block.location.z - 4}`);
            }
          }
          if (block.permutation.matches("ntk:structure_mss_way_north")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.4) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_north_01" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 10.8) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_north_02" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 16.2) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_north_03" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 21.6) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_north_04" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 27.0) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_north_05" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 32.4) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_north_06" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 37.8) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_north_07" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 43.2) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_north_08" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 48.6) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_north_09" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 54.0) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_north_10" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 59.3) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_north_11" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 64.8) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_north_12" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 67.0) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_station_north_01" ${block.location.x - 4} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 69.2) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_station_north_02" ${block.location.x - 4} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 71.4) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_station_north_03" ${block.location.x - 4} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 73.6) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_station_north_04" ${block.location.x - 4} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 75.2) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_spider_north_01" ${block.location.x - 4} ${block.location.y - 1} ${block.location.z - 8}`);
            }
            else if (randomChance <= 76.8) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_zombie_north_01" ${block.location.x - 4} ${block.location.y - 1} ${block.location.z - 8}`);
            }
          }
          if (block.permutation.matches("ntk:structure_mss_way_south")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.4) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_south_01" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 10.8) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_south_02" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 16.2) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_south_03" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 21.6) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_south_04" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 27.0) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_south_05" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 32.4) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_south_06" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 37.8) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_south_07" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 43.2) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_south_08" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 48.6) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_south_09" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 54.0) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_south_10" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 59.3) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_south_11" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 64.8) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_south_12" ${block.location.x - 1} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 67.0) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_station_south_01" ${block.location.x - 4} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 69.2) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_station_south_02" ${block.location.x - 4} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 71.4) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_station_south_03" ${block.location.x - 4} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 73.6) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_station_south_04" ${block.location.x - 4} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 75.2) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_spider_south_01" ${block.location.x - 4} ${block.location.y - 1} ${block.location.z}`);
            }
            else if (randomChance <= 76.8) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_zombie_south_01" ${block.location.x - 4} ${block.location.y - 1} ${block.location.z}`);
            }
          }
          if (block.permutation.matches("ntk:structure_mss_way_west")) {
            block.setPermutation(BlockPermutation.resolve("minecraft:air"));
            if (randomChance <= 5.4) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_west_01" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 10.8) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_west_02" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 16.2) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_west_03" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 21.6) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_west_04" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 27) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_west_05" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 32.4) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_west_06" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 37.8) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_west_07" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 43.2) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_west_08" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 48.6) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_west_09" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 54) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_west_10" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 59.3) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_west_11" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 64.8) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/passageway/swm_way_west_12" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 1}`);
            }
            else if (randomChance <= 67.0) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_station_west_01" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 4}`);
            }
            else if (randomChance <= 69.2) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_station_west_02" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 4}`);
            }
            else if (randomChance <= 71.4) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_station_west_03" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 4}`);
            }
            else if (randomChance <= 73.6) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_station_west_04" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 4}`);
            }
            else if (randomChance <= 75.2) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_spider_west_01" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 4}`);
            }
            else if (randomChance <= 76.8) {
              block.dimension.runCommand(`structure load "nmm/spruce_wood_mineshaft/station/swm_zombie_west_01" ${block.location.x - 8} ${block.location.y - 1} ${block.location.z - 4}`);
            }
          }
        }
      }
    }
  },
};
system.beforeEvents.startup.subscribe(({ blockComponentRegistry }) => {
  blockComponentRegistry.registerCustomComponent(
    "ntk:mineshaft_spawner_on_tick",
    BlockMineshaftSpawnerOnTickComponent
  );
});
