MineColonies

MineColonies

53M Downloads

[BUG] Food saturation was nerfed duplicately.

gisellevonbingen opened this issue ยท 0 comments

commented

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest MineColonies Version?

  • I am running the latest beta version of MineColonies for my Minecraft version.

Did you check on the Wiki? or ask on Discord?

  • I checked the MineColonies Wiki and made sure my issue is not covered there. Or I was sent from discord to open an issue here.

What were you playing at the time? Were you able to reproduce it in both settings?

  • Single Player
  • Multi Player

Minecraft Version

1.20.1

MineColonies Version

1.20.1-1.1.618-BETA

Structurize Version

1.20.1-1.0.740-BETA

Related Mods and their Versions

No response

Current Behavior

Since #10059.
There are duplicated divide by 2 in ItemStackUtils.consumeFood.
Same divide by 2 was removed in EntityAICook.(c09e3db#diff-8f6c4792747d1751c76b7ae5512d8a6d47b35f58d706da1f48fcbdedc1ed2f60L206-R206)

Previous

final int housingLevel = citizenData.getHomeBuilding() == null ? 0 : citizenData.getHomeBuilding().getBuildingLevel();
final double saturationNerf = foodStack.getItem() instanceof IMinecoloniesFoodItem ? 1.0 : (1.0 / (housingLevel + 1));
final double satIncrease = itemFood.getNutrition() * (1.0 + citizen.getCitizenColonyHandler().getColony().getResearchManager().getResearchEffects().getEffectStrength(SATURATION)) * saturationNerf;
citizenData.increaseSaturation(satIncrease / 2.0);

After

final double saturationNerf = foodStack.getItem() instanceof IMinecoloniesFoodItem ? 1.0 : (1.0 / (housingLevel + 1));
return itemFood.getNutrition() * saturationNerf * (1.0 + researchBonus) / 2.0;

final double satIncrease = FoodUtils.getFoodValue(foodStack, citizen);
citizenData.increaseSaturation(satIncrease / 2.0);

Expected Behavior

Nothing.

Reproduction Steps

Nothing.

Logs

Nothing.

Anything else?

  • Add a thumbs-up to the bug report if you are also affected. This helps the bug report become more visible to the team and doesn't clutter the comments.
  • Add a comment if you have any insights or background information that isn't already part of the conversation.