9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-22 08:19:26 +00:00
Files
SakuraMC/patches/server/0070-Configure-fast-health-regen.patch
2024-07-20 00:28:08 +01:00

20 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samsuik <kfian294ma4@gmail.com>
Date: Thu, 6 Jun 2024 18:18:28 +0100
Subject: [PATCH] Configure fast health regen
diff --git a/src/main/java/net/minecraft/world/food/FoodData.java b/src/main/java/net/minecraft/world/food/FoodData.java
index bd3f78e6453cfe18aa3da38176b04d734d83bb4b..22160241bd421d02f8ecec37899597c0c0afb53e 100644
--- a/src/main/java/net/minecraft/world/food/FoodData.java
+++ b/src/main/java/net/minecraft/world/food/FoodData.java
@@ -83,7 +83,7 @@ public class FoodData {
boolean flag = player.level().getGameRules().getBoolean(GameRules.RULE_NATURAL_REGENERATION);
- if (flag && this.saturationLevel > 0.0F && player.isHurt() && this.foodLevel >= 20) {
+ if (flag && this.saturationLevel > 0.0F && player.isHurt() && this.foodLevel >= 20 && player.level().sakuraConfig().players.combat.fastHealthRegen) { // Sakura - configure fast health regen
++this.tickTimer;
if (this.tickTimer >= this.saturatedRegenRate) { // CraftBukkit
float f = Math.min(this.saturationLevel, 6.0F);