Skip to content

Commit

Permalink
Update JavaVersionConstraint: 1.20.5 requires Java 21 (#3434)
Browse files Browse the repository at this point in the history
  • Loading branch information
Glavo authored Nov 9, 2024
1 parent 3dde2d1 commit 1d0ae42
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,9 @@ else if (violatedMandatoryConstraints.contains(JavaVersionConstraint.VANILLA))
case MODDED_JAVA_17:
suggestions.add(i18n("launch.advice.modded_java", 17, gameVersion));
break;
case MODDED_JAVA_21:
suggestions.add(i18n("launch.advice.modded_java", 21, gameVersion));
break;
case VANILLA_JAVA_8_51:
suggestions.add(i18n("launch.advice.java8_51_1_13"));
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,14 @@ protected boolean appliesToVersionImpl(GameVersionNumber gameVersionNumber, @Nul
return analyzer != null && analyzer.has(LibraryAnalyzer.LibraryType.FORGE);
}
},
MODDED_JAVA_17(false, GameVersionNumber.atLeast("1.18"), VersionNumber.between("17", "17.999")) {
MODDED_JAVA_17(false, GameVersionNumber.between("1.18", "1.20.4"), VersionNumber.between("17", "17.999")) {
@Override
protected boolean appliesToVersionImpl(GameVersionNumber gameVersionNumber, @Nullable Version version,
@Nullable JavaRuntime java, @Nullable LibraryAnalyzer analyzer) {
return analyzer != null && analyzer.has(LibraryAnalyzer.LibraryType.FORGE);
}
},
MODDED_JAVA_21(false, GameVersionNumber.atLeast("1.20.5"), VersionNumber.between("21", "21.999")) {
@Override
protected boolean appliesToVersionImpl(GameVersionNumber gameVersionNumber, @Nullable Version version,
@Nullable JavaRuntime java, @Nullable LibraryAnalyzer analyzer) {
Expand Down

0 comments on commit 1d0ae42

Please sign in to comment.