diff --git a/src/main/java/net/tfminecraft/cooking/cooking/PotReference.java b/src/main/java/net/tfminecraft/cooking/cooking/PotReference.java index 8270555..29a68da 100644 --- a/src/main/java/net/tfminecraft/cooking/cooking/PotReference.java +++ b/src/main/java/net/tfminecraft/cooking/cooking/PotReference.java @@ -208,7 +208,7 @@ public void scoop(Player p, ItemStack ladle) { // ---------- BUILD RESULT ---------- CompositionResult composed = CompositionQualityResolver.compose(p, slots.values(), CompositionContext.SOUP_SCOOP); CompositionApplier.apply(soup, composed); - soup.setBaseFood(scoopFood(soup.getBaseFood(), soupScoops())); + soup.setBaseFood(scoopFood(soup.getBaseFood())); int quality = composed.getFinalQuality(); ItemStack output = ItemBuilder.buildSingleWithQuality(soup, ladle, quality); @@ -565,9 +565,9 @@ public void rebuildFromFurniture() { applySoupLevel(); } - /** Whole-pot food split across scoops. Nutrition stays the template level. */ - public static double scoopFood(double templateFood, int scoops) { - return templateFood / Math.max(1, scoops); + /** Each scoop keeps the soup template food. Serving count does not scale it. */ + public static double scoopFood(double templateFood) { + return templateFood; } private static int soupScoops() { diff --git a/src/test/java/net/tfminecraft/cooking/item/PortionRulesTest.java b/src/test/java/net/tfminecraft/cooking/item/PortionRulesTest.java index 06c67ff..a42c37a 100644 --- a/src/test/java/net/tfminecraft/cooking/item/PortionRulesTest.java +++ b/src/test/java/net/tfminecraft/cooking/item/PortionRulesTest.java @@ -58,12 +58,12 @@ void plainRoastFoodFollowsCutsAndNutritionStaysAtBase() throws Exception { } @Test - void soupScoopDividesFoodOnly() { + void soupScoopKeepsTemplateFoodAndNutrition() { FoodItem soup = new FoodItem("soup", "Soup", true); soup.setBaseNutrition(8); - soup.setBaseFood(PotReference.scoopFood(26, 3)); + soup.setBaseFood(PotReference.scoopFood(26)); - assertEquals(26.0 / 3, soup.getBaseFood()); + assertEquals(26, soup.getBaseFood()); assertEquals(8, soup.getBaseNutrition()); } diff --git a/src/test/java/net/tfminecraft/cooking/item/ValuableIngredientTest.java b/src/test/java/net/tfminecraft/cooking/item/ValuableIngredientTest.java index 6991693..3e2bd5a 100644 --- a/src/test/java/net/tfminecraft/cooking/item/ValuableIngredientTest.java +++ b/src/test/java/net/tfminecraft/cooking/item/ValuableIngredientTest.java @@ -1,6 +1,5 @@ package net.tfminecraft.cooking.item; -import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -9,7 +8,6 @@ import org.junit.jupiter.api.Test; -import net.tfminecraft.cooking.cooking.PotReference; import net.tfminecraft.cooking.utils.StationAddonRules; class ValuableIngredientTest { @@ -26,11 +24,6 @@ void detectsValuableIngredientAndIgnoresVanilla() throws Exception { assertFalse(StationAddonRules.hasValuable(Map.of())); } - @Test - void soupScoopFoodIsUnchangedByValuableFlag() { - assertEquals(26.0 / 3, PotReference.scoopFood(26, 3)); - } - private static void setValuable(FoodItem item, boolean valuable) throws Exception { Field field = FoodItem.class.getDeclaredField("valuable"); field.setAccessible(true);