@@ -95,7 +95,7 @@ modstitch {
95
95
// true, it will automatically be generated.
96
96
addMixinsToModManifest = true
97
97
98
- configs.register(" flightassistant.client " ) { side = CLIENT }
98
+ configs.register(mod.id ) { side = CLIENT }
99
99
100
100
// Most of the time you wont ever need loader specific mixins.
101
101
// If you do, simply make the mixin file and add it like so for the respective loader:
@@ -138,13 +138,16 @@ yamlang {
138
138
139
139
// Resources
140
140
tasks.processResources {
141
+ inputs.property(" loader" , loader)
141
142
inputs.property(" mod_id" , mod.id)
142
143
inputs.property(" mod_version" , mod.version)
143
144
inputs.property(" mod_name" , mod.name)
144
145
inputs.property(" mc" , minecraftVersionRange)
145
146
147
+ val loader = inputs.properties[" loader" ]
148
+ val modId = inputs.properties[" mod_id" ]
146
149
val map = mapOf (
147
- " mod_id" to inputs.properties[ " mod_id " ] ,
150
+ " mod_id" to modId ,
148
151
" mod_version" to inputs.properties[" mod_version" ],
149
152
" mod_name" to inputs.properties[" mod_name" ],
150
153
" mc" to inputs.properties[" mc" ],
@@ -157,6 +160,9 @@ tasks.processResources {
157
160
filesMatching(" fabric.mod.json" ) { expandOrExclude(loader == " fabric" , map) }
158
161
filesMatching(" META-INF/mods.toml" ) { expandOrExclude(loader == " forge" , map) }
159
162
filesMatching(" META-INF/neoforge.mods.toml" ) { expandOrExclude(loader == " neoforge" , map) }
163
+ filesMatching(" ${modId} .mixins.json" ) { expand(mapOf (" refmap" to if (loader == " forge" ) """
164
+ ,"refmap": "${modId} .refmap.json"
165
+ """ .trimIndent() else " " ))}
160
166
}
161
167
162
168
// Publishing
0 commit comments