#Datagen compat for multiple mod IDs

5 messages · Page 1 of 1 (latest)

candid wasp
#

Some mods autogenerate blocks when paired with the mixins in my mod, when I manually add model and texture files under the resources folder for their mod ID, it fixes the issue.
However, I cannot figure out how to use Fabric's datagen to create a new pack under another Mod's mod ID.

#

There is a function in the "net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator" class, which creates a Pack, but it is hardcoded to only create the pack under the current modContainer's name.

    public net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator.Pack createPack() {
        return new net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator.Pack(true, modContainer.getMetadata().getName(), this.fabricOutput);
    }
#

this function has no alternative which allows me to specify the pack name, I have also attempted to create my own function for this but that is made very difficult by FabricDataGenerator's "FabricDataOutput fabricOutput" being private, and the class's instance not being accessible due to it being final (I believe? I am slightly out of my water here.)

#

I'm considering writing an issue of this on the fabric github, but currently I'm unsure if I'm just going about this in the completely wrong way.