Split resource pack into per-content packs for servers #20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/split-res-packs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
packs.json.packs.jsonkeeps that version. Anything else takes the current manifest version. Without--previous, every pack uses the current version.packs.jsonwhen it exists, then uploads the PUBLIC mcpack and zip, the FULL mcpack, allsplit/*.mcpack, andpacks.json.Assets
PokeBedrock RES PUBLIC <version>.mcpackand.zipPokeBedrock RES FULL <version>.mcpackpokebedrock-res-<name>.mcpackfor texts-en_US, texts-cs_CZ, texts-de_DE, texts-es_ES, texts-pt_BR, texts-ru_RU, texts-zh_CN, 3d, server, ui, core, audio-cries, audio-music, audio-otherpacks.jsonpacks.json schema
Schema 1, written by the build. Priority is array order (index 0 highest). There is no separate doc URL; the shape is:
filterkeys are optional and AND-ed:language(client language code) andminMemoryTier(the 3d pack uses 2). Header UUIDs are committed inscripts/data/splitPacks.ts.Test results
npm test: 18 passed (3 suites).npx ts-node --project tsconfig.json scripts/build.tssucceeded. A second run with--previous split/packs.jsonreused every pack version (hashes matched).subpacks/and keeps_3dcombined filenames;texts-de_DEshipstexts/languages.jsonof["de_DE"].1.21.20. That assertion was already red on main becausepresent.geo.jsonis above the 1.21.0 floor and the compiler takes the max.Sizes (zipped)
Follow-ups
languages.jsonper texts pack.Review @
26098a8e(merge main → feat/split-res-packs)No prior bot review on this SHA. Open issues: 0 (no issue-link). Not gameplay-pack / no BEH nudge / will not merge res alone.
Verified after main merge
26098a8emergeable, draft=false; basemain@5a2ff211.2.22.4(stale doc only).Blocker
texts-en_USis index 0 (highest priority) withfilter: {}. Locale packs sit below it and also writetexts/languages.json. Unless gobds drops en_US whenever a language-specific pack matches, highest-wins onlanguages.json(and any shared paths) will pin clients to English. Put en_US last among the texts packs (fallback) or document/enforce a gobds exclusion rule in-repo before merge.Otherwise solid
packs.json; previous-release fetch tolerates missing assets.PokeBedrock RES PUBLIC|FULL …is intentional — coordinate hub/bds-manager/gobds (do not merge res independently).Nits
2.22.4.minMemoryTier: 2on split3dvs PUBLIC subpackmemory_tier: 8— confirm intentional for server selection vs client subpack picker.languages.json) remain required after the priority fix.@ -0,0 +33,4 @@export const SPLIT_PACKS: readonly SplitPackDef[] = [{name: "texts-en_US",headerUuid: "e8c58119-c679-4d2d-a8dc-347caf7d0b70",Blocker — texts priority.
texts-en_USisSPLIT_PACKS[0](highest priority per file header / packs.json contract) withfilter: {}, so it always stacks. Locale packs below also emittexts/languages.json. On a de_DE client that gets both packs, highest-wins on that path (and any other shared texts paths) can pin the client to English.Move
texts-en_USto last among the texts packs so it is the fallback, or have gobds omit it when a language-specific pack matches — and put that rule next to this table if it is consumer-side. The in-game “lang fallback” follow-up does not land until this order (or exclusion) is correct.@ -0,0 +84,4 @@name: "3d",headerUuid: "ca3cc090-03b4-455a-917c-feb8f212d216",moduleUuid: "a491b26d-c297-4102-a65c-c4a75787b610",filter: { minMemoryTier: 2 },Nit / confirm intentional: split
3dusesminMemoryTier: 2while PUBLIC’s3dsubpack staysmemory_tier: 8. If gobds sends the 3d pack to tier≥2 clients, low-memory devices get 3d assets they would not enable via the PUBLIC subpack path. Fine if deliberate for server selection; worth one line in README/packs.json docs so hub/gobds stay aligned.Reviewed
26098a8efae6b4d13671fa1fc57269baf6ebca73(feat/split-res-packs → main).Verdict: Approve. Build/split/versioning design looks sound; tests cover assignment, PUBLIC∖server, hash reuse, and filtered combine.
What looks good
packs.jsonschema 1.manifest.jsonso version reuse is stable;--previous/ missing-release path is defensive.compileCombinedAssets({ includePaths })correctly scopes core vs server combined keys; CI hard-checks 14 split artifacts + uploads PUBLIC/FULL/packs.json.1.21.20.CI (this head)
CI / build-and-test (20.x)— success (~28s)Model Preview / model-preview— success (~1m20s)Release / cutover (not blockers for the code)
PokeBedrock RES 2.22.5.mcpack(nopacks.json). First release with this renames PUBLIC/FULL assets; ensure gobds / hub / bds-manager understandpacks.json(or the documented single-mcpack fallback) before that tag.languages.json.Issue links: repo
open_issues_count=0/list_issues type=issues state=openempty — noFixes:/Could Fix:posted.Resource-pack companion only — no BEH nudge, no merge, no push.
@ -0,0 +136,4 @@"render_controllers/crate.json","particles/crate/**","textures/items/crate_spawn_egg.png","textures/items/crate_keys/**",Non-blocking follow-up:
item_texture.jsonstays in core (catch-all) and still names these server-stripped paths (crate_spawn_egg,textures/items/crate_keys/*, floating_text / server_npc spawn eggs, etc.).Fine for the server split stack (server pack supplies the PNGs). For PUBLIC, those texture files are absent while the catalog rows remain — likely soft missing-texture only if a public client ever renders those items. If PUBLIC downloads are meant to be clean, consider stripping or rewriting those
texture_dataentries in a later pass (not required to land this).Review @
f0a00d08(Point model preview at the Forgejo copy of the action)Delta vs prior tip
26098a8e: only.github/workflows/model-preview.yml—smell-of-curry/mc-model-preview@latest→ pinnedhttps://git.pokebedrock.com/pokebedrock/mc-model-preview@b10a8ffc…. Right move for Forgejo runners (no floating@latest/ GitHub-only action). CI on this head: CI / build-and-test success (~31s); Model Preview success (~1m20s).Still blocking (unchanged — see prior inline #11186)
texts-en_USremainsSPLIT_PACKS[0]withfilter: {}. Locale packs below still writetexts/languages.json. Without gobds dropping en_US when a language pack matches, highest-wins can pin clients to English. Put en_US last among texts packs (fallback) or document/enforce the exclusion rule in-repo before merge. Not addressed by this commit.Carry-forward (not re-litigated)
minMemoryTier: 2vs PUBLIC subpackmemory_tier: 8— confirm intentional (inline #11187).packs.json+ PUBLIC/FULL rename — do not merge res alone.Issue links
Open res issues: 0 — no
Fixes:/Could Fix:.Not gameplay-pack / no BEH nudge / no merge.
Good: pin the Forgejo-hosted action SHA instead of
smell-of-curry/mc-model-preview@latest. Model Preview is green on this tip.Review @
f0a00d08(Point model preview at the Forgejo copy of the action)No prior bot review on this SHA. Open issues: 0 (no issue-link). Not gameplay-pack / no BEH nudge / will not merge res alone.
New commit (
.github/workflows/model-preview.ymlonly) — OKsmell-of-curry/mc-model-preview@latestwith pinned Forgejo absolute URLhttps://git.pokebedrock.com/pokebedrock/mc-model-preview@b10a8ffcf825203aa537c56ce48531249bf1ca6e.pokebedrock/mc-model-preview(Forgejo-friendly artifact fallback).Blocker still open (unchanged since REQUEST_CHANGES#2946 / inline on
scripts/data/splitPacks.ts)texts-en_USremainsSPLIT_PACKS[0]withfilter: {}. Locale packs below still emittexts/languages.json. Highest-wins can pin non-English clients to English unless en_US is last among texts packs (fallback) or gobds excludes it when a language pack matches. Not fixed by this tip — do not treat APPROVED#2947 (same prior tip race) as clearing this.Not re-opening a duplicate inline for the same finding (existing thread on
texts-en_US).Otherwise
f0a00d08mergeable, draft=false; basemain@d9b4c7e6(merge_base5a2ff211).Review @
05f99f36(Keep split packs from shadowing each other's files)No prior bot review on this SHA. Open issues: 0 (no issue-link). Not gameplay-pack / no BEH nudge / will not merge res alone.
Delta vs
f0a00d08— clears REQUEST_CHANGES#2961texts/languages.json— texts packs now write identicalSPLIT_LANGUAGES(full list) instead of[single locale]. Highest-wins / union no longer pins clients toen_USonly.texts-en_USmay stay index 0 withfilter: {}; that is fine once the shared file matches.compileCombinedAssets({ suffix: "_server" })for the server pack sopokebedrock_*_server(.geo).jsondoes not wholesale-replace core's root combined files. Right fix for same-path stack behavior (same reason subpacks use_3d).SPLIT_LANGUAGESmatches sourcetexts/languages.json(set equality).CI (this head)
CI / build-and-test— success (run #2336)Model Preview— in flight / succeeding on this tip (run #2337)Carry-forward (not blockers)
packs.json+ PUBLIC/FULL rename before that tag.minMemoryTier: 2on split3dvs PUBLIC subpackmemory_tier: 8— confirm intentional.languages.jsonas["de_DE"]and schema sample2.22.4— stale docs only.Resource-pack companion — do not merge independently of consumers.
Review @
05f99f36(Keep split packs from shadowing each other's files)No prior bot review on this SHA. Open issues: 0 (no issue-link). Not gameplay-pack / no BEH nudge / will not merge res alone.
Prior blocker cleared
texts/languages.jsonpinning (REQUEST_CHANGES#2961 / #2946): each texts pack previously wrote only its own code, sotexts-en_USatSPLIT_PACKS[0]withfilter: {}could pin the stack to English. Tip now ships the same fullSPLIT_LANGUAGESlist in every texts pack (and tests equality vs core's sourcetexts/languages.json). Highest-wins vs union no longer changes the result. Emptyfilteron en_US stays intentional (fallback to everyone) — OK with identical lists.New fix — LGTM
rootServercompiles withsuffix: "_server"sopokebedrock_*_serverfiles cannot wholesale-replace core's combined animations/models/render_controllers. Tests cover filtered merge + suffix path uniqueness.main@9a5af785.Carry-forward (not blockers for this tip)
packs.json+ PUBLIC/FULL rename — do not merge res independently.texts-de_DEshipslanguages.jsonof["de_DE"]— stale vs this tip; refresh when convenient.minMemoryTier: 2vs PUBLIC subpackmemory_tier: 8— still confirm intentional (server selection vs client subpack picker).Review @
a109538b(feat(build): give every split pack its own icon)No prior bot review on this SHA. Open issues: 0 (no issue-link). Not gameplay-pack / no BEH nudge / will not merge res alone.
Delta vs
05f99f36— LGTMcorepacks getpack_icon.pngfromscripts/data/packIcons/<name>.pngviacontentEntries({ icon }). Core keeps the rootpack_icon.png(assignPackstill routes it there). Icons are underscripts/, whichshippableFilesalready excludes, so they never ship as source.SPLIT_PACKSname exceptcorehas a matching PNG (13/13). Test asserts no missing icons +assignPack("pack_icon.png") === "core". Missing icon failsreadFileat build time.CI (this head)
CI / build-and-test— successModel Preview— successCarry-forward (not blockers)
packs.json+ PUBLIC/FULL rename — do not merge res independently.minMemoryTier: 2vs PUBLIC subpackmemory_tier: 8— still confirm intentional.languages.json/ schema2.22.4notes — docs only.Resource-pack companion — do not merge independently of consumers.
Review @
a109538b(feat(build): give every split pack its own icon)No prior bot review on this SHA. Open issues: 0 (no issue-link). Not gameplay-pack / no BEH nudge / will not merge res alone.
Delta vs last approved tip
05f99f36scripts/data/packIcons/*.pngfor every split pack exceptcore(3d, server, ui, audio-, texts-).contentEntriestakes optionalicon→ injectspack_icon.png; non-core packsreadFilethat path (ENOENT fails the build).assignPack("pack_icon.png") === "core"so root icon does not duplicate into other packs.iconparam. Prior blockers (identicalSPLIT_LANGUAGESin texts packs; server combined_serversuffix) unchanged / still cleared.CI (this head)
ci.ymlrun #2346 — success (~32s) https://git.pokebedrock.com/pokebedrock/pokebedrock-res/actions/runs/362model-preview.ymlrun #2347 — success (~65s) https://git.pokebedrock.com/pokebedrock/pokebedrock-res/actions/runs/363Carry-forward (not blockers)
packs.json+ PUBLIC/FULL rename — do not merge res independently.minMemoryTier: 2vs PUBLIC subpackmemory_tier: 8— confirm intentional.languages.json ["de_DE"]/ schema2.22.4.Resource-pack companion — do not merge independently of consumers; no BEH Reviewer nudge.