Java 类net.minecraftforge.common.EnumHelper 实例源码

项目:FallingEarth    文件:ItemHelper.java   
public static void initItems()
{
    meteorSpawner = new ItemMeteorSpawner(ConfigHelper.MeteorSpawnerID).setUnlocalizedName("MeteorSpawner");

    EnumToolMaterial meteor = EnumHelper.addToolMaterial("Meteoritic", 3, -1, 16, 14, 30);
    meteoriticPickaxe = new ItemMeteoriticPickaxe(ConfigHelper.MeteoriticPickaxeID, meteor).setUnlocalizedName("MeteoriticPickaxe");
    meteoriticAxe = new ItemMeteoriticAxe(ConfigHelper.MeteoriticAxeID, meteor).setUnlocalizedName("MeteoriticAxe");
    meteoriticShovel = new ItemMeteoriticShovel(ConfigHelper.MeteoriticShovelID, meteor).setUnlocalizedName("MeteoriticShovel");
    meteoriticSword = new ItemMeteoriticSword(ConfigHelper.MeteoriticSwordID, meteor).setUnlocalizedName("MeteoriticSword");

    int meteoriticArmor = FallingEarth.proxy.addArmor("FallingEarth:Meteor");
    EnumArmorMaterial meteoritic = EnumHelper.addArmorMaterial("Meteoritic", -1, new int[]{0,0,0,0}, 30);
    meteoriticHead = new ItemMeteoriticArmor(ConfigHelper.MeteoriticHeadID, meteoritic, meteoriticArmor, 0).setUnlocalizedName("FallingEarth:MeteoriticHelmet");
    meteoriticBody = new ItemMeteoriticArmor(ConfigHelper.MeteoriticBodyID, meteoritic, meteoriticArmor, 1).setUnlocalizedName("FallingEarth:MeteoriticBody");
    meteoriticLegs = new ItemMeteoriticArmor(ConfigHelper.MeteoriticLegsID, meteoritic, meteoriticArmor, 2).setUnlocalizedName("FallingEarth:MeteoriticLegs");
    meteoriticBoots = new ItemMeteoriticArmor(ConfigHelper.MeteoriticBootsID, meteoritic, meteoriticArmor, 3).setUnlocalizedName("FallingEarth:MeteoriticBoots");

    meteoriticEssence = new MeteoriticEssence(ConfigHelper.MeteoriticEssenceID).setUnlocalizedName("MeteoriticEssence");
}
项目:FantasyCraft-Mod    文件:FCraftToolMaterials.java   
/**
 * WOOD(0, 59, 2.0F, 0.0F, 15),
    * STONE(1, 131, 4.0F, 1.0F, 5),
    * IRON(2, 250, 6.0F, 2.0F, 14),
    * EMERALD(3, 1561, 8.0F, 3.0F, 10),
    * GOLD(0, 32, 12.0F, 0.0F, 22);
    * 
    * The level of material this tool can harvest (3 = DIAMOND, 2 = IRON, 1 = STONE, 0 = WOOD/GOLD)
    * The number of uses this material allows. (wood = 59, stone = 131, iron = 250, diamond = 1561, gold = 32)
    * The strength of this tool material against blocks which it is effective against.
    * Damage versus entities
    * Defines the natural enchantability factor of the material.
    */

public static void init() {
    //set most damage levels (par1) to diamond level until there is an ore of higher damage value
    MATERIAL_ZINCATITE = EnumHelper.addToolMaterial("materialZincatite", 1, 200, 7.0F, 2F, 0);
    MATERIAL_MYTHRIL = EnumHelper.addToolMaterial("materialMythril", 2, 500, 7.5F, 2.5F, 0);
    MATERIAL_PLATINUM = EnumHelper.addToolMaterial("materialPlatinum", 3, 600, 8.0F, 3.0F, 0);
    MATERIAL_ORICHALCUM = EnumHelper.addToolMaterial("materialOrichalcum", 3, 700, 7.0F, 3.5F, 0);
    MATERIAL_GEMSTEEL = EnumHelper.addToolMaterial("materialGemsteel", 3, 800, 8.5F, 4.0F, 0);
    MATERIAL_ZODIAC = EnumHelper.addToolMaterial("materialZodiac", 3, 900, 9.0F, 4.5F, 0);
    MATERIAL_SCARLETITE = EnumHelper.addToolMaterial("materialScarletite", 3, 1000, 10.0F, 5.0F, 0);
    MATERIAL_EINHERJARIUM = EnumHelper.addToolMaterial("materialEinherjarium", 3, 1100, 10.5F, 5.5F, 0);
    MATERIAL_ADAMANTITE = EnumHelper.addToolMaterial("materialAdamantite", 3, 1500, 11.0F, 6.0F, 0);
}
项目:Kingdom-Keys    文件:AddedItems.java   
public static void intiArmour(){
    //Organization
    OrganizationArmourMaterial = EnumHelper.addArmorMaterial("ORGANIZATION", 28, new int[] { 4, 8, 6, 3 }, 30);
    OrganizationHood = new OrganizationArmor(IDs.OHelm, OrganizationArmourMaterial , KingdomKeys.proxy.addArmor(OrganizationArmourMaterial.name()), 0, "ORGANIZATION_1", Strings.OHood);
    OrganizationCoat = new OrganizationArmor(IDs.OChest, OrganizationArmourMaterial, KingdomKeys.proxy.addArmor(OrganizationArmourMaterial.name()), 1, "ORGANIZATION_1", Strings.OCoat);
    OrganizationLegs = new OrganizationArmor(IDs.OLegs, OrganizationArmourMaterial, KingdomKeys.proxy.addArmor(OrganizationArmourMaterial.name()), 2, "ORGANIZATION_2", Strings.OLegs);
    OrganizationBoots = new OrganizationArmor(IDs.OBoots, OrganizationArmourMaterial, KingdomKeys.proxy.addArmor(OrganizationArmourMaterial.name()), 3, "ORGANIZATION_1", Strings.OBoots);
    //Keyblade
    //Aqua
    KeybladeAArmourMaterial = EnumHelper.addArmorMaterial("KEYBLADEA", 34, new int[] { 5, 8, 6, 4 }, 30);
    KeybladeAHelm = new KeybladeAArmor(IDs.KAHelm, KeybladeAArmourMaterial , KingdomKeys.proxy.addArmor(KeybladeAArmourMaterial.name()), 0, "KEYBLADEA_1", Strings.KAHelm);
    KeybladeAChest = new KeybladeAArmor(IDs.KAChest, KeybladeAArmourMaterial, KingdomKeys.proxy.addArmor(KeybladeAArmourMaterial.name()), 1, "KEYBLADEA_1", Strings.KAChest);
    KeybladeALegs = new KeybladeAArmor(IDs.KALegs, KeybladeAArmourMaterial, KingdomKeys.proxy.addArmor(KeybladeAArmourMaterial.name()), 2, "KEYBLADEA_2", Strings.KALegs);
    KeybladeABoots = new KeybladeAArmor(IDs.KABoots, KeybladeAArmourMaterial, KingdomKeys.proxy.addArmor(KeybladeAArmourMaterial.name()), 3, "KEYBLADEA_1", Strings.KABoots);
    //Terra
    KeybladeTArmourMaterial = EnumHelper.addArmorMaterial("KEYBLADET", 40, new int[] { 6, 8, 7, 4 }, 30);
    KeybladeTHelm = new KeybladeTArmor(IDs.KTHelm, KeybladeTArmourMaterial , KingdomKeys.proxy.addArmor(KeybladeTArmourMaterial.name()), 0, "KEYBLADET_1", Strings.KTHelm);
    KeybladeTChest = new KeybladeTArmor(IDs.KTChest, KeybladeTArmourMaterial, KingdomKeys.proxy.addArmor(KeybladeTArmourMaterial.name()), 1, "KEYBLADET_1", Strings.KTChest);
    KeybladeTLegs = new KeybladeTArmor(IDs.KTLegs, KeybladeTArmourMaterial, KingdomKeys.proxy.addArmor(KeybladeTArmourMaterial.name()), 2, "KEYBLADET_2", Strings.KTLegs);
    KeybladeTBoots = new KeybladeTArmor(IDs.KTBoots, KeybladeTArmourMaterial, KingdomKeys.proxy.addArmor(KeybladeTArmourMaterial.name()), 3, "KEYBLADET_1", Strings.KTBoots);
    //Ventus
    KeybladeVArmourMaterial = EnumHelper.addArmorMaterial("KEYBLADEV", 30, new int[] { 4, 8, 5, 4 }, 30);
    KeybladeVHelm = new KeybladeVArmor(IDs.KVHelm, KeybladeAArmourMaterial , KingdomKeys.proxy.addArmor(KeybladeVArmourMaterial.name()), 0, "KEYBLADEV_1", Strings.KVHelm);
    KeybladeVChest = new KeybladeVArmor(IDs.KVChest, KeybladeAArmourMaterial, KingdomKeys.proxy.addArmor(KeybladeVArmourMaterial.name()), 1, "KEYBLADEV_1", Strings.KVChest);
    KeybladeVLegs = new KeybladeVArmor(IDs.KVLegs, KeybladeAArmourMaterial, KingdomKeys.proxy.addArmor(KeybladeVArmourMaterial.name()), 2, "KEYBLADEV_2", Strings.KVLegs);
    KeybladeVBoots = new KeybladeVArmor(IDs.KVBoots, KeybladeAArmourMaterial, KingdomKeys.proxy.addArmor(KeybladeVArmourMaterial.name()), 3, "KEYBLADEV_1", Strings.KVBoots);
    //Eraqus
    KeybladeEArmourMaterial = EnumHelper.addArmorMaterial("KEYBLADEE", 42, new int[] { 5, 7, 7, 5 }, 30);
    KeybladeEHelm = new KeybladeEArmor(IDs.KEHelm, KeybladeEArmourMaterial , KingdomKeys.proxy.addArmor(KeybladeEArmourMaterial.name()), 0, "KEYBLADEE_1", Strings.KEHelm);
    KeybladeEChest = new KeybladeEArmor(IDs.KEChest, KeybladeEArmourMaterial, KingdomKeys.proxy.addArmor(KeybladeEArmourMaterial.name()), 1, "KEYBLADEE_1", Strings.KEChest);
    KeybladeELegs = new KeybladeEArmor(IDs.KELegs, KeybladeEArmourMaterial, KingdomKeys.proxy.addArmor(KeybladeEArmourMaterial.name()), 2, "KEYBLADEE_2", Strings.KELegs);
    KeybladeEBoots = new KeybladeEArmor(IDs.KEBoots, KeybladeEArmourMaterial, KingdomKeys.proxy.addArmor(KeybladeEArmourMaterial.name()), 3, "KEYBLADEE_1", Strings.KEBoots);

    OrganizationArmourMaterial.customCraftingMaterial = DarkLeather;
    KeybladeVArmourMaterial.customCraftingMaterial = OrichalcumPlus;
    KeybladeTArmourMaterial.customCraftingMaterial = OrichalcumPlus;
    KeybladeAArmourMaterial.customCraftingMaterial = OrichalcumPlus;
    KeybladeEArmourMaterial.customCraftingMaterial = OrichalcumPlus;
}
项目:Modjam-3    文件:CommonProxy.java   
/**
 * Hacks the gameMode stuff that we need to hack...
 */
public void hackGameMode()
{
    // set gameMode enum
    MobJam.GAMEMODE = EnumHelper.addEnum(EnumGameType.class, Constants.GAMEMODE.toUpperCase(),
                                         new Class[] {int.class, String.class},
                                         new Object[] {3, Constants.GAMEMODE});

    // replace commands
}
项目:Gems    文件:LapisGemModule.java   
public static void Settings() {
  //Items - Lapis Gem
  lapisGem = (new Gem(lapisGemID, "Lapis")).setMaxStackSize(64);
  chargedLapisGem = (new Gem(chargedLapisGemID, "ChargedLapis")).setMaxStackSize(16);
  //Tools - Lapis Gem
  lapisGemPaxel = (new Paxel(lapisGemPaxelID, ToolMaterials.ChargedLapisGem));
  //Swords - Lapis Gem
  lapisGemSword = (new Sword(lapisGemSwordID, ToolMaterials.ChargedLapisGem));
  //Armor - Lapis Gem
  EnumArmorMaterial lapisGemArmorMaterial = EnumHelper.addArmorMaterial("Lapis Gem Armor", 40, new int[] { 4, 9, 7, 4 }, 50);
  lapisGemHelmet = new LapisGemHelmet(lapisGemHelmetID, lapisGemArmorMaterial, Gems.proxy.addArmor("LapisGem"), 0).setUnlocalizedName("LapisGemHelmet").setCreativeTab(CreativeTabs.tabCombat);
  lapisGemChestplate = new LapisGemChestplate(lapisGemChestplateID, lapisGemArmorMaterial, Gems.proxy.addArmor("LapisGem"), 1).setUnlocalizedName("LapisGemChestplate").setCreativeTab(CreativeTabs.tabCombat);
  lapisGemLeggings = new LapisGemLeggings(lapisGemLeggingsID, lapisGemArmorMaterial, Gems.proxy.addArmor("LapisGem"), 2).setUnlocalizedName("LapisGemLeggings").setCreativeTab(CreativeTabs.tabCombat);
  lapisGemBoots = new LapisGemBoots(lapisGemBootsID, lapisGemArmorMaterial, Gems.proxy.addArmor("LapisGem"), 3).setUnlocalizedName("LapisGemBoots").setCreativeTab(CreativeTabs.tabCombat);
  //Blocks - Lapis Gem
  blockLapisGem = new BasicBlock(blockLapisGemID, "LapisGemblock",Material.rock).setHardness(4.0F).setResistance(7.5F).setStepSound(Block.soundMetalFootstep).setUnlocalizedName("BlockLapisGem").setCreativeTab(CreativeTabs.tabBlock);
  // Register Recipes - Lapis Gem
  GameRegistry.addRecipe(new ItemStack(lapisGem, 1), "ldl", "ddd", "ldl", 'l', new ItemStack(Item.dyePowder, 1, 4), 'd', new ItemStack(Item.diamond));
  GameRegistry.addSmelting(lapisGemID + 256, new ItemStack(chargedLapisGem), 1);
  GameRegistry.addRecipe(new ItemStack(lapisGemHelmet), "lll", "l l", "   ", 'l', new ItemStack(chargedLapisGem));
  GameRegistry.addRecipe(new ItemStack(lapisGemChestplate), "l l", "lll", "lll", 'l', new ItemStack(chargedLapisGem));
  GameRegistry.addRecipe(new ItemStack(lapisGemLeggings), "lll", "l l", "l l", 'l', new ItemStack(chargedLapisGem));
  GameRegistry.addRecipe(new ItemStack(lapisGemBoots), "   ", "l l", "l l", 'l', new ItemStack(chargedLapisGem));
  GameRegistry.addRecipe(new ItemStack(blockLapisGem), "lll", "lll", "lll", 'l', new ItemStack(chargedLapisGem));
  GameRegistry.addShapelessRecipe(new ItemStack(chargedLapisGem, 9), new ItemStack(blockLapisGem));
  GameRegistry.addRecipe(new ItemStack(lapisGemPaxel), "lbl", " s ", " s ", 'b', new ItemStack(blockLapisGem), 'l', new ItemStack(chargedLapisGem), 's', new ItemStack(Item.stick));
  GameRegistry.addRecipe(new ItemStack(lapisGemSword), " b ", " l ", " s ", 'b', new ItemStack(blockLapisGem), 'l', new ItemStack(chargedLapisGem), 's', new ItemStack(Item.stick));    
}
项目:ObsidiCraft    文件:ModItems.java   
public static void init(){

    obsidianTool = EnumHelper.addToolMaterial("OBSIDIAN", 4, 1100, 9.0F, 3, 20);
    blackDiamondTool = EnumHelper.addToolMaterial("BLACKDIAMOND", 6, 2000, 15.0F, 6, 40);

    //items
    obsidianSword = new obsidianSword(ItemIDs.obsidianSworddefault, obsidianTool).setUnlocalizedName("swordObsidian");
    obsidianShard = new obsidianShard(ItemIDs.obsidianSharddefault).setUnlocalizedName("shardObsidian");
    obsidianPickaxe = new obsidianPickaxe(ItemIDs.obsidianPickaxedefault, obsidianTool).setUnlocalizedName("pickaxeObsidian");
    obsidianAxe = new obsidianAxe(ItemIDs.obsidianHatchetdefault, obsidianTool).setUnlocalizedName("hatchetObsidian");
    obsidianHoe = new obsidianHoe(ItemIDs.obsidianHoedefault, obsidianTool).setUnlocalizedName("hoeObsidian");
    obsidianShovel = new obsidianShovel(ItemIDs.obsidianShoveldefault, obsidianTool).setUnlocalizedName("shovelObsidian");
    blackDiamondSword = new obsidianSword(ItemIDs.blackDiamondSworddefault, blackDiamondTool).setUnlocalizedName("swordBlackDiamond");
    blackDiamondPickaxe = new obsidianPickaxe(ItemIDs.blackDiamondPickaxedefault, blackDiamondTool).setUnlocalizedName("pickaxeBlackDiamond");
    blackDiamondAxe = new obsidianAxe(ItemIDs.blackDiamondAxedefault, blackDiamondTool).setUnlocalizedName("hatchetBlackDiamond");
    blackDiamondHoe = new obsidianHoe(ItemIDs.blackDiamondHoedefault, blackDiamondTool).setUnlocalizedName("hoeBlackDiamond");
    blackDiamondShovel = new obsidianShovel(ItemIDs.blackDiamondShoveldefault, blackDiamondTool).setUnlocalizedName("shovelBlackDiamond");
    obsidianCutter = new obsidianCutter(ItemIDs.obsidianCutterdefault);
    blackDiamond = new blackDiamond(ItemIDs.blackDiamonddefault);
    obsidianIngot = new obsidianIngot(ItemIDs.obsidianIngotDefault);
    obsidianBow = (ModItemBow)(new ModItemBow(ItemIDs.obsidianBowDefault)).setUnlocalizedName("obsidianBow");

    obsidianCutter.setContainerItem(obsidianCutter);

    ModArmor.init();

    registry.init();

}
项目:ObsidiCraft    文件:ModArmor.java   
public static void init()
{
    obsidianArmour = EnumHelper.addArmorMaterial("OBSIDIAN", 50, new int[] {2,7,5,2}, 20);
    blackDiamondArmour = EnumHelper.addArmorMaterial("BLACK_DIAMOND", 90, new int[] {4,10,8,4}, 40);

    obsidianBoots = (ItemObsidianArmor) new ItemObsidianArmor(ItemIDs.obsidianBootsDefault, obsidianArmour, 0 , 3).setUnlocalizedName("bootsObsidian");
    obsidianLeggings = (ItemObsidianArmor) new ItemObsidianArmor(ItemIDs.obsidianLeggingsDefault, obsidianArmour, 0 ,2).setUnlocalizedName("leggingsObsidian");
    obsidianHelmet = (ItemObsidianArmor) new ItemObsidianArmor(ItemIDs.obsidianHelmetDefault, obsidianArmour, 0, 0).setUnlocalizedName("helmetObsidian");
    obsidianChestPlate = (ItemObsidianArmor) new ItemObsidianArmor(ItemIDs.obsidianChestPlateDefault, obsidianArmour, 0 , 1).setUnlocalizedName("chestplateObsidian");

    blackDiamondBoots = (ItemBlackDiamondArmor) new ItemBlackDiamondArmor(ItemIDs.blackDiamondBootsDefault, blackDiamondArmour, 0 , 3).setUnlocalizedName("bootsBlackDiamond");
    blackDiamondLeggings = (ItemBlackDiamondArmor) new ItemBlackDiamondArmor(ItemIDs.blackDiamondLeggingsDefault, blackDiamondArmour, 0 ,2).setUnlocalizedName("leggingsBlackDiamond");
    blackDiamondHelmet = (ItemBlackDiamondArmor) new ItemBlackDiamondArmor(ItemIDs.blackDiamondHelmetDefault, blackDiamondArmour, 0, 0).setUnlocalizedName("helmetBlackDiamond");
    blackDiamondChestPlate = (ItemBlackDiamondArmor) new ItemBlackDiamondArmor(ItemIDs.blackDiamondChestPlateDefault, blackDiamondArmour, 0 , 1).setUnlocalizedName("chestplateBlackDiamond");
}
项目:ZeroQuest    文件:ZeroQuest.java   
@EventHandler
   public void load(FMLInitializationEvent event)
{           
    LogHelper.log(Level.INFO, "-----CONTENT LOAD INITATING-----");
       proxy.registerChannels();
    proxy.registerAdvanced();
    nileEssenceMaterial = EnumHelper.addToolMaterial("NileEssenceMaterial", 4, 4000, 20.0F, 4.0F, 30);
    nileEssenceMaterial2 = EnumHelper.addArmorMaterial("NileEssenceAMaterial", 40, new int[]{4, 9, 7, 4}, 25);  

    LogHelper.log(Level.INFO, "Loading Block and Items...");
    ModBlocks.load();
    ModBlocks.addNames();
    ModItems.load();
    ModItems.addNames();
    LogHelper.log(Level.INFO, "Blocks and Items Loaded Successfully!");

    LogHelper.log(Level.INFO, "Loading Nile Recipes...");
        ZeroQuestCrafting.loadRecipes();
    LogHelper.log(Level.INFO, "Recipes ready!");

    LogHelper.log(Level.INFO, "Loading Entities and Ore Dictionary...");
    ModEntities.loadCreatures();
    ModEntities.loadTileEntities();
    ModEntities.loadProjectiles();
        OreDic.load();
    LogHelper.log(Level.INFO, "Entities and Ore Dictionary Loaded Successfully!");

    LogHelper.log(Level.INFO, "Loading Achievements...");
        ModAchievements.load();
    LogHelper.log(Level.INFO, "Achievements Loaded Successfully!");

    LogHelper.log(Level.INFO, "Loading Biomes...");
    ModBiomes.loadBiomes();
    LogHelper.log(Level.INFO, "Biomes Loaded Successfully!");

    if(Constants.DEF_DARKLOAD == true){
    LogHelper.log(Level.INFO, "Dark Elemental Load is ENABLED!");   
    LogHelper.log(Level.INFO, "Initating Dark Elemental Load!");
    darkEssenceMaterial = EnumHelper.addToolMaterial("DarkEssenceMaterial", 4, 4000, 21.0F, 5.0F, 40);
        ModItems.loadDarkItems();
        ModBlocks.loadDarkBlocks();
            ZeroQuestCrafting.loadDarkRecipes();
        ModEntities.loadDarkCreatures();
        ModBiomes.loadDarkBiomes();
        LogHelper.log(Level.INFO, "Dark Elements Loaded Successfully!");
    }else{
    LogHelper.log(Level.WARNING, "Dark Elemental Load is not ENABLED! Change configurations to enable!");
    LogHelper.log(Level.INFO, "Skipping Dark Load");

    }


    LogHelper.log(Level.INFO, "Loading Crucial Stuff...");
        proxy.registerRenderThings();
        proxy.reigsterClientLangugaes();
        proxy.registerChestItems();
    GameRegistry.registerFuelHandler(new FuelHandler());
        GameRegistry.registerCraftingHandler(new CraftingHandler());
        GameRegistry.registerPickupHandler(new PickupHandler());
        GameRegistry.registerWorldGenerator(new WorldGenZQuest());
    //MinecraftForge.EVENT_BUS.register(new ZeroQuestEvents());
    LogHelper.log(Level.INFO, "The Crucial Stuff Loaded Successfully!");

    LogHelper.log(Level.INFO, "Loading Dimensions...");
        DimensionManager.registerProviderType(NillaxID, WorldProviderNillax.class, false);
       DimensionManager.registerDimension(NillaxID, NillaxID);
    LogHelper.log(Level.INFO, "Dimensions Loaded Successfully!");
    LogHelper.log(Level.INFO, "-----CONTENT LOAD FINSHED-----");
}
项目:GlowTools    文件:GTItems.java   
public static void init(){
    //Items
    FMLLog.log(Reference.CHANNELNAME, Level.INFO, "Loading Items...", "");
    itemPorkApple = new GlowFood(ConfigSettings.itemPorkAppleID, 10, 0.9F, true).setPotionEffect(Potion.resistance.id, 5, 0, 0.5F).setUnlocalizedName("PorkappleItem");
    itemDarkDoor = new ItemDarkDoor(ConfigSettings.itemDarkDoorID).setCreativeTab(Reference.CREATIVETAB).setUnlocalizedName("darkDoorItem");
    itemBlueFertilizer = new GlowItem(ConfigSettings.itemBlueFertilizerID).setCreativeTab(Reference.CREATIVETAB).setUnlocalizedName("bluefertilizerItem");
    craftingItems = new CraftingItems(ConfigSettings.craftingItemsID).setCreativeTab(Reference.CREATIVETAB);

    //Glow Iron Tools
    EnumToolMaterial EnumToolMaterialGlowiron = EnumHelper.addToolMaterial("Glowiron", 2, 650, 10.0F, 3, 18);
    itemGlironSword = new ItemGlironSword(ConfigSettings.itemGlironSwordID, EnumToolMaterialGlowiron).setUnlocalizedName("glironswordItem");
    itemGlironPick = new ItemGlironPick(ConfigSettings.itemGlironPickID, EnumToolMaterialGlowiron).setUnlocalizedName("glironpickItem");
    itemGlironShovel = new ItemGlironShovel(ConfigSettings.itemGlironShovelID, EnumToolMaterialGlowiron).setUnlocalizedName("glironshovelItem");
    itemGlironAxe = new ItemGlironAxe(ConfigSettings.itemGlironAxeID, EnumToolMaterialGlowiron).setUnlocalizedName("glironaxeItem");
    itemGlironHoe = new ItemGlironHoe(ConfigSettings.itemGlironHoeID, EnumToolMaterialGlowiron).setUnlocalizedName("glironhoeItem");

    //Red Iron Tools
    EnumToolMaterial EnumToolMaterialRediron = EnumHelper.addToolMaterial("Rediron", 2, 300, 5.0F, 5, 25);
    itemRedironSword = new ItemRedironSword(ConfigSettings.itemRedironSwordID, EnumToolMaterialRediron).setUnlocalizedName("redironswordItem");
    itemRedironPick = new ItemRedironPick(ConfigSettings.itemRedironPickID, EnumToolMaterialRediron).setUnlocalizedName("redironpickItem");
    itemRedironShovel = new ItemRedironShovel(ConfigSettings.itemRedironShovelID, EnumToolMaterialRediron).setUnlocalizedName("redironshovelItem");
    itemRedironAxe = new ItemRedironAxe(ConfigSettings.itemRedironAxeID, EnumToolMaterialRediron).setUnlocalizedName("redironaxeItem");
    itemRedironHoe = new ItemRedironHoe(ConfigSettings.itemRedironHoeID, EnumToolMaterialRediron).setUnlocalizedName("redironhoeItem");

    //Scepters
    EnumToolMaterial EnumToolMaterialScepter = EnumHelper.addToolMaterial("Scepter", -1, -1, 0F, 0, -1);
    itemScepterLight = new GlowScepter(ConfigSettings.itemScepterLightID, EnumToolMaterialScepter).setUnlocalizedName("LightscepterItem");
    itemScepterRegen = new GlowScepter(ConfigSettings.itemScepterRegenID, EnumToolMaterialScepter).setUnlocalizedName("RegenscepterItem");
    itemScepterRegen2 = new GlowScepter(ConfigSettings.itemScepterRegen2ID, EnumToolMaterialScepter).setUnlocalizedName("Regenscepter2Item");
    itemScepterOmni = new GlowScepter(ConfigSettings.itemScepterOmniID, EnumToolMaterialScepter).setUnlocalizedName("OmniscepterItem");
    itemScepterInfuse = new ItemScepterInfuse(ConfigSettings.itemScepterInfuseID, EnumToolMaterialScepter).setUnlocalizedName("itemScepterInfuse");

    /** Armor Section (Max Damage before it breaks, Damage Reduction, Enchantability) */

    //Glow Iron Armor
    EnumArmorMaterial EnumArmorMaterialGlowiron = EnumHelper.addArmorMaterial("Glowiron", 25, new int[] {2, 7, 6, 2}, 18);
    itemGlironHelm = new GlironArmor(ConfigSettings.itemGlironHelmID, EnumArmorMaterialGlowiron, GlowTools.proxy.addArmor("Gliron"), 0).setUnlocalizedName("GlironHelm");
    itemGlironChest = new GlironArmor(ConfigSettings.itemGlironChestID, EnumArmorMaterialGlowiron, GlowTools.proxy.addArmor("Gliron"), 1).setUnlocalizedName("GlironChest");
    itemGlironLegs = new GlironArmor(ConfigSettings.itemGlironLegsID, EnumArmorMaterialGlowiron, GlowTools.proxy.addArmor("Gliron"), 2).setUnlocalizedName("GlironLegs");
    itemGlironBoots = new GlironArmor(ConfigSettings.itemGlironBootsID, EnumArmorMaterialGlowiron, GlowTools.proxy.addArmor("Gliron"), 3).setUnlocalizedName("GlironBoots");

    //Cloaks
    EnumArmorMaterial EnumArmorMaterialCloak = EnumHelper.addArmorMaterial("Cloak", -1, new int[] {0, 2, 0, 0}, -1);
    itemCloakInvis = new ItemCloakInvis(ConfigSettings.itemCloakInvisID, EnumArmorMaterialCloak, GlowTools.proxy.addArmor("Cloak"), 1).setUnlocalizedName("CloakInvis");

}
项目:MinecraftSpaceAgency    文件:MSA.java   
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
    FMLLog.getLogger().info("Starting MSA");
    // Load configuration
    MSAConfig.initConfig(new Configuration(event.getSuggestedConfigurationFile()));

    // Load localizations
    Localization.addLocalization("/lang/MSA/", "en_US");

    // Client proxy things
    proxy.registerRenderers();

    // Entity registration
    EntityRegistry.registerModEntity(EntityRocket.class, "rocket", MSAEntityIDs.ROCKET, this.instance, 60, 1, true);

    // Add star steel as a tool material
    EnumHelper.addToolMaterial("Star Steel", 2, 350, 6.5F, 2.1F, 20);
    EnumHelper.addArmorMaterial("Star Steel", 18, new int[] { 3, 6, 5, 3 }, 20);

    // Register tile entities
    tileEntityRegistration();

    // Initialize all our blocks, items, tools and rocket parts
    BlockList.init();
    ItemList.init();
    ToolList.init();
    RocketPartList.init();

    // Add the recipies for our blocks, items, tools and rocket parts
    BlockList.addRecipies();
    ItemList.addRecipies();
    ToolList.addRecipies();
    RocketPartList.addRecipies();

    // Register our world generators
    GameRegistry.registerWorldGenerator(new GenStarSteelOre());
    GameRegistry.registerWorldGenerator(new GenMeteors());

    // Register our Gui Handler
    NetworkRegistry.instance().registerGuiHandler(instance, proxy);

}
项目:WoodworkingTFC    文件:WoodworkingTFC.java   
@Init
public void load(FMLInitializationEvent event)
{
    // setup blocks
    int nextBlock = 3166;
    carvingBench = new CarvingBench(nextBlock++);
    GameRegistry.registerBlock(carvingBench, carvingBench.getUnlocalizedName());

    // setup items
    int nextItem = 13166;
    weaponizedWood = EnumHelper.addToolMaterial("weaponizedWood", 1, 40, 1.0f, 85, 1);
    woodenClub = new WoodenClub(nextItem++, weaponizedWood);
    stoneWoodworkingKnifeHead = new StoneWoodworkingKnifeHead(nextItem++);
    stoneWoodworkingKnife = new StoneWoodworkingKnife(nextItem++, TFCItems.IgExToolMaterial);
    woodenCarving = new WoodenCarving(nextItem++);
    fingerPaint = new FingerPaint(nextItem++);

    // knapping tool heads
    CraftingManagerTFC craftTFC = CraftingManagerTFC.getInstance();
    craftTFC.addRecipe(new ItemStack(stoneWoodworkingKnifeHead), new Object[] {
        " X", "XX", "XX", "XX", 'X', new ItemStack(TFCItems.FlatRock, 1, 32767)
    });

    // tools (head + stick)
    GameRegistry.addRecipe(new ItemStack(stoneWoodworkingKnife), "X", "I",
        'X', new ItemStack(stoneWoodworkingKnifeHead), 'I', new ItemStack(Item.stick));

    // club (wood carving)
    CarvingRecipe.add(woodenClub.itemID, 1, false,
        "   XX",
        "  XXX",
        " XXX",
        " XX",
        "X");

    // carving bench (wood carving)
    CarvingRecipe.add(carvingBench.blockID, 1, false,
        "XXXXX",
        "X   X",
        "X   X",
        "X   X",
        "X   X");

    // wooden bowl (wood carving)
    CarvingRecipe.add(Item.bowlEmpty.itemID, 4, false,
        "X  X",
        "XXXX");

    // finger paints
    int ii;
    for(ii=0; ii<16; ++ii)
    {
        GameRegistry.addShapelessRecipe(new ItemStack(fingerPaint.itemID, 16, ii),
            new ItemStack(Item.bowlEmpty), new ItemStack(Item.dyePowder, 1, ii));
    }

    // gui handler
    NetworkRegistry.instance().registerGuiHandler(this, new GuiHandler());

    // crafting handler
    GameRegistry.registerCraftingHandler(new CraftingHandler());

    // rendering setup
    proxy.setupRenderers();
}
项目:ElementalExperimentation    文件:ElexAPI.java   
/**
 * Adds an alloy and respective tool and armor materials.
 * @param alloy - The instance of @see Alloy that you are registering. 
 * @param harvestLevel - The block harvest level of a tool of this material.
 * @param durability - The durability of armor and tools of this material.
 * @param armorPieceValues - The armor values of this material.
 * @param efficiency - The efficiency of a tool of this material on blocks.
 * @param damage - The extra damage to mobs and other players of a sword of this material.
 * @param enchantability - The enchantability level of armor and tools of this material.
 */
public static void addAlloy(Alloy alloy, int harvestLevel, int durability, int[] armorPieceValues, float efficiency, float damage, int enchantability) {
    alloy.armorMaterialStorage.put(alloy.alloyName, EnumHelper.addArmorMaterial(alloy.alloyName.toUpperCase(), durability, armorPieceValues, enchantability));
    alloy.toolMaterialStorage.put(alloy.alloyName, EnumHelper.addToolMaterial(alloy.alloyName.toUpperCase(), harvestLevel, durability, efficiency, damage, enchantability));
}