Repository navigation
Detect Java version requirements of Fabric mods - #196
Merged
Merged
Conversation
JulianVennen
approved these changes
Nov 13, 2026
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.
Fabric Loader provides Java as a built-in mod with the id
java, named after the running JVM (java.vm.name).When a mod needs a newer Java, the loader reports it like a missing mod dependency.
FabricModDependencyProblemmatched that line and reported "The mod 'Foo' is missing the required mod 'Java HotSpot(TM) 64-Bit Server VM'." with the solution "Install the mod 'Java HotSpot(TM) 64-Bit Server VM' with version >=99.", which is wrong on both counts.This PR adds
FabricModJavaVersionProblem, which names the mod and the required Java version and suggests the existingUpdateJavaSolution.FabricModDependencyProblemskips dependencies with the idjava, so the line is not reported twice.The pattern anchors on the id
(java)and not on the name, because the name depends on the JVM vendor (OpenJDK 64-Bit Server VM,Java HotSpot(TM) 64-Bit Server VM, ...).An exact requirement (
"java": "99", logged asrequires version 99 of) is reported the same way, because in practice it means the installed Java is too old.Changes
FabricModJavaVersionProblemwith the patternsminimumandspecificmod-java-version-problemFabricModDependencyProblemfabric-java-version-dependency.logandfabric-java-version-dependency-exact.log, real Fabric Loader 0.20.1 server logs for Minecraft 26.3Not covered:
any version before,afterandbetweenrequirements on Java, which are rare and have no meaningful update solution.