mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-27 23:45:48 +00:00
quick fixes : enhanced for loop
This commit is contained in:
1 parent
59f3b5b72a
commit
83f54f1e97
33 files changed
+74
-96
No files matched your search
@@ -233,12 +233,10 @@ public class Crossbow extends ProjectileWeapon {
|
||||
ItemStack[] inventory = player.inventory.mainInventory;
|
||||
|
||||
// check hotbar for tinker arrows
|
||||
for (int i = 0; i < inventory.length; i++) {
|
||||
ItemStack stack = inventory[i];
|
||||
for (ItemStack stack : inventory) {
|
||||
if (stack == null) continue;
|
||||
if (!(stack.getItem() instanceof BoltAmmo)) continue;
|
||||
if (((IAmmo) stack.getItem()).getAmmoCount(stack) <= 0) continue;
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user