Skip to content
Discussion options

You must be logged in to vote

it works perfectly in my dev env. But when I launch my exported mod it crashes

There is likely an older version of OSHI present in the environment where you're executing your mod.

Try relocating OSHI to a different package as part of your shading, e.g. in this section add entries to relocate OSHI and its dependencies:

named<ShadowJar>("shadowJar") {
    archiveClassifier.set("dev")
    configurations = listOf(shade, modShade)
    duplicatesStrategy = DuplicatesStrategy.EXCLUDE
    
    // Add these relocations
    relocate("oshi", "com.github.zacgamingpro1234.shade.oshi")
    relocate("com.sun.jna", "com.github.zacgamingpro1234.shade.jna")
    relocate("org.slf4j", "com.github.zacgaming…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Zacgamingpro1234
Comment options

@dbwiddis
Comment options

Answer selected by Zacgamingpro1234
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants