From 7f19cc85ce32a8d1b3e91187ab18d71f7179a199 Mon Sep 17 00:00:00 2001 From: unimatrixgit <95320811+unimatrixgit@users.noreply.github.com> Date: Sat, 28 Nov 2026 14:52:01 +0100 Subject: [PATCH] Build the central pack from pinned production common artwork --- .forgejo/workflows/resourcepack-ci.yml | 11 +++++++---- tools/build-planet-texture-packs.test.mjs | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/resourcepack-ci.yml b/.forgejo/workflows/resourcepack-ci.yml index d3809a7d..2530cbd7 100644 --- a/.forgejo/workflows/resourcepack-ci.yml +++ b/.forgejo/workflows/resourcepack-ci.yml @@ -88,18 +88,21 @@ jobs: run: | set -euo pipefail node --test tools/build-planet-texture-packs.test.mjs - curl --fail --location --retry 2 https://www.dunerealms.com/downloads/DuneRealms-Network-Artwork-v3.zip -o central-pack-baseline.zip + curl --fail --location --retry 2 https://www.dunerealms.com/downloads/DuneRealms-Network-Artwork-v6.zip -o central-pack-baseline.zip python3 - <<'PYTHON' import pathlib import runpy repair = runpy.run_path('tools/build-resourcepack-repair.py') - entries = repair['read_pack'](pathlib.Path('central-pack-baseline.zip'), repair['OLD_NETWORK']) - for name, data in repair['world_artwork'](entries).items(): + entries = repair['read_pack']( + pathlib.Path('central-pack-baseline.zip'), + 'ed2533646ee5e19a1dbfeec66e5791d1011a5107e6fcc4153372e431dfc5f56a', + ) + for name, data in entries.items(): target = pathlib.Path('central-pack-base') / name target.parent.mkdir(parents=True, exist_ok=True) target.write_bytes(data) PYTHON - node tools/build-central-resource-pack.mjs central-pack-base central-pack-output 1 + node tools/build-central-resource-pack.mjs central-pack-base central-pack-output 2 printf '%s\n' "$GITHUB_SHA" > central-pack-output/SOURCE_COMMIT (cd central-pack-output && sha256sum -- *.zip central-pack-manifest.json SOURCE_COMMIT > SHA256SUMS) - uses: actions/upload-artifact@v3 diff --git a/tools/build-planet-texture-packs.test.mjs b/tools/build-planet-texture-packs.test.mjs index 9c1fadef..9ab8c439 100644 --- a/tools/build-planet-texture-packs.test.mjs +++ b/tools/build-planet-texture-packs.test.mjs @@ -96,3 +96,21 @@ test('central generation refuses to overwrite a different item definition or mod error=>error.message==='Conflicting pack entry: '+file); } }); + +test('the central builder preserves compatible common runtime assets and leaves native overlays outside the base',()=>{ + const inherited=[ + 'pack.mcmeta', + 'assets/dunerealms/items/ecology/water_of_life.json', + 'assets/dunerealms/models/item/ecology/jerboa_egg.json', + 'assets/dunerealms/textures/entity/npc/chani.png', + 'assets/dunerealms/particles/fixture.json', + 'assets/dunerealms/sounds.json', + 'assets/dunerealms/sounds/fixture.ogg' + ]; + const base=new Map(inherited.map(name=>[name,Buffer.from(name==='pack.mcmeta' + ?JSON.stringify({pack:{pack_format:64}}):name)])); + const entries=centralPackEntries(base); + for(const name of inherited)assert.deepEqual(entries.get(name),base.get(name),name); + assert(!entries.has('assets/minecraft/textures/block/stone.png')); + assert(entries.has('assets/dunerealms/textures/planets/arrakis/block/stone.png')); +});