diff --git a/mc/1.20.5/src/main/java/dev/u9g/minecraftdatagenerator/generators/FoodsDataGenerator.java b/mc/1.20.5/src/main/java/dev/u9g/minecraftdatagenerator/generators/FoodsDataGenerator.java index ddb61fe..d07b656 100644 --- a/mc/1.20.5/src/main/java/dev/u9g/minecraftdatagenerator/generators/FoodsDataGenerator.java +++ b/mc/1.20.5/src/main/java/dev/u9g/minecraftdatagenerator/generators/FoodsDataGenerator.java @@ -25,8 +25,8 @@ public static JsonObject generateFoodDescriptor(Registry registry, Item fo FoodComponent foodComponent = Objects.requireNonNull(foodItem.getComponents().get(DataComponentTypes.FOOD)); float foodPoints = foodComponent.nutrition(); - float saturationRatio = foodComponent.saturation() * 2.0F; - float saturation = foodPoints * saturationRatio; + float saturation = foodComponent.saturation(); + float saturationRatio = saturation / foodPoints; foodDesc.addProperty("foodPoints", foodPoints); foodDesc.addProperty("saturation", saturation); diff --git a/mc/1.21.3/src/main/java/dev/u9g/minecraftdatagenerator/generators/FoodsDataGenerator.java b/mc/1.21.3/src/main/java/dev/u9g/minecraftdatagenerator/generators/FoodsDataGenerator.java index 9d2080f..bd73d5c 100644 --- a/mc/1.21.3/src/main/java/dev/u9g/minecraftdatagenerator/generators/FoodsDataGenerator.java +++ b/mc/1.21.3/src/main/java/dev/u9g/minecraftdatagenerator/generators/FoodsDataGenerator.java @@ -25,8 +25,8 @@ public static JsonObject generateFoodDescriptor(Registry registry, Item fo FoodComponent foodComponent = Objects.requireNonNull(foodItem.getComponents().get(DataComponentTypes.FOOD)); float foodPoints = foodComponent.nutrition(); - float saturationRatio = foodComponent.saturation() * 2.0F; - float saturation = foodPoints * saturationRatio; + float saturation = foodComponent.saturation(); + float saturationRatio = saturation / foodPoints; foodDesc.addProperty("foodPoints", foodPoints); foodDesc.addProperty("saturation", saturation); diff --git a/mc/1.21/src/main/java/dev/u9g/minecraftdatagenerator/generators/FoodsDataGenerator.java b/mc/1.21/src/main/java/dev/u9g/minecraftdatagenerator/generators/FoodsDataGenerator.java index ddb61fe..d07b656 100644 --- a/mc/1.21/src/main/java/dev/u9g/minecraftdatagenerator/generators/FoodsDataGenerator.java +++ b/mc/1.21/src/main/java/dev/u9g/minecraftdatagenerator/generators/FoodsDataGenerator.java @@ -25,8 +25,8 @@ public static JsonObject generateFoodDescriptor(Registry registry, Item fo FoodComponent foodComponent = Objects.requireNonNull(foodItem.getComponents().get(DataComponentTypes.FOOD)); float foodPoints = foodComponent.nutrition(); - float saturationRatio = foodComponent.saturation() * 2.0F; - float saturation = foodPoints * saturationRatio; + float saturation = foodComponent.saturation(); + float saturationRatio = saturation / foodPoints; foodDesc.addProperty("foodPoints", foodPoints); foodDesc.addProperty("saturation", saturation);