Skip to content

fix(weld): merge colliding lang files by key - #22

Open
Stoupy51 wants to merge 1 commit into
Smithed-MC:mainfrom
Stoupy51:fix/weld-merge-lang-files
Open

Stoupy51 wants to merge 1 commit into
Smithed-MC:mainfrom
Stoupy51:fix/weld-merge-lang-files

Conversation

@Stoupy51

@Stoupy51 Stoupy51 commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Lang files (assets/<namespace>/lang/<locale>.json) went through the vanilla branch of ConflictsHandler: minecraft:en_us was replaced by the vanilla file, dropping the pack's own keys.

They are now merged key by key, the later pack winning on identical keys (same order as the other files).

Adds a regression test. test_base_equal_and_inactive_gaps_break_file_runs already fails on main, unrelated.

@Stoupy51

Stoupy51 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor Author

Example

Two resource packs, each with assets/minecraft/lang/en_us.json.

pack_a:

{
  "a": "from A",
  "shared": "from A"
}

pack_b:

{
  "b": "from B",
  "shared": "from B"
}

Welded minecraft:en_us with pack_a then pack_b:

  • Before: the vanilla en_us.json replaced the packs content, so a, b and shared were lost.
  • After:
{
  "a": "from A",
  "shared": "from B",
  "b": "from B"
}

pack_b.zip
pack_a.zip

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant