9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2026-01-06 15:51:31 +00:00
Files
Leaf/leaf-server/minecraft-patches/features/0114-Fix-sprint-glitch.patch
Dreeam 3b162fb788 Move Purpur patches to first
To reduce the difficulty on maintenance and reduce chances to fix conflicts on updating
2025-10-01 18:27:42 -04:00

21 lines
976 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: pixelNightly <pixelnightly@proton.me>
Date: Mon, 4 Dec 2023 16:11:36 +0200
Subject: [PATCH] Fix sprint glitch
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index 763d8e61e36629f625bffad0993ec22da2eefa91..d5994607475e69f8a0da41d5198ba63dfa5a27df 100644
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -1422,7 +1422,8 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
player.setRealHealth(health);
}
- player.updateScaledHealth(false);
+ //player.updateScaledHealth(false); // Leaf - Fix sprint glitch - commented out
+ this.entityData.set(LivingEntity.DATA_HEALTH_ID, player.getScaledHealth()); // Leaf - Fix sprint glitch
return;
}
// CraftBukkit end