const woodTypes = [
  {
    "modid": "minecraft",
    "woodType": "oak"
  },
  {
    "modid": "minecraft",
    "woodType": "spruce"
  },
  {
    "modid": "minecraft",
    "woodType": "birch"
  },
  {
    "modid": "minecraft",
    "woodType": "jungle"
  },
  {
    "modid": "minecraft",
    "woodType": "acacia"
  },
  {
    "modid": "minecraft",
    "woodType": "dark_oak"
  },
  {
    "modid": "malum",
    "woodType": "runewood"
  },
  {
    "modid": "witchery_rewitched",
    "woodType": "rowan"
  },
  {
    "modid": "witchery_rewitched",
    "woodType": "hawthorn"
  },
  {
    "modid": "witchery_rewitched",
    "woodType": "alder"
  },
  {
    "modid": "abundance",
    "woodType": "jacaranda"
  },
  {
    "modid": "abundance",
    "woodType": "redbud"
  },
  {
    "modid": "bayou_blues",
    "woodType": "cypress"
  },
  {
    "modid": "environmental",
    "woodType": "willow"
  },
  {
    "modid": "environmental",
    "woodType": "cherry"
  },
  {
    "modid": "environmental",
    "woodType": "wisteria"
  },
  {
    "modid": "byg",
    "woodType": "aspen"
  },
  {
    "modid": "byg",
    "woodType": "baobab"
  },
  {
    "modid": "byg",
    "woodType": "blue_enchanted"
  },
  {
    "modid": "byg",
    "woodType": "green_enchanted"
  },
  {
    "modid": "byg",
    "woodType": "cherry"
  },
  {
    "modid": "byg",
    "woodType": "cika"
  },
  {
    "modid": "byg",
    "woodType": "cypress"
  },
  {
    "modid": "byg",
    "woodType": "ebony"
  },
  {
    "modid": "byg",
    "woodType": "ether"
  },
  {
    "modid": "byg",
    "woodType": "fir"
  },
  {
    "modid": "byg",
    "woodType": "holly"
  },
  {
    "modid": "byg",
    "woodType": "jacaranda"
  },
  {
    "modid": "byg",
    "woodType": "lament"
  },
  {
    "modid": "byg",
    "woodType": "mahogany"
  },
  {
    "modid": "byg",
    "woodType": "mangrove"
  },
  {
    "modid": "byg",
    "woodType": "maple"
  },
  {
    "modid": "byg",
    "woodType": "nightshade"
  },
  {
    "modid": "byg",
    "woodType": "palm"
  },
  {
    "modid": "byg",
    "woodType": "palo_verde"
  },
  {
    "modid": "byg",
    "woodType": "pine"
  },
  {
    "modid": "byg",
    "woodType": "rainbow_eucalyptus"
  },
  {
    "modid": "byg",
    "woodType": "redwood"
  },
  {
    "modid": "byg",
    "woodType": "skyris"
  },
  {
    "modid": "byg",
    "woodType": "willow"
  },
  {
    "modid": "byg",
    "woodType": "witch_hazel"
  },
  {
    "modid": "byg",
    "woodType": "zelkova"
  },
  {
    "modid": "byg",
    "woodType": "withering_oak"
  },
  {
    "modid": "projectvibrantjourneys",
    "woodType": "fir"
  },
  {
    "modid": "projectvibrantjourneys",
    "woodType": "pine"
  },
  {
    "modid": "projectvibrantjourneys",
    "woodType": "redwood"
  },
  {
    "modid": "projectvibrantjourneys",
    "woodType": "willow"
  },
  {
    "modid": "projectvibrantjourneys",
    "woodType": "mangrove"
  },
  {
    "modid": "projectvibrantjourneys",
    "woodType": "palm"
  },
  {
    "modid": "projectvibrantjourneys",
    "woodType": "cottonwood"
  },
  {
    "modid": "projectvibrantjourneys",
    "woodType": "juniper"
  },
  {
    "modid": "projectvibrantjourneys",
    "woodType": "baobab"
  },
  {
    "modid": "projectvibrantjourneys",
    "woodType": "maple"
  },
  {
    "modid": "projectvibrantjourneys",
    "woodType": "cherry_blossom"
  },
  {
    "modid": "projectvibrantjourneys",
    "woodType": "tamarack"
  },
  {
    "modid": "projectvibrantjourneys",
    "woodType": "joshua"
  },
  {
    "modid": "upgrade_aquatic",
    "woodType": "driftwood"
  },
  {
    "modid": "upgrade_aquatic",
    "woodType": "river"
  },
  {
    "modid": "betterendforge",
    "woodType": "mossy_glowshroom"
  },
  {
    "modid": "betterendforge",
    "woodType": "lacugrove"
  },
  {
    "modid": "betterendforge",
    "woodType": "end_lotus"
  },
  {
    "modid": "betterendforge",
    "woodType": "pythadendron"
  },
  {
    "modid": "betterendforge",
    "woodType": "dragon_tree"
  },
  {
    "modid": "betterendforge",
    "woodType": "tenanea"
  },
  {
    "modid": "betterendforge",
    "woodType": "helix_tree"
  },
  {
    "modid": "betterendforge",
    "woodType": "umbrella_tree"
  },
  {
    "modid": "betterendforge",
    "woodType": "jellyshroom"
  },
  {
    "modid": "betterendforge",
    "woodType": "lucernia"
  },
  {
    "modid": "hexerei",
    "woodType": "willow"
  },
  {
    "modid": "hexerei",
    "woodType": "mahogany"
  }
]

