Save Alc content on the Brew

This commit is contained in:
Sn0wStorm
2019-11-09 11:46:34 +01:00
parent 4c77944eb8
commit 81ea014e45
6 changed files with 44 additions and 16 deletions
+3 -2
View File
@@ -116,8 +116,9 @@ public class BIngredients {
if (cookRecipe != null) {
// Potion is best with cooking only
int quality = (int) Math.round((getIngredientQuality(cookRecipe) + getCookingQuality(cookRecipe, false)) / 2.0);
P.p.debugLog("cooked potion has Quality: " + quality);
brew = new Brew(quality, cookRecipe, this);
int alc = (int) Math.round(cookRecipe.getAlcohol() * ((float) quality / 10.0f));
P.p.debugLog("cooked potion has Quality: " + quality + ", Alc: " + alc);
brew = new Brew(quality, alc, cookRecipe, this);
BrewLore lore = new BrewLore(brew, potionMeta);
lore.updateQualityStars(false);
lore.updateCustomLore();