Skip to content

Make built-in resource pack overlays work#2868

Open
TelepathicGrunt wants to merge 2 commits intoneoforged:1.21.xfrom
TelepathicGrunt:BuiltInResourcepackOverlays
Open

Make built-in resource pack overlays work#2868
TelepathicGrunt wants to merge 2 commits intoneoforged:1.21.xfrom
TelepathicGrunt:BuiltInResourcepackOverlays

Conversation

@TelepathicGrunt
Copy link
Contributor

Closes #2724

See the comment here for why the change is required:
#2724 (comment)

Hi, I've found that the root cause of the issue seems to be the BuiltInPackSource#fromName used within the AddPackFindersEvent#addPackFinders method. Its openFull implementation appears to ignore the incoming Metadata parameter, causing the overlay information to be discarded and always returning just a JarContentsPackResources.

I tried replacing the call to BuiltInPackSource.fromName(...) with a direct new JarContentsPackResources.JarContentsResourcesSupplier(...), and the overlays started working correctly. This is because the latter's openFull method properly handles the metadata and returns a CompositePackResources.

This is just my observation, so please correct me if my understanding is wrong.

@TelepathicGrunt TelepathicGrunt added bug A bug or error area: data driven This request involves a data driven system 1.21.11 Targeted at Minecraft 1.21.11 labels Dec 12, 2025
@neoforged-pr-publishing
Copy link

neoforged-pr-publishing bot commented Dec 12, 2025

  • Publish PR to GitHub Packages

Last commit published: 8429365b5102258b4953fe6c9b61c0cfbc848e83 - version: 21.11.9-beta-pr-2868-builtinresourcepackoverlays

PR Publishing

The artifacts published by this PR:

Repository Declaration

In order to use the artifacts published by the PR, add the following repository to your buildscript:

repositories {
    maven {
        name = "Maven for PR #2868" // https://github.com/neoforged/NeoForge/pull/2868
        url = uri("https://prmaven.neoforged.net/NeoForge/pr2868")
        content {
            includeModule("net.neoforged", "neoforge")
            includeModule("net.neoforged", "testframework")
        }
    }
}

MDK installation

In order to setup a MDK using the latest PR version, run the following commands in a terminal.
The script works on both *nix and Windows as long as you have the JDK bin folder on the path.
The script will clone the MDK in a folder named NeoForge-pr2868.
On Powershell you will need to remove the -L flag from the curl invocation.

mkdir NeoForge-pr2868
cd NeoForge-pr2868
curl -L https://prmaven.neoforged.net/NeoForge/pr2868/net/neoforged/neoforge/21.11.9-beta-pr-2868-builtinresourcepackoverlays/mdk-pr2868.zip -o mdk.zip
jar xf mdk.zip
rm mdk.zip || del mdk.zip

To test a production environment, you can download the installer from here.

@TelepathicGrunt
Copy link
Contributor Author

@WCBBEX @Apollounknowndev Could either of you test this to see if this works? The "Publish PR to GitHub Packages" bot will leave a comment shortly for how to run this PR build in dev to test in a workspace.

@WCBBEX
Copy link
Contributor

WCBBEX commented Feb 5, 2026

I performed a simple test, and it works.

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

Labels

1.21.11 Targeted at Minecraft 1.21.11 area: data driven This request involves a data driven system bug A bug or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Built-in resource packs don't accept pack overlays

2 participants