Add Hunger Config Values

By: lazertester <austin.techhead@gmail.com>
This commit is contained in:
CraftBukkit/Spigot
2014-08-17 19:56:17 +10:00
parent 83699d54bf
commit f026f7905e
4 changed files with 36 additions and 10 deletions

View File

@@ -89,7 +89,7 @@
+ if (this.tickTimer >= this.unsaturatedRegenRate) { // CraftBukkit - add regen rate manipulation
+ player.heal(1.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED); // CraftBukkit - added RegainReason
+ // this.addExhaustion(6.0F); CraftBukkit - EntityExhaustionEvent
+ player.causeFoodExhaustion(6.0f, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.REGEN); // CraftBukkit - EntityExhaustionEvent
+ player.causeFoodExhaustion(player.level().spigotConfig.regenExhaustion, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.REGEN); // CraftBukkit - EntityExhaustionEvent // Spigot - Change to use configurable value
this.tickTimer = 0;
}
} else if (this.foodLevel <= 0) {