class not found, but mapping is shaded
CrazyL3gend opened this issue · comments
Hello. I have a problem with enable plugin with mojang mapping, I shade in plugin mojang mappings and in jar I see net/minecraft/world/entity/monster/Zombie, but plugin give me this error java.lang.NoClassDefFoundError: net/minecraft/world/entity/monster/Zombie, I am also have kotlin and kotlin dsl.
you need to run the reobf jar, as the server doesn't use mojang mappings at runtime (yet...)
+1 on MiniDigger's comment. Mojang-mapped JARs are currently development-only.
Assuming you're using gradle + userdev:
tasks {
assemble {
dependsOn(reobfJar)
}
}
Adding this to your build.gradle.kts will ensure gradle calls the reobfJar task from userdev before building your JAR :)