From d007850afec26b4bc4a080f04364843b827b7264 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 15 Apr 2024 12:23:46 -0400 Subject: [PATCH] Clear collections last --- src/engine/gameManager/ForgeManager.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index a19f284b..708fd902 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -308,14 +308,14 @@ public enum ForgeManager implements Runnable { for (Item memoryItem : toRemove) { - workOrder.cooking.remove(memoryItem); - inMemoryItemLookup.remove(memoryItem.objectUUID); - vendorItemLookup.get(workOrder.vendor).remove(memoryItem); - ItemProductionMsg outMsg = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, memoryItem, mbEnums.ProductionActionType.CONFIRM_SETPRICE, true); DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false); ItemProductionMsg outMsg2 = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, memoryItem, mbEnums.ProductionActionType.CONFIRM_DEPOSIT, true); DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg2, mbEnums.DispatchChannel.SECONDARY, 700, false, false); + + workOrder.cooking.remove(memoryItem); + inMemoryItemLookup.remove(memoryItem.objectUUID); + vendorItemLookup.get(workOrder.vendor).remove(memoryItem); } }