-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
54ad068
commit 05d69a1
Showing
3 changed files
with
15 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 9 additions & 6 deletions
15
forge/src/main/java/net/blay09/mods/trashslot/ForgeTrashSlot.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,29 @@ | ||
package net.blay09.mods.trashslot; | ||
|
||
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.trashslot.client.TrashSlotClient; | ||
import net.minecraftforge.api.distmarker.Dist; | ||
import net.minecraftforge.fml.DistExecutor; | ||
import net.minecraftforge.fml.common.Mod; | ||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; | ||
import net.minecraftforge.fml.loading.FMLEnvironment; | ||
|
||
@Mod(TrashSlot.MOD_ID) | ||
public class ForgeTrashSlot { | ||
|
||
public ForgeTrashSlot() { | ||
public ForgeTrashSlot(FMLJavaModLoadingContext context) { | ||
final var loadContext = new ForgeLoadContext(context.getModEventBus()); | ||
PlatformBindings.INSTANCE = new PlatformBindings() { | ||
@Override | ||
public boolean supportsKeyModifiers() { | ||
return true; | ||
} | ||
}; | ||
|
||
Balm.initialize(TrashSlot.MOD_ID, EmptyLoadContext.INSTANCE, TrashSlot::initialize); | ||
DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> BalmClient.initialize(TrashSlot.MOD_ID, EmptyLoadContext.INSTANCE, TrashSlotClient::initialize)); | ||
Balm.initialize(TrashSlot.MOD_ID, loadContext, TrashSlot::initialize); | ||
if (FMLEnvironment.dist.isClient()) { | ||
BalmClient.initialize(TrashSlot.MOD_ID, loadContext, TrashSlotClient::initialize); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters