Guest User

Untitled

a guest
Jun 14th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. package com.micromod.item.armor;
  2.  
  3. import com.micromod.ModClass;
  4. import com.micromod.client.model.ModelHelmetArthas;
  5. import com.micromod.item.ModItems;
  6. import com.micromod.item.MyFood;
  7. import com.micromod.proxy.ClientProxy;
  8. import net.minecraft.client.model.ModelBiped;
  9. import net.minecraft.creativetab.CreativeTabs;
  10. import net.minecraft.entity.Entity;
  11. import net.minecraft.entity.EntityLiving;
  12. import net.minecraft.entity.EntityLivingBase;
  13. import net.minecraft.inventory.EntityEquipmentSlot;
  14. import net.minecraft.item.ItemArmor;
  15. import net.minecraft.item.ItemStack;
  16. import net.minecraftforge.fml.relauncher.Side;
  17. import net.minecraftforge.fml.relauncher.SideOnly;
  18.  
  19. public class ItemHelmet extends ItemArmor{
  20. public ItemHelmet(String name){
  21. super(ModClass.roflanMaterialArmor, 0, EntityEquipmentSlot.HEAD);
  22. this.setRegistryName(name);
  23. this.setUnlocalizedName(name);
  24. }
  25. @SideOnly(Side.CLIENT)
  26. @Override
  27. public String getArmorTexture(ItemStack stack, Entity entity, EntityEquipmentSlot slot, String type) {
  28. return "micromod:textures/armor/wk_texture.png";
  29. }
  30. @SideOnly(Side.CLIENT)
  31. @Override
  32. public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, EntityEquipmentSlot armorSlot, ModelBiped model){
  33. if (armorSlot != EntityEquipmentSlot.HEAD)
  34. return null;
  35. if (itemStack != null && itemStack.getItem() instanceof ItemHelmet){
  36. ModelBiped armorModel = new ModelHelmetArthas();
  37. return armorModel;
  38. }
  39. return null;
  40. }
  41.  
  42. @Override
  43. public ItemHelmet setCreativeTab(CreativeTabs tab){
  44. super.setCreativeTab(tab);
  45. return this;
  46. }
  47.  
  48. public void registerItemModel(){
  49. //......
  50. }
  51.  
  52. }
Add Comment
Please, Sign In to add comment