Solved Custom entity (Tracking entity....)

Discussion in 'Spigot Plugin Development' started by xSkill_Cycanx, May 24, 2016.

Thread Status:
Not open for further replies.
  1. Hello, so this error you probably know, what is it. But i want avoid this situation. That only happens when server is stopped and my custom entites are saved into the world. So next i created listener onChunkLoad and onChunkUnload. Ok that works only if server running. But if server is stopped and again started. And chunks get load my entity is removed by plugin, but also this error show in console. Have you any idea how to avoid this situation ? In data config i store " EntityUUID: 'worldName:x:y:z' ", so location i have always. I am using Custom Entities, v1_9_R1. Thanks.

    Code (Text):
    [Server thread/ERROR]: "Silently" catching entity tracking error.
    net.minecraft.server.v1_9_R1.ReportedException: Adding entity to track
        at net.minecraft.server.v1_9_R1.EntityTracker.addEntity(EntityTracker.java:142) [spigot.jar:git-Spigot-944aa20-8cb1b36]
        at net.minecraft.server.v1_9_R1.EntityTracker.track(EntityTracker.java:81) [spigot.jar:git-Spigot-944aa20-8cb1b36]
        at net.minecraft.server.v1_9_R1.WorldManager.a(WorldManager.java:18) [spigot.jar:git-Spigot-944aa20-8cb1b36]
        at net.minecraft.server.v1_9_R1.World.b(World.java:1015) [spigot.jar:git-Spigot-944aa20-8cb1b36]
        at net.minecraft.server.v1_9_R1.WorldServer.b(WorldServer.java:1121) [spigot.jar:git-Spigot-944aa20-8cb1b36]
        at net.minecraft.server.v1_9_R1.WorldServer.a(WorldServer.java:1086) [spigot.jar:git-Spigot-944aa20-8cb1b36]
        at net.minecraft.server.v1_9_R1.Chunk.addEntities(Chunk.java:753) [spigot.jar:git-Spigot-944aa20-8cb1b36]
        at org.bukkit.craftbukkit.v1_9_R1.chunkio.ChunkIOProvider.callStage2(ChunkIOProvider.java:45) [spigot.jar:git-Spigot-944aa20-8cb1b36]
        at org.bukkit.craftbukkit.v1_9_R1.chunkio.ChunkIOProvider.callStage2(ChunkIOProvider.java:1) [spigot.jar:git-Spigot-944aa20-8cb1b36]
        at org.bukkit.craftbukkit.v1_9_R1.util.AsynchronousExecutor$Task.finish(AsynchronousExecutor.java:188) [spigot.jar:git-Spigot-944aa20-8cb1b36]
        at org.bukkit.craftbukkit.v1_9_R1.util.AsynchronousExecutor.finishActive(AsynchronousExecutor.java:347) [spigot.jar:git-Spigot-944aa20-8cb1b36]
        at org.bukkit.craftbukkit.v1_9_R1.chunkio.ChunkIOExecutor.tick(ChunkIOExecutor.java:34) [spigot.jar:git-Spigot-944aa20-8cb1b36]
        at net.minecraft.server.v1_9_R1.MinecraftServer.D(MinecraftServer.java:740) [spigot.jar:git-Spigot-944aa20-8cb1b36]
        at net.minecraft.server.v1_9_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot.jar:git-Spigot-944aa20-8cb1b36]
        at net.minecraft.server.v1_9_R1.MinecraftServer.C(MinecraftServer.java:660) [spigot.jar:git-Spigot-944aa20-8cb1b36]
        at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:559) [spigot.jar:git-Spigot-944aa20-8cb1b36]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_77]
    Caused by: java.lang.IllegalStateException: Entity is already tracked!
        at net.minecraft.server.v1_9_R1.EntityTracker.addEntity(EntityTracker.java:109) ~[spigot.jar:git-Spigot-944aa20-8cb1b36]
        ... 16 more
     
  2. Also i tried find where and how is called adding entity but i found nothing to use.
     
  3. Finally i solved it by yourself trought chunkload event and "se.tracker.untrackEntity(((CraftEntity) en).getHandle());" se is WorldServer...
     
Thread Status:
Not open for further replies.