mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 11:59:14 +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
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user