9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2026-01-04 15:41:31 +00:00

fix: fix chunk reload detector (#492)

This commit is contained in:
MC_XiaoHei
2025-05-17 09:29:34 +00:00
parent 53bc224b38
commit 4200ae72c9

View File

@@ -1,11 +1,11 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MC_XiaoHei <xiaohei.xor7@outlook.com>
From: Fortern <blueten.ki@gmail.com>
Date: Sat, 17 May 2025 03:01:48 +0000
Subject: [PATCH] Fix chunk reload detector
diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java
index 7681195587d361acf524d09ad3958e628aad73b6..c768a653a4a9c62e1db952979fca0e6176aa3849 100644
index 7681195587d361acf524d09ad3958e628aad73b6..edf9c01fd64d269a5d78d805db91177095edffc7 100644
--- a/net/minecraft/server/level/ServerEntity.java
+++ b/net/minecraft/server/level/ServerEntity.java
@@ -396,7 +396,7 @@ public class ServerEntity {
@@ -13,7 +13,7 @@ index 7681195587d361acf524d09ad3958e628aad73b6..c768a653a4a9c62e1db952979fca0e61
consumer.accept(new ClientboundSetEquipmentPacket(this.entity.getId(), list, true)); // Paper - data sanitization
}
- ((LivingEntity) this.entity).detectEquipmentUpdates(); // CraftBukkit - SPIGOT-3789: sync again immediately after sending
+ // ((LivingEntity) this.entity).detectEquipmentUpdates(); // CraftBukkit - SPIGOT-3789: sync again immediately after sending // Leaves - fix chunk reload detector (#492)
+ if (this.entity.totalEntityAge == 0) ((LivingEntity) this.entity).detectEquipmentUpdates(); // CraftBukkit - SPIGOT-3789: sync again immediately after sending // Leaves - fix chunk reload detector (#492)
}
if (!this.entity.getPassengers().isEmpty()) {