chore: update to FLoader 1.16.1
Some checks failed
ci/woodpecker/push/jfmod Pipeline was successful
ci/woodpecker/tag/jfmod Pipeline failed

This commit is contained in:
Johannes Frohnmeyer 2024-08-15 15:55:43 +02:00
parent cae4b0b4db
commit 32937d0bc2
Signed by: Johannes
GPG Key ID: E76429612C2929F4
4 changed files with 15 additions and 15 deletions

View File

@ -7,11 +7,11 @@ base.archivesName = "modsmod"
val commonsVersion = "2.0.0-SNAPSHOT"
jfMod {
minecraftVersion = "1.21"
yarn("build.1")
loaderVersion = "0.15.11"
libJfVersion = "3.16.0"
fabricApiVersion = "0.100.1+1.21"
minecraftVersion = "1.21.1"
yarn("build.3")
loaderVersion = "0.16.1"
libJfVersion = "3.17.0"
fabricApiVersion = "0.102.1+1.21.1"
modrinth {
projectId = "modsmod"
@ -35,7 +35,7 @@ dependencies {
// Dev env
modLocalRuntime("io.gitlab.jfronny.libjf:libjf-config-ui-tiny")
modLocalRuntime("io.gitlab.jfronny.libjf:libjf-devutil")
modLocalRuntime("com.terraformersmc:modmenu:11.0.0-beta.1")
modLocalRuntime("com.terraformersmc:modmenu:11.0.1")
// for modmenu
modLocalRuntime("net.fabricmc.fabric-api:fabric-resource-loader-v0")
modLocalRuntime("net.fabricmc.fabric-api:fabric-screen-api-v1")

View File

@ -1,7 +1,7 @@
pluginManagement {
repositories {
maven("https://maven.fabricmc.net/") // FabricMC
maven("https://maven.frohnmeyer-wds.de/artifacts") // scripts
maven("https://maven.frohnmeyer-wds.de/mirrors")
maven("https://maven.neoforged.net/releases")
gradlePluginPortal()
}
}

View File

@ -4,7 +4,7 @@ import io.gitlab.jfronny.commons.serialize.databind.api.TypeToken;
import io.gitlab.jfronny.modsmod.util.IteratorCallbackList;
import net.fabricmc.loader.impl.FabricLoaderImpl;
import net.fabricmc.loader.impl.ModContainerImpl;
import net.fabricmc.loader.impl.discovery.ModCandidate;
import net.fabricmc.loader.impl.discovery.ModCandidateImpl;
import net.fabricmc.loader.impl.metadata.LoaderModMetadata;
import java.lang.reflect.*;
@ -19,13 +19,13 @@ public class FabricLoaderInterface {
static {
try {
ADD_MOD_METHOD = FabricLoaderImpl.class.getDeclaredMethod("addMod", ModCandidate.class);
ADD_MOD_METHOD = FabricLoaderImpl.class.getDeclaredMethod("addMod", ModCandidateImpl.class);
ADD_MOD_METHOD.setAccessible(true);
MODS_FIELD = FabricLoaderImpl.class.getDeclaredField("mods");
MODS_FIELD.setAccessible(true);
CREATE_PLAIN_METHOD = ModCandidate.class.getDeclaredMethod("createPlain", new TypeToken<List<Path>>(){}.getRawType(), LoaderModMetadata.class, boolean.class, new TypeToken<Collection<ModCandidate>>(){}.getRawType());
CREATE_PLAIN_METHOD = ModCandidateImpl.class.getDeclaredMethod("createPlain", new TypeToken<List<Path>>(){}.getRawType(), LoaderModMetadata.class, boolean.class, new TypeToken<Collection<ModCandidateImpl>>(){}.getRawType());
CREATE_PLAIN_METHOD.setAccessible(true);
} catch (NoSuchMethodException | NoSuchFieldException e) {
throw new IllegalStateException("Failed to get reference to fabric loader internals. This fabric loader version is probably unsupported by modsmod", e);
@ -46,7 +46,7 @@ public class FabricLoaderInterface {
}
}
public static void addMod(FabricLoaderImpl fabricLoader, ModCandidate modCandidate) {
public static void addMod(FabricLoaderImpl fabricLoader, ModCandidateImpl modCandidate) {
try {
ADD_MOD_METHOD.invoke(fabricLoader, modCandidate);
} catch (IllegalAccessException | InvocationTargetException e) {
@ -54,9 +54,9 @@ public class FabricLoaderInterface {
}
}
public static ModCandidate createPlain(Path path, LoaderModMetadata metadata, boolean requiresRemap, Collection<ModCandidate> nestedMods) {
public static ModCandidateImpl createPlain(Path path, LoaderModMetadata metadata, boolean requiresRemap, Collection<ModCandidateImpl> nestedMods) {
try {
return (ModCandidate) CREATE_PLAIN_METHOD.invoke(null, List.of(path), metadata, requiresRemap, nestedMods);
return (ModCandidateImpl) CREATE_PLAIN_METHOD.invoke(null, List.of(path), metadata, requiresRemap, nestedMods);
} catch (IllegalAccessException | InvocationTargetException e) {
throw new IllegalStateException("Failed to create plain mod container", e);
}

View File

@ -19,7 +19,7 @@
"libjf:early": ["io.gitlab.jfronny.modsmod.ModsMod"]
},
"depends": {
"fabricloader": ">=0.13.3",
"fabricloader": ">=0.16.1",
"libjf-config-core-v1": ">=3.0.3",
"libjf-unsafe-v0": ">=3.0.3",
"minecraft": "*"