Repository navigation
Relocate adventure service files in the Fabric and Forge jars - #592
Merged
Merged
Conversation
The jars shipped the adventure service files unrelocated, pointing at provider classes that only exist under the relocated package, which breaks other mods that load adventure's services. The NeoForge build already merges service files for this reason.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #591
The Fabric and Forge jars relocate adventure to
me.lucko.spark.lib.adventure, but the two adventure service files are copied as they are:Those provider classes do not exist under that name in the jar, so any other mod that loads the real adventure services finds spark's entry and fails with
ServiceConfigurationError: ... Provider ... not found, which is the PacketEvents crash in the issue.The NeoForge build already has
mergeServiceFiles()for this (#460), which makes shadow relocate the service files too. This adds the same line to the Fabric and ForgeshadowJartasks.Checked
Built the jars from master and from this branch and listed
META-INF/services:net.kyori.adventure...pointing atnet.kyori.adventure...gson.impl...(same as the published 1.10.187 jar)me.lucko.spark.lib.adventure...pointing atme.lucko.spark.lib.adventure...gson.impl..., which exist in the jarAfter the change both jars match what the NeoForge jar already ships.
Then booted a Fabric 26.3 dedicated server (loader 0.19.5, fabric-api 0.162.0) with
packetevents-fabric-2.14.0:ServiceConfigurationError: net.kyori.adventure.text.event.DataComponentValueConverterRegistry$Provider: Provider net.kyori.adventure.text.serializer.gson.impl.GsonDataComponentValueConverterProvider not foundNot covered: I did not boot a Forge server; for Forge I only compared the jar contents.