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

@@ -109,8 +109,8 @@ public class Mattock extends DualHarvestTool {
private boolean allowCrafting(int head) {
int[] nonMetals = {0, 1, 3, 4, 5, 6, 7, 8, 9, 17};
for (int i = 0; i < nonMetals.length; i++) {
if (head == nonMetals[i]) return false;
for (int nonMetal : nonMetals) {
if (head == nonMetal) return false;
}
return true;
}
@@ -156,13 +156,13 @@ public class Scythe extends Weapon {
!= null) // && (block.blockMaterial == Material.leaves || block.isLeaves(world,
// xPos, yPos, zPos)))
{
for (int iter = 0; iter < materials.length; iter++) {
if (materials[iter] == localBlock.getMaterial()) {
for (Material material : materials) {
if (material == localBlock.getMaterial()) {
if (!player.capabilities.isCreativeMode) {
if (butter
&& localBlock instanceof IShearable
&& ((IShearable) localBlock)
.isShearable(stack, player.worldObj, xPos, yPos, zPos)) {
.isShearable(stack, player.worldObj, xPos, yPos, zPos)) {
ArrayList<ItemStack> drops = ((IShearable) localBlock)
.onSheared(
stack,