Merge pull request #182 from thatsIch/While

Replaces while iterators with foreach call
This commit is contained in:
Chris
2014-09-29 14:10:03 -07:00
10 changed files with 33 additions and 36 deletions
@@ -58,11 +58,9 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
AESharedNBT x = new AESharedNBT( itemID, damageValue );
// c.getTags()
Iterator var2 = c.func_150296_c().iterator();
while (var2.hasNext())
for (Object o : c.func_150296_c())
{
String name = (String) var2.next();
String name = (String) o;
x.setTag( name, c.getTag( name ).copy() );
}
+4 -3
View File
@@ -132,9 +132,10 @@ public final class ItemList<StackType extends IAEStack> implements IItemList<Sta
@Override
synchronized public StackType getFirstItem()
{
Iterator<StackType> i = this.iterator();
while (i.hasNext())
return i.next();
for (StackType stackType : this)
{
return stackType;
}
return null;
}