quick fix : Redundant 'if' statement

This commit is contained in:
Alexdoru authored and Jason Mitchell committed 2023-01-28 18:02:41 -08:00
1 parent 28b094ea1a
commit f384a4fe28
29 files changed
+48 -130

No files matched your search

@@ -15,7 +15,7 @@ public class WeaponryActiveToolMod extends ActiveToolMod {
IAmmo ammo = (IAmmo) stack.getItem();
if (tags.getInteger("Damage") == 0) {
int rem = ammo.consumeAmmo(1, stack);
if (rem > 0) return true;
return rem > 0;
} else if (ammo.getAmmoCount(stack) > 0) {
int d = tags.getInteger("Damage") + damage;
int max = tags.getInteger("TotalDurability");
@@ -26,7 +26,9 @@ public class WeaponryActiveToolMod extends ActiveToolMod {
}
}
// all other ammo items can't be damaged
else if (stack.getItem() instanceof IAmmo) return true;
else {
return stack.getItem() instanceof IAmmo;
}
return false;
}