9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2026-01-04 15:41:40 +00:00
Files
Leaf/leaf-server/minecraft-patches/features/0116-Fix-sprint-glitch.patch
2025-04-07 11:35:31 -04:00

21 lines
969 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 40ab67a6930242553ed7acc9d6cc474a36e23888..ab7bdbce80046df43e4889c20c4d3d9fb1d2e2c4 100644
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -1387,7 +1387,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
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