mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
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.
This commit is contained in:
parent
3badc8385a
commit
ce8b79d47e
1 changed files with 3 additions and 0 deletions
|
@ -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<net.minecraft.network.protocol.Packet<? super net.minecraft.network.protocol.game.ClientGamePacketListener>> list = new java.util.ArrayList<>();
|
||||
+ serverEntity.sendPairingData(player, list::add);
|
||||
|
|
Loading…
Reference in a new issue