Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[BUG] Food saturation was nerfed duplicately. #10069

Closed
5 tasks done
gisellevonbingen opened this issue Jul 23, 2024 · 0 comments · Fixed by #10070
Closed
5 tasks done

[BUG] Food saturation was nerfed duplicately. #10069

gisellevonbingen opened this issue Jul 23, 2024 · 0 comments · Fixed by #10070
Labels
Bug Gotta squash 'em all!

Comments

@gisellevonbingen
Copy link

gisellevonbingen commented Jul 23, 2024

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.
@gisellevonbingen gisellevonbingen added the Bug Gotta squash 'em all! label Jul 23, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug Gotta squash 'em all!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant