Fix a dupe bug in the formulaic assemblicator due to it not properly clearing a slot when trying to move the items to a more "optimal" slot
@@ -470,6 +470,14 @@ public class TileEntityFormulaicAssemblicator extends TileEntityMekanism impleme
storedMap.put(hashedItem, stored - count);
}
setSlotIfChanged(inputSlots.get(i), hashedItem, count);
+ } else {
+ //If we don't have the item stored anymore (already filled all previous slots with it),
+ // then we need to empty the slot as the items in it has been moved to a more "optimal" slot
+ //Note: We only set them to empty if they are not already empty to avoid onContentsChanged being called
+ IInventorySlot slot = inputSlots.get(i);
+ if (!slot.isEmpty()) {
+ slot.setStack(ItemStack.EMPTY);
+ }
}
}
// if we still have items, first try to add remaining items to known unused (non-controlled) slots
@@ -514,7 +522,7 @@ public class TileEntityFormulaicAssemblicator extends TileEntityMekanism impleme
storedMap.removeInt(item);
empty = storedMap.isEmpty();
} else {
- storedMap.put(item, stored - count);
+ next.setValue(stored - count);
}
setSlotIfChanged(inputSlot, item, count);
return empty;
