WesJD / AnvilGUI

Capture user input in Minecraft through an anvil GUI in under 20 lines of code
MIT License
466 stars 111 forks source link

Error: java.lang.NoClassDefFoundError: net.minecraft.world.entity.player.EntityHuman #327

Closed toonystank closed 2 months ago

toonystank commented 2 months ago

Hello im getting this error on 1.20.6 with anvilgui version 1.9.4-SNAPSHOT

[18:19:32 WARN]: [GPExtension] Task #58 for GPExtension v4.5.4PRE_RELEASE01 generated an exception
java.lang.NoClassDefFoundError: net/minecraft/world/entity/player/EntityHuman
        at java.base/java.lang.Class.forName0(Native Method) ~[?:?]
        at java.base/java.lang.Class.forName(Class.java:534) ~[?:?]
        at java.base/java.lang.Class.forName(Class.java:513) ~[?:?]
        at io.papermc.reflectionrewriter.runtime.AbstractDefaultRulesReflectionProxy.forName(AbstractDefaultRulesReflectionProxy.java:68) ~[reflection-rewriter-runtime-0.0.1.jar:?]
        at io.papermc.paper.pluginremap.reflect.PaperReflectionHolder.forName(Unknown Source) ~[purpur-1.20.6.jar:git-Purpur-2204]
        at GriefPrev-GUI-4.5.4PRE_RELEASE01.jar/com.toonystank.gpextension.utils.anvilgui.version.VersionMatcher.match(VersionMatcher.java:43) ~[GriefPrev-GUI-4.5.4PRE_RELEASE01.jar:?]
        at GriefPrev-GUI-4.5.4PRE_RELEASE01.jar/com.toonystank.gpextension.utils.anvilgui.AnvilGUI.<clinit>(AnvilGUI.java:42) ~[GriefPrev-GUI-4.5.4PRE_RELEASE01.jar:?]
        at GriefPrev-GUI-4.5.4PRE_RELEASE01.jar/com.toonystank.gpextension.utils.anvilgui.AnvilGUI$Builder.<init>(AnvilGUI.java:400) ~[GriefPrev-GUI-4.5.4PRE_RELEASE01.jar:?]
        at GriefPrev-GUI-4.5.4PRE_RELEASE01.jar/com.toonystank.gpextension.listener.GeneralListener.onAnvilReply(GeneralListener.java:84) ~[GriefPrev-GUI-4.5.4PRE_RELEASE01.jar:?]
        at GriefPrev-GUI-4.5.4PRE_RELEASE01.jar/com.toonystank.gpextension.gui.generic.requirement.BaseRequirementSection$3.run(BaseRequirementSection.java:151) ~[GriefPrev-GUI-4.5.4PRE_RELEASE01.jar:?]
        at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.20.6.jar:git-Purpur-2204]
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:482) ~[purpur-1.20.6.jar:git-Purpur-2204]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1740) ~[purpur-1.20.6.jar:git-Purpur-2204]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:503) ~[purpur-1.20.6.jar:git-Purpur-2204]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1612) ~[purpur-1.20.6.jar:git-Purpur-2204]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1266) ~[purpur-1.20.6.jar:git-Purpur-2204]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329) ~[purpur-1.20.6.jar:git-Purpur-2204]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.ClassNotFoundException: net.minecraft.world.entity.player.EntityHuman
        at io.papermc.paper.plugin.entrypoint.classloader.PaperPluginClassLoader.loadClass(PaperPluginClassLoader.java:142) ~[purpur-1.20.6.jar:git-Purpur-2204]
        at io.papermc.paper.plugin.entrypoint.classloader.PaperPluginClassLoader.loadClass(PaperPluginClassLoader.java:103) ~[purpur-1.20.6.jar:git-Purpur-2204]
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[?:?]
        ... 18 more 
mastercake10 commented 2 months ago

Seems like it doesn't remap the wrapper class correctly. EntityHuman should become Player, but this isn't the case somehow. Verify that it gets remapped in your logs.

toonystank commented 2 months ago

ah ya it did not remap. because I was using paper-plugin.yml .

mastercake10 commented 2 months ago

paper-plugin.yml? I thought it can only explicitly disabled using the paperweight gradle plugin or by specifying it in the manfiest.MF file of the jar. You need to ensure that it remaps the .jar file, or at least the classes from AnvilGUI since they all use spigot mappings.

toonystank commented 2 months ago

paper-plugin.yml? I thought it can only explicitly disabled using the paperweight gradle plugin or by specifying it in the manfiest.MF file of the jar. You need to ensure that it remaps the .jar file, or at least the classes from AnvilGUI since they all use spigot mappings.

Ya I will see what I can do. thanks for the help. issue is solved

TrueMB commented 1 week ago

paper-plugin.yml? I thought it can only explicitly disabled using the paperweight gradle plugin or by specifying it in the manfiest.MF file of the jar. You need to ensure that it remaps the .jar file, or at least the classes from AnvilGUI since they all use spigot mappings.

Ya I will see what I can do. thanks for the help. issue is solved

Hey, could you maybe share your solution? I currently got the same problem....

EDIT: I think I used the wrong jdk version in the build.gradle.