Moonlight Lib

Moonlight Lib

86M Downloads

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

Syst3ms opened this issue ยท 2 comments

commented

BEFORE CONTINUING:

  • Always check you are using the latest version of these mods and its dependencies
  • Remove known problematic rendering mods such as Optifine, Sodium and others

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

commented

Oh darn. You can use the generic type for now

commented

this was fixed