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

@@ -40,8 +40,8 @@ public abstract class Weapon extends ToolCore
if (stack.getTagCompound().getCompoundTag("InfiTool").getBoolean("Broken")) return 0.1f;
for (int i = 0; i < web.length; i++) {
if (web[i] == block.getMaterial()) {
for (Material material : web) {
if (material == block.getMaterial()) {
return effectiveSpeed();
}
}
@@ -95,8 +95,8 @@ public abstract class Weapon extends ToolCore
*/
@Override
public boolean canHarvestBlock(Block block, ItemStack is) {
for (int i = 0; i < web.length; i++) {
if (block.getMaterial() == web[i]) return true;
for (Material material : web) {
if (block.getMaterial() == material) return true;
}
return super.canHarvestBlock(block, is);
}