/******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ 604:
/***/ (() => {

onEvent('player.logged_in', function (event) {
  event.player.server.schedule(5, event.player, function (cb) {
    var player = cb.data;

    if (!player.stages.has('stage_1')) {
      player.stages.add('stage_1');
    }
  });
});
onEvent('player.tick', function (event) {
  if (event.player.server && event.player.ticksExisted % 20 === 0) {
    var player = event.player;

    for (var i = 1; i <= 6; i++) {
      updateRank(player, "stage_".concat(i));
    }
  }
});
onEvent('player.inventory.changed', function (event) {
  if (event.item == 'atum:scarab') {
    event.player.stages.add('stage_3');
    event.player.stages.add('atum_access');
  }
});

function updateRank(player, stage) {
  // TODO: Find a way to check if a player has a certain rank so it doesnt attempt to run the command even though the rank is already attached to the player.
  if (player.stages.has(stage)) {
    player.server.runCommand("/ftbranks add ".concat(player, " ").concat(stage));
  }
}

/***/ }),

/***/ 658:
/***/ (() => {

onEvent('player.tick', function (event) {
  var player = event.player;

  if (player.world.time % 20 != 0) {
    return;
  }

  var ftbquests = player.data.ftbquests;
  ftbquests.file.collect(function (obj) {
    return obj.objectType.id === 'quest' && obj.tags.contains('repeat');
  }).forEach(function (quest) {
    if (ftbquests.data.isCompleted(quest) && !quest.hasUnclaimedRewardsRaw(ftbquests.data, player.id)) {
      resetQuest(player, quest);
    }
  });
});
var item_tasks = {
  "743C565DC2BFD531": Item.of('patchouli:guide_book', '{"patchouli:book":"sushigocrafting:sushigocrafting"}').weakNBT(),
  "1AFE169343F416D4": Item.of('botania:lexicon', '{"botania:elven_unlock":1b}').weakNBT()
};

for (var taskId in item_tasks) {
  onEvent("ftbquests.custom_task.".concat(taskId), function (event) {
    event.checkTimer = 20;
    event.check = checkForItemTask;
  });
} // Eidolon Custom Tasks


var sign_tasks = {
  "6C796E1F3F2FB35D": "eidolon:sacred",
  "07CF15AF1F1028C6": "eidolon:wicked",
  "78EFBB1BF4422BB3": "eidolon:blood",
  "7DA967C950E92725": "eidolon:soul",
  "4F5532D227289763": "eidolon:mind"
};

for (var taskId in sign_tasks) {
  onEvent("ftbquests.custom_task.".concat(taskId), function (event) {
    event.checkTimer = 20;

    event.check = function (data, player) {
      if (hasSign(player, sign_tasks[data.task.toString()])) {
        data.progress++;
      }
    };
  });
}

function hasSign(player, sign) {
  var signs = player.fullNBT['ForgeCaps']['eidolon:knowledge']['signs'];

  for (var i in signs) {
    if (sign == signs[i]) {
      return true;
    }
  }

  return false;
}

function resetQuest(player, quest) {
  player.data.ftbquests.reset(quest);
  quest.rewards.forEach(function (reward) {
    player.data.ftbquests.data.resetReward(player.id, reward);
  });
}

function checkForItemTask(data, player) {
  var id = data.task.toString();
  var slot = player.inventory.find(item_tasks[id]);

  if (slot != -1) {
    data.progress++;
  }
}

/***/ }),

/***/ 290:
/***/ (() => {

onEvent('item.crafted', function (event) {
  if (event.item == 'botania:crystal_bow') {
    var inv = event.inventory;
    var crafted = event.item;

    var findItem = function findItem(inv, name) {
      for (var i = 0; i < inv.getSize(); i++) {
        var item = inv.get(i);

        if (item.getItem().getRegistryName().toString() == name) {
          return item;
        }
      }

      return null;
    };

    var bow = findItem(inv, 'botania:livingwood_bow');

    if (bow) {
      var prevNbt = bow.getNbt();

      if (prevNbt && prevNbt["Enchantments"]) {
        var nbt = crafted.getNbt();
        if (!nbt) nbt = NBT.compoundTag();
        nbt["Enchantments"] = prevNbt["Enchantments"];
      }
    }
  }
});

/***/ }),

