MehVahdJukaar / Moonlight

GNU General Public License v3.0
50 stars 26 forks source link

[šŸž]: Dynamic fluid tags get generated under `tags/fluid` instead of `tags/fluids` #177

Closed Syst3ms closed 8 months ago

Syst3ms commented 10 months ago

BEFORE CONTINUING:

Version-Loader

1.20.1-fabric

Moonlight Lib Version

moonlight 1.20-2.8.57

Issue Detail

I tried using a DynServerResourcesGenerator to dynamically add tags to my mod's fluids, using dynamicPack#addTag. When it looked like the tags hadn't been registered in-game, I went to look at the code:

public void addTag(SimpleTagBuilder builder, RegistryKey<?> type) {
        Identifier tagId = builder.getId();
        String tagPath = type.getValue().getPath();
        if (tagPath.equals("block") || tagPath.equals("entity_type") || tagPath.equals("item")) {
            tagPath = tagPath + "s";
        }
        // ...

The if statement tries pluralizing the tag folders when needed, but it misses fluids, which are saved under tags/fluids. The debug resource dump shows that the dynamic tags do indeed get saved under the incorrect tags/fluid.

Log Attachment

N/A

OPTIONAL: To Produce

1) Use DynamicDataPack#addTag to add a fluid tag, and implement any distinctive functionality based on it. 2) The distinctive functionality will not trigger 3) Check the debug resource dump to find the tags are generated under tags/fluid instead of tags/fluids.

OPTIONAL: Which mods are affected?

No response

MehVahdJukaar commented 10 months ago

Oh darn. You can use the generic type for now

MehVahdJukaar commented 8 months ago

this was fixed