FabricMC / fabric-loom

Gradle build system plugin used to automate the setup of a minecraft mod development environment.
MIT License
223 stars 194 forks source link

[Enhancement & Fix] Avoid specifying the datagen mod id as it must be identical to the main mod id #1079

Closed maityyy closed 3 months ago

maityyy commented 3 months ago

See https://github.com/FabricMC/fabric-loom/issues/999

modmuss50 commented 3 months ago

As far as I can tell this is working as expected, what am I missing?

Doing:

fabricApi {
    configureDataGeneration {
        createSourceSet = true
    }
}

loom.mods.forEach {
    println it.name
}

Correctly prints out the modid as specified in src/datagen/resources/fabric.mod.json

maityyy commented 3 months ago

Ahh, I should have created the FMJ in the datagen sourceset? I thought that FMJ should be read from the main sourceset

maityyy commented 3 months ago

https://discord.com/channels/507304429255393322/592749519171616796/1220732053201616927