Skip to content

Rename assets folder and ponder .nbt in renameMod#1

Merged
StaticFX merged 1 commit into
mainfrom
fix/rename-assets-and-ponder-nbt
Jul 12, 2026
Merged

Rename assets folder and ponder .nbt in renameMod#1
StaticFX merged 1 commit into
mainfrom
fix/rename-assets-and-ponder-nbt

Conversation

@StaticFX

Copy link
Copy Markdown
Owner

Problem

./gradlew renameMod renamed Java code and the mixin config, but left the
assets/examplemod folder and example_ponder.nbt with their template names,
and never rewrote the lang JSON contents. So after renaming:

  • the Ponder plugin looked for <id>_ponder.nbt while the file was still example_ponder.nbt (scene broken),
  • the assets/examplemod namespace folder didn't match the new mod id, and
  • lang/default/*.json + de_de.json still had examplemod / example_ keys.

Fix

  • Rewrite resource text files (.json, .mcmeta) alongside Java/config; binary resources (.nbt, .png) are excluded so they're never mangled.
  • Rename resource files (example_ponder.nbt → <id>_ponder.nbt, the mixin config) and the namespace directory (assets/examplemod → assets/<id>, plus data/ if present).

Verification

Ran renameMod --name "Sick Mod" on a throwaway copy:

  • assets/examplemod/ → assets/sickmod/, example_ponder.nbt → sickmod_ponder.nbt
  • the .nbt still loads ([5,2,5], palette intact)
  • ponder code ref addStoryBoard("sickmod_ponder", …) matches the file
  • lang contents rewritten, zero examplemod/example_ leftovers in src/
  • renamed project compiles (gradlew compileJava → BUILD SUCCESSFUL)

Kept in lockstep with the equivalent fix in create-addon-cli.

🤖 Generated with Claude Code

https://claude.ai/code/session_015ZSumy7MfmiKehkGd3Y79r

The renameMod task renamed code and the mixin config but left the
assets/examplemod folder and example_ponder.nbt untouched, and never
rewrote the lang JSON contents. After a rename the ponder plugin looked
for <id>_ponder.nbt while the file was still example_ponder.nbt, and the
lang keys still said examplemod / example_.

- Rewrite resource text files (lang jsons, mcmeta) alongside java/config;
  binary resources (.nbt/.png) are excluded so they are never mangled.
- Rename resource files (example_ponder.nbt -> <id>_ponder.nbt, the mixin
  config) and the namespace dir (assets/examplemod -> assets/<id>).

Verified end-to-end: renamed copy compiles, the .nbt still loads, the
ponder code reference matches the renamed file, and no examplemod/example_
references remain in src.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ZSumy7MfmiKehkGd3Y79r
@StaticFX
StaticFX merged commit 643f79e into main Jul 12, 2026
1 check passed
@StaticFX
StaticFX deleted the fix/rename-assets-and-ponder-nbt branch July 13, 2026 08:09
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