Solved Custom zombie crash

Discussion in 'Spigot Plugin Development' started by Parozzz, Dec 6, 2017.

Thread Status:
Not open for further replies.
  1. I am working on a plugin and I need to create a custom zombie. Everything seems to work fine, but sometimes I am getting this error that crashes the server if I remove the plugin the entity id is skipped and everything works fine. Seems like something related to some Async task, but i am using none in my plugin. I am using PaperSpigot.

    https://pastebin.com/HvFHL1xT

    Code (Text):
    [22:00:18 ERROR]: Encountered an unexpected exception
    java.lang.NoClassDefFoundError: Could not initialize class net.minecraft.server.v1_12_R1.Cras                                     hReport
            at net.minecraft.server.v1_12_R1.Entity.f(Entity.java:1753) ~[patched_1.12.2.jar:git-                                     Paper-1268]
            at net.minecraft.server.v1_12_R1.EntityTypes.a(EntityTypes.java:76) ~[patched_1.12.2.                                     jar:git-Paper-1268]
            at net.minecraft.server.v1_12_R1.ChunkRegionLoader.a(ChunkRegionLoader.java:547) ~[pa                                     tched_1.12.2.jar:git-Paper-1268]
            at net.minecraft.server.v1_12_R1.ChunkRegionLoader.a(ChunkRegionLoader.java:488) ~[pa                                     tched_1.12.2.jar:git-Paper-1268]
            at net.minecraft.server.v1_12_R1.ChunkRegionLoader.loadEntities(ChunkRegionLoader.jav                                     a:451) ~[patched_1.12.2.jar:git-Paper-1268]
            at org.bukkit.craftbukkit.v1_12_R1.chunkio.ChunkIOProvider.callStage2(ChunkIOProvider                                     .java:45) ~[patched_1.12.2.jar:git-Paper-1268]
            at org.bukkit.craftbukkit.v1_12_R1.chunkio.ChunkIOProvider.callStage2(ChunkIOProvider                                     .java:16) ~[patched_1.12.2.jar:git-Paper-1268]
            at org.bukkit.craftbukkit.v1_12_R1.util.AsynchronousExecutor$Task.finish(Asynchronous                                     Executor.java:188) ~[patched_1.12.2.jar:git-Paper-1268]
            at org.bukkit.craftbukkit.v1_12_R1.util.AsynchronousExecutor.finishActive(Asynchronou                                     sExecutor.java:347) ~[patched_1.12.2.jar:git-Paper-1268]
            at org.bukkit.craftbukkit.v1_12_R1.chunkio.ChunkIOExecutor.tick(ChunkIOExecutor.java:                                     36) ~[patched_1.12.2.jar:git-Paper-1268]
            at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:859) ~[patche                                     d_1.12.2.jar:git-Paper-1268]
            at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:426) ~[patche                                     d_1.12.2.jar:git-Paper-1268]
            at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:767) ~[patche                                     d_1.12.2.jar:git-Paper-1268]
            at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:665) [patch                                     ed_1.12.2.jar:git-Paper-1268]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_121]
     
    If anyone have any idea, i would like to avoid it to happen again.
     
  2. Well, it's weird... Can you give us your source code? By GitHub would be fine
     
  3. The crash report looks like its from paper spigot, it looks like paper has a bug in its CrashReport code :|, this makes it rather hard to see the original issue.
     
  4. I thought the same. It only happened when I've updated to the last PaperSpigot version, never before. Googling a bit seems like also other people have the same issue, yet not related specifically to Paper.


    Unfortunately, I can't. I'll pastebin the class with the custom entity in it.
    https://pastebin.com/xkjaHXnK
    For registering the custom entity I am using the NMSUtils class from @jetp250 POST HERE.
     
  5. To anyone who will read this, seems like this happens when there an exception is thrown during mob loading or some operation not allowed by Minecraft before the actual mob is loaded into the world.
     
Thread Status:
Not open for further replies.

Share This Page