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