File tree Expand file tree Collapse file tree
src/main/java/fr/flowarg/flowupdater Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,19 +6,22 @@ plugins {
66}
77
88group = ' fr.flowarg'
9- version = ' 1.9.3 '
9+ version = ' 1.9.4 '
1010
1111java {
1212 toolchain {
13- languageVersion = JavaLanguageVersion . of(8 )
13+ languageVersion = JavaLanguageVersion . of(17 )
1414 }
1515 withJavadocJar()
1616 withSourcesJar()
1717}
1818
1919tasks. withType(JavaCompile ). configureEach {
2020 options. encoding = ' UTF-8'
21- sourceCompatibility = targetCompatibility = JavaVersion . VERSION_1_8
21+ }
22+
23+ tasks. named(" compileJava" ). configure {
24+ options. release. set(8 )
2225}
2326
2427repositories {
@@ -27,13 +30,13 @@ repositories {
2730}
2831
2932dependencies {
30- api ' com.google.code. gson:gson:2.13.1 '
31- api ' fr.flowarg: flowmultitools:1.4.5 '
32- api ' org.jetbrains: annotations:26.0.2 '
33+ api libs . gson
34+ api libs . flowmultitools
35+ api libs . annotations
3336
3437 // Only for internal tests
35- testImplementation ' fr.flowarg:openlauncherlib:3.2.11 '
36- testImplementation ' org .junit.jupiter:junit-jupiter:5.13.4 '
38+ testImplementation libs . oll
39+ testImplementation libs . junit. jupiter
3740 testRuntimeOnly ' org.junit.platform:junit-platform-launcher'
3841}
3942
Original file line number Diff line number Diff line change 1+ [versions ]
2+ gson = " 2.13.2"
3+ flowmultitools = " 1.4.5"
4+
5+ annotations = " 26.0.2"
6+
7+ oll = " 3.2.11"
8+ junit = " 6.0.1"
9+
10+ [libraries ]
11+ gson = { module = " com.google.code.gson:gson" , version.ref = " gson" }
12+ flowmultitools = { module = " fr.flowarg:flowmultitools" , version.ref = " flowmultitools" }
13+ annotations = { module = " org.jetbrains:annotations" , version.ref = " annotations" }
14+ oll = { module = " fr.flowarg:openlauncherlib" , version.ref = " oll" }
15+ junit-jupiter = { module = " org.junit.jupiter:junit-jupiter" , version.ref = " junit" }
Original file line number Diff line number Diff line change 11distributionBase =GRADLE_USER_HOME
22distributionPath =wrapper/dists
3- distributionUrl =https\://services.gradle.org/distributions/gradle-9.0 .0-all.zip
3+ distributionUrl =https\://services.gradle.org/distributions/gradle-9.2 .0-all.zip
44zipStoreBase =GRADLE_USER_HOME
55zipStorePath =wrapper/dists
Original file line number Diff line number Diff line change 3636public class FlowUpdater
3737{
3838 /** FlowUpdater's version string constant */
39- public static final String FU_VERSION = "1.9.3 " ;
39+ public static final String FU_VERSION = "1.9.4 " ;
4040
4141 /** Vanilla version's object to update/install */
4242 private final VanillaVersion vanillaVersion ;
Original file line number Diff line number Diff line change 55import fr .flowarg .flowupdater .download .json .*;
66import fr .flowarg .flowupdater .utils .IOUtils ;
77import fr .flowarg .flowupdater .utils .ModFileDeleter ;
8+ import fr .flowarg .flowupdater .utils .Version ;
89import fr .flowarg .flowupdater .versions .AbstractModLoaderVersion ;
910import fr .flowarg .flowupdater .versions .ModLoaderUtils ;
1011import fr .flowarg .flowupdater .versions .ParsedLibrary ;
@@ -70,9 +71,21 @@ public boolean isModLoaderAlreadyInstalled(@NotNull Path installDir)
7071 .resolve (this .modLoaderVersion );
7172
7273 final Path universalNeoForgeJar = neoForgeDirectory .resolve (this .versionId + "-universal.jar" );
74+ final Path minecraftClientPatchedJar = installDir .resolve ("libraries" )
75+ .resolve ("net" )
76+ .resolve ("neoforged" )
77+ .resolve ("minecraft-client-patched" )
78+ .resolve (this .modLoaderVersion )
79+ .resolve ("minecraft-client-patched-" + this .modLoaderVersion + ".jar" ); // starting from 21.10.37-beta
7380 final Path clientNeoForgeJar = neoForgeDirectory .resolve (this .versionId + "-client.jar" );
7481
75- return Files .exists (universalNeoForgeJar ) && Files .exists (clientNeoForgeJar );
82+ final Version modLoaderVer = Version .gen (this .modLoaderVersion .split ("-" )[0 ]); // skip -beta/alpha etc strings
83+
84+ return Files .exists (universalNeoForgeJar ) && (
85+ Files .exists (
86+ modLoaderVer .isNewerOrEqualTo (Version .gen ("21.10.37" )) ? minecraftClientPatchedJar : clientNeoForgeJar
87+ )
88+ );
7689 }
7790
7891 @ Override
You can’t perform that action at this time.
0 commit comments