Пример #1
0
  {
    // Blocks
    // oreRuby = new OreRuby();
    // oreTitanium = new OreTitanium();
    // GameRegistry.registerBlock(oreRuby, "oreRuby");
    // GameRegistry.registerBlock(oreTitanium, "oreTitanium");

    // Items
    ingotRubium = new IngotRubium();
    gemRuby = new GemRuby();
    ingotTitanium = new IngotTitanium();
    GameRegistry.registerItem(gemRuby, "gemRuby");
    GameRegistry.registerItem(ingotTitanium, "ingotTitanium");
    GameRegistry.registerItem(ingotRubium, "ingotRubium");
    LanguageRegistry.addName(ingotRubium, "Rubium Ingot");
    LanguageRegistry.addName(gemRuby, "Ruby Gem");
    LanguageRegistry.addName(ingotTitanium, "Titanium Ingot");

    // Crafting
    GameRegistry.addShapelessRecipe(
        new ItemStack(ingotRubium), new Object[] {new ItemStack(gemRuby), ingotTitanium});
  }
Пример #2
0
  @EventHandler
  public static void preinit(FMLPreInitializationEvent PreEvent) {
    // Enum Item ToolMaterials
    ToolMaterial copper = EnumHelper.addToolMaterial("copper", 2, 320, 5.5F, 2.5F, 16);

    // Blocks
    copperOre = new CopperOre();

    // Blocks Language Registry
    LanguageRegistry.addName(copperOre, "Copper Ore");

    // Tools
    copperAxe = new CopperAxe(copper);
    copperPickaxe = new CopperPickaxe(copper);
    copperSpade = new CopperSpade(copper);
    copperSword = new CopperSword(copper);
    copperHoe = new CopperHoe(copper);

    GameRegistry.registerItem(copperAxe = new CopperAxe(copper), "copperAxe");
    GameRegistry.registerItem(copperPickaxe = new CopperPickaxe(copper), "copperPickaxe");
    GameRegistry.registerItem(copperSpade = new CopperSpade(copper), "copperSpade");
    GameRegistry.registerItem(copperSword = new CopperSword(copper), "copperSword");
    GameRegistry.registerItem(copperHoe = new CopperHoe(copper), "copperHoe");

    // Tools Language Registry
    LanguageRegistry.addName(copperAxe, "Copper Axe");
    LanguageRegistry.addName(copperPickaxe, "Copper Pickaxe");
    LanguageRegistry.addName(copperSpade, "Copper Shovel");
    LanguageRegistry.addName(copperHoe, "Copper Hoe");
    LanguageRegistry.addName(copperSword, "Copper Sword");

    // Items
    copperIngot = new CopperIngot();

    // Items Language Registry
    LanguageRegistry.addName(copperIngot, "Copper Ingot");

    // Recipes
    ModRecipes.addRecipes();

    // Event Handler Registry
    proxy.registerRenderInfo();
  }