Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.20.5] Resource Conditions in Pack Overlays #3702

Open
wants to merge 6 commits into
base: 1.20.6
Choose a base branch
from

Conversation

Apollounknowndev
Copy link
Contributor

Supercedes #3589, rebased to target 1.20.5.

1.20.2 added pack overlays (explained in the 23w31a changelog), which conditionally overlay resource/data pack files from sub-directories onto the base pack. This PR extends this system to allow for overlays based on resource conditions, which allow overlays to be applied based on conditions other than just the current pack format.

The main difference between the 1.20.4 and 1.20.5 versions of the PR is that OverlayConditionsMetadata has been completely refactored for the new codec-based resource conditions, which means they are parsed with a codec now. The class has also been moved to api for datagen purposes.

@modmuss50 modmuss50 added the enhancement New feature or request label Apr 10, 2024
@Apollounknowndev Apollounknowndev deleted the overlay-conditions branch April 11, 2024 22:22
@Apollounknowndev Apollounknowndev restored the overlay-conditions branch April 11, 2024 22:23
ResourceCondition.CODEC.fieldOf("condition").forGetter(Entry::condition),
Codec.STRING.validate(OverlayConditionsMetadata::validateDirectory).fieldOf("directory").forGetter(Entry::overlay)
).apply(instance, Entry::new));
public boolean shouldApply() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space missing above

@Apollounknowndev Apollounknowndev changed the base branch from 1.20.5 to 1.20.6 May 15, 2024 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants