package net.paladrill.paladrillmod.item; import net.paladrill.paladrillmod.creativetab.TabPalaDrillMod; import net.paladrill.paladrillmod.ElementsPaladrillmodMod; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.client.event.ModelRegistryEvent; import net.minecraft.util.ResourceLocation; import net.minecraft.item.ItemArmor; import net.minecraft.item.Item; import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.client.renderer.block.model.ModelResourceLocation; @ElementsPaladrillmodMod.ModElement.Tag public class ItemTitaneArmor extends ElementsPaladrillmodMod.ModElement { @GameRegistry.ObjectHolder("paladrillmod:titanearmorhelmet") public static final Item helmet = null; @GameRegistry.ObjectHolder("paladrillmod:titanearmorbody") public static final Item body = null; @GameRegistry.ObjectHolder("paladrillmod:titanearmorlegs") public static final Item legs = null; @GameRegistry.ObjectHolder("paladrillmod:titanearmorboots") public static final Item boots = null; public ItemTitaneArmor(ElementsPaladrillmodMod instance) { super(instance, 36); } @Override public void initElements() { ItemArmor.ArmorMaterial enuma = EnumHelper.addArmorMaterial("TITANEARMOR", "paladrillmod:titane", 18, new int[]{2, 5, 7, 2}, 12, (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("")), 1f); elements.items.add(() -> new ItemArmor(enuma, 0, EntityEquipmentSlot.HEAD).setUnlocalizedName("titanearmorhelmet") .setRegistryName("titanearmorhelmet").setCreativeTab(TabPalaDrillMod.tab)); elements.items.add(() -> new ItemArmor(enuma, 0, EntityEquipmentSlot.CHEST).setUnlocalizedName("titanearmorbody") .setRegistryName("titanearmorbody").setCreativeTab(TabPalaDrillMod.tab)); elements.items.add(() -> new ItemArmor(enuma, 0, EntityEquipmentSlot.LEGS).setUnlocalizedName("titanearmorlegs") .setRegistryName("titanearmorlegs").setCreativeTab(TabPalaDrillMod.tab)); elements.items.add(() -> new ItemArmor(enuma, 0, EntityEquipmentSlot.FEET).setUnlocalizedName("titanearmorboots") .setRegistryName("titanearmorboots").setCreativeTab(TabPalaDrillMod.tab)); } @SideOnly(Side.CLIENT) @Override public void registerModels(ModelRegistryEvent event) { ModelLoader.setCustomModelResourceLocation(helmet, 0, new ModelResourceLocation("paladrillmod:titanearmorhelmet", "inventory")); ModelLoader.setCustomModelResourceLocation(body, 0, new ModelResourceLocation("paladrillmod:titanearmorbody", "inventory")); ModelLoader.setCustomModelResourceLocation(legs, 0, new ModelResourceLocation("paladrillmod:titanearmorlegs", "inventory")); ModelLoader.setCustomModelResourceLocation(boots, 0, new ModelResourceLocation("paladrillmod:titanearmorboots", "inventory")); } }