All Downloads are FREE. Search and download functionalities are using the official Maven repository.

top.hendrixshen.magiclib.game.malilib.MalilibStuffsInitializer Maven / Gradle / Ivy

There is a newer version: 0.8.41
Show newest version
package top.hendrixshen.magiclib.game.malilib;

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;
import top.hendrixshen.magiclib.impl.malilib.SharedConstants;

//#if FORGE_LIKE
//$$ import fi.dy.masa.malilib.compat.forge.ForgePlatformCompat;
//#endif

public class MalilibStuffsInitializer {
    public static void init() {
        InitializationHandler.getInstance().registerInitializationHandler(() ->
                ConfigManager.getInstance().registerConfigHandler(
                        top.hendrixshen.magiclib.SharedConstants.getMagiclibIdentifier(),
                        SharedConstants.getConfigHandler()));
        Configs.init();
        InputEventHandler.getKeybindManager().registerKeybindProvider(
                (IKeybindProvider) SharedConstants.getConfigManager());
        //#if FORGE_LIKE
        //$$ MalilibStuffsInitializer.setupForgeConfigGui();
        //#endif
    }

    //#if FORGE_LIKE
    //$$ private static void setupForgeConfigGui() {
    //$$     ForgePlatformCompat.getInstance()
    //$$             .getMod(SharedConstants.getModIdentifier())
    //$$             .registerModConfigScreen(screen -> {
    //$$                 ConfigGui gui = new ConfigGui();
    //$$                 gui.setParentGui(screen);
    //$$                 return gui;
    //$$             });
    //$$ }
    //#endif
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy