本文整理汇总了Java中net.minecraftforge.common.util.EnumHelper.addToolMaterial方法的典型用法代码示例。如果您正苦于以下问题:Java EnumHelper.addToolMaterial方法的具体用法?Java EnumHelper.addToolMaterial怎么用?Java EnumHelper.addToolMaterial使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraftforge.common.util.EnumHelper
的用法示例。
在下文中一共展示了EnumHelper.addToolMaterial方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MaterialDefinition
import net.minecraftforge.common.util.EnumHelper; //导入方法依赖的package包/类
@SerializationConstructor
public MaterialDefinition(@Name("color") Color color, @Name("name") String name, @Name("ore") OreComponent ore, @Name("components") List<CraftableComponent> craftables, @Name("properties") List<MaterialProperty> properties, @Name("abilities") AbilitySeries series) {
this.abilitySeries = series;
this.color = color;
this.ore = ore;
this.material = ore.getMaterial();
this.craftables = craftables;
this.name = name;
this.toolMaterial = EnumHelper.addToolMaterial(this.name, this.material.getHarvestLevel(), this.material.getMaxUses(), this.material.getEfficiency(), this.material.getDamage(), this.material.getEnchantability());
this.totalArmor = sum(this.material.getArmorReduction());
this.armorMaterial = EnumHelper.addArmorMaterial(this.name, "randores:armor", this.material.getMaxUses() / 10, this.material.getArmorReduction(), this.material.getEnchantability(), SoundEvents.ITEM_ARMOR_EQUIP_IRON, this.material.getToughness());
this.components = new ArrayList<>();
this.components.addAll(this.craftables);
this.components.add(this.ore);
this.components.add(this.material);
this.propertiesList = properties;
this.properties = new HashMap<>();
for (MaterialProperty property : properties) {
this.properties.put(property.name(), property);
}
}
示例2: setupMaterials
import net.minecraftforge.common.util.EnumHelper; //导入方法依赖的package包/类
private static void setupMaterials() {
// regular materials
advancedWood = EnumHelper.addToolMaterial("advancedWood", 1, 236, 8.0F, 1.75F, 8);
(advancedStone = EnumHelper.addToolMaterial("advancedStone", 2, 524, 12.0F, 3.0F, 3)).setRepairItem(new ItemStack(ACBlocks.advancedStone));
(advancedIron = EnumHelper.addToolMaterial("advancedIron", 3, 2250, 18.0F, 10.0F, 7)).setRepairItem(new ItemStack(Blocks.IRON_BLOCK));
(advancedGold = EnumHelper.addToolMaterial("advancedGold", 2, 1561, 8.0F, 6.0F, 15)).setRepairItem(new ItemStack(Blocks.GOLD_BLOCK));
(advancedEmerald = EnumHelper.addToolMaterial("advancedEmerald", 4, 3122, 12.0F, ACConfig.emeraldSwordDamage - 4, 22)).setRepairItem(new ItemStack(Blocks.EMERALD_BLOCK));
(advancedDiamond = EnumHelper.addToolMaterial("advancedDiamond", 4, 8192, 24.0F, 20.0F, 5)).setRepairItem(new ItemStack(Blocks.DIAMOND_BLOCK));
(netherStar = EnumHelper.addToolMaterial("netherStar", 4, 9366, 20.0F, 26.0F, 1)).setRepairItem(new ItemStack(Items.NETHER_STAR));
(advancedNetherStar = EnumHelper.addToolMaterial("advancedNetherStar", 5, 16384, 30.0F, 56.0F, 0)).setRepairItem(new ItemStack(ACBlocks.netherStarBlock));
creative = EnumHelper.addToolMaterial("creative_", 1000, 1, 0, 0, 0);
// thaumic materials
// advancedThaumium = EnumHelper.addToolMaterial("advancedThaumium", 3, 2250, 18.0F, 11.0F, 12);
// advancedElemental = EnumHelper.addToolMaterial("advancedElemental", 4, 6144, 24.0F, 22.0F, 8);
// advancedVoid = EnumHelper.addToolMaterial("advancedVoid", 4, 524, 18.0F, 24.0F, 12);
// advancedCrimson = EnumHelper.addToolMaterial("advancedCrimson", 4, 668, 20.0F, 30.0F, 12);
// advancedPrimal = EnumHelper.addToolMaterial("advancedPrimal", 5, 937, 22.0F, 36.0F, 12);
// if(ASModIntegration.thaumcraftExists) {
// advancedThaumium.setRepairItem(new ItemStack(BlocksTC.metal, 1, 0));
// advancedVoid.setRepairItem(new ItemStack(BlocksTC.metal, 1, 1));
// }
}
示例3: initItems
import net.minecraftforge.common.util.EnumHelper; //导入方法依赖的package包/类
@Override
public void initItems() {
venusItem = new ItemBasics("venusItem", VenusCore.instance.prefixTexture, new String[] {
"sulfurDust",
"ingotSulfur",
"ruby",
"ingotUranium",
"pellucidum",
"sulfurPlate",
"rubyPlate",
"uraniumPlate",
"tier4HeavyDutyPlate",
"venusRod",
"venusRodDust",
"powerPellucidum",
"ventBerry",
});
batteryUranium = new ItemBattery(VenusCore.instance.prefixTexture, "batteryUranium", 75000.0f);
batterySulfur = new ItemBattery(VenusCore.instance.prefixTexture, "batterySulfur", 17500.0f);
armourRuby = new ItemSetArmour(VenusCore.instance.prefixTexture, EnumHelper.addArmorMaterial("ruby", 30, new int[] { 3, 8, 6, 3 }, 12));
armourSulfur = new ItemSetArmour(VenusCore.instance.prefixTexture, EnumHelper.addArmorMaterial("sulfur", 15, new int[] { 1, 4, 2, 1 }, 7));
toolsRuby = new ItemSetTools(VenusCore.instance.prefixTexture, EnumHelper.addToolMaterial("ruby", 3, 768, 5.0f, 2, 8));
toolsSulfur = new ItemSetTools(VenusCore.instance.prefixTexture, EnumHelper.addToolMaterial("sulfur", 3, 416, 6.0f, 1, 2));
}
示例4: init
import net.minecraftforge.common.util.EnumHelper; //导入方法依赖的package包/类
private void init() {
teambattleingotraw = new ItemTeambattleIngot().setUnlocalizedName("teambattleingotraw").setCreativeTab(TeambattleMod.tab);
teambattleingot = new ItemTeambattleIngot().setUnlocalizedName("teambattleingot").setCreativeTab(TeambattleMod.tab);
teambattletool = EnumHelper.addToolMaterial("TEAMBATTLE", 3, 50000000, 10.0F, 5.0F, 25);
teambattlearmor = EnumHelper.addArmorMaterial("TEAMBATTLE", "", 3125000, new int[] { 3, 8, 6, 3 }, 25);
teambattletool.setRepairItem(new ItemStack(teambattleingot));
teambattlearmor.customCraftingMaterial = teambattleingot;
teambattlesword = new ItemTeambattleSword(teambattletool).setUnlocalizedName("teambattlesword").setCreativeTab(TeambattleMod.tab);
teambattlepickaxe = new ItemTeambattlePickaxe(teambattletool).setUnlocalizedName("teambattlepickaxe").setCreativeTab(TeambattleMod.tab);
teambattleshovel = new ItemTeambattleShovel(teambattletool).setUnlocalizedName("teambattleshovel").setCreativeTab(TeambattleMod.tab);
teambattlebow = new ItemTeambattleBow().setUnlocalizedName("teambattlebow").setCreativeTab(TeambattleMod.tab);
teambattlehelmet = new ItemTeambattleArmor(teambattlearmor, 0).setUnlocalizedName("teambattlehelmet").setCreativeTab(TeambattleMod.tab);
teambattlechestplate = new ItemTeambattleArmor(teambattlearmor, 1).setUnlocalizedName("teambattlechestplate").setCreativeTab(TeambattleMod.tab);
teambattleleggings = new ItemTeambattleArmor(teambattlearmor, 2).setUnlocalizedName("teambattleleggings").setCreativeTab(TeambattleMod.tab);
teambattleboots = new ItemTeambattleArmor(teambattlearmor, 3).setUnlocalizedName("teambattleboots").setCreativeTab(TeambattleMod.tab);
teambattlebackpack = new ItemTeambattleBackpack().setUnlocalizedName("teambattlebackpack").setCreativeTab(TeambattleMod.tab);
teambattlehangglider = new ItemTeambattleHangglider().setUnlocalizedName("teambattlehangglider").setCreativeTab(TeambattleMod.tab);
}
示例5: setupMaterials
import net.minecraftforge.common.util.EnumHelper; //导入方法依赖的package包/类
/** Set up tool and armor materials */
private static void setupMaterials() {
// tools
elecMat = EnumHelper.addToolMaterial("Electricium", 4, 3000, 14.0f, 5.0f, 22);
elecHammerMat = EnumHelper.addToolMaterial("Electricium Hammer", 4, 3500, 16.0f, 9.0f, 22);
skyMat = EnumHelper.addToolMaterial("Skyfather", 5, 3500, 18.0f, 6.5f, 30);
skyHammerMat = EnumHelper.addToolMaterial("Skyfather Hammer", 5, 3500, 18.0f, 12.0f, 30);
mysticMat = EnumHelper.addToolMaterial("Mystic", 6, 4000, 18.0f, 8.0f, 30);
mysticHammerMat = EnumHelper.addToolMaterial("Mystic Hammer", 6, 4000, 18.0f, 15.0f, 30);
kineticMat = EnumHelper.addToolMaterial("Kinetic Shard", 3, 100, 1.0f, 0.0f, 1);
// special tools
soulMat = EnumHelper.addToolMaterial("Soul", 1, 150, 4.0F, 1.5F, 10);
zombieMat = EnumHelper.addToolMaterial("Zombie", 1, 131, 4.0F, 1.0F, 10);
featherMat = EnumHelper.addToolMaterial("Feather", 1, 131, 4.0F, 1.0F, 10);
enderMat = EnumHelper.addToolMaterial("Ender", 1, 200, 4.0F, 1.5F, 10);
blazeMat = EnumHelper.addToolMaterial("Blaze", 1, 150, 4.0F, 1.0F, 10);
iceMat = EnumHelper.addToolMaterial("Ice", 1, 100, 4.0F, 0.5F, 10);
// armor
elecArmor = ArmorHelper.addArmorMaterial("Electricium", RefStrings.MODID + ":elecArmor", 40, new int[]{3, 6, 8, 4}, 25, SoundEvents.ITEM_ARMOR_EQUIP_GOLD, 2F);
skyArmor = ArmorHelper.addArmorMaterial("Skyfather", RefStrings.MODID + ":skyArmor", 50, new int[]{3, 7, 8, 4}, 20, SoundEvents.ITEM_ARMOR_EQUIP_GOLD, 2.5F);
mysticArmor = ArmorHelper.addArmorMaterial("Mystic", RefStrings.MODID + ":mysticArmor", 60, new int[]{4, 7, 8, 4}, 15, SoundEvents.ITEM_ARMOR_EQUIP_GOLD, 3F);
kineticArmor = ArmorHelper.addArmorMaterial("Kinetic", RefStrings.MODID + ":kineticArmor", 4, new int[]{1, 3, 5, 2}, 1, SoundEvents.ITEM_ARMOR_EQUIP_GOLD, 0F);
}
示例6: registerPurpleMaterial
import net.minecraftforge.common.util.EnumHelper; //导入方法依赖的package包/类
private static void registerPurpleMaterial() {
ArmorMaterial mimicArmor = ArmorMaterial.DIAMOND;
MaterialRegistry.powerArmorMaterial = EnumHelper.addArmorMaterial(MATERIALNAME, Const.MODRES + MATERIALNAME,
diamondDurability * 2, // affects DURABILITY . 15 is the same as iron
new int[] {
mimicArmor.getDamageReductionAmount(EntityEquipmentSlot.FEET) + 1,
mimicArmor.getDamageReductionAmount(EntityEquipmentSlot.LEGS) + 1,
mimicArmor.getDamageReductionAmount(EntityEquipmentSlot.CHEST) + 1,
mimicArmor.getDamageReductionAmount(EntityEquipmentSlot.HEAD) + 2
},
mimicArmor.getEnchantability() / 4,
mimicArmor.getSoundEvent(),
mimicArmor.getToughness() + 2);
MaterialRegistry.powerArmorMaterial.repairMaterial = new ItemStack(Blocks.OBSIDIAN);
//now the tool material
MaterialRegistry.powerToolMaterial = EnumHelper.addToolMaterial(MATERIALNAME,
ToolMaterial.DIAMOND.getHarvestLevel(),
ToolMaterial.DIAMOND.getMaxUses() * 4, //was - 261
ToolMaterial.DIAMOND.getEfficiencyOnProperMaterial(),
ToolMaterial.DIAMOND.getDamageVsEntity() * 8, //best draconic evolution sword is 35 base, so this is not that crazy
ToolMaterial.GOLD.getEnchantability() * 2);
MaterialRegistry.powerToolMaterial.setRepairItem(MaterialRegistry.powerArmorMaterial.repairMaterial);
}
示例7: registerEmeraldMaterial
import net.minecraftforge.common.util.EnumHelper; //导入方法依赖的package包/类
private static void registerEmeraldMaterial() {
MaterialRegistry.emeraldArmorMaterial = EnumHelper.addArmorMaterial(emeraldName, Const.MODRES + emeraldName,
diamondDurability + 30, //was -2 affects DURABILITY
new int[] {
ArmorMaterial.DIAMOND.getDamageReductionAmount(EntityEquipmentSlot.FEET),
ArmorMaterial.DIAMOND.getDamageReductionAmount(EntityEquipmentSlot.LEGS),
ArmorMaterial.DIAMOND.getDamageReductionAmount(EntityEquipmentSlot.CHEST),
ArmorMaterial.DIAMOND.getDamageReductionAmount(EntityEquipmentSlot.HEAD)
},
ArmorMaterial.GOLD.getEnchantability(),
ArmorMaterial.DIAMOND.getSoundEvent(),
ArmorMaterial.DIAMOND.getToughness() + 1);//was / 2
MaterialRegistry.emeraldArmorMaterial.repairMaterial = new ItemStack(Items.EMERALD);
//max uses is durability ex The number of uses this material allows.
//as of 1.9.4 : (wood = 59, stone = 131, iron = 250, diamond = 1561, gold = 32)
MaterialRegistry.emeraldToolMaterial = EnumHelper.addToolMaterial(emeraldName,
ToolMaterial.DIAMOND.getHarvestLevel(),
ToolMaterial.DIAMOND.getMaxUses(), //was - 261
ToolMaterial.DIAMOND.getEfficiencyOnProperMaterial(),
ToolMaterial.DIAMOND.getDamageVsEntity(), //was - 0.25F
ToolMaterial.GOLD.getEnchantability());
MaterialRegistry.emeraldToolMaterial.setRepairItem(MaterialRegistry.emeraldArmorMaterial.repairMaterial);
}
示例8: initializeItems
import net.minecraftforge.common.util.EnumHelper; //导入方法依赖的package包/类
public static void initializeItems(){
timeToolMaterial = EnumHelper.addToolMaterial("timeToolMaterial", 6, 1620, 8.0F, 4.0F, 7);
pheromoneArmor = EnumHelper.addArmorMaterial("pheromoneArmor", 12, new int[]{2, 4, 2, 1}, 9);
fossil_Shard = new Item().setUnlocalizedName("iat.fossil_Shard").setTextureName("iat:fossil").setCreativeTab(ItsAboutTime.iatTab);
rockPick = new ItemRockPick().setUnlocalizedName("iat.rockPick").setTextureName("iat:rockPick").setCreativeTab(ItsAboutTime.iatTab);
fossil_Broken = new ItemFossilBroken().setUnlocalizedName("iat.fossil_Broken").setCreativeTab(ItsAboutTime.iatTab);
fossil = new ItemFossil().setUnlocalizedName("iat.fossil").setCreativeTab(ItsAboutTime.iatTab);
for (int i = 0; i < EnumFossilSkeleton.values().length; i++) {
EnumFossilSkeleton.values()[i].fossilItem = new Item().setTextureName("iat:fossil").setUnlocalizedName("iat.fossil" + EnumFossilSkeleton.values()[i].name).setCreativeTab(ItsAboutTime.iatTab);
EnumFossilSkeleton.values()[i].fossilBrokenItem = new Item().setTextureName("iat:fossil").setUnlocalizedName("iat.fossil_Broken" + EnumFossilSkeleton.values()[i].name).setCreativeTab(ItsAboutTime.iatTab);
}
amber = new ItemAmber().setUnlocalizedName("iat.amber").setCreativeTab(ItsAboutTime.iatTab);
plaster_Ball = new Item().setUnlocalizedName("iat.plaster_Ball").setTextureName("iat:plaster").setCreativeTab(ItsAboutTime.iatTab);
time_Crystal = new ItemTimeCrystal().setUnlocalizedName("iat.time_Crystal").setTextureName("iat:time_Crystal").setCreativeTab(ItsAboutTime.iatTab);
time_Shovel = new ItemModSpade(timeToolMaterial).setUnlocalizedName("iat.time_Shovel").setTextureName("iat:time_Shovel").setCreativeTab(ItsAboutTime.iatTab);
time_Pickaxe = new ItemModPickaxe(timeToolMaterial).setUnlocalizedName("iat.time_Pickaxe").setTextureName("iat:time_Pickaxe").setCreativeTab(ItsAboutTime.iatTab);
time_Axe = new ItemModAxe(timeToolMaterial).setUnlocalizedName("iat.time_Axe").setTextureName("iat:time_Axe").setCreativeTab(ItsAboutTime.iatTab);
time_Sword = new ItemSword(timeToolMaterial).setUnlocalizedName("iat.time_Sword").setTextureName("iat:time_Sword").setCreativeTab(ItsAboutTime.iatTab);
time_Hoe = new ItemHoe(timeToolMaterial).setUnlocalizedName("iat.time_Hoe").setTextureName("iat:time_Hoe").setCreativeTab(ItsAboutTime.iatTab);
pheromoneChest = new ItemPheromoneArmor(pheromoneArmor, 0, 1).setUnlocalizedName("iat.pheromoneCanester").setTextureName("iat:pheromoneCanester").setCreativeTab(ItsAboutTime.iatTab);
bucket_Time = new ItemBucket(ModBlocks.fluidTimeBlock).setUnlocalizedName("iat.bucket_Time").setTextureName("iat:bucket_Time").setContainerItem(Items.bucket);
ginkoNuts = new ItemFood(2, 0.2F, false).setPotionEffect(Potion.hunger.id, 30, 0, 0.3F).setUnlocalizedName("iat.ginkoNut").setTextureName("iat:ginko_nut").setCreativeTab(ItsAboutTime.iatTab);
}
示例9: registerMaterial
import net.minecraftforge.common.util.EnumHelper; //导入方法依赖的package包/类
protected static void registerMaterial(String name, MetalMaterial m){
allMaterials.put(name, m);
String enumName = m.getEnumName();
String texName = m.getName();
int[] protection = m.getDamageReductionArray();
int durability = m.getArmorMaxDamageFactor();
ArmorMaterial am = EnumHelper.addArmorMaterial(enumName, texName, durability, protection, m.getEnchantability(), SoundEvents.ITEM_ARMOR_EQUIP_IRON, (m.hardness > 10 ? (int)(m.hardness / 5) : 0));
if(am == null){
// uh-oh
FMLLog.severe("Failed to create armor material enum for "+m);
}
armorMaterialMap.put(m, am);
FMLLog.info("Created armor material enum "+am);
ToolMaterial tm = EnumHelper.addToolMaterial(enumName, m.getToolHarvestLevel(), m.getToolDurability(), m.getToolEfficiency(), m.getBaseAttackDamage(), m.getEnchantability());
if(tm == null){
// uh-oh
FMLLog.severe("Failed to create tool material enum for "+m);
}
toolMaterialMap.put(m, tm);
FMLLog.info("Created tool material enum "+tm);
}
示例10: init
import net.minecraftforge.common.util.EnumHelper; //导入方法依赖的package包/类
public static void init(){
// EnumTools
toolAquamarine = EnumHelper.addToolMaterial("AQUAMARINE", 3, 3644, 6.5F, 3, 23);
toolTin = EnumHelper.addToolMaterial("TIN", 1, 150, 2.5F, 1, 9);
toolCopper = EnumHelper.addToolMaterial("COPPER", 1, 150, 2.5F, 1, 9);
toolChromite = EnumHelper.addToolMaterial("CHROMITE", 3, 1524, 20.0F, 3, 23);
toolTanzanite = EnumHelper.addToolMaterial("TANZANITE", 3, 1648, 7.5F, 3, 23);
toolBronze = EnumHelper.addToolMaterial("BRONZE", 2, 408, 5.0F, 2, 14);
toolSilver = EnumHelper.addToolMaterial("SILVER", 3, 230, 10.0F, 3, 20);
toolSteel = EnumHelper.addToolMaterial("STEEL", 4, 2104, 11.5F, 4, 15);
toolCobalt = EnumHelper.addToolMaterial("COBALT", 4, 2040, 11.0F, 4, 13);
toolFyrised = EnumHelper.addToolMaterial("FYRISED", 5, 3216, 14.0F, 5, 12);
// EnumArmors
Bronze_Armor = EnumHelper.addArmorMaterial("BRONZE", 10, new int[]{2, 6, 3, 1}, 16);
Slime_Armor = EnumHelper.addArmorMaterial("SLIME", 8, new int[]{2, 4, 3, 2}, 5);
Silver_Armor = EnumHelper.addArmorMaterial("SILVER", 12, new int[]{3, 7, 4, 2}, 23);
Steel_Armor = EnumHelper.addArmorMaterial("STEEL", 38, new int[]{4, 8, 6, 3}, 9);
Cobalt_Armor = EnumHelper.addArmorMaterial("COBALT", 38, new int[]{4, 8, 5, 3}, 9);
Fyrised_Armor = EnumHelper.addArmorMaterial("FYRISED", 45, new int[]{5, 9, 6, 4}, 10);
//EnumTools for War Axes
toolWaraxe = EnumHelper.addToolMaterial("Waraxe", 4, 2144, 12.0F, 8, 10);
System.out.println("[Soul Forest] Materials initialized");
}
示例11: SoulHarsherPickaxe
import net.minecraftforge.common.util.EnumHelper; //导入方法依赖的package包/类
public SoulHarsherPickaxe()
{
super(EnumHelper.addToolMaterial("soul_harsher_pickaxe", 3, 2000, 13.5f, 2.5f, 30));
setUnlocalizedName("soul_harsher_pickaxe");
setRegistryName("soul_harsher_pickaxe");
setNoRepair();
}
示例12: load
import net.minecraftforge.common.util.EnumHelper; //导入方法依赖的package包/类
public static void load()
{
Item.ToolMaterial compositeToolMaterial = EnumHelper.addToolMaterial("CG_COMPOSITE", 2, 1800, 6.0F, 2.0F, 13);
Item.ToolMaterial compositeDaggerMaterial = EnumHelper.addToolMaterial("CG_COMPOSITE_DAGGER", 2, 600, 6.0F, 0.0F, 15);
// TODO: Solve this garbage with materials.
ItemArmor.ArmorMaterial accessoryArmorMaterial = EnumHelper.addArmorMaterial("CG_ACCESSORY", null, 100, new int[] { 1, 2, 2, 1 }, 15, null, 0);
ItemArmor.ArmorMaterial compositeMaskArmorMaterial = EnumHelper.addArmorMaterial("CG_MASK_COMPOSITE", null, 50, new int[] { 3, 9, 6, 3 }, 12, null, 0);
ItemArmor.ArmorMaterial compositeArmorMaterial = EnumHelper.addArmorMaterial("CG_COMPOSITE", null, 50, new int[] { 3, 9, 6, 3 }, 12, null, 0);
// Armor
compositeHelmet = new ItemCompositeArmor("composite_helmet", compositeArmorMaterial, COMPOSITE_NAME, 0, EntityEquipmentSlot.HEAD).setDefaultColor(8815987).setRarity(EnumRarity.UNCOMMON);
compositeChestplate = new ItemCompositeArmor("composite_chestplate", compositeArmorMaterial, COMPOSITE_NAME , 0, EntityEquipmentSlot.CHEST).setDefaultColor(8815987).setRarity(EnumRarity.UNCOMMON);
compositeLeggings = new ItemCompositeArmor("composite_leggings", compositeArmorMaterial, COMPOSITE_NAME, 0, EntityEquipmentSlot.LEGS).setDefaultColor(8815987).setRarity(EnumRarity.UNCOMMON);
compositeBoots = new ItemCompositeArmor("composite_boots", compositeArmorMaterial, COMPOSITE_NAME, 0, EntityEquipmentSlot.FEET).setDefaultColor(8815987).setRarity(EnumRarity.UNCOMMON);
// Respirators
respiratorHalfMask = new ItemCGArmor("respirator_halfmask", accessoryArmorMaterial, "respirator_halfmask", 0, EntityEquipmentSlot.HEAD)
.setItemClass(EnumItemClass.ACCESSORY_ARMOR).setAirMask(true).setMinAir(80);
respiratorMask = new ItemCGArmor("respirator_mask", accessoryArmorMaterial, "respirator_mask", 0, EntityEquipmentSlot.HEAD)
.setItemClass(EnumItemClass.ACCESSORY_ARMOR).setAirMask(true).setMinAir(20).setMaxDamage(150);
respiratorMaskComposite = new ItemCGArmor("respirator_mask_composite", compositeMaskArmorMaterial, "respirator_mask_composite", 0, EntityEquipmentSlot.HEAD)
.setItemClass(EnumItemClass.LIGHT_ARMOR).setAirMask(true).setMinAir(20).setRarity(EnumRarity.UNCOMMON).setMaxDamage(200);
// Decorative
ushankaHat = new ItemCompositeArmor("ushanka_hat", accessoryArmorMaterial, "ushanka_hat", 0, EntityEquipmentSlot.HEAD).setDefaultColor(8487297)
.setItemClass(EnumItemClass.ACCESSORY_ARMOR).setHasDescription(true).setMaxDamage(300);
balaclavaMask = new ItemCompositeArmor("balaclava_mask", accessoryArmorMaterial, "balaclava_mask", 0, EntityEquipmentSlot.HEAD).setDefaultColor(8487297)
.setItemClass(EnumItemClass.ACCESSORY_ARMOR).setHasDescription(true);
shemaghMask = new ItemCompositeArmor("shemagh_mask", accessoryArmorMaterial, "shemagh_mask", 0, EntityEquipmentSlot.HEAD).setDefaultColor(8487297)
.setHasOverlayIcon(true).setItemClass(EnumItemClass.ACCESSORY_ARMOR).setHasDescription(true);
// Weapons
compositeSword = new ItemCGSword("composite_sword", compositeToolMaterial);
compositeDagger = new ItemCGSword("composite_dagger", compositeDaggerMaterial);
compositeBow = new ItemCGBow("composite_bow", 2000, 15);
if (CompositeGear.proxy.isClient()) {
registerMultiItem(compositeSword, "composite_sword", "items/tool/generic");
registerMultiItem(compositeDagger, "composite_dagger", "items/tool/generic");
registerItemModel(compositeBow, "tool/composite_bow");
}
}
示例13: preInitialize
import net.minecraftforge.common.util.EnumHelper; //导入方法依赖的package包/类
@EventHandler
public void preInitialize(FMLPreInitializationEvent e)
{
instance = this;
// Load our settings
proxy.loadOptions();
proxy.registerTickHandler();
ModBlocks.initialise();
FluidList.register();
// Register Key Bindings(Client only)
proxy.registerKeys();
// Register KeyBinding Handler (Client only)
proxy.registerKeyBindingHandler();
// Register Handler (Client only)
proxy.registerHandlers();
// Register Tile Entities
proxy.registerTileEntities(true);
// Register Sound Handler (Client only)
proxy.registerSoundHandler();
woodenClubMaterial = EnumHelper.addToolMaterial("woodenClub", 1, 120, 2, 80, 5);
ModItems.initialise();
// Register Gui Handler
proxy.registerGuiHandler();
// proxy.registerWailaHandler();
}
示例14: initItems
import net.minecraftforge.common.util.EnumHelper; //导入方法依赖的package包/类
@Override
public void initItems() {
mercuryItem = new ItemBasics("mercuryItem", MercuryCore.instance.prefixTexture, new String[] {
"iridiumCrystals",
"iridiumPlate",
});
armourIridium = new ItemSetArmour(MercuryCore.instance.prefixTexture, EnumHelper.addArmorMaterial("iridium", 15, new int[] { 1, 4, 2, 1 }, 7));
toolsIridium = new ItemSetTools(MercuryCore.instance.prefixTexture, EnumHelper.addToolMaterial("iridium", 3, 416, 6.0f, 1, 2));
}
示例15: obsidianMaterial
import net.minecraftforge.common.util.EnumHelper; //导入方法依赖的package包/类
protected static void obsidianMaterial() {
int harvestLevel = 3;
int durability = 10;
float miningSpeed = 10f;
float damageVsEntities = 20f;
int enchantability = 12;
OBSIDIAN_MATERIAL = EnumHelper.addToolMaterial("OBSIDIAN", harvestLevel, durability, miningSpeed, damageVsEntities, enchantability);
OBSIDIAN_MATERIAL.setRepairItem(new ItemStack(Blocks.OBSIDIAN));
}