diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index b9bc3d7a..b0e3ee61 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -46,11 +46,6 @@ public enum ForgeManager implements Runnable { Logger.error(e); } - // Do not process null workOrders - - if (workOrder == null) - continue; - if (workOrder.total_produced >= workOrder.total_to_produce) { // Complete this workOrder. diff --git a/src/engine/net/client/handlers/ItemProductionMsgHandler.java b/src/engine/net/client/handlers/ItemProductionMsgHandler.java index e8810c48..05528578 100644 --- a/src/engine/net/client/handlers/ItemProductionMsgHandler.java +++ b/src/engine/net/client/handlers/ItemProductionMsgHandler.java @@ -146,6 +146,8 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { ForgeManager.itemWorkOrderLookup.remove(virtualItem); DbManager.removeFromCache(virtualItem); + workOrder.slots_used = workOrder.slots_used - 1; + // If this is the last item then remove the workOrder from the game if (workOrder.cooking.isEmpty()) @@ -395,6 +397,8 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { DbManager.removeFromCache(virtualItem); ForgeManager.itemWorkOrderLookup.remove(virtualItem); + workOrder.slots_used = workOrder.slots_used - 1; + // If this is the last item then remove the workOrder from the game if (workOrder.cooking.isEmpty())