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

Add tag aliases #4198

Draft
wants to merge 1 commit into
base: 1.21.3
Choose a base branch
from
Draft

Add tag aliases #4198

wants to merge 1 commit into from

Conversation

Juuxel
Copy link
Member

@Juuxel Juuxel commented Nov 1, 2024

The tag alias API lets modders merge different but equivalent tags together so that they have the same content. For example, tag aliases can be used to unify matching minecraft and c tags. (This is the main purpose of the PR.)

Tag aliases are defined in data packs like tags. For example, a block tag alias group for fences would be located at data/my_mod/fabric/tag_aliases/block/fences.json with the contents:

{
  "tags": [
    "minecraft:fences",
    "c:fences"
  ]
}

The files can also be generated with the data generation API. Alias groups can be replaced (or disabled) like most data pack files by having a different file with the same name at the same file path.

TODO:

  • Better docs
  • Tests
    • Functionality
    • Data generation

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.

1 participant