diff --git a/src/engine/gameManager/NPCManager.java b/src/engine/gameManager/NPCManager.java index 960bcc6b..7e5acf18 100644 --- a/src/engine/gameManager/NPCManager.java +++ b/src/engine/gameManager/NPCManager.java @@ -27,6 +27,7 @@ import org.pmw.tinylog.Logger; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.concurrent.ThreadLocalRandom; import static engine.math.FastMath.acos; @@ -522,7 +523,9 @@ public enum NPCManager { ArrayList itemList = new ArrayList<>(); - for (WorkOrder workOrder : ForgeManager.vendorWorkOrderLookup.get(npc)) + List vendorWorkOrders = ForgeManager.vendorWorkOrderLookup.get(npc); + + for (WorkOrder workOrder : vendorWorkOrders) itemList.addAll(workOrder.cooking); return itemList;