1.8.8 NPC despawns when is in an unloaded chunk

Discussion in 'Spigot Plugin Development' started by Vytska111, Feb 23, 2020.

  1. Hi,
    So I made an NPC with ProtocolLib, it works fine, but when the client goes too far, the NPC just disappears. I can go up to 160 blocks from the NPC without it despawning. The one idea I have to fix this is using PlayerMoveEvent and somehow calculate how much blocks are from the NPC, but that would probably lower the performance of the server. So I wanted to ask how Citizens and other NPC plugins know when to send packets to show the NPC to the client again, so they don't disappear.