From b12d8adf268579a3e52f6455597ee205148ceb75 Mon Sep 17 00:00:00 2001 From: Raycoms Date: Sun, 17 Nov 2024 12:19:05 +0100 Subject: [PATCH] translation fix and 0 building level no food fix --- .../minecolonies/api/util/constant/TranslationConstants.java | 4 ++-- .../core/entity/ai/workers/service/EntityAIWorkCook.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/minecolonies/api/util/constant/TranslationConstants.java b/src/main/java/com/minecolonies/api/util/constant/TranslationConstants.java index cb29cae13c0..04fea8a4853 100755 --- a/src/main/java/com/minecolonies/api/util/constant/TranslationConstants.java +++ b/src/main/java/com/minecolonies/api/util/constant/TranslationConstants.java @@ -654,9 +654,9 @@ public final class TranslationConstants @NonNls public static final String FOOD_QUALITY_TOOLTIP = "com.minecolonies.core.gui.restaurant.foodquality"; @NonNls - public static final String FOOD_QUALITY = ".foodquality"; + public static final String FOOD_QUALITY = "foodquality"; @NonNls - public static final String FOOD_DIVERSITY = ".fooddiversity"; + public static final String FOOD_DIVERSITY = "fooddiversity"; @NonNls public static final String URGENT = ".urgent"; diff --git a/src/main/java/com/minecolonies/core/entity/ai/workers/service/EntityAIWorkCook.java b/src/main/java/com/minecolonies/core/entity/ai/workers/service/EntityAIWorkCook.java index 468f465c049..cb3b58424e0 100755 --- a/src/main/java/com/minecolonies/core/entity/ai/workers/service/EntityAIWorkCook.java +++ b/src/main/java/com/minecolonies/core/entity/ai/workers/service/EntityAIWorkCook.java @@ -224,7 +224,7 @@ else if (InventoryUtils.hasItemInItemHandler(handler, canEatPredicate)) } final int countInSlot = worker.getInventoryCitizen().getStackInSlot(foodSlot).getCount(); - int homeBuildingLevel = citizen.getCitizenData().getHomeBuilding() == null ? 0 : citizen.getCitizenData().getHomeBuilding().getBuildingLevel(); + int homeBuildingLevel = citizen.getCitizenData().getHomeBuilding() == null ? 1 : citizen.getCitizenData().getHomeBuilding().getBuildingLevel(); int qty = (int) (Math.max(1.0, (FULL_SATURATION - citizen.getCitizenData().getSaturation()) / FoodUtils.getFoodValue(worker.getInventoryCitizen().getStackInSlot(foodSlot), citizen)) * homeBuildingLevel/2.0); final int transferCount = Math.min(countInSlot, building.getBuildingLevel());