Use foreach loops

This commit is contained in:
mezz committed 2016-10-20 23:13:41 -07:00
1 parent 7a90a5cbbf
commit f96bf5ba5f
3 files changed
+5 -9

No files matched your search

@@ -296,8 +296,7 @@ public class BlockCeramicBrick extends Block implements IBlockMetadata, IMultipa
return null;
}
final int[] colors = {-1, -1};
for (int index = 0; index < stacks.size(); ++index) {
final ItemStack stack2 = stacks.get(index);
for (final ItemStack stack2 : stacks) {
if (stack2.getItem() != Item.getItemFromBlock(Botany.ceramicBrick)) {
return null;
}
@@ -344,8 +343,7 @@ public class BlockCeramicBrick extends Block implements IBlockMetadata, IMultipa
final int[] colors = {-1, -1};
int a = 0;
int b = 0;
for (int index2 = 0; index2 < stacks.size(); ++index2) {
final ItemStack stack4 = stacks.get(index2);
for (final ItemStack stack4 : stacks) {
if (stack4.getItem() != Item.getItemFromBlock(Botany.ceramicBrick)) {
return null;
}
@@ -47,9 +47,8 @@ public class EntityBeeLightning extends EntityLightningBolt {
this.worldObj.setLastLightningBolt(2);
} else {
final double d0 = 3.0;
final List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, new AxisAlignedBB(this.posX - d0, this.posY - d0, this.posZ - d0, this.posX + d0, this.posY + 6.0 + d0, this.posZ + d0));
for (int l = 0; l < list.size(); ++l) {
final Entity entity = (Entity) list.get(l);
final List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, new AxisAlignedBB(this.posX - d0, this.posY - d0, this.posZ - d0, this.posX + d0, this.posY + 6.0 + d0, this.posZ + d0));
for (Entity entity : list) {
entity.onStruckByLightning(this);
}
}
@@ -103,8 +103,7 @@ public class NBTShapedRecipe implements IRecipe {
int k = 0;
if (p_92103_2_[i] instanceof String[]) {
final String[] astring = (String[]) p_92103_2_[i++];
for (int l = 0; l < astring.length; ++l) {
final String s2 = astring[l];
for (final String s2 : astring) {
++k;
j = s2.length();
s += s2;