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 02daf6b commit 61cfabc
Show file tree
Hide file tree
Showing 5 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.netherportalfix;

import net.blay09.mods.balm.api.Balm;
import net.blay09.mods.balm.api.EmptyLoadContext;
import net.minecraftforge.fml.IExtensionPoint;
import net.minecraftforge.fml.ModLoadingContext;
import net.minecraftforge.fml.common.Mod;
Expand All @@ -9,7 +10,7 @@
public class ForgeNetherPortalFix {

public ForgeNetherPortalFix() {
Balm.initialize(NetherPortalFix.MOD_ID, NetherPortalFix::initialize);
Balm.initialize(NetherPortalFix.MOD_ID, EmptyLoadContext.INSTANCE, NetherPortalFix::initialize);

ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> IExtensionPoint.DisplayTest.IGNORESERVERONLY, (a, b) -> true));
}
Expand Down
2 changes: 1 addition & 1 deletion neoforge/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'multiloader-loader'
id 'net.neoforged.gradle.userdev' version '7.0.124'
id 'net.neoforged.gradle.userdev' version '7.0.134'
id 'net.darkhax.curseforgegradle'
id "com.modrinth.minotaur"
}
Expand Down

0 comments on commit 61cfabc

Please sign in to comment.