Skip to content

refactor(client-fs): asset storage and path handling#106

Merged
Purdze merged 4 commits intoPommeMC:masterfrom
arse09:refactor/client-fs
Mar 31, 2026
Merged

refactor(client-fs): asset storage and path handling#106
Purdze merged 4 commits intoPommeMC:masterfrom
arse09:refactor/client-fs

Conversation

@arse09
Copy link
Copy Markdown
Contributor

@arse09 arse09 commented Mar 30, 2026

This pr is meant for updating the current asset and installation directory layout to prepare for #62.

Summary

  • Added supported versions check
  • data.rs now is dirs.rs and it stores the paths for the directories that the client uses
  • Replaced ambiguous assets_dir variable with jar_assets_dir, objects_dir and indexes_dir. Also added pomc_assets_dir to store all custom non vanilla data.
  • New directory layout, the client has access to the folders that are commented from the DataDirs struct stored in the App:
.pomc/
├── assets/
│   ├── indexes/                        # indexes_dir
│   └── objects/                        # objects_dir
├── pomc-assets/                        # pomc_assets_dir
├── versions/
│   └── 26.1/
│       ├── 26.1.jar
│       ├── 26.1.json
│       └── extracted/
│           └── assets/                 # jar_assets_dir
│               └── minecraft/
│                   ├── blockstates/
│                   ├── models/
│                   └── textures/
│
├── installations.json
└── installations/

<installation>/                         # game_dir
    ├── saves/
    ├── mods/
    ├── resourcepacks/
    ├── shaderpacks/
    ├── screenshots/
    ├── logs/
    ├── options.json
    ├── servers.json
    └── icon.png

Test plan

  • Check that all assets are loaded correctly from their respective directories.

@arse09 arse09 changed the title refactor(client-fs): refactor asset storage and path handling refactor(client-fs): asset storage and path handling Mar 30, 2026
@Purdze
Copy link
Copy Markdown
Collaborator

Purdze commented Mar 30, 2026

Version is now a required arg, cargo run without --version will fail. Consider keeping it Option with a fallback or document that dev mode needs --version

for_each_blockstate dropped asset_index, blockstates now only resolve from jar_assets_dir. This is fine if blockstates are always in the extracted jar, but worth confirming no edge case uses the asset index for blockstate lookup

Might be worth checking settings.json doesnt collide with other settings

@arse09
Copy link
Copy Markdown
Contributor Author

arse09 commented Mar 30, 2026

Block-states are always in the JAR, never in objects/ so there should not be any edge cases. Also, changed the settings.json to options.json so that it doesn't conflict with the settings.json from the launcher.

@Purdze Purdze merged commit ee167cb into PommeMC:master Mar 31, 2026
6 checks passed
@arse09 arse09 deleted the refactor/client-fs branch March 31, 2026 12:34
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.

2 participants