Update upstream

This commit is contained in:
IzzelAliz 2022-05-07 15:54:04 +08:00
parent df9f220acf
commit f0436fb466
No known key found for this signature in database
GPG Key ID: EE50E123A11D8338

View File

@ -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();