Skip to content

Commit

Permalink
feat: Update for Forge 1.21.4
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Jan 13, 2025
1 parent ea954ce commit c5efd10
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
8 changes: 6 additions & 2 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ plugins {
}

mixin {
add(sourceSets.main, "${mod_id}.refmap.json")

config("${mod_id}.mixins.json")
config("${mod_id}.forge.mixins.json")
}
Expand Down Expand Up @@ -119,4 +117,10 @@ modrinth {
dependencies {
required.project "balm"
}
}

sourceSets.each {
def dir = layout.buildDirectory.dir("sourcesSets/$it.name")
it.output.resourcesDir = dir
it.java.destinationDirectory = dir
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
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.balm.forge.ForgeLoadContext;
import net.blay09.mods.craftingtweaks.client.CraftingTweaksClient;
import net.minecraftforge.fml.IExtensionPoint;
import net.minecraftforge.fml.common.Mod;
Expand All @@ -12,9 +12,11 @@
@Mod(CraftingTweaks.MOD_ID)
public class ForgeCraftingTweaks {
public ForgeCraftingTweaks(FMLJavaModLoadingContext context) {
Balm.initialize(CraftingTweaks.MOD_ID, EmptyLoadContext.INSTANCE, CraftingTweaks::initialize);
if (FMLEnvironment.dist.isClient())
BalmClient.initialize(CraftingTweaks.MOD_ID, EmptyLoadContext.INSTANCE, CraftingTweaksClient::initialize);
final var loadContext = new ForgeLoadContext(context.getModEventBus());
Balm.initialize(CraftingTweaks.MOD_ID, loadContext, CraftingTweaks::initialize);
if (FMLEnvironment.dist.isClient()) {
BalmClient.initialize(CraftingTweaks.MOD_ID, loadContext, CraftingTweaksClient::initialize);
}

context.getModEventBus().addListener(IMCHandler::processInterMod);
context.registerDisplayTest(IExtensionPoint.DisplayTest.IGNORE_ALL_VERSION);
Expand Down

0 comments on commit c5efd10

Please sign in to comment.