// returns the quality regarding the barrel wood conditioning given Recipe public int getWoodQuality(BRecipe recipe, float wood) { if (recipe.getWood() == 0) { // type of wood doesnt matter return 10; } int quality = 10 - Math.round(recipe.getWoodDiff(wood) * recipe.getDifficulty()); if (quality > 0) { return quality; } return 0; }