Special Handlers are now properly wrapped in IMEMonitors for Storage Bus to function properly.

This commit is contained in:
AlgorithmX2
2014-05-03 19:21:33 -05:00
parent 21e40a5fb3
commit e1c6b18399
11 changed files with 234 additions and 22 deletions
+39
View File
@@ -0,0 +1,39 @@
package appeng.util.inv;
import java.util.Iterator;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IItemList;
public class IMEAdaptorIterator implements Iterator<ItemSlot>
{
Iterator<IAEItemStack> stack;
ItemSlot slot = new ItemSlot();
int offset = 0;
public IMEAdaptorIterator(IItemList<IAEItemStack> availableItems) {
stack = availableItems.iterator();
}
@Override
public boolean hasNext()
{
return stack.hasNext();
}
@Override
public ItemSlot next()
{
IAEItemStack item = stack.next();
slot.setAEItemStack( item );
slot.slot = offset++;
return slot;
}
@Override
public void remove()
{
throw new RuntimeException( "Not Implemented!" );
}
}