@@ -69,7 +69,7 @@ val adventureApiNbt by configurations.creating
6969dependencies {
7070 implementation(project(" :api" ))
7171 implementation(project(" :webserver" , " shadow" ))
72- implementation(" com.github.retrooper:packetevents-sponge:2.12.2+22c9961 -SNAPSHOT" )
72+ implementation(" com.github.retrooper:packetevents-sponge:2.12.2+24443d4 -SNAPSHOT" )
7373 implementation(" org.bstats:bstats-sponge:3.0.2" )
7474 implementation(" org.incendo:cloud-sponge:2.0.0-SNAPSHOT" ) {
7575 exclude(" org.checkerframework" )
@@ -103,6 +103,18 @@ tasks {
103103 relocate(" org.bstats" , " forcepack.libs.bstats" )
104104 relocate(" net.kyori.adventure.nbt" , " forcepack.libs.adventure.nbt" )
105105 relocate(" net.kyori.examination" , " forcepack.libs.adventure.ex" )
106+
107+ // packetevents classes are already relocated by buildlogic.java-common-conventions
108+ // (com.github.retrooper.packetevents -> forcepack.libs.pe.api, io.github.retrooper.packetevents -> forcepack.libs.pe.impl).
109+ // Rename the bundled mapping assets so a standalone packetevents install can't
110+ // accidentally load our (potentially older) copy via the classloader, and vice
111+ // versa. The matching customResourceProvider in ForcePackSponge translates
112+ // lookups back to this renamed path.
113+ eachFile {
114+ if (path.startsWith(" assets/mappings/" )) {
115+ path = " assets/forcepack-sponge-packetevents/mappings/" + path.removePrefix(" assets/mappings/" )
116+ }
117+ }
106118 }
107119}
108120
0 commit comments