mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 08:59:01 +00:00
Support 1.14 Minecraft Barrels for Aging
This commit is contained in:
@@ -302,20 +302,14 @@ public class BIngredients {
|
||||
}
|
||||
int quality = 10 - Math.round(recipe.getWoodDiff(wood) * recipe.getDifficulty());
|
||||
|
||||
if (quality > 0) {
|
||||
return quality;
|
||||
}
|
||||
return 0;
|
||||
return Math.max(quality, 0);
|
||||
}
|
||||
|
||||
// returns the quality regarding the ageing time conditioning given Recipe
|
||||
public int getAgeQuality(BRecipe recipe, float time) {
|
||||
int quality = 10 - Math.round(Math.abs(time - recipe.getAge()) * ((float) recipe.getDifficulty() / 2));
|
||||
|
||||
if (quality > 0) {
|
||||
return quality;
|
||||
}
|
||||
return 0;
|
||||
return Math.max(quality, 0);
|
||||
}
|
||||
|
||||
// Creates a copy ingredients
|
||||
|
||||
Reference in New Issue
Block a user