generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Hendrix-Shen <[email protected]>
- Loading branch information
1 parent
9def4a0
commit cefb93a
Showing
33 changed files
with
587 additions
and
124 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
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
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 |
---|---|---|
|
@@ -12,6 +12,8 @@ | |
"1.20.2-fabric", | ||
"1.20.4-fabric", | ||
"1.20.6-fabric", | ||
"1.21.1-fabric" | ||
"1.21.1-fabric", | ||
|
||
"1.21.1-neoforge" | ||
] | ||
} |
12 changes: 12 additions & 0 deletions
12
src/main/java/com/plusls/MasaGadget/MasaGadgetFabricMod.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//#if FABRIC_LIKE | ||
package com.plusls.MasaGadget; | ||
|
||
import net.fabricmc.api.ClientModInitializer; | ||
|
||
public class MasaGadgetFabricMod implements ClientModInitializer { | ||
@Override | ||
public void onInitializeClient() { | ||
MasaGadgetMod.onInitializeClient(); | ||
} | ||
} | ||
//#endif |
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
26 changes: 26 additions & 0 deletions
26
src/main/java/com/plusls/MasaGadget/MasaGadgetNeoForgeMod.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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
//#if NEO_FORGE | ||
//$$ package com.plusls.MasaGadget; | ||
//$$ | ||
//$$ import net.neoforged.fml.common.Mod; | ||
//$$ import top.hendrixshen.magiclib.api.entrypoint.ModInitializer; | ||
//$$ | ||
//$$ @Mod("@MOD_IDENTIFIER@") | ||
//$$ public class MasaGadgetNeoForgeMod implements ModInitializer { | ||
//$$ public MasaGadgetNeoForgeMod() { | ||
//$$ this.construct(); | ||
//$$ } | ||
//$$ | ||
//$$ @Override | ||
//$$ public void onInitializeClient() { | ||
//$$ MasaGadgetMod.onInitializeClient(); | ||
//$$ } | ||
//$$ | ||
//$$ @Override | ||
//$$ public void onInitializeServer() { | ||
//$$ } | ||
//$$ | ||
//$$ @Override | ||
//$$ public void onInitialize() { | ||
//$$ } | ||
//$$ } | ||
//#endif |
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
40 changes: 40 additions & 0 deletions
40
src/main/java/com/plusls/MasaGadget/game/MalilibStuffsInitializer.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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.plusls.MasaGadget.game; | ||
|
||
import com.plusls.MasaGadget.SharedConstants; | ||
import fi.dy.masa.malilib.config.ConfigManager; | ||
import fi.dy.masa.malilib.event.InitializationHandler; | ||
import fi.dy.masa.malilib.event.InputEventHandler; | ||
import fi.dy.masa.malilib.hotkeys.IKeybindProvider; | ||
|
||
//#if FORGE_LIKE | ||
//$$ import top.hendrixshen.magiclib.util.minecraft.ForgePlatformUtil; | ||
//#endif | ||
|
||
public class MalilibStuffsInitializer { | ||
public static void init() { | ||
InitializationHandler.getInstance().registerInitializationHandler(() -> | ||
ConfigManager.getInstance().registerConfigHandler(SharedConstants.getModIdentifier(), | ||
SharedConstants.getConfigHandler())); | ||
Configs.init(); | ||
InputEventHandler.getKeybindManager().registerKeybindProvider( | ||
(IKeybindProvider) SharedConstants.getConfigManager()); | ||
//#if FORGE_LIKE | ||
//$$ MalilibStuffsInitializer.setupForgeConfigGui(); | ||
//#endif | ||
} | ||
|
||
//#if FORGE_LIKE | ||
//$$ private static void setupForgeConfigGui() { | ||
//$$ ForgePlatformUtil.registerModConfigScreen(SharedConstants.getModIdentifier(), | ||
//$$ screen -> { | ||
//$$ ConfigGui gui = new ConfigGui(); | ||
//#if MC > 11903 | ||
//$$ gui.setParent(screen); | ||
//#else | ||
//$$ gui.setParentGui(screen); | ||
//#endif | ||
//$$ return gui; | ||
//$$ }); | ||
//$$ } | ||
//#endif | ||
} |
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
Oops, something went wrong.