本文整理匯總了Java中net.minecraftforge.common.util.EnumHelper.addArmorMaterial方法的典型用法代碼示例。如果您正苦於以下問題:Java EnumHelper.addArmorMaterial方法的具體用法?Java EnumHelper.addArmorMaterial怎麽用?Java EnumHelper.addArmorMaterial使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraftforge.common.util.EnumHelper
的用法示例。
在下文中一共展示了EnumHelper.addArmorMaterial方法的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: 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));
}
示例3: 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);
}
示例4: 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);
}
示例5: 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);
}
示例6: 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);
}
示例7: 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);
}
示例8: register
import net.minecraftforge.common.util.EnumHelper; //導入方法依賴的package包/類
@Override
public void register()
{
super.register();
EnumHelper.addArmorMaterial(getMaterialName(), 0, protectionDisplays, enchantability); // dummy, used for enchantability
items = new Item[4];
for (int i = 0; i <= 3; i++)
{
if (ArrayUtils.contains(armors, i))
{
items[i] = new ItemCustomArmor(this, i);
GameRegistry.registerItem(items[i], name + names[i]);
addOreDictNames(new ItemStack(items[i]));
}
}
types.add(this);
}
示例9: 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");
}
示例10: Elytra
import net.minecraftforge.common.util.EnumHelper; //導入方法依賴的package包/類
public Elytra() {
super(EnumHelper.addArmorMaterial("elytra", 27, new int[] { 0, 0, 0, 0 }, 0), 0, 1);
setMaxDamage(432);
setMaxStackSize(1);
setTextureName("elytra");
setUnlocalizedName(Utils.getUnlocalisedName("elytra"));
setCreativeTab(EtFuturum.enableElytra ? EtFuturum.creativeTab : null);
}
示例11: 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");
}
}
示例12: addMaterials
import net.minecraftforge.common.util.EnumHelper; //導入方法依賴的package包/類
/** add the needed materials */
private static void addMaterials() {
wood = EnumHelper.addArmorMaterial("Wood Log", RefStrings.MODID + ":wood", 6, new int[]{1, 3, 4, 1}, 5, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC, 0);
stone = EnumHelper.addArmorMaterial("Stone", RefStrings.MODID + ":stone", 11, new int[]{2, 4, 5, 2}, 8, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC, 0);
nether = EnumHelper.addArmorMaterial("Nether", RefStrings.MODID + ":nether", 33, new int[]{3, 5, 7, 3}, 8, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC, 2.5F);
obsidian = EnumHelper.addArmorMaterial("Obsidian", RefStrings.MODID + ":obsidian", 88, new int[]{3, 6, 8, 4}, 8, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC, 4);
stone.setRepairItem(new ItemStack(ACBlocks.advancedStone));
nether.setRepairItem(new ItemStack(ACBlocks.netherFortressBlock));
obsidian.setRepairItem(new ItemStack(ACBlocks.reinforcedObsidian));
}
示例13: 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));
}
示例14: ItemTrollHelmet
import net.minecraftforge.common.util.EnumHelper; //導入方法依賴的package包/類
public ItemTrollHelmet()
{
super(EnumHelper.addArmorMaterial("Troll", 5000, new int[] { 0, 0, 0, 0 }, 1000), 0, 0);
setCreativeTab(RivalRebels.rrarmortab);
setMaxDamage(5000);
maxStackSize = 64;
}
示例15: getMaterial
import net.minecraftforge.common.util.EnumHelper; //導入方法依賴的package包/類
public static ArmorMaterial getMaterial() {
if(ninjaCloth == null) {
ninjaCloth = EnumHelper.addArmorMaterial("ninjaCloth", "ninja_cloth", 15, new int[]{2, 3, 4, 2}, 12, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 1.0F);
if(ninjaCloth != null) {
ninjaCloth.repairMaterial = new ItemStack(Blocks.WOOL, 1, OreDictionary.WILDCARD_VALUE);
}
}
return ninjaCloth == null ? ArmorMaterial.LEATHER : ninjaCloth;
}