mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 19:59:55 +00:00
quick fix : Redundant 'if' statement
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user