mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-20 04:09:40 +00:00
Make shuriken and ammoweapon/throwing knifes not throwable without ammo
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -101,6 +101,9 @@ public class Shuriken extends AmmoWeapon {
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
if(getAmmoCount(stack) <= 0)
|
||||
return stack;
|
||||
|
||||
launchProjectile(stack, world, player);
|
||||
|
||||
// this is only used for the animation
|
||||
|
||||
Reference in new issue
Block a user