mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-12 03:13:37 +01:00
Fixed hunger not behaving correctly. Addresses BUKKIT-907
This commit is contained in:
parent
2510af0d1a
commit
bcf979b2a6
@ -33,7 +33,7 @@ public class FoodMetaData {
|
||||
this.saturationLevel = Math.max(this.saturationLevel - 1.0F, 0.0F);
|
||||
} else if (i > 0) {
|
||||
// CraftBukkit start
|
||||
org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callFoodLevelChangeEvent(entityhuman, Math.min(this.foodLevel - 1, 0));
|
||||
org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callFoodLevelChangeEvent(entityhuman, Math.max(this.foodLevel - 1, 0));
|
||||
|
||||
if (!event.isCancelled()) {
|
||||
this.foodLevel = event.getFoodLevel();
|
||||
|
Loading…
Reference in New Issue
Block a user