diff --git a/forge/build.gradle b/forge/build.gradle index f928f66..535e579 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -7,8 +7,6 @@ plugins { } mixin { - add(sourceSets.main, "${mod_id}.refmap.json") - config("${mod_id}.mixins.json") config("${mod_id}.forge.mixins.json") } @@ -90,4 +88,10 @@ publishing { fg.component(it) } } +} + +sourceSets.each { + def dir = layout.buildDirectory.dir("sourcesSets/$it.name") + it.output.resourcesDir = dir + it.java.destinationDirectory = dir } \ No newline at end of file diff --git a/forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKumaAPI.java b/forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKumaAPI.java index ca3d346..9477898 100644 --- a/forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKumaAPI.java +++ b/forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKumaAPI.java @@ -1,16 +1,15 @@ package net.blay09.mods.kuma.forge; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.fml.loading.FMLEnvironment; @Mod(value = "kuma_api") public class ForgeKumaAPI { - public ForgeKumaAPI(IEventBus modEventBus) { - if (FMLEnvironment.dist == Dist.CLIENT) { - ForgeKumaAPIClient.init(modEventBus); + public ForgeKumaAPI(FMLJavaModLoadingContext context) { + if (FMLEnvironment.dist.isClient()) { + ForgeKumaAPIClient.init(context.getModEventBus()); } } } diff --git a/forge/src/main/resources/kuma_api.forge.mixins.json b/forge/src/main/resources/kuma_api.forge.mixins.json index 37a45e3..440a23c 100644 --- a/forge/src/main/resources/kuma_api.forge.mixins.json +++ b/forge/src/main/resources/kuma_api.forge.mixins.json @@ -3,7 +3,6 @@ "minVersion": "0.8", "package": "net.blay09.mods.kuma.mixin", "compatibilityLevel": "JAVA_17", - "refmap": "${mod_id}.refmap.json", "mixins": [ ], "client": [