-
-
Notifications
You must be signed in to change notification settings - Fork 708
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 ability to set molang tags for custom items #4041
Conversation
core/src/main/java/org/geysermc/geyser/item/mappings/versions/MappingsReader.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/item/mappings/versions/MappingsReader_v1.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/registry/populator/CustomItemRegistryPopulator.java
Outdated
Show resolved
Hide resolved
Can we make our custom tag |
Imo it should use the same namespace we give to items/blocks which is geyser_custom: |
Not against changing the namespace (both for the custom tags, or the tag for all custom items), but imo it would be odd to name it geyser_custom:is_custom. Idk, not up to me |
For now, i went with Kastle's suggestion and set the namespace to "geyser_custom". Personally, i would prefer "geysermc" or maybe just "geyser"; but i see how consistency would be nice. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm after this :)
core/src/main/java/org/geysermc/geyser/registry/populator/CustomItemRegistryPopulator.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/item/mappings/versions/MappingsReader_v1.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/item/mappings/versions/MappingsReader.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/item/mappings/versions/MappingsReader.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Konicai <[email protected]>
I have tested the default tag While doing the tests I noticed that my player controller is not handling all conditions with filled maps, bows and shields correctly, this is unrelated to the tag implementation (already existed while using is_name_any), but I soon will update my controller using tags. If that works well, this should be ready for merge. |
Works well for me, I implemented tags now in my test pack, here is an example for all custom shields within the "pre_animation" section.
Had no issues so far related to this implementation. |
# Conflicts: # core/src/main/java/org/geysermc/geyser/item/mappings/versions/MappingsReader_v1.java # core/src/main/java/org/geysermc/geyser/registry/populator/CustomItemRegistryPopulator.java
…d ToolBreakSpeedsUtils class
Updated to latest master changes:
Worth noting: |
|
https://github.com/GeyserMC/Geyser/blob/master/core/src/main/java/org/geysermc/geyser/registry/mappings/versions/MappingsReader_v1.java#L500-L509 |
Actually blocks just let you set whatever you want so I'm fine with that. For tags the namespace isn't even required it's only convention. |
Addressed; now the namespace for tags is just "geyser" instead of "geyser_custom". |
But why are we forcing any namespace? We can just use whatever they give us like for blocks? |
Sure, that should work |
Oh sorry I thought you meant forcing user tags to have a namespace. Whatever you want to do for the global custom item tag is fine. |
This comment was marked as outdated.
This comment was marked as outdated.
After internal discussion + Kastle's comment; changed it so no namespace is set at all. Can be defined manually though, which together with the changes made in the recipes PR (usage of itemTags wherever feasible/useful in recipes) might come in handy to set a minecraft namespaced tag; atleast in theory. |
core/src/main/java/org/geysermc/geyser/registry/mappings/versions/MappingsReader_v1.java
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/item/GeyserCustomItemData.java
Outdated
Show resolved
Hide resolved
… .tags() builder multiple times will not add both sets of tags, but replace the existing tag set
Also should update the wiki^ |
These changes should allow for two things:
now:minecraft:is_geyser_custom
geyser:is_custom
would find all custom items.(example query:
query.equipped_item_any_tag('test:is_tag_one')
) - any tag, including minecraft tags can be set. A namespace isn't necessary, but should exist for good measure.Fixes #3988