Fix bug with exporter

This commit is contained in:
Raoul Van den Berge
2016-05-22 00:21:16 +02:00
parent e798dae4d3
commit 89084aea38
2 changed files with 5 additions and 4 deletions

View File

@@ -45,13 +45,14 @@ public class TileExporter extends TileMachine implements ICompareConfig {
scheduler.resetSchedule();
for (int j = 0; j < handler.getSlots(); ++j) {
// If we have no remainder
if (handler.insertItem(j, took, true) == null) {
handler.insertItem(j, took, false);
} else {
controller.push(took);
return;
}
}
controller.push(took);
} else if (RefinedStorageUtils.hasUpgrade(upgradesInventory, ItemUpgrade.TYPE_CRAFTING)) {
if (scheduler.canSchedule(compare, slot)) {
scheduler.schedule(controller, compare, slot);

View File

@@ -59,6 +59,7 @@ public class TileExternalStorage extends TileMachine implements IStorageProvider
} else {
IDeepStorageUnit storageUnit = getStorageUnit();
// @todo: doesn't work
if (storageUnit != null && storageUnit.getStoredItemType() != null) {
items.add(new ItemGroup(storageUnit.getStoredItemType().copy()));
}
@@ -96,7 +97,6 @@ public class TileExternalStorage extends TileMachine implements IStorageProvider
for (int i = 0; i < handler.getSlots(); ++i) {
ItemStack slot = handler.getStackInSlot(i);
// @todo: there is a bug here
if (slot != null && RefinedStorageUtils.compareStack(slot, stack, flags)) {
if (quantity > slot.stackSize) {
quantity = slot.stackSize;