Mob Grinding Utils

Mob Grinding Utils

57M Downloads

Fluid XP directly subtracts hunger instead of adding exhaustion

James103 opened this issue ยท 0 comments

commented

Currently, when a player is standing inside Fluid XP, their hunger level is directly reduced by 1 instead of their exhaustion increasing by an equivalent amount. This means that any events that occur when the player gains exhaustion don't occur.

Do note that by changing Fluid XP to cause exhaustion instead of subtract hunger, the exhaustion will first reduce the player's saturation, then hunger. Therefore, the amount of exhaustion per second could be anywhere from 4 (to preserve original ratios) to 8 (to preserve the same maximum XP from full hunger/saturation).

Originally reproduced in All the Mods 7 version 0.4.15, which includes Mob Grinding Utils version 1.18.2-0.4.39.

Current code:

player.getFoodData().setFoodLevel(player.getFoodData().getFoodLevel() - 1);

Example implementation:

player.causeFoodExhaustion(4.0F);