Пример #1
0
 @Handler
 public void init(FMLInitializationEvent event) {
   craftingTableRecipes();
   registerModifiers();
   addRecipesForDryingRack();
   TConstructRegistry.equipableTab.init(travelGoggles.getDefaultItem());
   proxy.initialize();
 }
Пример #2
0
  @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");
  }