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.21 fixes from the nuclear nexus branch #442

Merged
merged 17 commits into from
Jul 21, 2024

Conversation

edayot
Copy link
Contributor

@edayot edayot commented Jul 8, 2024

Based on TheNuclearNexus dynamic support, another approach with dict instead of tuples. No more hardcoded values inside the datapack class.

Old scope definition :

class DamageType(JsonFile):
    """Class representing a damage type."""

    scope: ClassVar[NamespaceFileScope] = ("damage_type",)
    extension: ClassVar[str] = ".json"

New scope definition :

class Advancement(JsonFile):
    """Class representing an advancement."""

    scope: ClassVar[NamespaceFileScope] = {
        0: ("advancements",),
        45: ("advancement",),
    }
    extension: ClassVar[str] = ".json"

We have all future renames needed with the exact pack_version affected (assuming there is no conflict in future versions) while preserving the old & the new syntax.

@edayot edayot marked this pull request as ready for review July 8, 2024 17:22
@Stoupy51
Copy link

Up

@edayot
Copy link
Contributor Author

edayot commented Jul 21, 2024

Checking the action logs, it's only a formmating issue, i hate myself

@vberlier
Copy link
Member

Sorry for not getting on to this sooner! This looks really good, that's basically how I would have done it as well! I tweaked a few minor things and enabled 1.21 as the latest default version. Thanks!

@vberlier vberlier merged commit df8f013 into mcbeet:main Jul 21, 2024
1 check passed
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.

4 participants