From f0436fb4667823e6c686ff6d38ebb4ceeaf0801f Mon Sep 17 00:00:00 2001 From: IzzelAliz Date: Sat, 7 May 2022 15:54:04 +0800 Subject: [PATCH] Update upstream --- .../common/mixin/core/world/entity/EntityMixin.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/EntityMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/EntityMixin.java index 0315088f..e604d250 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/EntityMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/EntityMixin.java @@ -552,6 +552,13 @@ public abstract class EntityMixin implements InternalEntityBridge, EntityBridge, @Inject(method = "load", at = @At(value = "RETURN")) public void arclight$read$ReadBukkitValues(CompoundTag compound, CallbackInfo ci) { + // CraftBukkit start + if ((Object) this instanceof LivingEntity entity) { + this.tickCount = compound.getInt("Spigot.ticksLived"); + } + this.persist = !compound.contains("Bukkit.persist") || compound.getBoolean("Bukkit.persist"); + // CraftBukkit end + // CraftBukkit start - Reset world if ((Object) this instanceof ServerPlayer) { Server server = Bukkit.getServer();