/***/ 843:
/***/ (() => {

onEvent('player.tick', function (event) {
  var player = event.player;
  var inv = player.inventory;
  var held = inv.get(player.getSelectedSlot());

  if (held == 'eidolon:codex') {
    var worldCaps = player.level.minecraftLevel.func_217481_x().func_215753_b(null, "capabilities").func_189551_b(NBT.compoundTag());
    var reps = worldCaps["eidolon:reputation"].reps[player.id];
    var reputation = reps ? reps["eidolon:dark"].rep : 0;
    player.paint({
      eidolon_reputation: {
        type: 'text',
        text: "Reputation: ".concat(reputation),
        scale: 1,
        x: 0,
        y: -40,
        alignX: 'center',
        alignY: 'bottom',
        centered: false,
        shadow: true,
        draw: 'ingame'
      }
    });
  } else {
    player.paint({
      eidolon_reputation: {
        type: 'text',
        remove: true
      }
    });
  }
});

/***/ }),

/***/ 167:
/***/ (() => {

onEvent('block.tags', function (event) {
  event.remove('forge:wg_stone', 'create:natural_scoria');
});
onEvent('tags.items', function (event) {
  // tag, item
  event.remove('minecraft:planks', 'betterendforge:mossy_glowshroom_planks');
  event.remove('minecraft:planks', 'betterendforge:lacugrove_planks');
  event.remove('minecraft:planks', 'betterendforge:end_lotus_planks');
  event.remove('minecraft:planks', 'betterendforge:pythadendron_planks');
  event.remove('minecraft:planks', 'betterendforge:dragon_tree_planks');
  event.remove('minecraft:planks', 'betterendforge:tenanea_planks');
  event.remove('minecraft:planks', 'betterendforge:helix_tree_planks');
  event.remove('minecraft:planks', 'betterendforge:umbrella_tree_planks');
  event.remove('minecraft:planks', 'betterendforge:jellyshroom_planks');
  event.remove('minecraft:planks', 'betterendforge:lucernia_planks');
  event.remove('curios:back', 'minecraft:elytra');
  event.remove('curios:hands', 'curios:knuckles');
});

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
(() => {
"use strict";

;// CONCATENATED MODULE: ./lib/common/mods.js
var Minecraft = 'minecraft';
var EE = 'emendatusenigmatica';
var Botania = 'botania';
var IE = 'immersiveengineering';
var CreateStuff = 'create_stuff_additions';
var CreateAddition = 'createaddition';
var Create = 'create';
var Atum = 'atum';
var AE2 = 'appliedenergistics2';
var BYG = 'byg';
var Occultism = 'occultism';
var Thermal = 'thermal';
var TCon = 'tconstruct';
var MM = 'masterfulmachinery';
var Titanium = 'titanium';
var IF = 'industrialforegoing';
var KubeJS = 'kubejs';
var BetterEnd = 'betterendforge';
var AS = 'astralsorcery';
var ExtendedCrafting = 'extendedcrafting';

;// CONCATENATED MODULE: ./lib/common/types/metal.js
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

var Metal = /*#__PURE__*/function () {
  function Metal(modid, name) {
    _classCallCheck(this, Metal);

    this.baseModId = modid;
    this.name = name;
    this.oreTag = "forge:ores/".concat(name);
    this.ingotTag = "forge:ingots/".concat(name);
    this.blockTag = "forge:storage_blocks/".concat(name);
    this.plateTag = "forge:plates/".concat(name);
    this.fluidTag = "forge:molten_".concat(name);
    this.skipMetalItems = false;
    this.ignoreModOverrides = false;
  }

  _createClass(Metal, [{
    key: "setSkipMetalItems",
    value: function setSkipMetalItems() {
      this.skipMetalItems = true;
      return this;
    }
  }, {
    key: "setIgnoreModOverrides",
    value: function setIgnoreModOverrides() {
      this.ignoreModOverrides = true;
      return this;
    }
  }, {
    key: "isOre",
    value: function isOre() {
      return !(this instanceof Alloy);
    }
  }, {
    key: "named",
    value: function named(modid, type, reverse) {
      modid = this.ignoreModOverrides ? this.baseModId : modid || this.baseModId;

      if (reverse) {
        return "".concat(modid, ":").concat(type, "_").concat(this.name);
      }

      return "".concat(modid, ":").concat(this.name, "_").concat(type);
    }
  }, {
    key: "ingot",
    value: function ingot(modid, reverse) {
      return this.named(modid, 'ingot', reverse);
    }
  }, {
    key: "nugget",
    value: function nugget(modid, reverse) {
      return this.named(modid, 'nugget', reverse);
    }
  }, {
    key: "plate",
    value: function plate(modid, reverse) {
      return this.named(modid, 'plate', reverse);
    }
  }, {
    key: "gear",
    value: function gear(modid, reverse) {
      return this.named(modid, 'gear', reverse);
    }
  }, {
    key: "rod",
    value: function rod(modid, reverse) {
      return this.named(modid, 'rod', reverse);
    }
  }, {
    key: "dust",
    value: function dust(modid, reverse) {
      return this.named(modid, 'dust', reverse);
    }
  }]);

  return Metal;
}();



var Alloy = /*#__PURE__*/function (_Metal) {
  _inherits(Alloy, _Metal);

  var _super = _createSuper(Alloy);

  function Alloy() {
    _classCallCheck(this, Alloy);

    return _super.apply(this, arguments);
  }

  return Alloy;
}(Metal);


;// CONCATENATED MODULE: ./lib/common/types/tool.js
function tool_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { tool_typeof = function _typeof(obj) { return typeof obj; }; } else { tool_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return tool_typeof(obj); }

function tool_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) tool_setPrototypeOf(subClass, superClass); }

function tool_setPrototypeOf(o, p) { tool_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return tool_setPrototypeOf(o, p); }

function tool_createSuper(Derived) { var hasNativeReflectConstruct = tool_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = tool_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = tool_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return tool_possibleConstructorReturn(this, result); }; }

function tool_possibleConstructorReturn(self, call) { if (call && (tool_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return tool_assertThisInitialized(self); }

function tool_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function tool_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function tool_getPrototypeOf(o) { tool_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return tool_getPrototypeOf(o); }

function tool_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Tool = function Tool(id) {
  tool_classCallCheck(this, Tool);

  this.id = id;
};

var ToolList = function ToolList(modid, material, reverse) {
  tool_classCallCheck(this, ToolList);

  this.tools = {
    pickaxe: new Pickaxe("".concat(modid, ":").concat(reverse ? "pickaxe_".concat(material) : "".concat(material, "_pickaxe"))),
    axe: new Axe("".concat(modid, ":").concat(reverse ? "axe_".concat(material) : "".concat(material, "_axe"))),
    shovel: new Shovel("".concat(modid, ":").concat(reverse ? "shovel_".concat(material) : "".concat(material, "_shovel"))),
    hoe: new Hoe("".concat(modid, ":").concat(reverse ? "hoe_".concat(material) : "".concat(material, "_hoe"))),
    sword: new Sword("".concat(modid, ":").concat(reverse ? "sword_".concat(material) : "".concat(material, "_sword")))
  };
};

var Pickaxe = /*#__PURE__*/function (_Tool) {
  tool_inherits(Pickaxe, _Tool);

  var _super = tool_createSuper(Pickaxe);

  function Pickaxe() {
    tool_classCallCheck(this, Pickaxe);

    return _super.apply(this, arguments);
  }

  return Pickaxe;
}(Tool);

var Axe = /*#__PURE__*/function (_Tool2) {
  tool_inherits(Axe, _Tool2);

  var _super2 = tool_createSuper(Axe);

  function Axe() {
    tool_classCallCheck(this, Axe);

    return _super2.apply(this, arguments);
  }

  return Axe;
}(Tool);

var Shovel = /*#__PURE__*/function (_Tool3) {
  tool_inherits(Shovel, _Tool3);

  var _super3 = tool_createSuper(Shovel);

  function Shovel() {
    tool_classCallCheck(this, Shovel);

    return _super3.apply(this, arguments);
  }

  return Shovel;
}(Tool);

var Hoe = /*#__PURE__*/function (_Tool4) {
  tool_inherits(Hoe, _Tool4);

  var _super4 = tool_createSuper(Hoe);

  function Hoe() {
    tool_classCallCheck(this, Hoe);

    return _super4.apply(this, arguments);
  }

  return Hoe;
}(Tool);

var Sword = /*#__PURE__*/function (_Tool5) {
  tool_inherits(Sword, _Tool5);

  var _super5 = tool_createSuper(Sword);

  function Sword() {
    tool_classCallCheck(this, Sword);

    return _super5.apply(this, arguments);
  }

  return Sword;
}(Tool);


;// CONCATENATED MODULE: ./lib/common/types/wood.js
function wood_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Wood = function Wood(modid, name, isStem, overrides) {
  wood_classCallCheck(this, Wood);

  this.name = name;
  this.logsTag = "".concat(modid, ":").concat(name, "_").concat(isStem ? 'stems' : 'logs');
  this.planks = "".concat(modid, ":").concat(name, "_planks");

  if (overrides) {
    this.logsTag = overrides.logsTag || this.logsTag;
    this.planks = overrides.planks || this.planks;
  }
};


;// CONCATENATED MODULE: ./lib/common/lists.js



 //import VillagerPackage from './types/villager_package'

 //import { spawnEntity } from './helper'

var metals = [new Metal(Minecraft, 'iron'), new Metal(Minecraft, 'gold'), new Metal(EE, 'copper'), new Metal(EE, 'zinc'), new Metal(EE, 'silver'), new Metal(EE, 'tin'), new Metal(EE, 'lead'), new Metal(EE, 'nickel'), new Metal(EE, 'uranium'), new Metal(EE, 'osmium'), new Metal(EE, 'cobalt'), new Metal(EE, 'aluminum'), new Metal(Occultism, 'iesnium').setSkipMetalItems().setIgnoreModOverrides(), new Alloy(EE, 'brass'), new Alloy(EE, 'steel'), new Alloy(EE, 'constantan'), new Alloy(EE, 'electrum'), new Alloy(EE, 'invar'), new Alloy(EE, 'bronze'), new Alloy(EE, 'signalum'), new Alloy(EE, 'lumium'), new Alloy(EE, 'enderium')];
var tools = [new ToolList(Minecraft, 'wooden'), new ToolList(Minecraft, 'stone'), new ToolList(Minecraft, 'golden'), new ToolList(Minecraft, 'iron'), new ToolList(Minecraft, 'diamond'), new ToolList(Minecraft, 'netherite'), new ToolList(Botania, 'manasteel'), new Pickaxe("".concat(Botania, ":manasteel_pick")), new ToolList(Botania, 'elementium'), new Pickaxe("".concat(Botania, ":glass_pickaxe")), new ToolList(CreateStuff, 'brass'), new ToolList(CreateStuff, 'zinc'), new ToolList(CreateStuff, 'copper'), new ToolList(CreateStuff, 'blazing'), new ToolList(CreateStuff, 'rose_quartz'), new ToolList(CreateStuff, 'shadow_steel'), new ToolList(IE, 'steel', true), new ToolList(AE2, 'certus_quartz'), new ToolList(AE2, 'nether_quartz'), new ToolList(BYG, 'pendorite'), new ToolList(Atum, 'limestone'), new ToolList(Occultism, 'iesnium'), new Axe("".concat(BYG, ":pendorite_battleaxe"))];
var woods = [new Wood(Minecraft, 'oak'), new Wood(Minecraft, 'dark_oak'), new Wood(Minecraft, 'birch'), new Wood(Minecraft, 'spruce'), new Wood(Minecraft, 'acacia'), new Wood(Minecraft, 'jungle'), new Wood(Minecraft, 'crimson', true), new Wood(Minecraft, 'warped', true), new Wood(Botania, 'livingwood', false, {
  logsTag: 'botania:livingwood'
}), new Wood(Botania, 'dreamwood', false, {
  logsTag: 'proletaria:dreamwood'
}), new Wood(TCon, 'greenheart'), new Wood(TCon, 'skyroot'), new Wood(TCon, 'bloodshroom'), new Wood(BYG, 'aspen'), new Wood(BYG, 'baobab'), new Wood(BYG, 'blue_enchanted'), new Wood(BYG, 'bulbis', true), new Wood(BYG, 'cherry'), new Wood(BYG, 'cika'), new Wood(BYG, 'cypress'), new Wood(BYG, 'ebony'), new Wood(BYG, 'ether'), new Wood(BYG, 'fir'), new Wood(BYG, 'green_enchanted'), new Wood(BYG, 'holly'), new Wood(BYG, 'imparius', true), new Wood(BYG, 'jacaranda'), new Wood(BYG, 'lament'), new Wood(BYG, 'mahogany'), new Wood(BYG, 'mangrove'), new Wood(BYG, 'maple'), new Wood(BYG, 'nightshade'), new Wood(BYG, 'palm'), new Wood(BYG, 'palo_verde', false, {
  planks: 'minecraft:birch_planks'
}), new Wood(BYG, 'pine'), new Wood(BYG, 'rainbow_eucalyptus'), new Wood(BYG, 'redwood'), new Wood(BYG, 'skyris'), new Wood(BYG, 'willow'), new Wood(BYG, 'witch_hazel'), new Wood(BYG, 'zelkova'), new Wood(BYG, 'sythian', true), new Wood(BYG, 'embur', false, {
  logsTag: 'byg:embur_pedus'
}), new Wood(Atum, 'palm', false, {
  logsTag: 'forge:palm_logs'
}), new Wood(Atum, 'deadwood', false, {
  logsTag: 'forge:deadwood_logs'
}), new Wood(KubeJS, 'mysticwood', false, {
  logsTag: 'kubejs:mysticwood'
}), new Wood(BetterEnd, 'mossy_glowshroom'), new Wood(BetterEnd, 'lacugrove'), new Wood(BetterEnd, 'end_lotus'), new Wood(BetterEnd, 'pythadendron'), new Wood(BetterEnd, 'dragon_tree'), new Wood(BetterEnd, 'tenanea'), new Wood(BetterEnd, 'helix_tree'), new Wood(BetterEnd, 'umbrella_tree'), new Wood(BetterEnd, 'jellyshroom'), new Wood(BetterEnd, 'lucernia')];
/*
const packages = {
    "kubejs:husbandry_package": new VillagerPackage("stage_1",
    [
        "Summons animals around you"
    ],
    [],
    player => {
        var count = 1 + Math.floor(Math.random() * 3)
        for (var i = 0; i < count; i++) {
            var selection = Math.random() * randomAnimalSummonsTotalWeight
            var acc = 0
            var entity = ""
            for (var entry in randomAnimalSummons) {
                acc += entry[1]
                if (acc >= selection) {
                    entity = entry[0]
                    break
                }
            }
            spawnEntity(player.world, entity, player.x, player.y, player.z)
        }
    }),
    "kubejs:butcher_package": new VillagerPackage("stage_1", []),
    "kubejs:cartographer_package": new VillagerPackage("stage_1", []),
    "kubejs:cleric_package": new VillagerPackage("stage_1", []),
    "kubejs:electrician_package": new VillagerPackage("stage_1", []),
    "kubejs:engineer_package": new VillagerPackage("stage_1", []),
    "kubejs:farmer_package": new VillagerPackage("stage_1", 
    [
        new ItemSpawn(Item.of('minecraft:potato')).withChance(0.33).withCount(2, 5),
        new ItemSpawn(Item.of('minecraft:carrot')).withCount(1, 2)
    ]),
    "kubejs:fisherman_package": new VillagerPackage("stage_1", [
        Item.of('minecraft:cod', 2),
        Item.of('minecraft:water_bucket')
    ]),
    "kubejs:fletcher_package": new VillagerPackage("stage_1", []),
    "kubejs:gunsmith_package": new VillagerPackage("stage_1", []),
    "kubejs:leatherworker_package": new VillagerPackage("stage_1", []),
    "kubejs:librarian_package": new VillagerPackage("stage_1", []),
    "kubejs:machinist_package": new VillagerPackage("stage_1", []),
    "kubejs:mason_package": new VillagerPackage("stage_1", []),
    "kubejs:mechanic_package": new VillagerPackage("stage_1", []),
    "kubejs:outfitter_package": new VillagerPackage("stage_1", []),
    "kubejs:shepherd_package": new VillagerPackage("stage_1", []),
    "kubejs:toolsmith_package": new VillagerPackage("stage_1", []),
    "kubejs:weaponsmith_package":new VillagerPackage("stage_1", [])
}

// Random choice of animals.
// [Entity, Weight]
const randomAnimalSummons = [
    ["minecraft:cow", 50],
    ["minecraft:sheep", 50],
    ["minecraft:chicken", 50],
    ["minecraft:pig", 50],
    ["minecraft:rabbit", 20],
    ["minecraft:mooshroom", 10]
]
const randomAnimalSummonsTotalWeight = randomAnimalSummons.map(a => a[1]).reduce((prev, acc) => prev + acc)
*/


;// CONCATENATED MODULE: ./lib/server/recipes/ore_processing.js
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }



onEvent('recipes', function (event) {
  var _iterator = _createForOfIteratorHelper(metals),
      _step;

  try {
    for (_iterator.s(); !(_step = _iterator.n()).done;) {
      var metal = _step.value;

      if (!metal.isOre()) {
        continue;
      } // Water -> 1 Nugget


      event.custom({
        type: 'interactio:item_fluid_transform',
        inputs: [{
          tag: metal.oreTag
        }],
        fluid: {
          fluid: 'minecraft:water'
        },
        output: {
          entries: [{
            result: {
              item: metal.nugget()
            },
            weight: 1
          }],
          rolls: 1
        },
        consume_fluid: 0.01
      }); // Mana Pool -> 3 Nuggets

      event.custom({
        type: 'botania:mana_infusion',
        input: [{
          tag: metal.oreTag
        }],
        output: {
          item: metal.nugget(),
          count: 3
        },
        mana: 2000
      }); // Occultism Ore -> 2 Dust

      event.custom({
        type: "occultism:crushing",
        ingredient: {
          tag: metal.oreTag
        },
        result: {
          item: metal.dust(EE),
          count: 2
        },
        crushing_time: 200
      }); // Botanists Smelter/Blaster

      var smelterIds = ['botanist_furnace_structure', 'botanist_blaster_structure'];
      smelterIds.forEach(function (id) {
        var recipe = {
          type: 'masterfulmachinery:machine_process',
          structureId: id,
          controllerId: 'livingrock',
          ticks: 100,
          inputs: [{
            type: 'masterfulmachinery:items',
            consumeInstantly: false,
            data: {
              tag: metal.oreTag,
              count: 1
            }
          }, {
            type: 'masterfulmachinery:botania_mana',
            perTick: true,
            consumeInstantly: true,
            data: {
              amount: 25
            }
          }, {
            type: 'masterfulmachinery:create_rotation',
            perTick: true,
            data: {
              speed: 16
            }
          }],
          outputs: [{
            type: 'masterfulmachinery:items',
            data: {
              item: metal.nugget(),
              count: 9
            }
          }]
        };

        if (id == 'botanist_blaster_structure') {
          recipe.outputs.push({
            type: 'masterfulmachinery:items',
            chance: 0.5,
            data: {
              item: metal.nugget(),
              count: 2
            }
          }, {
            type: 'masterfulmachinery:items',
            chance: 1 / 3,
            data: {
              item: metal.nugget(),
              count: 2
            }
          }, {
            type: 'masterfulmachinery:items',
            chance: 0.2,
            data: {
              item: metal.nugget(),
              count: 1
            }
          });
        }

        event.custom(recipe);
      }); // Crushing Wheels (chunk -> 3 ore dust + 10%)

      event.custom({
        type: "".concat(Create, ":crushing"),
        ingredients: [{
          tag: metal.oreTag
        }],
        results: [{
          item: metal.dust(EE),
          count: 3
        }, {
          item: metal.dust(EE),
          chance: 0.25
        }],
        processingTime: 300
      }); // Crusher (chunk -> 4 crushed ore + 20 ore dust)

      event.custom({
        type: "".concat(IE, ":crusher"),
        input: {
          tag: metal.oreTag
        },
        result: {
          item: metal.dust(EE),
          count: 4
        },
        secondaries: [{
          chance: 0.2,
          output: {
            item: metal.dust(EE)
          }
        }],
        energy: 10000
      }); // Starlight Infusion (chunk -> 6 ingot)

      event.custom({
        type: "".concat(AS, ":infuser"),
        fluidInput: "astralsorcery:liquid_starlight",
        input: {
          tag: metal.oreTag
        },
        output: {
          item: metal.ingot(),
          count: 6
        },
        consumptionChance: 1,
        duration: 10 * 20,
        consumeMultipleFluids: true,
        acceptChaliceInput: true,
        copyNBTToOutputs: false
      }); // Pulverizer (chunk -> 5 crushed ore + 50% ore dust)

      event.custom({
        type: "".concat(Thermal, ":pulverizer"),
        ingredient: {
          tag: metal.oreTag
        },
        result: [{
          item: metal.dust(EE),
          chance: 5.0
        }, {
          item: metal.dust(EE),
          chance: 0.5
        }],
        experience: 0.2
      }); //* Ingots to Dust *\\

      event.custom({
        type: "occultism:crushing",
        ingredient: {
          tag: metal.ingotTag
        },
        result: {
          item: metal.dust(EE)
        },
        crushing_time: 200
      });
      event.custom({
        type: "".concat(Thermal, ":pulverizer"),
        ingredient: {
          tag: metal.ingotTag
        },
        result: [{
          item: metal.dust(EE)
        }],
        experience: 0.01
      });
      event.custom({
        type: "".concat(IE, ":crusher"),
        input: {
          tag: metal.ingotTag
        },
        result: {
          item: metal.dust(EE)
        },
        secondaries: [],
        energy: 1000
      });
      event.custom({
        type: "".concat(Create, ":crushing"),
        ingredients: [{
          tag: metal.ingotTag
        }],
        results: [{
          item: metal.dust(EE)
        }],
        processingTime: 40
      });
    }
  } catch (err) {
    _iterator.e(err);
  } finally {
    _iterator.f();
  }
});
;// CONCATENATED MODULE: ./lib/server/recipes/alter_planks.js

onEvent('recipes', function (event) {
  woods.forEach(function (wood) {
    // Default 1:1
    event.shapeless(wood.planks, ["#".concat(wood.logsTag)]); // Botanist's Sawmill 1:2

    event.custom({
      type: 'masterfulmachinery:machine_process',
      structureId: 'botanist_sawmill_structure',
      controllerId: 'livingwood',
      ticks: 50,
      inputs: [{
        type: 'masterfulmachinery:items',
        consumeInstantly: true,
        data: {
          tag: wood.logsTag,
          count: 1
        }
      }, {
        type: 'masterfulmachinery:botania_mana',
        perTick: true,
        consumeInstantly: true,
        data: {
          amount: 20
        }
      }, {
        type: 'masterfulmachinery:create_rotation',
        consumeInstantly: true,
        data: {
          speed: 16
        }
      }, {
        type: 'masterfulmachinery:fluids',
        perTick: true,
        data: {
          fluid: 'kubejs:mystical_lubricant',
          amount: 1
        }
      }],
      outputs: [{
        type: 'masterfulmachinery:items',
        data: {
          item: wood.planks,
          count: 2
        }
      }]
    });
  });
});
;// CONCATENATED MODULE: ./lib/server/recipes/remove_recipes.js
// priority: 100


onEvent('recipes', function (event) {
  // Vanilla
  event.remove({
    id: 'minecraft:bucket'
  }); // Remove metal recipes

  metals.forEach(function (metal) {
    event.remove({
      type: 'minecraft:blasting',
      output: "#".concat(metal.ingotTag)
    });
    event.remove({
      type: 'minecraft:smelting',
      output: "#".concat(metal.ingotTag)
    });
    event.remove({
      id: "".concat(Thermal, ":machine/press/press_").concat(metal.name, "_ingot_to_plate")
    });
    event.remove({
      id: "".concat(Thermal, ":machine/press/press_").concat(metal.name, "_ingot_to_gear")
    });
    event.remove({
      id: "".concat(Occultism, ":crushing/").concat(metal.name, "_dust")
    });
    event.remove({
      id: "".concat(Create, ":milling/").concat(metal.name, "_ore")
    });
    event.remove({
      id: "".concat(Create, ":compat/ae2/milling/").concat(metal.name)
    });
    event.remove({
      id: "".concat(IE, ":crusher/ore_").concat(metal.name)
    });
    event.remove({
      id: "".concat(IE, ":machine/pulverizer/pulverizer_").concat(metal.name, "_ore")
    });
    event.remove({
      type: 'minecraft:stonecutting',
      output: "#".concat(metal.oreTag)
    });
    event.remove({
      type: 'minecraft:crafting_shapeless',
      output: "#".concat(metal.oreTag)
    });
    event.remove({
      output: "#forge:ores_cluster/".concat(metal.name)
    });
  }); // Remove default ore processing

  event.remove({
    type: "".concat(Create, ":crushing"),
    input: '#forge:ores'
  });
  event.remove({
    type: "".concat(Create, ":crushing"),
    input: '#forge:storage_blocks'
  });
  event.remove({
    type: "".concat(Create, ":milling"),
    input: '#forge:ores'
  });
  event.remove({
    type: "".concat(Thermal, ":pulverizer"),
    input: '#forge:ores'
  }); // Remove smeltery alloying recipes

  event.remove({
    type: 'tconstruct:alloy'
  }); // Remove default planks recipe

  woods.forEach(function (wood) {
    event.remove({
      input: "#".concat(wood.logsTag),
      output: wood.planks
    });
  }); // Remove BYG Crafting Table recipes

  event.remove({
    mod: 'byg',
    output: '#forge:workbench'
  }); // Remove plates

  event.remove({
    mod: EE,
    output: '#forge:plates'
  });
  event.remove({
    mod: IE,
    output: '#forge:plates'
  });
  event.remove({
    mod: Create,
    output: '#forge:plates'
  });
  event.remove({
    mod: CreateAddition,
    output: '#forge:plates'
  });
  event.remove({
    mod: TCon,
    output: '#forge:plates'
  }); // Remove Rods

  event.remove({
    mod: IE,
    output: '#forge:rods/all_metal'
  });
  event.remove({
    mod: CreateAddition,
    output: '#forge:rods/all_metal'
  });
  event.remove({
    mod: TCon,
    output: '#forge:rods/all_metal'
  });
  event.remove({
    mod: EE,
    output: '#forge:rods'
  }); // Remove Gears

  event.remove({
    mod: Thermal,
    output: '#forge:gears'
  });
  event.remove({
    mod: EE,
    output: '#forge:gears'
  });
  event.remove({
    mod: TCon,
    output: '#forge:gears'
  });
  event.remove({
    mod: IF,
    output: '#forge:gears'
  });
  event.remove({
    mod: IE,
    output: '#forge:gears'
  }); // TConstruct

  event.remove({
    id: 'tconstruct:smeltery/seared/seared_brick'
  });
  event.remove({
    id: 'tconstruct:smeltery/seared/seared_brick_kiln'
  });
  event.remove({
    id: 'tconstruct:smeltery/seared/grout'
  });
  event.remove({
    id: 'tconstruct:smeltery/seared/grout_multiple'
  }); // Hammer Crushing
  //event.remove({ output: '#forge:dusts' })

  event.remove({
    mod: EE,
    output: '#forge:dusts'
  });
  event.remove({
    output: '#forge:dusts',
    input: "".concat(IE, ":hammer")
  }); // Starmetal Ingot

  event.remove({
    output: "".concat(AS, ":starmetal_ingot"),
    type: 'minecraft:smelting'
  });
  event.remove({
    output: "".concat(AS, ":starmetal_ingot"),
    type: 'minecraft:blasting'
  });
});
;// CONCATENATED MODULE: ./lib/server/recipes/metal_items.js


onEvent('recipes', function (event) {
  metals.forEach(function (metal) {
    if (metal.skipMetalItems) {
      return;
    } // Plates


    event.recipes.createCutting("5x ".concat(metal.plate(EE)), ["#".concat(metal.blockTag)]);
    event.shaped(metal.plate(EE), [' H ', 'III'], {
      H: '#proletaria:hammer',
      I: "#".concat(metal.ingotTag)
    });
    event.custom({
      type: 'immersiveengineering:metal_press',
      mold: {
        item: 'immersiveengineering:mold_plate'
      },
      result: {
        item: metal.plate(EE)
      },
      input: {
        base_ingredient: {
          tag: metal.ingotTag
        },
        count: 2
      },
      energy: 2400
    });
    event.custom({
      type: 'thermal:press',
      ingredient: {
        tag: metal.ingotTag
      },
      result: [{
        item: metal.plate(EE)
      }]
    }); // Rods

    event.shaped(metal.rod(EE), ['I ', 'IH', 'I '], {
      H: '#proletaria:hammer',
      I: "#".concat(metal.ingotTag)
    });
    event.custom({
      type: 'immersiveengineering:metal_press',
      mold: {
        item: 'immersiveengineering:mold_rod'
      },
      result: {
        item: metal.rod(EE)
      },
      input: {
        base_ingredient: {
          tag: metal.ingotTag
        }
      },
      energy: 2400
    });
    event.recipes.createCutting("2x ".concat(metal.rod(EE)), ["#".concat(metal.plateTag)]); // Gears

    event.replaceOutput({
      id: "".concat(Thermal, ":machine/press/press_").concat(metal.name, "_ingot_to_gear")
    }, "thermal:".concat(metal.name, "_gear"), "emendatusenigmatica:".concat(metal.name, "_gear"));
    var casts = ['single_use', 'multi_use'];
    casts.forEach(function (usage) {
      event.custom({
        type: 'tconstruct:casting_table',
        cast: {
          tag: "tconstruct:casts/".concat(usage, "/gear")
        },
        cast_consumed: usage == 'single_use',
        fluid: {
          tag: metal.fluidTag,
          amount: 1152
        },
        result: {
          item: metal.gear(EE)
        },
        cooling_time: 94
      });
    });
    event.custom({
      type: 'immersiveengineering:metal_press',
      mold: {
        item: 'immersiveengineering:mold_gear'
      },
      result: {
        item: metal.gear(EE)
      },
      input: {
        base_ingredient: {
          tag: metal.ingotTag
        },
        count: 4
      },
      energy: 2400
    });
    event.custom({
      type: 'thermal:press',
      ingredients: [{
        tag: metal.ingotTag,
        count: 4
      }, {
        item: 'thermal:press_gear_die'
      }],
      result: [{
        item: metal.gear(EE)
      }]
    });
  });
});
// EXTERNAL MODULE: ./lib/server/recipes/crystal_bow.js
var crystal_bow = __webpack_require__(290);
// EXTERNAL MODULE: ./lib/server/tags_modifications.js
var tags_modifications = __webpack_require__(167);
// EXTERNAL MODULE: ./lib/server/quests.js
var quests = __webpack_require__(658);
// EXTERNAL MODULE: ./lib/server/player_stages.js
var player_stages = __webpack_require__(604);
;// CONCATENATED MODULE: ./lib/server/recipes/lightning.js

onEvent('entity.spawned', function (event) {
  var bolt = event.entity; // Lightning Crafting

  if (bolt.type == 'minecraft:lightning_bolt' || bolt.type == 'cofh_core:electric_arc') {
    var world = event.world;
    var aabb = AABB.of(bolt.x - 4, bolt.y - 3, bolt.z - 4, bolt.x + 4, bolt.y + 3, bolt.z + 4);
    var entities = world.getEntitiesWithin(aabb);
    entities.forEach(function (e) {
      // Item Entity Transform
      if (e.type == 'minecraft:item') {
        if (e.item == "".concat(AE2, ":certus_quartz_crystal")) {
          replaceItemEntity(world, e, "".concat(AE2, ":charged_certus_quartz_crystal"));
        }
      }

      if (e.type == "".concat(AE2, ":charged_quartz")) {
        replaceItemEntity(world, e, "".concat(AE2, ":charged_certus_quartz_crystal"));
      }
    });
  }
});

function replaceItemEntity(world, e, itemOut) {
  var output = world.createEntity('minecraft:item');
  output.item = itemOut;
  output.item.count = e.item.count;
  output.setPosition(e.x, e.y, e.z);
  e.kill();
  world.server.scheduleInTicks(30, output, function (c) {
    c.data.world.minecraftWorld.func_217376_c(output.minecraftEntity);
  });
}
// EXTERNAL MODULE: ./lib/server/screen_painter.js
var screen_painter = __webpack_require__(843);
;// CONCATENATED MODULE: ./modules/server.js









 //import '../lib/server/villager_packages'
})();

/******/ })()
;