Make shuriken and ammoweapon/throwing knifes not throwable without ammo

This commit is contained in:
Bernhard Bonigl committed 2014-10-30 13:16:41 +01:00
1 parent 9d7d33fea3
commit 3f74dd7535
2 files changed
+5 -1

No files matched your search

@@ -31,7 +31,8 @@ public abstract class AmmoWeapon extends AmmoItem implements IAccuracy, IWindup
@Override
public ItemStack onItemRightClick (ItemStack stack, World world, EntityPlayer player)
{
player.setItemInUse(stack, this.getMaxItemUseDuration(stack));
if(getAmmoCount(stack) > 0)
player.setItemInUse(stack, this.getMaxItemUseDuration(stack));
return stack;
}