9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-27 18:59:06 +00:00

Drop useless reduce movement allocations patch

This commit is contained in:
Samsuik
2024-07-20 00:23:26 +01:00
parent 17b32245f6
commit ff811ffd5c
70 changed files with 104 additions and 341 deletions

View File

@@ -0,0 +1,19 @@
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);