quick fixes : enhanced for loop

This commit is contained in:
Alexdoru authored and Jason Mitchell committed 2023-01-28 18:02:41 -08:00
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;
}