Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 25 lines 656 B view raw
1package net.minecraft.server; 2 3public class ItemSaddle extends Item { 4 5 public ItemSaddle(int i) { 6 super(i); 7 this.maxStackSize = 1; 8 } 9 10 public void a(ItemStack itemstack, EntityLiving entityliving) { 11 if (entityliving instanceof EntityPig) { 12 EntityPig entitypig = (EntityPig) entityliving; 13 14 if (!entitypig.hasSaddle()) { 15 entitypig.setSaddle(true); 16 --itemstack.count; 17 } 18 } 19 } 20 21 public boolean a(ItemStack itemstack, EntityLiving entityliving, EntityLiving entityliving1) { 22 this.a(itemstack, entityliving); 23 return true; 24 } 25}