Custom mobs seem to lose their properties when I go far away from them?

Discussion in 'Plugin Development' started by Scullyking, Jul 5, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    Scullyking

    I have custom VILLAGER entities (NPCVillager.class) in my world which are managed by an NPCManager class.

    Using NMS I have made these VILLAGERs un-able to move.

    The problem is when I move far away from them and then return to them, they appear to have lost this custom NMS property and start walking around.

    It's as if they've reverted to the parent class EntityVillager.

    What's going on?
     
  2. @Scullyking I haven't dealt with NMS and custom entities, and I'm almost sure this might be the wrong way to go, but you could always keep the chunk they're in loaded.
     
  3. Offline

    Scullyking

    @CodePlaysMinecraft
    Unfortunately that is probably a bad idea! I've put in a really awful "fix" for now, basically I kill every villager in the world every 20 seconds and then re-spawn all the NPCs. It doesn't lag at all (because there will only be about 200 NPCs in the world at most) but it's hardly the most elegant fix.
     
Thread Status:
Not open for further replies.

Share This Page