From f9715ad40729ccfcb0b570c9daa290b9621921fb 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 6a8448e36b0..19cec1bb6bc 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 @@ -136,7 +136,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 3b9436256a9..b7f91b69b33 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 @@ -146,7 +146,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 c9409b2b50b..78536e856fc 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 @@ -977,7 +977,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();