createrp_client 0.2.0; mrpack export carries local jars and config/createrp/pack-version.txt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Fulldroper
2026-10-14 10:05:46 +03:00
co-authored by Claude Opus 5.5
parent 6210aa03e5
commit 91fbf75819
5 changed files with 10 additions and 3 deletions
+7
View File
@@ -62,6 +62,13 @@ fs.writeFileSync(path.join(stage, 'modrinth.index.json'), JSON.stringify(index,
fs.cpSync(path.join(root, 'config'), path.join(stage, 'overrides', 'config'), { recursive: true });
// kubejs/assets: always-on client resources (CC terminal font with Cyrillic)
if (fs.existsSync(path.join(root, 'kubejs'))) fs.cpSync(path.join(root, 'kubejs'), path.join(stage, 'overrides', 'kubejs'), { recursive: true });
// jars that live in the pack itself (our createrp_client mod) are not on Modrinth: they go in as overrides
const localJars = fs.readdirSync(path.join(root, 'mods')).filter(f => f.endsWith('.jar'));
if (localJars.length) fs.mkdirSync(path.join(stage, 'overrides', 'mods'), { recursive: true });
for (const j of localJars) fs.copyFileSync(path.join(root, 'mods', j), path.join(stage, 'overrides', 'mods', j));
// the version the game has, for createrp_client's updater (it compares it with the latest release)
fs.mkdirSync(path.join(stage, 'overrides', 'config', 'createrp'), { recursive: true });
fs.writeFileSync(path.join(stage, 'overrides', 'config', 'createrp', 'pack-version.txt'), packVersion);
const out = path.join(root, 'dist', `CreateRP-${packVersion}.mrpack`);
fs.rmSync(out, { force: true });