From f2b2311a727613f1f06fe08be6f63aa908b67201 Mon Sep 17 00:00:00 2001 From: Raycoms Date: Wed, 4 Dec 2024 18:08:33 +0100 Subject: [PATCH] fix #10490 (#10502) Mark min stock requests as passive to avoid interfering with worker operation. Fix food request equality --- .../core/colony/buildings/modules/MinimumStockModule.java | 2 +- .../core/colony/buildings/modules/RestaurantMenuModule.java | 2 +- .../core/entity/ai/workers/production/EntityAIWorkNether.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/minecolonies/core/colony/buildings/modules/MinimumStockModule.java b/src/main/java/com/minecolonies/core/colony/buildings/modules/MinimumStockModule.java index e97e566bed6..5304872058f 100644 --- a/src/main/java/com/minecolonies/core/colony/buildings/modules/MinimumStockModule.java +++ b/src/main/java/com/minecolonies/core/colony/buildings/modules/MinimumStockModule.java @@ -132,7 +132,7 @@ public void onColonyTick(@NotNull final IColony colony) itemStack.setCount(Math.min(itemStack.getMaxStackSize(), delta)); final MinimumStack stack = new MinimumStack(itemStack, false); stack.setCanBeResolvedByBuilding(false); - building.createRequest(stack, false); + building.createRequest(stack, true); } } else if (request != null && delta <= 0) diff --git a/src/main/java/com/minecolonies/core/colony/buildings/modules/RestaurantMenuModule.java b/src/main/java/com/minecolonies/core/colony/buildings/modules/RestaurantMenuModule.java index b9aa5f5b7fa..33cf6643f14 100644 --- a/src/main/java/com/minecolonies/core/colony/buildings/modules/RestaurantMenuModule.java +++ b/src/main/java/com/minecolonies/core/colony/buildings/modules/RestaurantMenuModule.java @@ -144,7 +144,7 @@ public void onColonyTick(@NotNull final IColony colony) requestStack.setCount(Math.min(16, Math.min(requestStack.getMaxStackSize(), delta))); final MinimumStack stack = new MinimumStack(requestStack, false); stack.setCanBeResolvedByBuilding(false); - building.createRequest(stack, false); + building.createRequest(stack, true); } } else if (request != null && delta <= 0) diff --git a/src/main/java/com/minecolonies/core/entity/ai/workers/production/EntityAIWorkNether.java b/src/main/java/com/minecolonies/core/entity/ai/workers/production/EntityAIWorkNether.java index fed20177bb5..66880efd086 100644 --- a/src/main/java/com/minecolonies/core/entity/ai/workers/production/EntityAIWorkNether.java +++ b/src/main/java/com/minecolonies/core/entity/ai/workers/production/EntityAIWorkNether.java @@ -985,7 +985,7 @@ protected void checkAndRequestArmor() protected IAIState checkAndRequestFood() { - if (InventoryUtils.getItemCountInItemHandler(worker.getInventoryCitizen(), stack -> building.getModule(NETHERMINER_MENU).getMenu().contains(new ItemStorage(stack))) > 16) + if (InventoryUtils.getItemCountInItemHandler(worker.getInventoryCitizen(), stack -> building.getModule(NETHERMINER_MENU).getMenu().contains(new ItemStorage(stack))) >= 16) { // We have enough food. return getState();