Tweaked how the Air Orb takes damage.

This commit is contained in:
allstar69 2013-06-28 18:31:11 -07:00
commit a958f31454

View file

@ -21,17 +21,12 @@ public class ItemOrbAir extends Item {
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer)
{
world.playSoundEffect(entityPlayer.posX, entityPlayer.posY, entityPlayer.posZ, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
if (entityPlayer.onGround)
{
world.playSoundEffect(entityPlayer.posX, entityPlayer.posY, entityPlayer.posZ, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
itemStack.damageItem(1, entityPlayer);
entityPlayer.addVelocity(0, 2.5, 0);
}
if (!world.isRemote)
{
itemStack.damageItem(1, entityPlayer);
}
return itemStack;
}