11plugins {
22 id(" multiloader-common" )
3- id(" net.neoforged.moddev " )
3+ id(" fabric-loom " )
44}
55
66// Vanilla depends on ASM 9.3, MDG makes that a 'strict' version constraint,
@@ -20,7 +20,16 @@ dependencies {
2020 compileOnly " org.ow2.asm:asm-commons:${ asm_version} "
2121 compileOnly " org.ow2.asm:asm-tree:${ asm_version} "
2222 compileOnly " org.ow2.asm:asm-util:${ asm_version} "
23-
23+
24+ // Minecraft
25+ minecraft(" com.mojang:minecraft:${ minecraft_version} " )
26+
27+ // Mappings
28+ mappings(loom. layered {
29+ officialMojangMappings()
30+ parchment(" org.parchmentmc.data:parchment-${ parchment_minecraft_version} :${ parchment_version} @zip" )
31+ })
32+
2433 // Mixin and MixinExtras
2534 compileOnly(" org.spongepowered:mixin:${ mixin_version} " )
2635 compileOnly(annotationProcessor(" io.github.llamalad7:mixinextras-common:${ mixinextras_version} " ))
@@ -29,14 +38,18 @@ dependencies {
2938 api(" me.shedaniel.cloth:cloth-config-neoforge:${ clothconfig_version} " )
3039}
3140
32- neoForge {
33- neoFormVersion = neoform_version
34- // Automatically enable AccessTransformers if the file exists
35- def at = file(" src/main/resources/META-INF/accesstransformer.cfg" )
36- if (at. exists()) accessTransformers. from(at. absolutePath)
37- parchment {
38- minecraftVersion = parchment_minecraft_version
39- mappingsVersion = parchment_version
41+ loom {
42+ // Apply common AccessWidener if it exists
43+ def aw = project(" :common" ). file(" src/main/resources/${ mod_id} .accesswidener" )
44+ if (aw. exists()) accessWidenerPath. set(aw)
45+ if (aw. exists()) {
46+ validateAccessWidener { accessWidener = aw }
47+ afterEvaluate {
48+ validateAccessWidener. run()
49+ }
50+ }
51+ mixin {
52+ defaultRefmapName. set(" ${ mod_id} .refmap.json" )
4053 }
4154}
4255
0 commit comments