chore: update to FLoader 1.16.1
This commit is contained in:
parent
cae4b0b4db
commit
32937d0bc2
@ -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")
|
||||
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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": "*"
|
||||
|
Loading…
Reference in New Issue
Block a user