Files
mc/mods/pala/legacy-src-backup/net/paladrill/paladrillmod/item/ItemAmethystArmor.java
T

57 lines
3.0 KiB
Java

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 ItemAmethystArmor extends ElementsPaladrillmodMod.ModElement {
@GameRegistry.ObjectHolder("paladrillmod:amethystarmorhelmet")
public static final Item helmet = null;
@GameRegistry.ObjectHolder("paladrillmod:amethystarmorbody")
public static final Item body = null;
@GameRegistry.ObjectHolder("paladrillmod:amethystarmorlegs")
public static final Item legs = null;
@GameRegistry.ObjectHolder("paladrillmod:amethystarmorboots")
public static final Item boots = null;
public ItemAmethystArmor(ElementsPaladrillmodMod instance) {
super(instance, 10);
}
@Override
public void initElements() {
ItemArmor.ArmorMaterial enuma = EnumHelper.addArmorMaterial("AMETHYSTARMOR", "paladrillmod:methyst_rmor_", 15, new int[]{2, 5, 6, 2}, 9,
(net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("")), 0f);
elements.items.add(() -> new ItemArmor(enuma, 0, EntityEquipmentSlot.HEAD).setUnlocalizedName("amethystarmorhelmet")
.setRegistryName("amethystarmorhelmet").setCreativeTab(TabPalaDrillMod.tab));
elements.items.add(() -> new ItemArmor(enuma, 0, EntityEquipmentSlot.CHEST).setUnlocalizedName("amethystarmorbody")
.setRegistryName("amethystarmorbody").setCreativeTab(TabPalaDrillMod.tab));
elements.items.add(() -> new ItemArmor(enuma, 0, EntityEquipmentSlot.LEGS).setUnlocalizedName("amethystarmorlegs")
.setRegistryName("amethystarmorlegs").setCreativeTab(TabPalaDrillMod.tab));
elements.items.add(() -> new ItemArmor(enuma, 0, EntityEquipmentSlot.FEET).setUnlocalizedName("amethystarmorboots")
.setRegistryName("amethystarmorboots").setCreativeTab(TabPalaDrillMod.tab));
}
@SideOnly(Side.CLIENT)
@Override
public void registerModels(ModelRegistryEvent event) {
ModelLoader.setCustomModelResourceLocation(helmet, 0, new ModelResourceLocation("paladrillmod:amethystarmorhelmet", "inventory"));
ModelLoader.setCustomModelResourceLocation(body, 0, new ModelResourceLocation("paladrillmod:amethystarmorbody", "inventory"));
ModelLoader.setCustomModelResourceLocation(legs, 0, new ModelResourceLocation("paladrillmod:amethystarmorlegs", "inventory"));
ModelLoader.setCustomModelResourceLocation(boots, 0, new ModelResourceLocation("paladrillmod:amethystarmorboots", "inventory"));
}
}