Repository navigation
Conversation
Introduce the byte/provider layer, resource configuration, registry and metadata APIs without changing decoding or wiring migration consumers. Temporarily allow dead_code and unused_imports only on the Resources module declaration; the dependent migration removes this allowance.
ChronosWS
marked this pull request as ready for review
October 29, 2026 13:04
2 of 7 tasks
Purdze
requested changes
Oct 29, 2026
Purdze
left a comment
Collaborator
There was a problem hiding this comment.
thanks for this, the directions good and the lookup logicis good too but a few things need changing
- nothing uses it yet and there aren't any tests, so it's hard to know it works. could you split it into a stack? first layer: the manager + dir/index sources, some tests, and one real consumer moved over (lang or sounds.json). then build up from there
▎ - could you port vanilla's classes (PackResources, FallbackResourceManager, MultiPackResourceManager etc.) more directly instead of a new design? way easier to review
▎ - no need to read client.jar as a zip, we already extract it to versions//extracted/assets, so that can just be a dir source. drops most of the zip code + self_cell
▎ - the path canonicalizing on every lookup will be slow on windows, vanilla just resolves and opens
Contributor
Author
|
Migrating the code to be much closer to the Vanilla structure and contracts. |
Replace the obsolete Resources engine with pack backends, suppliers, repository sources, and reloadable managers. Initialize resource views in AppCore and retain verified installer JARs for format metadata. Preserve the existing asset stack while consumer adoption remains deferred.
ChronosWS
marked this pull request as draft
October 31, 2026 14:12
Add 211 API-focused resource tests with shared trait assertions and backend fixtures, including test-only supplier helpers and RAII cleanup. Fix ZIP empty-directory listing parity discovered by the regression tests: construct the prefix as root + directory + slash, matching Vanilla even for an empty directory.
ChronosWS
marked this pull request as ready for review
November 1, 2026 21:29
Add direct ResourceId::from_parts construction with private parsing helpers. Add 15 black-box path_validation cases covering resource representability and pack path containment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change
Overview
This PR adds a resource management system ported from Vanilla, which provides a consistent, centralized mechanism for registering resource providers and retrieving resources by logical ID. It is intended to support all Pomme's current resource usage, including resource packs, themes, version overlays and dynamic resource reloading. In addition it supports known resource sources such as directories, jars, zips and Bedrock formats. This PR does not fundamentally alter how specific asset types are processed - resources provide bytes, not an interpretation nor a general management of loaded and interpreted assets.
This PR is intended as a foundation for further resource-based features and fixups, and was specifically motivated by the desire to implement the particle system facilities expressible in Vanilla, which rely on asset definitions derived from resource packs.
Overall structure
resources/managers- The resource management API typically used by consumers, which applies priority and filteringresources/packs- Logical packs of resources, including their metadata and suppliersresources/pack_resources- The implementations which provide access to the physical resource streams from the resource packsUsage
At a high level, we will use the following sequence of steps to register, load and access resources:
RepositorySources which provide the universe of Packs from which we can compose the set of packs we will use, which ultimately determines which resources are available.RepositorySources are collected into aPackRepository, where packs can be enabled and disabled.PackRepositorydelivered the "opened" packages, which represents all of the enabled packsReloadableResourceManager, which implementsResourceManageris initialized with this opened set.MultiPackResourceManagerhandles the filtering and prioritization through theFallbackResourceManager, which is applied per-namespace.Resources can then be queried through theResourceManagertrait by their stableResourceId, which delegates fromReloadabletoMultiPackand eventually intoFallbackto get theResourcefrom the source pack.Resourceone can get theResourceContentResourceContent, a consumer can acquire the underlying byte stream, from which they load the associated asset (using existing mechanisms)Future Work
Besides the migration, there will be additional work to better support asynchronous reloads and possibly performance improvements.
Follow up migration
There is a follow up PR #785 which will be the actual migration of consumers to use this system.
The remainder of this description is AI-generated reference and validation documentation - however the entire PR was hand-reviewed by me before being posted here.
Reference
Static comparison of all 21 changed files against 22 Java source files in the local Vanilla 26.3 decompilation (
reference/26.3/decompiled):net.minecraft.server.packs.resources—MultiPackResourceManager,FallbackResourceManager,Resource,IoSupplier,ResourceFilterSection,ReloadableResourceManager,ResourceManagerReloadListener.net.minecraft.server.packs—AbstractPackMetadataResources,PathPackResources,FilePackResources,OverlayedPackResources,OverlayMetadataSection,VanillaPackResources,VanillaPackResourcesBuilder,FixedPathPackResources.net.minecraft.server.packs.metadata.pack.PackFormat(includingIntermediaryFormat),net.minecraft.server.packs.metadata.pack.PackMetadataSection;net.minecraft.util.InclusiveRangeandnet.minecraft.util.ExtraCodecs.net.minecraft.client.resources.IndexedAssetSource,net.minecraft.resources.Identifier,net.minecraft.util.IdentifierPattern.This is not a line-for-line port or a claim of full Vanilla equivalence. Intentional differences include raw uncached sidecars, synchronous caller-owned reload, case-preserving generic IDs, Rust regex rather than full Java
Patterncompatibility, and provider-specific ownership/error behavior. Bedrock support here is a directory theme adapter with panorama aliases and raw byte access, not a general Bedrock manifest/format decoder.Testing and validation
Current scope: The foundation uses
PackResourcesbackends,PackRepositoryand repository sources, and the fallback/multi-pack/reloadable manager hierarchy. Application initialization activates this resource view. Two demonstration consumers use it: menu splash text and the PNG shared by credits and the graphical loading logo. Other consumers and the resource-pack selection UI remain on the legacy asset stack; their migration is outside this PR's scope.dbf6c101a8226d20e3bc3df5eb649fb50df9a24b:just client-pre-pr, run after sourcing/home/cliffh/dev/vulkan/1.4.363.0/setup-env.sh --set-dep-ld, completed with exit 0. Formatting and all five strict release Clippy checks across client, supporting crates and singleplayer passed.--no-default-features1,430, with 1 skipped; singleplayer with--run-ignored all2, includingworld_settings_reach_the_steel_configandopens_two_worlds_in_one_process.