You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 3, 2024. It is now read-only.
A sane and simple framework around FML for Patchwork.
3
+
4
+
This document intends to (eventually) describe how mods are identified and loaded.
5
+
## Custom block
6
+
Patchwork Patcher will provide the following metadata at the root of the `custom` block:
7
+
1.`patchwork:source`: An object with a member named `loader` of value `forge`.
8
+
This is for ModMenu, and should not be considered a reliable or stable marker of a patched mod (it will be removed in 1.16)
9
+
10
+
Additionally, the following metadata will be provided through the `patchwork:patcherMeta` object:
11
+
1.`patchedOn`: An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date that shows when this file was patched.
12
+
It should be in UTC time and have the format of the format `yyyy-MM-dd'T'HH:mm'Z'` (which results in something like `2020-10-10T22:03Z`)
13
+
2.`patcherVersion`: The version of Patcher that this mod has been patched with.
14
+
3.`annotations`: Points to a json file somewhere in the JAR that holds the annotation metadata.
15
+
Must either be a valid SemVer version (i.e `1.0.0`), or `develop`. When checking if a Patcher version is recent enough for the current API version, `develop` will always be considered compatible.
16
+
4.`parent`: If the mod is a skeleton mod (TODO: Describe in more detail), this tells the mod id of it's parent
17
+
5.`children`: If the mod has children, this array lists all additional mod ids that were provided in the original Forge mod.
// TODO: Supposed to call "container.setMod()" here, but this requires a WIP Patchwork-Patcher feature.
103
-
initializer.onForgeInitialize();
124
+
ModInstanceinstance = pair.getRight().get();
125
+
126
+
if (instance != null) {
127
+
container.setMod(instance);
128
+
loaded = true;
129
+
}
104
130
} catch (Throwablet) {
105
131
if (error == null) {
106
132
error = newPatchworkInitializationException("Failed to construct Patchwork mods");
@@ -127,9 +153,9 @@ public static void gatherAndInitializeMods() {
127
153
}
128
154
129
155
if (unDefinedClass.startsWith("net.minecraft.") || (unDefinedClass.startsWith("net.minecraftforge.") && !unDefinedClass.startsWith("net.minecraftforge.lex."))) {
130
-
thrownewPatchworkInitializationException("Patchwork mod " + initializer.getModId() + " tried to access an unimplemented " + type + ".", t);
156
+
thrownewPatchworkInitializationException("Patchwork mod " + modId + " tried to access an unimplemented " + type + ".", t);
131
157
} else {
132
-
thrownewPatchworkInitializationException("Patchwork mod " + initializer.getModId() + " tried to access a missing " + type + " from a missing and undeclared, or outdated dependency.", t);
158
+
thrownewPatchworkInitializationException("Patchwork mod " + modId + " tried to access a missing " + type + " from a missing and undeclared, or outdated dependency.", t);
133
159
}
134
160
}
135
161
@@ -138,18 +164,24 @@ public static void gatherAndInitializeMods() {
0 commit comments