@Override
  public String getUnlocalizedName(ItemStack stack) {
    int id = getMaterialID(stack);
    if (id == -1) return getUnlocalizedName();

    return "toolpart." + partName + "." + TConstructRegistry.getMaterial(id).materialName;
  }
  @Override
  public int getColorFromItemStack(ItemStack stack, int renderpass) {
    int matId = getMaterialID(stack);
    if (matId > icons.length) return super.getColorFromItemStack(stack, renderpass);

    if (matId >= 0 && icons[matId] == null)
      return TConstructRegistry.getMaterial(matId).primaryColor();

    return super.getColorFromItemStack(stack, renderpass);
  }
  @Override
  protected int getDefaultColor(int renderPass, int materialID) {
    // fletchling uses custom material
    if (renderPass == 2) {
      CustomMaterial mat =
          TConstructRegistry.getCustomMaterial(materialID, FletchingMaterial.class);
      if (mat != null) return mat.color;
    }

    return super.getDefaultColor(renderPass, materialID);
  }
 public static void addArrowShaft(
     int ID,
     Item stack,
     int itemDamage,
     float durmod,
     float weight,
     float breakChance,
     int color) {
   TConstructRegistry.addCustomMaterial(
       ArrowShaftMaterial.createMaterial(
           ID, stack, itemDamage, durmod, weight, breakChance, color));
 }
  @Override
  public String getItemStackDisplayName(ItemStack stack) {
    tconstruct.library.tools.ToolMaterial toolmat =
        TConstructRegistry.getMaterial(getMaterialID(stack));
    if (toolmat == null) return super.getItemStackDisplayName(stack);

    String material = toolmat.localizationString.substring(9); // :(

    // custom name
    if (StatCollector.canTranslate("toolpart." + partName + "." + material)) {
      return StatCollector.translateToLocal("toolpart." + partName + "." + material);
    }
    // general name
    else {
      // specific material name for materials?
      String matName;
      if (StatCollector.canTranslate("toolpart.material." + material))
        matName = StatCollector.translateToLocal("toolpart.material." + material);
      else matName = toolmat.prefixName();

      return StatCollector.translateToLocal("toolpart." + partName)
          .replaceAll("%%material", matName);
    }
  }
  public static void init() {

    // TINKERS
    IguanaLog.log("Modifying TConstruct materials");

    float durMod = IguanaConfig.durabilityPercentage / 100F;
    float speedMod = IguanaConfig.miningSpeedPercentage / 100F;

    TConstructRegistry.toolMaterials.remove(0);
    TConstructRegistry.addToolMaterial(
        0,
        "Wood",
        "Wooden ",
        MaterialConfig.woodharvestLevel,
        Math.round(MaterialConfig.wooddurability * durMod),
        Math.round(MaterialConfig.woodminingspeed * speedMod),
        MaterialConfig.woodattack,
        MaterialConfig.woodhandleModifier,
        MaterialConfig.woodreinforced,
        MaterialConfig.woodstonebound,
        "\u00A7e",
        "");

    TConstructRegistry.toolMaterials.remove(4);
    TConstructRegistry.addToolMaterial(
        4,
        "Cactus",
        MaterialConfig.cactusharvestLevel,
        Math.round(MaterialConfig.cactusdurability * durMod),
        Math.round(MaterialConfig.cactusminingspeed * speedMod),
        MaterialConfig.cactusattack,
        MaterialConfig.cactushandleModifier,
        MaterialConfig.cactusreinforced,
        MaterialConfig.cactusstonebound,
        "\u00A72",
        "Jagged");

    TConstructRegistry.toolMaterials.remove(8);
    TConstructRegistry.addToolMaterial(
        8,
        "Slime",
        MaterialConfig.slimeharvestLevel,
        Math.round(MaterialConfig.slimedurability * durMod),
        Math.round(MaterialConfig.slimeminingspeed * speedMod),
        MaterialConfig.slimeattack,
        MaterialConfig.slimehandleModifier,
        MaterialConfig.slimereinforced,
        MaterialConfig.slimestonebound,
        "\u00A7a",
        "");

    TConstructRegistry.toolMaterials.remove(17);
    TConstructRegistry.addToolMaterial(
        17,
        "BlueSlime",
        "Slime ",
        MaterialConfig.blueslimeharvestLevel,
        Math.round(MaterialConfig.blueslimedurability * durMod),
        Math.round(MaterialConfig.blueslimeminingspeed * speedMod),
        MaterialConfig.blueslimeattack,
        MaterialConfig.blueslimehandleModifier,
        MaterialConfig.blueslimereinforced,
        MaterialConfig.blueslimestonebound,
        "\u00A7b",
        "");

    TConstructRegistry.toolMaterials.remove(9);
    TConstructRegistry.addToolMaterial(
        9,
        "Paper",
        MaterialConfig.paperharvestLevel,
        Math.round(MaterialConfig.paperdurability * durMod),
        Math.round(MaterialConfig.paperminingspeed * speedMod),
        MaterialConfig.paperattack,
        MaterialConfig.paperhandleModifier,
        MaterialConfig.paperreinforced,
        MaterialConfig.paperstonebound,
        "\u00A7f",
        "Writable");

    TConstructRegistry.toolMaterials.remove(1);
    TConstructRegistry.addToolMaterial(
        1,
        "Stone",
        MaterialConfig.stoneharvestLevel,
        Math.round(MaterialConfig.stonedurability * durMod),
        Math.round(MaterialConfig.stoneminingspeed * speedMod),
        MaterialConfig.stoneattack,
        MaterialConfig.stonehandleModifier,
        MaterialConfig.stonereinforced,
        MaterialConfig.stonestonebound,
        "",
        "Stonebound");

    TConstructRegistry.toolMaterials.remove(3);
    TConstructRegistry.addToolMaterial(
        3,
        "Flint",
        MaterialConfig.flintharvestLevel,
        Math.round(MaterialConfig.flintdurability * durMod),
        Math.round(MaterialConfig.flintminingspeed * speedMod),
        MaterialConfig.flintattack,
        MaterialConfig.flinthandleModifier,
        MaterialConfig.flintreinforced,
        MaterialConfig.flintstonebound,
        "\u00A78",
        "");

    TConstructRegistry.toolMaterials.remove(5);
    TConstructRegistry.addToolMaterial(
        5,
        "Bone",
        MaterialConfig.boneharvestLevel,
        Math.round(MaterialConfig.bonedurability * durMod),
        Math.round(MaterialConfig.boneminingspeed * speedMod),
        MaterialConfig.boneattack,
        MaterialConfig.bonehandleModifier,
        MaterialConfig.bonereinforced,
        MaterialConfig.bonestonebound,
        "\u00A7e",
        "");

    TConstructRegistry.toolMaterials.remove(7);
    TConstructRegistry.addToolMaterial(
        7,
        "Netherrack",
        MaterialConfig.netherrackharvestLevel,
        Math.round(MaterialConfig.netherrackdurability * durMod),
        Math.round(MaterialConfig.netherrackminingspeed * speedMod),
        MaterialConfig.netherrackattack,
        MaterialConfig.netherrackhandleModifier,
        MaterialConfig.netherrackreinforced,
        MaterialConfig.netherrackstonebound,
        "\u00A74",
        "Stonebound");

    TConstructRegistry.toolMaterials.remove(13);
    TConstructRegistry.addToolMaterial(
        13,
        "Copper",
        MaterialConfig.copperharvestLevel,
        Math.round(MaterialConfig.copperdurability * durMod),
        Math.round(MaterialConfig.copperminingspeed * speedMod),
        MaterialConfig.copperattack,
        MaterialConfig.copperhandleModifier,
        MaterialConfig.copperreinforced,
        MaterialConfig.copperstonebound,
        "\u00A7c",
        "");

    TConstructRegistry.toolMaterials.remove(2);
    TConstructRegistry.addToolMaterial(
        2,
        "Iron",
        MaterialConfig.ironharvestLevel,
        Math.round(MaterialConfig.irondurability * durMod),
        Math.round(MaterialConfig.ironminingspeed * speedMod),
        MaterialConfig.ironattack,
        MaterialConfig.ironhandleModifier,
        MaterialConfig.ironreinforced,
        MaterialConfig.ironstonebound,
        "\u00A7f",
        "");

    TConstructRegistry.toolMaterials.remove(14);
    TConstructRegistry.addToolMaterial(
        14,
        "Bronze",
        MaterialConfig.bronzeharvestLevel,
        Math.round(MaterialConfig.bronzedurability * durMod),
        Math.round(MaterialConfig.bronzeminingspeed * speedMod),
        MaterialConfig.bronzeattack,
        MaterialConfig.bronzehandleModifier,
        MaterialConfig.bronzereinforced,
        MaterialConfig.bronzestonebound,
        "\u00A76",
        "");

    if (TContent.thaumcraftAvailable) {
      TConstructRegistry.toolMaterials.remove(31);
      TConstructRegistry.addToolMaterial(
          31,
          "Thaumium",
          MaterialConfig.thaumiumharvestLevel,
          Math.round(MaterialConfig.thaumiumdurability * durMod),
          Math.round(MaterialConfig.thaumiumminingspeed * speedMod),
          MaterialConfig.thaumiumattack,
          MaterialConfig.thaumiumhandleModifier,
          MaterialConfig.thaumiumreinforced,
          MaterialConfig.thaumiumstonebound,
          "\u00A75",
          "Thaumic");
    }

    TConstructRegistry.toolMaterials.remove(16);
    TConstructRegistry.addToolMaterial(
        16,
        "Steel",
        MaterialConfig.steelharvestLevel,
        Math.round(MaterialConfig.steeldurability * durMod),
        Math.round(MaterialConfig.steelminingspeed * speedMod),
        MaterialConfig.steelattack,
        MaterialConfig.steelhandleModifier,
        MaterialConfig.steelreinforced,
        MaterialConfig.steelstonebound,
        "\u00A7f",
        "");

    TConstructRegistry.toolMaterials.remove(18);
    TConstructRegistry.addToolMaterial(
        18,
        "PigIron",
        "Pig Iron ",
        MaterialConfig.pigironharvestLevel,
        Math.round(MaterialConfig.pigirondurability * durMod),
        Math.round(MaterialConfig.pigironminingspeed * speedMod),
        MaterialConfig.pigironattack,
        MaterialConfig.pigironhandleModifier,
        MaterialConfig.pigironreinforced,
        MaterialConfig.pigironstonebound,
        "\u00A7c",
        "Tasty");

    TConstructRegistry.toolMaterials.remove(6);
    TConstructRegistry.addToolMaterial(
        6,
        "Obsidian",
        MaterialConfig.obsidianharvestLevel,
        Math.round(MaterialConfig.obsidiandurability * durMod),
        Math.round(MaterialConfig.obsidianminingspeed * speedMod),
        MaterialConfig.obsidianattack,
        MaterialConfig.obsidianhandleModifier,
        MaterialConfig.obsidianreinforced,
        MaterialConfig.obsidianstonebound,
        "\u00A78",
        "");

    TConstructRegistry.toolMaterials.remove(15);
    TConstructRegistry.addToolMaterial(
        15,
        "Alumite",
        MaterialConfig.alumiteharvestLevel,
        Math.round(MaterialConfig.alumitedurability * durMod),
        Math.round(MaterialConfig.alumiteminingspeed * speedMod),
        MaterialConfig.alumiteattack,
        MaterialConfig.alumitehandleModifier,
        MaterialConfig.alumitereinforced,
        MaterialConfig.alumitestonebound,
        "\u00A7d",
        "");

    TConstructRegistry.toolMaterials.remove(11);
    TConstructRegistry.addToolMaterial(
        11,
        "Ardite",
        MaterialConfig.arditeharvestLevel,
        Math.round(MaterialConfig.arditedurability * durMod),
        Math.round(MaterialConfig.arditeminingspeed * speedMod),
        MaterialConfig.arditeattack,
        MaterialConfig.arditehandleModifier,
        MaterialConfig.arditereinforced,
        MaterialConfig.arditestonebound,
        "\u00A74",
        "Stonebound");

    TConstructRegistry.toolMaterials.remove(10);
    TConstructRegistry.addToolMaterial(
        10,
        "Cobalt",
        MaterialConfig.cobaltharvestLevel,
        Math.round(MaterialConfig.cobaltdurability * durMod),
        Math.round(MaterialConfig.cobaltminingspeed * speedMod),
        MaterialConfig.cobaltattack,
        MaterialConfig.cobalthandleModifier,
        MaterialConfig.cobaltreinforced,
        MaterialConfig.cobaltstonebound,
        "\u00A73",
        "");

    TConstructRegistry.toolMaterials.remove(12);
    TConstructRegistry.addToolMaterial(
        12,
        "Manyullyn",
        MaterialConfig.manyullynharvestLevel,
        Math.round(MaterialConfig.manyullyndurability * durMod),
        Math.round(MaterialConfig.manyullynminingspeed * speedMod),
        MaterialConfig.manyullynattack,
        MaterialConfig.manyullynhandleModifier,
        MaterialConfig.manyullynreinforced,
        MaterialConfig.manyullynstonebound,
        "\u00A75",
        "");

    // Extra TiC / Metallurgy materials
    if (Loader.isModLoaded("ExtraTiC")) {
      if (Loader.isModLoaded("Metallurgy3Base")) {

        // Stone level
        TConstructRegistry.toolMaterials.remove(103);
        TConstructRegistry.addToolMaterial(
            103,
            "Brass",
            MaterialConfig.brassharvestLevel,
            Math.round(MaterialConfig.brassdurability * durMod),
            Math.round(MaterialConfig.brassminingspeed * speedMod),
            MaterialConfig.brassattack,
            MaterialConfig.brasshandleModifier,
            MaterialConfig.brassreinforced,
            MaterialConfig.brassstonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(104);
        TConstructRegistry.addToolMaterial(
            104,
            "Electrum",
            MaterialConfig.electrumharvestLevel,
            Math.round(MaterialConfig.electrumdurability * durMod),
            Math.round(MaterialConfig.electrumminingspeed * speedMod),
            MaterialConfig.electrumattack,
            MaterialConfig.electrumhandleModifier,
            MaterialConfig.electrumreinforced,
            MaterialConfig.electrumstonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(106);
        TConstructRegistry.addToolMaterial(
            106,
            "Silver",
            MaterialConfig.silverharvestLevel,
            Math.round(MaterialConfig.silverdurability * durMod),
            Math.round(MaterialConfig.silverminingspeed * speedMod),
            MaterialConfig.silverattack,
            MaterialConfig.silverhandleModifier,
            MaterialConfig.silverreinforced,
            MaterialConfig.silverstonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(109);
        TConstructRegistry.addToolMaterial(
            109,
            "Ignatius",
            MaterialConfig.ignatiusharvestLevel,
            Math.round(MaterialConfig.ignatiusdurability * durMod),
            Math.round(MaterialConfig.ignatiusminingspeed * speedMod),
            MaterialConfig.ignatiusattack,
            MaterialConfig.ignatiushandleModifier,
            MaterialConfig.ignatiusreinforced,
            MaterialConfig.ignatiusstonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(114);
        TConstructRegistry.addToolMaterial(
            114,
            "Shadow Iron",
            MaterialConfig.shadowIronharvestLevel,
            Math.round(MaterialConfig.shadowIrondurability * durMod),
            Math.round(MaterialConfig.shadowIronminingspeed * speedMod),
            MaterialConfig.shadowIronattack,
            MaterialConfig.shadowIronhandleModifier,
            MaterialConfig.shadowIronreinforced,
            MaterialConfig.shadowIronstonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(129);
        TConstructRegistry.addToolMaterial(
            129,
            "Prometheum",
            MaterialConfig.prometheumharvestLevel,
            Math.round(MaterialConfig.prometheumdurability * durMod),
            Math.round(MaterialConfig.prometheumminingspeed * speedMod),
            MaterialConfig.prometheumattack,
            MaterialConfig.prometheumhandleModifier,
            MaterialConfig.prometheumreinforced,
            MaterialConfig.prometheumstonebound,
            "",
            "");

        // Iron Level
        TConstructRegistry.toolMaterials.remove(105);
        TConstructRegistry.addToolMaterial(
            105,
            "Platinum",
            MaterialConfig.platinumharvestLevel,
            Math.round(MaterialConfig.platinumdurability * durMod),
            Math.round(MaterialConfig.platinumminingspeed * speedMod),
            MaterialConfig.platinumattack,
            MaterialConfig.platinumhandleModifier,
            MaterialConfig.platinumreinforced,
            MaterialConfig.platinumstonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(115);
        TConstructRegistry.addToolMaterial(
            115,
            "Shadow Steel",
            MaterialConfig.shadowSteelharvestLevel,
            Math.round(MaterialConfig.shadowSteeldurability * durMod),
            Math.round(MaterialConfig.shadowSteelminingspeed * speedMod),
            MaterialConfig.shadowSteelattack,
            MaterialConfig.shadowSteelhandleModifier,
            MaterialConfig.shadowSteelreinforced,
            MaterialConfig.shadowSteelstonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(121);
        TConstructRegistry.addToolMaterial(
            121,
            "Black Steel",
            MaterialConfig.blackSteelharvestLevel,
            Math.round(MaterialConfig.blackSteeldurability * durMod),
            Math.round(MaterialConfig.blackSteelminingspeed * speedMod),
            MaterialConfig.blackSteelattack,
            MaterialConfig.blackSteelhandleModifier,
            MaterialConfig.blackSteelreinforced,
            MaterialConfig.blackSteelstonebound,
            "§9",
            "");

        TConstructRegistry.toolMaterials.remove(124);
        TConstructRegistry.addToolMaterial(
            124,
            "Deep Iron",
            MaterialConfig.deepIronharvestLevel,
            Math.round(MaterialConfig.deepIrondurability * durMod),
            Math.round(MaterialConfig.deepIronminingspeed * speedMod),
            MaterialConfig.deepIronattack,
            MaterialConfig.deepIronhandleModifier,
            MaterialConfig.deepIronreinforced,
            MaterialConfig.deepIronstonebound,
            "§9",
            "");

        // Bronze Level
        TConstructRegistry.toolMaterials.remove(100);
        TConstructRegistry.addToolMaterial(
            100,
            "Angmallen",
            MaterialConfig.angmallenharvestLevel,
            Math.round(MaterialConfig.angmallendurability * durMod),
            Math.round(MaterialConfig.angmallenminingspeed * speedMod),
            MaterialConfig.angmallenattack,
            MaterialConfig.angmallenhandleModifier,
            MaterialConfig.angmallenreinforced,
            MaterialConfig.angmallenstonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(102);
        TConstructRegistry.addToolMaterial(
            102,
            "Hepatizon",
            MaterialConfig.hepatizonharvestLevel,
            Math.round(MaterialConfig.hepatizondurability * durMod),
            Math.round(MaterialConfig.hepatizonminingspeed * speedMod),
            MaterialConfig.hepatizonattack,
            MaterialConfig.hepatizonhandleModifier,
            MaterialConfig.hepatizonreinforced,
            MaterialConfig.hepatizonstonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(108);
        TConstructRegistry.addToolMaterial(
            108,
            "Ceruclase",
            MaterialConfig.ceruclaseharvestLevel,
            Math.round(MaterialConfig.ceruclasedurability * durMod),
            Math.round(MaterialConfig.ceruclaseminingspeed * speedMod),
            MaterialConfig.ceruclaseattack,
            MaterialConfig.ceruclasehandleModifier,
            MaterialConfig.ceruclasereinforced,
            MaterialConfig.ceruclasestonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(112);
        TConstructRegistry.addToolMaterial(
            112,
            "Midasium",
            MaterialConfig.midasiumharvestLevel,
            Math.round(MaterialConfig.midasiumdurability * durMod),
            Math.round(MaterialConfig.midasiumminingspeed * speedMod),
            MaterialConfig.midasiumattack,
            MaterialConfig.midasiumhandleModifier,
            MaterialConfig.midasiumreinforced,
            MaterialConfig.midasiumstonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(117);
        TConstructRegistry.addToolMaterial(
            117,
            "Vyroxeres",
            MaterialConfig.vyroxeresharvestLevel,
            Math.round(MaterialConfig.vyroxeresdurability * durMod),
            Math.round(MaterialConfig.vyroxeresminingspeed * speedMod),
            MaterialConfig.vyroxeresattack,
            MaterialConfig.vyroxereshandleModifier,
            MaterialConfig.vyroxeresreinforced,
            MaterialConfig.vyroxeresstonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(128);
        TConstructRegistry.addToolMaterial(
            128,
            "Oureclase",
            MaterialConfig.oureclaseharvestLevel,
            Math.round(MaterialConfig.oureclasedurability * durMod),
            Math.round(MaterialConfig.oureclaseminingspeed * speedMod),
            MaterialConfig.oureclaseattack,
            MaterialConfig.oureclasehandleModifier,
            MaterialConfig.oureclasereinforced,
            MaterialConfig.oureclasestonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(133);
        TConstructRegistry.addToolMaterial(
            133,
            "Eximite",
            MaterialConfig.eximiteharvestLevel,
            Math.round(MaterialConfig.eximitedurability * durMod),
            Math.round(MaterialConfig.eximiteminingspeed * speedMod),
            MaterialConfig.eximiteattack,
            MaterialConfig.eximitehandleModifier,
            MaterialConfig.eximitereinforced,
            MaterialConfig.eximitestonebound,
            "",
            "");

        // Obsidian Level
        TConstructRegistry.toolMaterials.remove(101);
        TConstructRegistry.addToolMaterial(
            101,
            "Damascus Steel",
            MaterialConfig.damascusSteelharvestLevel,
            Math.round(MaterialConfig.damascusSteeldurability * durMod),
            Math.round(MaterialConfig.damascusSteelminingspeed * speedMod),
            MaterialConfig.damascusSteelattack,
            MaterialConfig.damascusSteelhandleModifier,
            MaterialConfig.damascusSteelreinforced,
            MaterialConfig.damascusSteelstonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(107);
        TConstructRegistry.addToolMaterial(
            107,
            "Amordrine",
            MaterialConfig.amordrineharvestLevel,
            Math.round(MaterialConfig.amordrinedurability * durMod),
            Math.round(MaterialConfig.amordrineminingspeed * speedMod),
            MaterialConfig.amordrineattack,
            MaterialConfig.amordrinehandleModifier,
            MaterialConfig.amordrinereinforced,
            MaterialConfig.amordrinestonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(110);
        TConstructRegistry.addToolMaterial(
            110,
            "Inolashite",
            MaterialConfig.inolashiteharvestLevel,
            Math.round(MaterialConfig.inolashitedurability * durMod),
            Math.round(MaterialConfig.inolashiteminingspeed * speedMod),
            MaterialConfig.inolashiteattack,
            MaterialConfig.inolashitehandleModifier,
            MaterialConfig.inolashitereinforced,
            MaterialConfig.inolashitestonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(111);
        TConstructRegistry.addToolMaterial(
            111,
            "Kalendrite",
            MaterialConfig.kalendriteharvestLevel,
            Math.round(MaterialConfig.kalendritedurability * durMod),
            Math.round(MaterialConfig.kalendriteminingspeed * speedMod),
            MaterialConfig.kalendriteattack,
            MaterialConfig.kalendritehandleModifier,
            MaterialConfig.kalendritereinforced,
            MaterialConfig.kalendritestonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(119);
        TConstructRegistry.addToolMaterial(
            119,
            "Astral Silver",
            MaterialConfig.astralSilverharvestLevel,
            Math.round(MaterialConfig.astralSilverdurability * durMod),
            Math.round(MaterialConfig.astralSilverminingspeed * speedMod),
            MaterialConfig.astralSilverattack,
            MaterialConfig.astralSilverhandleModifier,
            MaterialConfig.astralSilverreinforced,
            MaterialConfig.astralSilverstonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(122);
        TConstructRegistry.addToolMaterial(
            122,
            "Carmot",
            MaterialConfig.carmotharvestLevel,
            Math.round(MaterialConfig.carmotdurability * durMod),
            Math.round(MaterialConfig.carmotminingspeed * speedMod),
            MaterialConfig.carmotattack,
            MaterialConfig.carmothandleModifier,
            MaterialConfig.carmotreinforced,
            MaterialConfig.carmotstonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(125);
        TConstructRegistry.addToolMaterial(
            125,
            "Haderoth",
            MaterialConfig.haderothharvestLevel,
            Math.round(MaterialConfig.haderothdurability * durMod),
            Math.round(MaterialConfig.haderothminingspeed * speedMod),
            MaterialConfig.haderothattack,
            MaterialConfig.haderothhandleModifier,
            MaterialConfig.haderothreinforced,
            MaterialConfig.haderothstonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(126);
        TConstructRegistry.addToolMaterial(
            126,
            "Mithril",
            MaterialConfig.mithrilharvestLevel,
            Math.round(MaterialConfig.mithrildurability * durMod),
            Math.round(MaterialConfig.mithrilminingspeed * speedMod),
            MaterialConfig.mithrilattack,
            MaterialConfig.mithrilhandleModifier,
            MaterialConfig.mithrilreinforced,
            MaterialConfig.mithrilstonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(130);
        TConstructRegistry.addToolMaterial(
            130,
            "Quicksilver",
            MaterialConfig.quicksilverharvestLevel,
            Math.round(MaterialConfig.quicksilverdurability * durMod),
            Math.round(MaterialConfig.quicksilverminingspeed * speedMod),
            MaterialConfig.quicksilverattack,
            MaterialConfig.quicksilverhandleModifier,
            MaterialConfig.quicksilverreinforced,
            MaterialConfig.quicksilverstonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(132);
        if (Loader.isModLoaded("ExtraTicTrick"))
          TConstructRegistry.addToolMaterial(
              132,
              "Desichalkosr",
              "Sinisite ",
              MaterialConfig.desichalkosrharvestLevel,
              Math.round(MaterialConfig.desichalkosrdurability * durMod),
              Math.round(MaterialConfig.desichalkosrminingspeed * speedMod),
              MaterialConfig.desichalkosrattack,
              MaterialConfig.desichalkosrhandleModifier,
              MaterialConfig.desichalkosrreinforced,
              MaterialConfig.desichalkosrstonebound,
              "",
              "");
        else
          TConstructRegistry.addToolMaterial(
              132,
              "Desichalkosr",
              MaterialConfig.desichalkosrharvestLevel,
              Math.round(MaterialConfig.desichalkosrdurability * durMod),
              Math.round(MaterialConfig.desichalkosrminingspeed * speedMod),
              MaterialConfig.desichalkosrattack,
              MaterialConfig.desichalkosrhandleModifier,
              MaterialConfig.desichalkosrreinforced,
              MaterialConfig.desichalkosrstonebound,
              "",
              "");

        // Ardite Level
        TConstructRegistry.toolMaterials.remove(116);
        TConstructRegistry.addToolMaterial(
            116,
            "Vulcanite",
            MaterialConfig.vulcaniteharvestLevel,
            Math.round(MaterialConfig.vulcanitedurability * durMod),
            Math.round(MaterialConfig.vulcaniteminingspeed * speedMod),
            MaterialConfig.vulcaniteattack,
            MaterialConfig.vulcanitehandleModifier,
            MaterialConfig.vulcanitereinforced,
            MaterialConfig.vulcanitestonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(123);
        if (Loader.isModLoaded("ExtraTicTrick"))
          TConstructRegistry.addToolMaterial(
              123,
              "Celenegil",
              "Thyrium ",
              MaterialConfig.celenegilharvestLevel,
              Math.round(MaterialConfig.celenegildurability * durMod),
              Math.round(MaterialConfig.celenegilminingspeed * speedMod),
              MaterialConfig.celenegilattack,
              MaterialConfig.celenegilhandleModifier,
              MaterialConfig.celenegilreinforced,
              MaterialConfig.celenegilstonebound,
              "",
              "");
        else
          TConstructRegistry.addToolMaterial(
              123,
              "Celenegil",
              MaterialConfig.celenegilharvestLevel,
              Math.round(MaterialConfig.celenegildurability * durMod),
              Math.round(MaterialConfig.celenegilminingspeed * speedMod),
              MaterialConfig.celenegilattack,
              MaterialConfig.celenegilhandleModifier,
              MaterialConfig.celenegilreinforced,
              MaterialConfig.celenegilstonebound,
              "",
              "");

        TConstructRegistry.toolMaterials.remove(127);
        TConstructRegistry.addToolMaterial(
            127,
            "Orichalcum",
            MaterialConfig.orichalcumharvestLevel,
            Math.round(MaterialConfig.orichalcumdurability * durMod),
            Math.round(MaterialConfig.orichalcumminingspeed * speedMod),
            MaterialConfig.orichalcumattack,
            MaterialConfig.orichalcumhandleModifier,
            MaterialConfig.orichalcumreinforced,
            MaterialConfig.orichalcumstonebound,
            "",
            "");

        // Cobalt Level
        TConstructRegistry.toolMaterials.remove(113);
        TConstructRegistry.addToolMaterial(
            113,
            "Sanguinite",
            MaterialConfig.sanguiniteharvestLevel,
            Math.round(MaterialConfig.sanguinitedurability * durMod),
            Math.round(MaterialConfig.sanguiniteminingspeed * speedMod),
            MaterialConfig.sanguiniteattack,
            MaterialConfig.sanguinitehandleModifier,
            MaterialConfig.sanguinitereinforced,
            MaterialConfig.sanguinitestonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(118);
        if (Loader.isModLoaded("ExtraTicTrick"))
          TConstructRegistry.addToolMaterial(
              118,
              "Adamantine",
              "Adamantium ",
              MaterialConfig.adamantineharvestLevel,
              Math.round(MaterialConfig.adamantinedurability * durMod),
              Math.round(MaterialConfig.adamantineminingspeed * speedMod),
              MaterialConfig.adamantineattack,
              MaterialConfig.adamantinehandleModifier,
              MaterialConfig.adamantinereinforced,
              MaterialConfig.adamantinestonebound,
              "§4",
              "");
        else
          TConstructRegistry.addToolMaterial(
              118,
              "Adamantine",
              MaterialConfig.adamantineharvestLevel,
              Math.round(MaterialConfig.adamantinedurability * durMod),
              Math.round(MaterialConfig.adamantineminingspeed * speedMod),
              MaterialConfig.adamantineattack,
              MaterialConfig.adamantinehandleModifier,
              MaterialConfig.adamantinereinforced,
              MaterialConfig.adamantinestonebound,
              "§4",
              "");

        TConstructRegistry.toolMaterials.remove(120);
        TConstructRegistry.addToolMaterial(
            120,
            "Atlarus",
            MaterialConfig.atlarusharvestLevel,
            Math.round(MaterialConfig.atlarusdurability * durMod),
            Math.round(MaterialConfig.atlarusminingspeed * speedMod),
            MaterialConfig.atlarusattack,
            MaterialConfig.atlarushandleModifier,
            MaterialConfig.atlarusreinforced,
            MaterialConfig.atlarusstonebound,
            "",
            "");

        // Manyullyn Level
        TConstructRegistry.toolMaterials.remove(131);
        TConstructRegistry.addToolMaterial(
            131,
            "Tartarite",
            MaterialConfig.tartariteharvestLevel,
            Math.round(MaterialConfig.tartaritedurability * durMod),
            Math.round(MaterialConfig.tartariteminingspeed * speedMod),
            MaterialConfig.tartariteattack,
            MaterialConfig.tartaritehandleModifier,
            MaterialConfig.tartaritereinforced,
            MaterialConfig.tartaritestonebound,
            "",
            "");
      }

      if (Loader.isModLoaded("Natura")) {
        TConstructRegistry.toolMaterials.remove(134);
        TConstructRegistry.addToolMaterial(
            134,
            "Bloodwood",
            MaterialConfig.bloodwoodharvestLevel,
            Math.round(MaterialConfig.bloodwooddurability * durMod),
            Math.round(MaterialConfig.bloodwoodminingspeed * speedMod),
            MaterialConfig.bloodwoodattack,
            MaterialConfig.bloodwoodhandleModifier,
            MaterialConfig.bloodwoodreinforced,
            MaterialConfig.bloodwoodstonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(135);
        TConstructRegistry.addToolMaterial(
            135,
            "Darkwood",
            MaterialConfig.darkwoodharvestLevel,
            Math.round(MaterialConfig.darkwooddurability * durMod),
            Math.round(MaterialConfig.darkwoodminingspeed * speedMod),
            MaterialConfig.darkwoodattack,
            MaterialConfig.darkwoodhandleModifier,
            MaterialConfig.darkwoodreinforced,
            MaterialConfig.darkwoodstonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(136);
        TConstructRegistry.addToolMaterial(
            136,
            "Fusewood",
            MaterialConfig.fusewoodharvestLevel,
            Math.round(MaterialConfig.fusewooddurability * durMod),
            Math.round(MaterialConfig.fusewoodminingspeed * speedMod),
            MaterialConfig.fusewoodattack,
            MaterialConfig.fusewoodhandleModifier,
            MaterialConfig.fusewoodreinforced,
            MaterialConfig.fusewoodstonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(137);
        TConstructRegistry.addToolMaterial(
            137,
            "Ghostwood",
            MaterialConfig.ghostwoodharvestLevel,
            Math.round(MaterialConfig.ghostwooddurability * durMod),
            Math.round(MaterialConfig.ghostwoodminingspeed * speedMod),
            MaterialConfig.ghostwoodattack,
            MaterialConfig.ghostwoodhandleModifier,
            MaterialConfig.ghostwoodreinforced,
            MaterialConfig.ghostwoodstonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(138);
        TConstructRegistry.addToolMaterial(
            138,
            "Nether Quartz",
            MaterialConfig.netherQuartzharvestLevel,
            Math.round(MaterialConfig.netherQuartzdurability * durMod),
            Math.round(MaterialConfig.netherQuartzminingspeed * speedMod),
            MaterialConfig.netherQuartzattack,
            MaterialConfig.netherQuartzhandleModifier,
            MaterialConfig.netherQuartzreinforced,
            MaterialConfig.netherQuartzstonebound,
            "",
            "");
      }

      if (Loader.isModLoaded("Mekanism")) {
        TConstructRegistry.toolMaterials.remove(139);
        TConstructRegistry.addToolMaterial(
            139,
            "Refined Glowstone",
            MaterialConfig.refinedGlowstoneharvestLevel,
            Math.round(MaterialConfig.refinedGlowstonedurability * durMod),
            Math.round(MaterialConfig.refinedGlowstoneminingspeed * speedMod),
            MaterialConfig.refinedGlowstoneattack,
            MaterialConfig.refinedGlowstonehandleModifier,
            MaterialConfig.refinedGlowstonereinforced,
            MaterialConfig.refinedGlowstonestonebound,
            "",
            "");

        TConstructRegistry.toolMaterials.remove(140);
        TConstructRegistry.addToolMaterial(
            140,
            "Osmium",
            MaterialConfig.osmiumharvestLevel,
            Math.round(MaterialConfig.osmiumdurability * durMod),
            Math.round(MaterialConfig.osmiumminingspeed * speedMod),
            MaterialConfig.osmiumattack,
            MaterialConfig.osmiumhandleModifier,
            MaterialConfig.osmiumreinforced,
            MaterialConfig.osmiumstonebound,
            "",
            "");
      }

      TConstructRegistry.toolMaterials.remove(141);
      TConstructRegistry.addToolMaterial(
          141,
          "Pokefennium",
          MaterialConfig.pokefenniumharvestLevel,
          Math.round(MaterialConfig.pokefenniumdurability * durMod),
          Math.round(MaterialConfig.pokefenniumminingspeed * speedMod),
          MaterialConfig.pokefenniumattack,
          MaterialConfig.pokefenniumhandleModifier,
          MaterialConfig.pokefenniumreinforced,
          MaterialConfig.pokefenniumstonebound,
          "",
          "");

      TConstructRegistry.toolMaterials.remove(142);
      TConstructRegistry.addToolMaterial(
          142,
          "Fairy",
          MaterialConfig.fairyharvestLevel,
          Math.round(MaterialConfig.fairydurability * durMod),
          Math.round(MaterialConfig.fairyminingspeed * speedMod),
          MaterialConfig.fairyattack,
          MaterialConfig.fairyhandleModifier,
          MaterialConfig.fairyreinforced,
          MaterialConfig.fairystonebound,
          "",
          "");

      if (Loader.isModLoaded("AppliedEnergistics")) {
        TConstructRegistry.toolMaterials.remove(143);
        TConstructRegistry.addToolMaterial(
            143,
            "Certus Quartz",
            MaterialConfig.certusQuartzharvestLevel,
            Math.round(MaterialConfig.certusQuartzdurability * durMod),
            Math.round(MaterialConfig.certusQuartzminingspeed * speedMod),
            MaterialConfig.certusQuartzattack,
            MaterialConfig.certusQuartzhandleModifier,
            MaterialConfig.certusQuartzreinforced,
            MaterialConfig.certusQuartzstonebound,
            "",
            "");
      }

      if (Loader.isModLoaded("BiomesOPlenty")) {
        TConstructRegistry.toolMaterials.remove(144);
        TConstructRegistry.addToolMaterial(
            144,
            "Amethyst",
            MaterialConfig.amethystharvestLevel,
            Math.round(MaterialConfig.amethystdurability * durMod),
            Math.round(MaterialConfig.amethystminingspeed * speedMod),
            MaterialConfig.amethystattack,
            MaterialConfig.amethysthandleModifier,
            MaterialConfig.amethystreinforced,
            MaterialConfig.amethyststonebound,
            "",
            "");
      }
    }
  }
  @Handler
  public void preInit(FMLPreInitializationEvent event) {
    proxy.preInit();

    MinecraftForge.EVENT_BUS.register(new TinkerArmorEvents());
    FMLCommonHandler.instance().bus().register(new ArmorAbilities());

    TinkerArmor.dryingRack = new DryingRack().setBlockName("Armor.DryingRack");
    GameRegistry.registerBlock(TinkerArmor.dryingRack, "Armor.DryingRack");
    GameRegistry.registerTileEntity(DryingRackLogic.class, "Armor.DryingRack");
    TinkerArmor.diamondApple = new DiamondApple().setUnlocalizedName("tconstruct.apple.diamond");
    GameRegistry.registerItem(TinkerArmor.diamondApple, "diamondApple");
    boolean foodOverhaul = false;
    if (Loader.isModLoaded("HungerOverhaul") || Loader.isModLoaded("fc_food")) {
      foodOverhaul = true;
    }

    TinkerArmor.jerky = new Jerky(foodOverhaul).setUnlocalizedName("tconstruct.jerky");
    GameRegistry.registerItem(TinkerArmor.jerky, "jerky");

    // Wearables
    // heavyHelmet = new TArmorBase(PHConstruct.heavyHelmet,
    // 0).setUnlocalizedName("tconstruct.HeavyHelmet");
    TinkerArmor.heartCanister = new HeartCanister().setUnlocalizedName("tconstruct.canister");
    // heavyBoots = new TArmorBase(PHConstruct.heavyBoots,
    // 3).setUnlocalizedName("tconstruct.HeavyBoots");
    // glove = new
    // Glove(PHConstruct.glove).setUnlocalizedName("tconstruct.Glove");
    TinkerArmor.knapsack = new Knapsack().setUnlocalizedName("tconstruct.storage");
    // GameRegistry.registerItem(TRepo.heavyHelmet, "heavyHelmet");
    GameRegistry.registerItem(TinkerArmor.heartCanister, "heartCanister");
    // GameRegistry.registerItem(TRepo.heavyBoots, "heavyBoots");
    // GameRegistry.registerItem(TRepo.glove, "glove");
    GameRegistry.registerItem(TinkerArmor.knapsack, "knapsack");

    LiquidCasting basinCasting = TConstruct.getBasinCasting();
    TinkerArmor.materialWood = EnumHelper.addArmorMaterial("WOOD", 2, new int[] {1, 2, 2, 1}, 3);
    TinkerArmor.helmetWood =
        new ArmorBasic(TinkerArmor.materialWood, 0, "wood")
            .setUnlocalizedName("tconstruct.helmetWood");
    TinkerArmor.chestplateWood =
        new ArmorBasic(TinkerArmor.materialWood, 1, "wood")
            .setUnlocalizedName("tconstruct.chestplateWood");
    TinkerArmor.leggingsWood =
        new ArmorBasic(TinkerArmor.materialWood, 2, "wood")
            .setUnlocalizedName("tconstruct.leggingsWood");
    TinkerArmor.bootsWood =
        new ArmorBasic(TinkerArmor.materialWood, 3, "wood")
            .setUnlocalizedName("tconstruct.bootsWood");
    GameRegistry.registerItem(TinkerArmor.helmetWood, "helmetWood");
    GameRegistry.registerItem(TinkerArmor.chestplateWood, "chestplateWood");
    GameRegistry.registerItem(TinkerArmor.leggingsWood, "leggingsWood");
    GameRegistry.registerItem(TinkerArmor.bootsWood, "bootsWood");
    TConstructRegistry.addItemStackToDirectory(
        "diamondApple", new ItemStack(TinkerArmor.diamondApple, 1, 0));

    TConstructRegistry.addItemStackToDirectory(
        "canisterEmpty", new ItemStack(TinkerArmor.heartCanister, 1, 0));
    TConstructRegistry.addItemStackToDirectory(
        "miniRedHeart", new ItemStack(TinkerArmor.heartCanister, 1, 1));
    TConstructRegistry.addItemStackToDirectory(
        "canisterRedHeart", new ItemStack(TinkerArmor.heartCanister, 1, 2));

    travelGoggles =
        (TravelGear) new TravelGear(ArmorPart.Head).setUnlocalizedName("tconstruct.travelgoggles");
    travelVest =
        (TravelGear) new TravelGear(ArmorPart.Chest).setUnlocalizedName("tconstruct.travelvest");
    travelWings = (TravelGear) new TravelWings().setUnlocalizedName("tconstruct.travelwings");
    travelBoots =
        (TravelGear) new TravelGear(ArmorPart.Feet).setUnlocalizedName("tconstruct.travelboots");
    travelGlove = (AccessoryCore) new TravelGlove().setUnlocalizedName("tconstruct.travelgloves");
    travelBelt = (AccessoryCore) new TravelBelt().setUnlocalizedName("tconstruct.travelbelt");
    GameRegistry.registerItem(travelGoggles, "travelGoggles");
    GameRegistry.registerItem(travelVest, "travelVest");
    GameRegistry.registerItem(travelWings, "travelWings");
    GameRegistry.registerItem(travelBoots, "travelBoots");
    GameRegistry.registerItem(travelGlove, "travelGlove");
    GameRegistry.registerItem(travelBelt, "travelBelt");
  }
  private void registerModifiers() {
    ItemStack redstoneItem = new ItemStack(Items.redstone);
    ItemStack redstoneBlock = new ItemStack(Blocks.redstone_block);
    // Travel gear modifiers
    // MultiType
    ModifyBuilder.registerModifier(
        new TravelModDoubleJump(
            EnumSet.of(ArmorPart.Legs, ArmorPart.Feet),
            new ItemStack[] {
              new ItemStack(Items.ghast_tear),
              new ItemStack(TinkerWorld.slimeGel, 1, 0),
              new ItemStack(Blocks.piston)
            }));
    ModifyBuilder.registerModifier(
        new TravelModDoubleJump(
            EnumSet.of(ArmorPart.Legs, ArmorPart.Feet),
            new ItemStack[] {
              new ItemStack(Items.ghast_tear),
              new ItemStack(TinkerWorld.slimeGel, 1, 1),
              new ItemStack(Blocks.piston)
            }));
    ModifyBuilder.registerModifier(
        new AModInteger(
            4,
            "Moss",
            EnumSet.of(ArmorPart.Legs, ArmorPart.Feet, ArmorPart.Chest, ArmorPart.Head),
            new ItemStack[] {new ItemStack(TinkerTools.materials, 1, 6)},
            3,
            "\u00a72",
            StatCollector.translateToLocal("modifier.tool.moss")));
    ModifyBuilder.registerModifier(new TravelModRepair());
    TConstructRegistry.registerActiveArmorMod(new ActiveTinkerArmor());

    // Head
    ModifyBuilder.registerModifier(
        new AModBoolean(
            0,
            "Night Vision",
            EnumSet.of(ArmorPart.Head),
            new ItemStack[] {
              new ItemStack(Items.flint_and_steel),
              new ItemStack(Items.potionitem, 1, 8198),
              new ItemStack(Items.golden_carrot)
            },
            "\u00a78",
            "Night Vision"));

    // Chest
    ModifyBuilder.registerModifier(
        new AModInteger(
            0,
            "Perfect Dodge",
            EnumSet.of(ArmorPart.Chest),
            new ItemStack[] {
              new ItemStack(Items.ender_eye),
              new ItemStack(Items.ender_pearl),
              new ItemStack(Items.sugar)
            },
            1,
            "\u00a7d",
            "Perfect Dodge"));
    ModifyBuilder.registerModifier(
        new AModBoolean(
            1,
            "Stealth",
            EnumSet.of(ArmorPart.Chest),
            new ItemStack[] {
              new ItemStack(Items.fermented_spider_eye),
              new ItemStack(Items.ender_eye),
              new ItemStack(Items.potionitem, 1, 8206),
              new ItemStack(Items.golden_carrot)
            },
            "\u00a78",
            "Stealth"));

    // Wings
    ItemStack feather = new ItemStack(Items.feather);
    ModifyBuilder.registerModifier(
        new AModInteger(
            1,
            "Feather Fall",
            EnumSet.of(ArmorPart.Legs),
            new ItemStack[] {
              new ItemStack(TinkerWorld.slimeGel, 1, 0),
              new ItemStack(Items.ender_pearl),
              feather,
              feather,
              feather,
              feather,
              feather,
              feather
            },
            1,
            "\u00a7f",
            "Feather Fall"));
    ModifyBuilder.registerModifier(
        new AModInteger(
            1,
            "Feather Fall",
            EnumSet.of(ArmorPart.Legs),
            new ItemStack[] {
              new ItemStack(TinkerWorld.slimeGel, 1, 1),
              new ItemStack(Items.ender_pearl),
              feather,
              feather,
              feather,
              feather,
              feather,
              feather
            },
            1,
            "\u00a7f",
            "Feather Fall"));

    // Feet
    ModifyBuilder.registerModifier(
        new AModBoolean(
            1,
            "WaterWalk",
            EnumSet.of(ArmorPart.Feet),
            new ItemStack[] {new ItemStack(Blocks.waterlily), new ItemStack(Blocks.waterlily)},
            "\u00a79",
            "Water-Walking"));
    ModifyBuilder.registerModifier(
        new AModLeadBoots(new ItemStack[] {new ItemStack(Blocks.iron_block)}));
    ModifyBuilder.registerModifier(
        new AModInteger(
            3,
            "Slimy Soles",
            EnumSet.of(ArmorPart.Feet),
            new ItemStack[] {
              new ItemStack(TinkerWorld.slimePad, 1, 0), new ItemStack(TinkerWorld.slimePad, 1, 0)
            },
            1,
            "\u00a7a",
            "Slimy Soles"));

    // Glove
    ModifyBuilder.registerModifier(
        new GloveSpeed(1, new ItemStack[] {redstoneItem, redstoneBlock}, new int[] {1, 9}));
    // ModifyBuilder.registerModifier(new GloveClimb(new ItemStack[] { new
    // ItemStack(Items.slime_ball), new ItemStack(Blocks.web), new ItemStack(TinkerTools.materials,
    // 1, 25) }));
    modAttackGlove =
        new ModAttack(
            "Quartz",
            2,
            new ItemStack[] {
              new ItemStack(Items.quartz), new ItemStack(Blocks.quartz_block, 1, Short.MAX_VALUE)
            },
            new int[] {1, 4},
            50,
            50,
            "Accessory");
    // ModifyBuilder.registerModifier(modAttackGlove);
  }
 private static void addItemStackPartBuilding(ItemStack pattern, int materialID, ItemStack part) {
   TConstructRegistry.addPartMapping(pattern.getItem(), pattern.getItemDamage(), materialID, part);
 }
  /**
   * Adds a tool material to TConstruct
   *
   * @param name Name of the material
   * @param stack The stack used to create the material
   * @param ID The unique ID of the material
   * @param mat The base tool material used to generate values
   * @param tooltipColor The colour in the item tooltip
   * @param hexColor The actual colour of the Item
   * @param handleMod The handle modifier of the material
   * @param reinforced The reinforced trait of the material
   * @param stonebound The stonebound modifier of the material, negative is jagged
   * @param maxDamage The base speed of the bow
   * @param bowMaxSpeed The max speed of the bow
   * @param arrowWeight The weight of the arrow
   * @param arrowBreakChance The chance that the arrow will survive on impact
   * @param inGame The in game name of the material
   * @param casting Whether or not this needs casting (true) or part building (false)
   */
  public static void createToolSet(
      String name,
      ItemStack stack,
      int ID,
      ToolMaterial mat,
      EnumChatFormatting tooltipColor,
      int hexColor,
      float handleMod,
      int reinforced,
      float stonebound,
      int maxDamage,
      float bowMaxSpeed,
      float arrowWeight,
      float arrowBreakChance,
      String inGame,
      boolean casting,
      boolean instant) {
    pb.registerMaterialSet(
        name,
        new ItemStack(TinkerTools.toolShard, 1, ID),
        new ItemStack(TinkerTools.toolRod, 1, ID),
        32);
    TConstructClientRegistry.addMaterialRenderMapping(ID, "tinker", name, true);
    if (Loader.isModLoaded("IguanaTweaksTConstruct"))
      //									ID, MaterialName, 	HarvestLevel,	BaseDurability, MiningSpeed, 	Attack,
      //	handleModifier, ReinforcedLevel, 	stonebound
      TConstructRegistry.addToolMaterial(
          ID,
          name,
          mat.getHarvestLevel() + 2,
          mat.getMaxUses(),
          instant ? Integer.MAX_VALUE : (int) mat.getEfficiencyOnProperMaterial() * 100,
          (int) mat.getDamageVsEntity(),
          handleMod,
          reinforced,
          stonebound,
          tooltipColor.toString(),
          hexColor);
    else
      TConstructRegistry.addToolMaterial(
          ID,
          name,
          mat.getHarvestLevel(),
          mat.getMaxUses(),
          instant ? Integer.MAX_VALUE : (int) mat.getEfficiencyOnProperMaterial() * 100,
          (int) mat.getDamageVsEntity(),
          handleMod,
          reinforced,
          stonebound,
          tooltipColor.toString(),
          hexColor);
    //								MatID, DrawSpeed, maxSpeed
    TConstructRegistry.addBowMaterial(ID, maxDamage, bowMaxSpeed);
    //								MatID, Weight, BreakChance
    TConstructRegistry.addArrowMaterial(ID, arrowWeight, arrowBreakChance);
    // TinkerTools.registerPatternMaterial(name, 2, name);
    TConstructRegistry.addDefaultToolPartMaterial(ID);
    pb.registerFullMaterial(
        stack,
        2,
        name,
        new ItemStack(TinkerTools.toolShard, 1, ID),
        new ItemStack(TinkerTools.toolRod, 1, ID),
        ID);
    LanguageRegistry.instance()
        .addStringLocalization("material." + name.toLowerCase(), "en_US", inGame);
    // LogHelper.info("Looking for %s to localise to %s", "material."+name, inGame);
    registerWithStations(stack, name, ID);
    if (!casting) addPartBuilding(ID);
    // else		 addCasting(null, ID);

  }
 public static void addCasting(Fluid fluid, int ID) {
   // .addCastingRecipe(output, fluid, cast, hardeningDelay)
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerTools.toolRod, 1, ID),
           new FluidStack(fluid, (int) (144 * 0.5D)),
           TConstructRegistry.getItemStack("toolRodCast"),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerTools.pickaxeHead, 1, ID),
           new FluidStack(fluid, (int) (144 * 1.0D)),
           TConstructRegistry.getItemStack("pickaxeHeadCast"),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerTools.shovelHead, 1, ID),
           new FluidStack(fluid, (int) (144 * 1.0D)),
           TConstructRegistry.getItemStack("shovelHeadCast"),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerTools.hatchetHead, 1, ID),
           new FluidStack(fluid, (int) (144 * 1.0D)),
           TConstructRegistry.getItemStack("hatchetHeadCast"),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerTools.swordBlade, 1, ID),
           new FluidStack(fluid, (int) (144 * 1.0D)),
           TConstructRegistry.getItemStack("swordBladeCast"),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerTools.fullGuard, 1, ID),
           new FluidStack(fluid, (int) (144 * 1.0D)),
           TConstructRegistry.getItemStack("fullGuardCast"),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerTools.wideGuard, 1, ID),
           new FluidStack(fluid, (int) (144 * 0.5D)),
           TConstructRegistry.getItemStack("wideGuardCast"),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerTools.crossbar, 1, ID),
           new FluidStack(fluid, (int) (144 * 0.5D)),
           TConstructRegistry.getItemStack("crossbarCast"),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerTools.binding, 1, ID),
           new FluidStack(fluid, (int) (144 * 0.5D)),
           TConstructRegistry.getItemStack("bindingCast"),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerTools.handGuard, 1, ID),
           new FluidStack(fluid, (int) (144 * 0.5D)),
           TConstructRegistry.getItemStack("handGuardCast"),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerTools.frypanHead, 1, ID),
           new FluidStack(fluid, (int) (144 * 1.0D)),
           TConstructRegistry.getItemStack("frypanHeadCast"),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerTools.signHead, 1, ID),
           new FluidStack(fluid, (int) (144 * 1.0D)),
           TConstructRegistry.getItemStack("signHeadCast"),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerTools.knifeBlade, 1, ID),
           new FluidStack(fluid, (int) (144 * 0.5D)),
           TConstructRegistry.getItemStack("knifeBladeCast"),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerTools.chiselHead, 1, ID),
           new FluidStack(fluid, (int) (144 * 0.5D)),
           TConstructRegistry.getItemStack("chiselHeadCast"),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerTools.toughRod, 1, ID),
           new FluidStack(fluid, (int) (144 * 3.0D)),
           TConstructRegistry.getItemStack("toughRodCast"),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerTools.toughBinding, 1, ID),
           new FluidStack(fluid, (int) (144 * 3.0D)),
           TConstructRegistry.getItemStack("toughBindingCast"),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerTools.largePlate, 1, ID),
           new FluidStack(fluid, (int) (144 * 8.0D)),
           TConstructRegistry.getItemStack("largePlateCast"),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerTools.broadAxeHead, 1, ID),
           new FluidStack(fluid, (int) (144 * 8.0D)),
           TConstructRegistry.getItemStack("broadAxeHeadCast"),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerTools.scytheBlade, 1, ID),
           new FluidStack(fluid, (int) (144 * 8.0D)),
           TConstructRegistry.getItemStack("scytheHeadCast"),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerTools.excavatorHead, 1, ID),
           new FluidStack(fluid, (int) (144 * 8.0D)),
           TConstructRegistry.getItemStack("excavatorHeadCast"),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerTools.largeSwordBlade, 1, ID),
           new FluidStack(fluid, (int) (144 * 8.0D)),
           TConstructRegistry.getItemStack("largeBladeCast"),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerTools.hammerHead, 1, ID),
           new FluidStack(fluid, (int) (144 * 8.0D)),
           TConstructRegistry.getItemStack("hammerHeadCast"),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerWeaponry.arrowhead, 1, ID),
           new FluidStack(fluid, (int) (144 * 1.0D)),
           new ItemStack(TConstructRegistry.getItem("metalPattern"), 1, 25),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerWeaponry.partCrossbowBody, 1, ID),
           new FluidStack(fluid, (int) (144 * 5.0D)),
           new ItemStack(TinkerWeaponry.metalPattern, 1, 2),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerWeaponry.partCrossbowLimb, 1, ID),
           new FluidStack(fluid, (int) (144 * 4.0D)),
           new ItemStack(TinkerWeaponry.metalPattern, 1, 1),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerWeaponry.partBowLimb, 1, ID),
           new FluidStack(fluid, (int) (144 * 4.0D)),
           new ItemStack(TinkerWeaponry.metalPattern, 1, 3),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerWeaponry.partShuriken, 1, ID),
           new FluidStack(fluid, (int) (144 * 0.5D)),
           new ItemStack(TinkerWeaponry.metalPattern, 1, 0),
           50);
   TConstructRegistry.instance
       .getTableCasting()
       .addCastingRecipe(
           new ItemStack(TinkerWeaponry.partBolt, 1, ID),
           new FluidStack(fluid, (int) (144 * 1.0D)),
           new ItemStack(TinkerTools.toolRod),
           50);
 }
 public static void addPartBuilding(int materialID) {
   addItemStackPartBuilding(
       TConstructRegistry.getItemStack("toolRodPattern"),
       materialID,
       new ItemStack(TinkerTools.toolRod, 1, materialID));
   addItemStackPartBuilding(
       TConstructRegistry.getItemStack("pickaxeHeadPattern"),
       materialID,
       new ItemStack(TinkerTools.pickaxeHead, 1, materialID));
   addItemStackPartBuilding(
       TConstructRegistry.getItemStack("shovelHeadPattern"),
       materialID,
       new ItemStack(TinkerTools.shovelHead, 1, materialID));
   addItemStackPartBuilding(
       TConstructRegistry.getItemStack("hatchetHeadPattern"),
       materialID,
       new ItemStack(TinkerTools.hatchetHead, 1, materialID));
   addItemStackPartBuilding(
       TConstructRegistry.getItemStack("swordBladePattern"),
       materialID,
       new ItemStack(TinkerTools.swordBlade, 1, materialID));
   addItemStackPartBuilding(
       TConstructRegistry.getItemStack("wideGuardPattern"),
       materialID,
       new ItemStack(TinkerTools.wideGuard, 1, materialID));
   addItemStackPartBuilding(
       TConstructRegistry.getItemStack("handGuardPattern"),
       materialID,
       new ItemStack(TinkerTools.handGuard, 1, materialID));
   addItemStackPartBuilding(
       TConstructRegistry.getItemStack("crossbarPattern"),
       materialID,
       new ItemStack(TinkerTools.crossbar, 1, materialID));
   addItemStackPartBuilding(
       TConstructRegistry.getItemStack("bindingPattern"),
       materialID,
       new ItemStack(TinkerTools.binding, 1, materialID));
   addItemStackPartBuilding(
       TConstructRegistry.getItemStack("frypanHeadPattern"),
       materialID,
       new ItemStack(TinkerTools.frypanHead, 1, materialID));
   addItemStackPartBuilding(
       TConstructRegistry.getItemStack("signHeadPattern"),
       materialID,
       new ItemStack(TinkerTools.signHead, 1, materialID));
   addItemStackPartBuilding(
       TConstructRegistry.getItemStack("knifeBladePattern"),
       materialID,
       new ItemStack(TinkerTools.knifeBlade, 1, materialID));
   addItemStackPartBuilding(
       TConstructRegistry.getItemStack("chiselHeadPattern"),
       materialID,
       new ItemStack(TinkerTools.chiselHead, 1, materialID));
   addItemStackPartBuilding(
       TConstructRegistry.getItemStack("toughRodPattern"),
       materialID,
       new ItemStack(TinkerTools.toughRod, 1, materialID));
   addItemStackPartBuilding(
       TConstructRegistry.getItemStack("toughBindingPattern"),
       materialID,
       new ItemStack(TinkerTools.toughBinding, 1, materialID));
   addItemStackPartBuilding(
       TConstructRegistry.getItemStack("largePlatePattern"),
       materialID,
       new ItemStack(TinkerTools.largePlate, 1, materialID));
   addItemStackPartBuilding(
       TConstructRegistry.getItemStack("broadAxeHeadPattern"),
       materialID,
       new ItemStack(TinkerTools.broadAxeHead, 1, materialID));
   addItemStackPartBuilding(
       TConstructRegistry.getItemStack("scytheHeadPattern"),
       materialID,
       new ItemStack(TinkerTools.scytheBlade, 1, materialID));
   addItemStackPartBuilding(
       TConstructRegistry.getItemStack("excavatorHeadPattern"),
       materialID,
       new ItemStack(TinkerTools.excavatorHead, 1, materialID));
   addItemStackPartBuilding(
       TConstructRegistry.getItemStack("largeBladePattern"),
       materialID,
       new ItemStack(TinkerTools.largeSwordBlade, 1, materialID));
   addItemStackPartBuilding(
       TConstructRegistry.getItemStack("hammerHeadPattern"),
       materialID,
       new ItemStack(TinkerTools.hammerHead, 1, materialID));
   addItemStackPartBuilding(
       TConstructRegistry.getItemStack("fullGuardPattern"),
       materialID,
       new ItemStack(TinkerTools.fullGuard, 1, materialID));
   addItemStackPartBuilding(
       new ItemStack(TConstructRegistry.getItem("woodPattern"), 1, 25),
       materialID,
       new ItemStack(TinkerWeaponry.arrowhead, 1, materialID));
   addItemStackPartBuilding(
       new ItemStack(TinkerWeaponry.woodPattern, 1, 0),
       materialID,
       new ItemStack(TinkerWeaponry.partShuriken, 1, materialID));
   addItemStackPartBuilding(
       new ItemStack(TinkerWeaponry.woodPattern, 1, 1),
       materialID,
       new ItemStack(TinkerWeaponry.partCrossbowLimb, 1, materialID));
   addItemStackPartBuilding(
       new ItemStack(TinkerWeaponry.woodPattern, 1, 2),
       materialID,
       new ItemStack(TinkerWeaponry.partCrossbowBody, 1, materialID));
   addItemStackPartBuilding(
       new ItemStack(TinkerWeaponry.woodPattern, 1, 3),
       materialID,
       new ItemStack(TinkerWeaponry.partBowLimb, 1, materialID));
 }