You've already forked AstralRinth
forked from didirus/AstralRinth
feat(frontend): Package datapack as NeoForge mod (#2142)
This commit is contained in:
@@ -119,6 +119,16 @@ export const createDataPackVersion = async function (
|
||||
forgeModsToml.issueTrackerURL = project.issues_url;
|
||||
}
|
||||
|
||||
const neoModsToml = {
|
||||
...forgeModsToml,
|
||||
modLoader: "javafml",
|
||||
loaderVersion: "[1,)",
|
||||
mods: forgeModsToml.mods.map((mod) => ({
|
||||
...mod,
|
||||
updateJSONURL: mod.updateJSONURL + "?neoforge=only",
|
||||
})),
|
||||
};
|
||||
|
||||
const primaryFileData = await (await fetch(primaryFile.url)).blob();
|
||||
|
||||
const primaryZipReader = new JSZip();
|
||||
@@ -133,6 +143,12 @@ export const createDataPackVersion = async function (
|
||||
if (loaders.includes("forge")) {
|
||||
primaryZipReader.file("META-INF/mods.toml", TOML.stringify(forgeModsToml, { newline: "\n" })); // eslint-disable-line import/no-named-as-default-member
|
||||
}
|
||||
if (loaders.includes("neoforge")) {
|
||||
primaryZipReader.file(
|
||||
"META-INF/neoforge.mods.toml",
|
||||
TOML.stringify(neoModsToml, { newline: "\n" }), // eslint-disable-line import/no-named-as-default-member
|
||||
);
|
||||
}
|
||||
|
||||
if (!newForge && loaders.includes("forge")) {
|
||||
const classFile = new Uint8Array(
|
||||
|
||||
Reference in New Issue
Block a user