Skip to content

Commit

Permalink
translation fix and 0 building level no food fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Raycoms committed Nov 17, 2024
1 parent f0deefb commit b12d8ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit b12d8ad

Please sign in to comment.