Skip to content

Commit

Permalink
fix(1.20.6): Fix Forge builds
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed May 23, 2024
1 parent aa92627 commit 9535e7c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion buildSrc/src/main/groovy/multiloader-common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ jar {
'Implementation-Title' : project.name,
'Implementation-Version': project.jar.archiveVersion,
'Implementation-Vendor' : mod_author,
'Built-On-Minecraft' : minecraft_version
'Built-On-Minecraft' : minecraft_version,
'MixinConfigs' : "${mod_id}.mixins.json,${mod_id}.${project.name}.mixins.json",
])
}
}
Expand Down
4 changes: 4 additions & 0 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ mixin {
minecraft {
mappings channel: 'official', version: minecraft_version

reobf = false

copyIdeResources = true

// Automatically enable forge AccessTransformers if the file exists
Expand Down Expand Up @@ -75,6 +77,8 @@ sourceSets.main.resources.srcDir 'src/generated/resources'
dependencies {
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
annotationProcessor "org.spongepowered:mixin:${mixin_version}:processor"
// temporary hacky fix as suggested by Forge
implementation('net.sf.jopt-simple:jopt-simple:5.0.4') { version { strictly '5.0.4' } }
}

apply from: rootProject.file('repositories.gradle')
Expand Down
2 changes: 1 addition & 1 deletion forge/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies {
implementation fg.deobf("net.blay09.mods:balm-forge:${balm_version}") {
implementation("net.blay09.mods:balm-forge:${balm_version}") {
changing = balm_version.contains("SNAPSHOT")
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.blay09.mods.craftingtweaks;

import net.blay09.mods.balm.api.Balm;
import net.blay09.mods.balm.api.EmptyLoadContext;
import net.blay09.mods.balm.api.client.BalmClient;
import net.blay09.mods.craftingtweaks.client.CraftingTweaksClient;
import net.minecraftforge.api.distmarker.Dist;
Expand All @@ -13,8 +14,8 @@
@Mod(CraftingTweaks.MOD_ID)
public class ForgeCraftingTweaks {
public ForgeCraftingTweaks() {
Balm.initialize(CraftingTweaks.MOD_ID, CraftingTweaks::initialize);
DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> BalmClient.initialize(CraftingTweaks.MOD_ID, CraftingTweaksClient::initialize));
Balm.initialize(CraftingTweaks.MOD_ID, EmptyLoadContext.INSTANCE, CraftingTweaks::initialize);
DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> BalmClient.initialize(CraftingTweaks.MOD_ID, EmptyLoadContext.INSTANCE, CraftingTweaksClient::initialize));

FMLJavaModLoadingContext.get().getModEventBus().addListener(IMCHandler::processInterMod);
ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> IExtensionPoint.DisplayTest.IGNORESERVERONLY, (a, b) -> true));
Expand Down

0 comments on commit 9535e7c

Please sign in to comment.