mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Configurable hunger starvation damage
This commit is contained in:
@@ -8,3 +8,12 @@
|
||||
this.add(event.getFoodLevel() - oldFoodLevel, foodProperties.saturation());
|
||||
}
|
||||
serverPlayer.getBukkitEntity().sendHealthUpdate();
|
||||
@@ -84,7 +_,7 @@
|
||||
this.tickTimer++;
|
||||
if (this.tickTimer >= this.starvationRate) { // CraftBukkit - add regen rate manipulation
|
||||
if (player.getHealth() > 10.0F || difficulty == Difficulty.HARD || player.getHealth() > 1.0F && difficulty == Difficulty.NORMAL) {
|
||||
- player.hurtServer(serverLevel, player.damageSources().starve(), 1.0F);
|
||||
+ player.hurtServer(serverLevel, player.damageSources().starve(), player.level().purpurConfig.hungerStarvationDamage); // Purpur - Configurable hunger starvation damage
|
||||
}
|
||||
|
||||
this.tickTimer = 0;
|
||||
|
||||
Reference in New Issue
Block a user