PaperMC / paperweight

Gradle build system plugin for Paper and Paper forks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 :)

now I have another problem, I have this fatJar task gradle
изображение

reobfJar working but I have same error with classNotFound
изображение

commented

Please ask on our discord or forums for future support with this. This is not a paperweight issue, and the issue tracker is not the best place for help.