Advertisement
O3Bubbles09

Untitled

Feb 13th, 2013
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. package O3Bubbles09.mod.Common;
  2.  
  3. import net.minecraft.creativetab.CreativeTabs;
  4. import net.minecraft.entity.EntityLiving;
  5. import net.minecraft.entity.player.EntityPlayer;
  6. import net.minecraft.item.EnumArmorMaterial;
  7. import net.minecraft.item.ItemArmor;
  8. import net.minecraft.item.ItemStack;
  9. import net.minecraft.util.DamageSource;
  10. import net.minecraft.world.World;
  11. import net.minecraftforge.common.IArmorTextureProvider;
  12. import net.minecraftforge.common.ISpecialArmor;
  13.  
  14. public class ItemmodArmorBoots extends ItemArmor implements IArmorTextureProvider {
  15.  
  16. public ItemmodArmorBoots(int id, EnumArmorMaterial EAM, int par1, int par2) {
  17. super(id, EAM, par1, par2);
  18. this.setCreativeTab(O3Bubbles09Main.O3ArmorTab);
  19. }
  20.  
  21. public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack itemStack) {
  22. if(!world.isRemote) {
  23. ItemStack helm = player.inventory.armorItemInSlot(0);
  24.  
  25. if(helm.itemID == O3Bubbles09Main.copperBoots.itemID) {
  26. System.out.println("Activated");
  27. player.fallDistance = 0.0F;
  28. }
  29. }
  30. }
  31.  
  32. public String getArmorTextureFile(ItemStack itemstack) {
  33. O3Bubbles09Main bubs = new O3Bubbles09Main();
  34. if (itemstack.itemID == bubs.copperHelm.itemID
  35. || itemstack.itemID == bubs.copperChest.itemID
  36. || itemstack.itemID == bubs.copperBoots.itemID) {
  37. return "/O3Bubbles09/mod/Common/copperArmour_1.png";
  38. }
  39. if (itemstack.itemID == bubs.copperLegs.itemID) {
  40. return "/O3Bubbles09/mod/Common/copperArmour_2.png";
  41. }
  42. return "/O3Bubbles09/mod/Common/copperArmour_2.png";
  43. }
  44.  
  45. public String getTextureFile() {
  46. return CommonProxy.ITEMS;
  47. }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement