diff --git a/src/main/java/net/glease/structurecompat/MEInventoryStackExtractor.java b/src/main/java/net/glease/structurecompat/MEInventoryStackExtractor.java index e832150..d6a9885 100644 --- a/src/main/java/net/glease/structurecompat/MEInventoryStackExtractor.java +++ b/src/main/java/net/glease/structurecompat/MEInventoryStackExtractor.java @@ -17,6 +17,7 @@ import appeng.api.storage.IMEInventoryHandler; import appeng.api.storage.data.IAEItemStack; import appeng.api.storage.data.IItemList; +import appeng.util.IterationCounter; abstract class MEInventoryStackExtractor implements InventoryUtility.ItemStackExtractor { @@ -50,7 +51,7 @@ public int takeFromStack(Predicate predicate, boolean simulate, int c IEnergySource energy = pair.getLeft(); IMEInventoryHandler cellInventory = pair.getRight(); IItemList items = cellInventory - .getAvailableItems(AEApi.instance().storage().createPrimitiveItemList()); + .getAvailableItems(AEApi.instance().storage().createPrimitiveItemList(), IterationCounter.fetchNewId()); // limit the extraction count to maximum supported by power, so we don't have to constantly // check for power limits later on. count = Math.min(count, (int) energy.extractAEPower(count, Actionable.SIMULATE, PowerMultiplier.ONE)); diff --git a/src/main/java/net/glease/structurecompat/WirelessTerminalStackExtractor.java b/src/main/java/net/glease/structurecompat/WirelessTerminalStackExtractor.java index f707d31..350242b 100644 --- a/src/main/java/net/glease/structurecompat/WirelessTerminalStackExtractor.java +++ b/src/main/java/net/glease/structurecompat/WirelessTerminalStackExtractor.java @@ -181,7 +181,7 @@ public IAEItemStack extractItems(IAEItemStack request, Actionable mode, BaseActi } @Override - public IItemList getAvailableItems(IItemList out) { + public IItemList getAvailableItems(IItemList out, int iteration) { return rawInventory.getAvailableItems(new IItemList() { public void addStorage(IAEItemStack option) { @@ -235,7 +235,7 @@ public void forEach(Consumer action) { public Spliterator spliterator() { return out.spliterator(); } - }); + }, iteration); } @Override