Skip to content

Commit

Permalink
workaround neoforge classloader issue
Browse files Browse the repository at this point in the history
this change: neoforged/FancyModLoader#96
causes LambdaEvents to be loaded as a LIBRARY instead of GAMELIBRARY

for some reason this prevents it from being able to load XP classes

The only way to get it to load as a GAMELIBRARY is to modify the LambdaEvents jar manifest which is not easily doable here. So instead i just shadowing it into the XP package path to work around this
  • Loading branch information
rfresh2 committed Apr 25, 2024
1 parent 23fe2a9 commit 34d0060
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion neo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ dependencies {
modCompileOnly(libs.fabric.waystones)
shadow(libs.sqlite)
forgeRuntimeLibrary(implementation(include(libs.caffeine.get())!!)!!)
forgeRuntimeLibrary(implementation(include(libs.lambdaEvents.get())!!)!!)
forgeRuntimeLibrary(implementation(shadow(libs.lambdaEvents.get())!!)!!)
compileOnly(project(":common"))
}

Expand Down Expand Up @@ -73,6 +73,7 @@ tasks {

shadowJar {
configurations = listOf(project.configurations.shadow.get())
relocate("net.lenni0451.lambdaevents", "xaeroplus.lambdaevents")
}

remapJar {
Expand Down

0 comments on commit 34d0060

Please sign in to comment.