From cd34ea63eea0e10dd73afc1fa3e5685cbe30c09a Mon Sep 17 00:00:00 2001 From: Neidmare <182026957+Neidmare@users.noreply.github.com> Date: Sat, 28 Sep 2024 17:21:58 +0200 Subject: [PATCH] Fix nutrients always stuck at 50 in singleplayer --- src/main/java/ca/wescook/nutrition/events/EventEatFood.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/ca/wescook/nutrition/events/EventEatFood.java b/src/main/java/ca/wescook/nutrition/events/EventEatFood.java index 97630ba..8ac63c2 100644 --- a/src/main/java/ca/wescook/nutrition/events/EventEatFood.java +++ b/src/main/java/ca/wescook/nutrition/events/EventEatFood.java @@ -64,7 +64,9 @@ public void onFoodEaten(FoodEvent.FoodEaten event) { if (!event.player.getEntityWorld().isRemote) { // Server PlayerDataHandler.getForPlayer(event.player) .add(foundNutrients, nutritionValue); - } else { // Client + } + + if (Nutrition.proxy.isClient()) { // Client ClientProxy.localNutrition.add(foundNutrients, nutritionValue); // set that food has now been eaten ClientProxy.popHungerChange();