onEvent("recipes", recipeEvent => {
  const addWoodcutterRecipes = woodTypes => {
    for (let type of woodTypes) {
      let { modid, woodType } = type;

      /* Remove all recipes for charm:woodcutter and environmental:sawing */

      recipeEvent.remove({
        type: "charm:woodcutting",
        input: `${modid}:${woodType}_log`
      });

      recipeEvent.remove({
        type: "charm:woodcutting",
        input: modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`
      });

      recipeEvent.remove({
        type: "charm:woodcutting",
        input: `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`
      });

      recipeEvent.remove({
        type: "charm:woodcutting",
        input: `${modid}:${woodType}_planks`
      });

      recipeEvent.remove({
        type: "environmental:sawing",
        input: `${modid}:${woodType}_log`
      });

      recipeEvent.remove({
        type: "environmental:sawing",
        input: modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`
      });

      recipeEvent.remove({
        type: "environmental:sawing",
        input: `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`
      });

      recipeEvent.remove({
        type: "environmental:sawing",
        input: `${modid}:${woodType}_planks`
      });

      /* Start Charm Woodcutter Recipes */

      // log -> planks
      if (Item.exists(`${modid}:${woodType}_log`) && Item.exists(`${modid}:${woodType}_planks`)) {
        recipeEvent.custom({
          "type": "charm:woodcutting",
          "ingredient": {
            "item": `${modid}:${woodType}_log`
          },
          "result": `${modid}:${woodType}_planks`,
          "count": 4,
          "conditions": [
            {
              "type": "charm:module_enabled",
              "module": "charm:woodcutters"
            }
          ]
        });
      }

      // log -> stripped_log
      if (Item.exists(`${modid}:${woodType}_log`) && Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`)) {
        recipeEvent.custom({
          "type": "charm:woodcutting",
          "ingredient": {
            "item": `${modid}:${woodType}_log`
          },
          "result": modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`,
          "count": 1,
          "conditions": [
            {
              "type": "charm:module_enabled",
              "module": "charm:woodcutters"
            }
          ]
        });
      }

      // log -> wood
      if (Item.exists(`${modid}:${woodType}_log`) && Item.exists(`${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`)) {
        recipeEvent.custom({
          "type": "charm:woodcutting",
          "ingredient": {
            "item": `${modid}:${woodType}_log`
          },
          "result": `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`,
          "count": 1,
          "conditions": [
            {
              "type": "charm:module_enabled",
              "module": "charm:woodcutters"
            }
          ]
        });
      }

      // stripped_log -> planks
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`) && Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`)) {
        recipeEvent.custom({
          "type": "charm:woodcutting",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`
          },
          "result": `${modid}:${woodType}_planks`,
          "count": 4,
          "conditions": [
            {
              "type": "charm:module_enabled",
              "module": "charm:woodcutters"
            }
          ]
        });
      }

      // stripped_log -> stripped_wood
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`) && Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`)) {
        recipeEvent.custom({
          "type": "charm:woodcutting",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`
          },
          "result": modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`,
          "count": 1,
          "conditions": [
            {
              "type": "charm:module_enabled",
              "module": "charm:woodcutters"
            }
          ]
        });
      }

      // wood -> planks
      if (Item.exists(`${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`) && Item.exists(`${modid}:${woodType}_planks`)) {
        recipeEvent.custom({
          "type": "charm:woodcutting",
          "ingredient": {
            "item": `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`
          },
          "result": `${modid}:${woodType}_planks`,
          "count": 4,
          "conditions": [
            {
              "type": "charm:module_enabled",
              "module": "charm:woodcutters"
            }
          ]
        });
      }

      // wood -> stripped_wood
      if (Item.exists(`${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`) && Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`)) {
        recipeEvent.custom({
          "type": "charm:woodcutting",
          "ingredient": {
            "item": `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`
          },
          "result": modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`,
          "count": 4,
          "conditions": [
            {
              "type": "charm:module_enabled",
              "module": "charm:woodcutters"
            }
          ]
        });
      }

      // stripped_wood -> planks
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`) && Item.exists(`${modid}:${woodType}_planks`)) {
        recipeEvent.custom({
          "type": "charm:woodcutting",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`
          },
          "result": `${modid}:${woodType}_planks`,
          "count": 4,
          "conditions": [
            {
              "type": "charm:module_enabled",
              "module": "charm:woodcutters"
            }
          ]
        });
      }

      // planks -> stairs
      if (Item.exists(`${modid}:${woodType}_planks`) && Item.exists(`${modid}:${woodType}_stairs`)) {
        recipeEvent.custom({
          "type": "charm:woodcutting",
          "ingredient": {
            "item": `${modid}:${woodType}_planks`
          },
          "result": `${modid}:${woodType}_stairs`,
          "count": 1,
          "conditions": [
            {
              "type": "charm:module_enabled",
              "module": "charm:woodcutters"
            }
          ]
        });
      }

      // planks -> button
      if (Item.exists(`${modid}:${woodType}_planks`) && Item.exists(`${modid}:${woodType}_button`)) {
        recipeEvent.custom({
          "type": "charm:woodcutting",
          "ingredient": {
            "item": `${modid}:${woodType}_planks`
          },
          "result": `${modid}:${woodType}_button`,
          "count": 1,
          "conditions": [
            {
              "type": "charm:module_enabled",
              "module": "charm:woodcutters"
            }
          ]
        });
      }

      // planks -> door
      if (Item.exists(`${modid}:${woodType}_planks`) && Item.exists(`${modid}:${woodType}_door`)) {
        recipeEvent.custom({
          "type": "charm:woodcutting",
          "ingredient": {
            "item": `${modid}:${woodType}_planks`
          },
          "result": `${modid}:${woodType}_door`,
          "count": 1,
          "conditions": [
            {
              "type": "charm:module_enabled",
              "module": "charm:woodcutters"
            }
          ]
        });
      }

      // planks -> fence
      if (Item.exists(`${modid}:${woodType}_planks`) && Item.exists(`${modid}:${woodType}_fence`)) {
        recipeEvent.custom({
          "type": "charm:woodcutting",
          "ingredient": {
            "item": `${modid}:${woodType}_planks`
          },
          "result": `${modid}:${woodType}_fence`,
          "count": 1,
          "conditions": [
            {
              "type": "charm:module_enabled",
              "module": "charm:woodcutters"
            }
          ]
        });
      }

      // planks -> fence_gate
      if (Item.exists(`${modid}:${woodType}_planks`) && Item.exists(`${modid}:${woodType}_fence_gate`)) {
        recipeEvent.custom({
          "type": "charm:woodcutting",
          "ingredient": {
            "item": `${modid}:${woodType}_planks`
          },
          "result": `${modid}:${woodType}_fence_gate`,
          "count": 1,
          "conditions": [
            {
              "type": "charm:module_enabled",
              "module": "charm:woodcutters"
            }
          ]
        });
      }

      // planks -> sign
      if (Item.exists(`${modid}:${woodType}_planks`) && Item.exists(`${modid}:${woodType}_sign`)) {
        recipeEvent.custom({
          "type": "charm:woodcutting",
          "ingredient": {
            "item": `${modid}:${woodType}_planks`
          },
          "result": `${modid}:${woodType}_sign`,
          "count": 1,
          "conditions": [
            {
              "type": "charm:module_enabled",
              "module": "charm:woodcutters"
            }
          ]
        });
      }

      // planks -> slab
      if (Item.exists(`${modid}:${woodType}_planks`) && Item.exists(`${modid}:${woodType}_slab`)) {
        recipeEvent.custom({
          "type": "charm:woodcutting",
          "ingredient": {
            "item": `${modid}:${woodType}_planks`
          },
          "result": `${modid}:${woodType}_slab`,
          "count": 2,
          "conditions": [
            {
              "type": "charm:module_enabled",
              "module": "charm:woodcutters"
            }
          ]
        });
      }

      // planks -> trapdoor
      if (Item.exists(`${modid}:${woodType}_planks`) && Item.exists(`${modid}:${woodType}_trapdoor`)) {
        recipeEvent.custom({
          "type": "charm:woodcutting",
          "ingredient": {
            "item": `${modid}:${woodType}_planks`
          },
          "result": `${modid}:${woodType}_trapdoor`,
          "count": 1,
          "conditions": [
            {
              "type": "charm:module_enabled",
              "module": "charm:woodcutters"
            }
          ]
        });
      }

      // planks -> vertical_slab
      if (Item.exists(`${modid}:${woodType}_planks`) && Item.exists(`${modid}:${woodType}_vertical_slab`)) {
        recipeEvent.custom({
          "type": "charm:woodcutting",
          "ingredient": {
            "item": `${modid}:${woodType}_planks`
          },
          "result": `${modid}:${woodType}_vertical_slab`,
          "count": 2,
          "conditions": [
            {
              "type": "charm:module_enabled",
              "module": "charm:woodcutters"
            }
          ]
        });
      }

      // planks -> vertical plank
      if (Item.exists(`${modid}:${woodType}_planks`) && Item.exists(`${modid}:vertical_${woodType}_planks`)) {
        recipeEvent.custom({
          "type": "charm:woodcutting",
          "ingredient": {
            "item": `${modid}:${woodType}_planks`
          },
          "result": `${modid}:vertical_${woodType}_planks`,
          "count": 1,
          "conditions": [
            {
              "type": "charm:module_enabled",
              "module": "charm:woodcutters"
            }
          ]
        });
      }

      // planks -> boat
      if (Item.exists(`${modid}:${woodType}_planks`) && Item.exists(`${modid}:${woodType}_boat`)) {
        recipeEvent.custom({
          "type": "charm:woodcutting",
          "ingredient": {
            "item": `${modid}:${woodType}_planks`
          },
          "result": `${modid}:${woodType}_boat`,
          "count": 1,
          "conditions": [
            {
              "type": "charm:module_enabled",
              "module": "charm:woodcutters"
            }
          ]
        });
      }

      /* End Charm Woodcutter Recipes
      *
      * Start Environmental Sawmill Recipes */

      // log -> planks
      if (Item.exists(`${modid}:${woodType}_log`) && Item.exists(`${modid}:${woodType}_planks`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_log`
          },
          "result": `${modid}:${woodType}_planks`,
          "count": 4
        });
      }

      // log -> stripped_log
      if (Item.exists(`${modid}:${woodType}_log`) && Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_log`
          },
          "result": modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`,
          "count": 1
        });
      }

      // log -> wood
      if (Item.exists(`${modid}:${woodType}_log`) && Item.exists(`${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_log`
          },
          "result": `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`,
          "count": 1
        });
      }

      // log -> stairs
      if (Item.exists(`${modid}:${woodType}_log`) && Item.exists(`${modid}:${woodType}_stairs`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_log`
          },
          "result": `${modid}:${woodType}_stairs`,
          "count": 4
        });
      }

      // log -> button
      if (Item.exists(`${modid}:${woodType}_log`) && Item.exists(`${modid}:${woodType}_button`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_log`
          },
          "result": `${modid}:${woodType}_button`,
          "count": 4
        });
      }

      // log -> door
      if (Item.exists(`${modid}:${woodType}_log`) && Item.exists(`${modid}:${woodType}_door`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_log`
          },
          "result": `${modid}:${woodType}_door`,
          "count": 2
        });
      }

      // log -> fence
      if (Item.exists(`${modid}:${woodType}_log`) && Item.exists(`${modid}:${woodType}_fence`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_log`
          },
          "result": `${modid}:${woodType}_fence`,
          "count": 4
        });
      }

      // log -> fence_gate
      if (Item.exists(`${modid}:${woodType}_log`) && Item.exists(`${modid}:${woodType}_fence_gate`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_log`
          },
          "result": `${modid}:${woodType}_fence_gate`,
          "count": 1
        });
      }

      // log -> sign
      if (Item.exists(`${modid}:${woodType}_log`) && Item.exists(`${modid}:${woodType}_sign`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_log`
          },
          "result": `${modid}:${woodType}_sign`,
          "count": 2
        });
      }

      // log -> slab
      if (Item.exists(`${modid}:${woodType}_log`) && Item.exists(`${modid}:${woodType}_slab`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_log`
          },
          "result": `${modid}:${woodType}_slab`,
          "count": 8
        });
      }

      // log -> trapdoor
      if (Item.exists(`${modid}:${woodType}_log`) && Item.exists(`${modid}:${woodType}_trapdoor`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_log`
          },
          "result": `${modid}:${woodType}_trapdoor`,
          "count": 1
        });
      }

      // log -> vertical_slab
      if (Item.exists(`${modid}:${woodType}_log`) && Item.exists(`${modid}:${woodType}_vertical_slab`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_log`
          },
          "result": `${modid}:${woodType}_vertical_slab`,
          "count": 8
        });
      }

      // log -> vertical plank
      if (Item.exists(`${modid}:${woodType}_log`) && Item.exists(`${modid}:vertical_${woodType}_planks`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_log`
          },
          "result": `${modid}:vertical_${woodType}_planks`,
          "count": 4
        });
      }

      // log -> crafting_table
      if (Item.exists(`${modid}:${woodType}_log`) && Item.exists(`${modid}:${woodType}_crafting_table`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_log`
          },
          "result": `${modid}:${woodType}_crafting_table`,
          "count": 1
        });
      }

      // log -> pressure_plate
      if (Item.exists(`${modid}:${woodType}_log`) && Item.exists(`${modid}:${woodType}_pressure_plate`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_log`
          },
          "result": `${modid}:${woodType}_pressure_plate`,
          "count": 2
        });
      }

      // log -> ladder
      if (Item.exists(`${modid}:${woodType}_log`) && Item.exists(`${modid}:${woodType}_ladder`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_log`
          },
          "result": `${modid}:${woodType}_ladder`,
          "count": 8
        });
      }

      // log -> stick
      if (Item.exists(`${modid}:${woodType}_log`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_log`
          },
          "result": "minecraft:stick",
          "count": 8
        });
      }

      // log -> bowl
      if (Item.exists(`${modid}:${woodType}_log`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_log`
          },
          "result": "minecraft:bowl",
          "count": 4
        });
      }

      // stripped_log -> planks
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`) && Item.exists(`${modid}:${woodType}_planks`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`
          },
          "result": `${modid}:${woodType}_planks`,
          "count": 4
        });
      }

      // stripped_log -> stripped_wood
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`) && Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`
          },
          "result": modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`,
          "count": 1
        });
      }
      
      // stripped_log -> stairs
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`) && Item.exists(`${modid}:${woodType}_stairs`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`
          },
          "result": `${modid}:${woodType}_stairs`,
          "count": 4
        });
      }

      // stripped_log -> button
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`) && Item.exists(`${modid}:${woodType}_button`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`
          },
          "result": `${modid}:${woodType}_button`,
          "count": 4
        });
      }

      // stripped_log -> door
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`) && Item.exists(`${modid}:${woodType}_door`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`
          },
          "result": `${modid}:${woodType}_door`,
          "count": 2
        });
      }

      // stripped_log -> fence
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`) && Item.exists(`${modid}:${woodType}_fence`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`
          },
          "result": `${modid}:${woodType}_fence`,
          "count": 4
        });
      }

      // stripped_log -> fence_gate
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`) && Item.exists(`${modid}:${woodType}_fence_gate`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`
          },
          "result": `${modid}:${woodType}_fence_gate`,
          "count": 1
        });
      }

      // stripped_log -> sign
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`) && Item.exists(`${modid}:${woodType}_sign`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`
          },
          "result": `${modid}:${woodType}_sign`,
          "count": 2
        });
      }

      // stripped_log -> slab
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`) && Item.exists(`${modid}:${woodType}_slab`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`
          },
          "result": `${modid}:${woodType}_slab`,
          "count": 8
        });
      }

      // stripped_log -> trapdoor
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`) && Item.exists(`${modid}:${woodType}_trapdoor`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`
          },
          "result": `${modid}:${woodType}_trapdoor`,
          "count": 1
        });
      }

      // stripped_log -> vertical_slab
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`) && Item.exists(`${modid}:${woodType}_vertical_slab`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`
          },
          "result": `${modid}:${woodType}_vertical_slab`,
          "count": 8
        });
      }

      // stripped_log -> vertical plank
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`) && Item.exists(`${modid}:vertical_${woodType}_planks`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`
          },
          "result": `${modid}:vertical_${woodType}_planks`,
          "count": 4
        });
      }

      // stripped_log -> crafting_table
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`) && Item.exists(`${modid}:${woodType}_crafting_table`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`
          },
          "result": `${modid}:${woodType}_crafting_table`,
          "count": 1
        });
      }

      // stripped_log -> pressure_plate
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`) && Item.exists(`${modid}:${woodType}_pressure_plate`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`
          },
          "result": `${modid}:${woodType}_pressure_plate`,
          "count": 2
        });
      }

      // stripped_log -> ladder
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`) && Item.exists(`${modid}:${woodType}_ladder`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`
          },
          "result": `${modid}:${woodType}_ladder`,
          "count": 8
        });
      }

      // stripped_log -> stick
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`
          },
          "result": "minecraft:stick",
          "count": 8
        });
      }

      // stripped_log -> bowl
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_log` : `${modid}:stripped_${woodType}_log`
          },
          "result": "minecraft:bowl",
          "count": 4
        });
      }

      // wood -> planks
      if (Item.exists(`${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`) && Item.exists(`${modid}:${woodType}_planks`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`
          },
          "result": `${modid}:${woodType}_planks`,
          "count": 4
        });
      }

      // wood -> stripped_wood
      if (Item.exists(`${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`) && Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`
          },
          "result": modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`,
          "count": 1
        });
      }

      // wood -> stairs
      if (Item.exists(`${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`) && Item.exists(`${modid}:${woodType}_stairs`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`
          },
          "result": `${modid}:${woodType}_stairs`,
          "count": 4
        });
      }

      // wood -> button
      if (Item.exists(`${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`) && Item.exists(`${modid}:${woodType}_button`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`
          },
          "result": `${modid}:${woodType}_button`,
          "count": 4
        });
      }

      // wood -> door
      if (Item.exists(`${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`) && Item.exists(`${modid}:${woodType}_door`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`
          },
          "result": `${modid}:${woodType}_door`,
          "count": 2
        });
      }

      // wood -> fence
      if (Item.exists(`${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`) && Item.exists(`${modid}:${woodType}_fence`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`
          },
          "result": `${modid}:${woodType}_fence`,
          "count": 4
        });
      }

      // wood -> fence_gate
      if (Item.exists(`${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`) && Item.exists(`${modid}:${woodType}_fence_gate`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`
          },
          "result": `${modid}:${woodType}_fence_gate`,
          "count": 1
        });
      }

      // wood -> sign
      if (Item.exists(`${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`) && Item.exists(`${modid}:${woodType}_sign`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`
          },
          "result": `${modid}:${woodType}_sign`,
          "count": 2
        });
      }

      // wood -> slab
      if (Item.exists(`${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`) && Item.exists(`${modid}:${woodType}_slab`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`
          },
          "result": `${modid}:${woodType}_slab`,
          "count": 8
        });
      }

      // wood -> trapdoor
      if (Item.exists(`${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`) && Item.exists(`${modid}:${woodType}_trapdoor`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`
          },
          "result": `${modid}:${woodType}_trapdoor`,
          "count": 1
        });
      }

      // wood -> vertical_slab
      if (Item.exists(`${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`) && Item.exists(`${modid}:${woodType}_vertical_slab`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`
          },
          "result": `${modid}:${woodType}_vertical_slab`,
          "count": 8
        });
      }

      // wood -> vertical plank
      if (Item.exists(`${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`) && Item.exists(`${modid}:vertical_${woodType}_planks`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`
          },
          "result": `${modid}:vertical_${woodType}_planks`,
          "count": 4
        });
      }

      // wood -> crafting_table
      if (Item.exists(`${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`) && Item.exists(`${modid}:${woodType}_crafting_table`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`
          },
          "result": `${modid}:${woodType}_crafting_table`,
          "count": 1
        });
      }

      // wood -> pressure_plate
      if (Item.exists(`${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`) && Item.exists(`${modid}:${woodType}_pressure_plate`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`
          },
          "result": `${modid}:${woodType}_pressure_plate`,
          "count": 2
        });
      }

      // wood -> ladder
      if (Item.exists(`${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`) && Item.exists(`${modid}:${woodType}_ladder`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`
          },
          "result": `${modid}:${woodType}_ladder`,
          "count": 8
        });
      }

      // wood -> stick
      if (Item.exists(`${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`
          },
          "result": "minecraft:stick",
          "count": 8
        });
      }

      // wood -> bowl
      if (Item.exists(`${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_${modid === "betterendforge" ? "bark" : "wood"}`
          },
          "result": "minecraft:bowl",
          "count": 4
        });
      }

      // stripped_wood -> planks
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`) && Item.exists(`${modid}:${woodType}_planks`)) {
      }

      // stripped_wood -> stairs
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`) && Item.exists(`${modid}:${woodType}_stairs`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`
          },
          "result": `${modid}:${woodType}_stairs`,
          "count": 4
        });
      }

      // stripped_wood -> button
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`) && Item.exists(`${modid}:${woodType}_button`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`
          },
          "result": `${modid}:${woodType}_button`,
          "count": 4
        });
      }

      // stripped_wood -> door
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`) && Item.exists(`${modid}:${woodType}_door`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`
          },
          "result": `${modid}:${woodType}_door`,
          "count": 2
        });
      }

      // stripped_wood -> fence
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`) && Item.exists(`${modid}:${woodType}_fence`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`
          },
          "result": `${modid}:${woodType}_fence`,
          "count": 4
        });
      }

      // stripped_wood -> fence_gate
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`) && Item.exists(`${modid}:${woodType}_fence_gate`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`
          },
          "result": `${modid}:${woodType}_fence_gate`,
          "count": 1
        });
      }

      // stripped_wood -> sign
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`) && Item.exists(`${modid}:${woodType}_sign`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`
          },
          "result": `${modid}:${woodType}_sign`,
          "count": 2
        });
      }

      // stripped_wood -> slab
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`) && Item.exists(`${modid}:${woodType}_slab`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`
          },
          "result": `${modid}:${woodType}_slab`,
          "count": 8
        });
      }

      // stripped_wood -> trapdoor
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`) && Item.exists(`${modid}:${woodType}_trapdoor`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`
          },
          "result": `${modid}:${woodType}_trapdoor`,
          "count": 1
        });
      }

      // stripped_wood -> vertical_slab
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`) && Item.exists(`${modid}:${woodType}_vertical_slab`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`
          },
          "result": `${modid}:${woodType}_vertical_slab`,
          "count": 8
        });
      }

      // stripped_wood -> vertical plank
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`) && Item.exists(`${modid}:vertical_${woodType}_planks`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`
          },
          "result": `${modid}:vertical_${woodType}_planks`,
          "count": 4
        });
      }

      // stripped_wood -> crafting_table
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`) && Item.exists(`${modid}:${woodType}_crafting_table`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`
          },
          "result": `${modid}:${woodType}_crafting_table`,
          "count": 1
        });
      }

      // stripped_wood -> pressure_plate
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`) && Item.exists(`${modid}:${woodType}_pressure_plate`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`
          },
          "result": `${modid}:${woodType}_pressure_plate`,
          "count": 2
        });
      }

      // stripped_wood -> ladder
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`) && Item.exists(`${modid}:${woodType}_ladder`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`
          },
          "result": `${modid}:${woodType}_ladder`,
          "count": 8
        });
      }

      // stripped_wood -> stick
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`
          },
          "result": "minecraft:stick",
          "count": 8
        });
      }

      // stripped_wood -> bowl
      if (Item.exists(modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": modid === "betterendforge" ? `${modid}:${woodType}_stripped_bark` : `${modid}:stripped_${woodType}_wood`
          },
          "result": "minecraft:bowl",
          "count": 4
        });
      }

      // planks -> stairs
      if (Item.exists(`${modid}:${woodType}_planks`) && Item.exists(`${modid}:${woodType}_stairs`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_planks`
          },
          "result": `${modid}:${woodType}_stairs`,
          "count": 1
        });
      }

      // planks -> button
      if (Item.exists(`${modid}:${woodType}_planks`) && Item.exists(`${modid}:${woodType}_button`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_planks`
          },
          "result": `${modid}:${woodType}_button`,
          "count": 1
        });
      }

      // planks -> fence
      if (Item.exists(`${modid}:${woodType}_planks`) && Item.exists(`${modid}:${woodType}_fence`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_planks`
          },
          "result": `${modid}:${woodType}_fence`,
          "count": 1
        });
      }

      // planks -> slab
      if (Item.exists(`${modid}:${woodType}_planks`) && Item.exists(`${modid}:${woodType}_slab`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_planks`
          },
          "result": `${modid}:${woodType}_slab`,
          "count": 2
        });
      }

      // planks -> ladder
      if (Item.exists(`${modid}:${woodType}_planks`) && Item.exists(`${modid}:${woodType}_ladder`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_planks`
          },
          "result": `${modid}:${woodType}_ladder`,
          "count": 2
        });
      }

      // planks -> vertical_slab
      if (Item.exists(`${modid}:${woodType}_planks`) && Item.exists(`${modid}:${woodType}_vertical_slab`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_planks`
          },
          "result": `${modid}:${woodType}_vertical_slab`,
          "count": 2
        });
      }

      // planks -> vertical plank
      if (Item.exists(`${modid}:${woodType}_planks`) && Item.exists(`${modid}:vertical_${woodType}_planks`)) {
        recipeEvent.custom({
          "type": "environmental:sawing",
          "ingredient": {
            "item": `${modid}:${woodType}_planks`
          },
          "result": `${modid}:vertical_${woodType}_planks`,
          "count": 1
        });
      }
    }
  }

  addWoodcutterRecipes(woodTypes);
});