From ce8b79d47ee1df89c69f1da7c0efc00d5399d371 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sun, 28 Jul 2024 15:49:38 -0700 Subject: [PATCH] Null check tracker in Entity#resendPossiblyDesyncedEntityData Accidentally dropped this check last commit. It is possible that this is called while the entity is not tracked. --- patches/server/Properly-resend-entities.patch | 3 +++ 1 file changed, 3 insertions(+) diff --git a/patches/server/Properly-resend-entities.patch b/patches/server/Properly-resend-entities.patch index d7eb9b135e..ba2175913d 100644 --- a/patches/server/Properly-resend-entities.patch +++ b/patches/server/Properly-resend-entities.patch @@ -138,6 +138,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + if (player.getBukkitEntity().canSee(this.getBukkitEntity())) { + ServerLevel world = (net.minecraft.server.level.ServerLevel)this.level(); + net.minecraft.server.level.ChunkMap.TrackedEntity tracker = world == null ? null : world.getChunkSource().chunkMap.entityMap.get(this.getId()); ++ if (tracker == null) { ++ return; ++ } + final net.minecraft.server.level.ServerEntity serverEntity = tracker.serverEntity; + final List> list = new java.util.ArrayList<>(); + serverEntity.sendPairingData(player, list::add);