Skip to content

Commit 867aaa2

Browse files
authored
Fix nutrients always stuck at 50 in singleplayer (#19)
1 parent 0c0eacf commit 867aaa2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/ca/wescook/nutrition/events/EventEatFood.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ public void onFoodEaten(FoodEvent.FoodEaten event) {
6464
if (!event.player.getEntityWorld().isRemote) { // Server
6565
PlayerDataHandler.getForPlayer(event.player)
6666
.add(foundNutrients, nutritionValue);
67-
} else { // Client
67+
}
68+
69+
if (Nutrition.proxy.isClient()) { // Client
6870
ClientProxy.localNutrition.add(foundNutrients, nutritionValue);
6971
// set that food has now been eaten
7072
ClientProxy.popHungerChange();

0 commit comments

Comments
 (0)