package appeng.util.iterators; import java.util.Iterator; import net.minecraft.item.ItemStack; import appeng.util.inv.ItemSlot; public class StackToSlotIterator implements Iterator { int x = 0; final ItemSlot iss = new ItemSlot(); final Iterator is; public StackToSlotIterator(Iterator is) { this.is = is; } @Override public boolean hasNext() { return is.hasNext(); } @Override public ItemSlot next() { iss.slot = x++; iss.setItemStack( is.next() ); return iss; } @Override public void remove() { // uhh no. } }