From 34d00601b660d54b831fccf44ee96099103f5ad5 Mon Sep 17 00:00:00 2001 From: rfresh2 <89827146+rfresh2@users.noreply.github.com> Date: Thu, 25 Apr 2024 15:41:59 -0700 Subject: [PATCH] workaround neoforge classloader issue this change: https://github.com/neoforged/FancyModLoader/pull/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 --- neo/build.gradle.kts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neo/build.gradle.kts b/neo/build.gradle.kts index ac3816df..50140f2d 100644 --- a/neo/build.gradle.kts +++ b/neo/build.gradle.kts @@ -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")) } @@ -73,6 +73,7 @@ tasks { shadowJar { configurations = listOf(project.configurations.shadow.get()) + relocate("net.lenni0451.lambdaevents", "xaeroplus.lambdaevents") } remapJar {