本文整理匯總了Java中net.minecraftforge.common.EnumHelper.addToolMaterial方法的典型用法代碼示例。如果您正苦於以下問題:Java EnumHelper.addToolMaterial方法的具體用法?Java EnumHelper.addToolMaterial怎麽用?Java EnumHelper.addToolMaterial使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraftforge.common.EnumHelper
的用法示例。
在下文中一共展示了EnumHelper.addToolMaterial方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: initItems
import net.minecraftforge.common.EnumHelper; //導入方法依賴的package包/類
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");
}
示例2: init
import net.minecraftforge.common.EnumHelper; //導入方法依賴的package包/類
/**
* 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);
}
示例3: init
import net.minecraftforge.common.EnumHelper; //導入方法依賴的package包/類
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();
}
示例4: load
import net.minecraftforge.common.EnumHelper; //導入方法依賴的package包/類
@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-----");
}
示例5: init
import net.minecraftforge.common.EnumHelper; //導入方法依賴的package包/類
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");
}
示例6: preInit
import net.minecraftforge.common.EnumHelper; //導入方法依賴的package包/類
@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);
}
示例7: load
import net.minecraftforge.common.EnumHelper; //導入方法依賴的package包/類
@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();
}