Configurable hunger starvation damage

This commit is contained in:
Encode42
2025-01-11 23:06:24 -08:00
committed by granny
parent 58013b963c
commit 40ecc3fc06
3 changed files with 14 additions and 33 deletions

View File

@@ -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;