Skip to content

Commit

Permalink
feat: Update NeoForge to 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Jun 14, 2024
1 parent aaa8a26 commit 25599dc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
package net.blay09.mods.craftingslots;

import net.blay09.mods.balm.api.Balm;
import net.blay09.mods.balm.api.client.BalmClient;
import net.blay09.mods.balm.neoforge.NeoForgeLoadContext;
import net.blay09.mods.craftingslots.client.CraftingSlotsClient;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.DistExecutor;
import net.neoforged.fml.common.Mod;

@Mod(CraftingSlots.MOD_ID)
public class NeoForgeCraftingSlots {
public NeoForgeCraftingSlots(IEventBus modEventBus) {
final var context = new NeoForgeLoadContext(modEventBus);
Balm.initialize(CraftingSlots.MOD_ID, context, CraftingSlots::initialize);
DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> BalmClient.initialize(CraftingSlots.MOD_ID, context, CraftingSlotsClient::initialize));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package net.blay09.mods.craftingslots.client;

import net.blay09.mods.balm.api.client.BalmClient;
import net.blay09.mods.balm.neoforge.NeoForgeLoadContext;
import net.blay09.mods.craftingslots.CraftingSlots;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.common.Mod;

@Mod(value = CraftingSlots.MOD_ID, dist = Dist.CLIENT)
public class NeoForgeCraftingSlotsClient {
public NeoForgeCraftingSlotsClient(IEventBus modEventBus) {
final var context = new NeoForgeLoadContext(modEventBus);
BalmClient.initialize(CraftingSlots.MOD_ID, context, CraftingSlotsClient::initialize);
}
}

0 comments on commit 25599dc

Please sign in to comment.