From 721db52ebaa84b13afdbcd0dcad2ada1942b2c6f Mon Sep 17 00:00:00 2001 From: Rothes <449181985@qq.com> Date: Fri, 29 May 2026 13:38:07 +0800 Subject: [PATCH 1/2] Always load totalEntityAge --- .../sources/net/minecraft/world/entity/Entity.java.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/patches/sources/net/minecraft/world/entity/Entity.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/Entity.java.patch index 9953d5da41d4..58f3c44f4b35 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/Entity.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/Entity.java.patch @@ -860,7 +860,7 @@ } + // CraftBukkit start + // Spigot start -+ if (this instanceof net.minecraft.world.entity.LivingEntity) { ++ if (true || this instanceof net.minecraft.world.entity.LivingEntity) { // Paper + this.totalEntityAge = input.getIntOr("Spigot.ticksLived", 0); // Paper + } + // Spigot end From e54b4c3143f3f06078e8534f47c83fccc6dc621d Mon Sep 17 00:00:00 2001 From: Rothes <449181985@qq.com> Date: Sat, 30 May 2026 09:03:53 +0800 Subject: [PATCH 2/2] Remove if statement --- .../sources/net/minecraft/world/entity/Entity.java.patch | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/paper-server/patches/sources/net/minecraft/world/entity/Entity.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/Entity.java.patch index 58f3c44f4b35..8b7b2ab241a7 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/Entity.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/Entity.java.patch @@ -854,15 +854,13 @@ this.customData = input.read("data", CustomData.CODEC).orElse(CustomData.EMPTY); this.tags.clear(); input.read("Tags", TAG_LIST_CODEC).ifPresent(this.tags::addAll); -@@ -2104,6 +_,58 @@ +@@ -2104,6 +_,56 @@ } else { throw new IllegalStateException("Entity has invalid rotation"); } + // CraftBukkit start + // Spigot start -+ if (true || this instanceof net.minecraft.world.entity.LivingEntity) { // Paper -+ this.totalEntityAge = input.getIntOr("Spigot.ticksLived", 0); // Paper -+ } ++ this.totalEntityAge = input.getIntOr("Spigot.ticksLived", 0); // Paper + // Spigot end + this.persist = input.getBooleanOr("Bukkit.persist", true); + this.visibleByDefault = input.getBooleanOr("Bukkit.visibleByDefault", true);