Browse Source

Atomic instead of volatile to match counter

combat-2
MagicBot 8 months ago
parent
commit
ad2cde9d85
  1. 4
      src/engine/net/client/handlers/ItemProductionMsgHandler.java

4
src/engine/net/client/handlers/ItemProductionMsgHandler.java

@ -150,7 +150,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
ForgeManager.itemWorkOrderLookup.remove(virtualItem); ForgeManager.itemWorkOrderLookup.remove(virtualItem);
DbManager.removeFromCache(virtualItem); DbManager.removeFromCache(virtualItem);
workOrder.slots_used.set(workOrder.slots_used.get() - 1); workOrder.slots_used.decrementAndGet();
// Update workOrder on disk // Update workOrder on disk
@ -429,7 +429,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
// Slot is no longer allocated to this workOrder. // Slot is no longer allocated to this workOrder.
workOrder.slots_used.set(workOrder.slots_used.get() - 1); workOrder.slots_used.decrementAndGet();
// Update workOrder on disk // Update workOrder on disk

Loading…
Cancel
Save