Advertisement
Guest User

Chapeau

a guest
Jan 28th, 2015
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. package fr.yannblanc.aliceadsl.agriculcraft.common.items;
  2.  
  3. import net.minecraft.client.model.ModelBiped;
  4. import net.minecraft.entity.Entity;
  5. import net.minecraft.entity.EntityLivingBase;
  6. import net.minecraft.entity.player.EntityPlayer;
  7. import net.minecraft.item.ItemArmor;
  8. import net.minecraft.item.ItemStack;
  9. import net.minecraft.potion.Potion;
  10. import net.minecraft.potion.PotionEffect;
  11. import net.minecraft.world.World;
  12. import cpw.mods.fml.relauncher.Side;
  13. import cpw.mods.fml.relauncher.SideOnly;
  14. import fr.yannblanc.aliceadsl.agriculcraft.client.render.ModelChapeau;
  15. import fr.yannblanc.aliceadsl.agriculcraft.common.Modmain;
  16.  
  17. public class Chapeau extends ItemArmor
  18. {
  19. public ModelChapeau model;
  20.  
  21. public Chapeau(ArmorMaterial material, int type)
  22.  
  23. {
  24.  
  25. super(material, 0, type);
  26.  
  27.  
  28.  
  29. this.setCreativeTab(Modmain.AgriEVTab);
  30.  
  31. }
  32.  
  33. @Override
  34. public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type)
  35. {
  36. if(stack.getItem().equals(ACItems.Chapeau))
  37. {
  38. return "acev1:textures/armor/chapeau.png";
  39. }
  40. return "acev1:textures/blocks/empty.png";
  41. }
  42.  
  43. @Override
  44. @SideOnly(Side.CLIENT)
  45. public ModelBiped getArmorModel(EntityLivingBase entityliving, ItemStack stack, int armor)
  46. {
  47. return new ModelChapeau();
  48. }
  49.  
  50. private int tick = 40;
  51.  
  52. @SideOnly(Side.CLIENT)
  53. public void initModel()
  54. {
  55. if(model == null)
  56. {
  57. model = new ModelChapeau();
  58. }
  59.  
  60. }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement