Java Code Examples for cpw.mods.fml.common.event.FMLPreInitializationEvent#getModConfigurationDirectory()

The following examples show how to use cpw.mods.fml.common.event.FMLPreInitializationEvent#getModConfigurationDirectory() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GalacticraftProxy.java    From bartworks with MIT License 5 votes vote down vote up
private static void commonpreInit(FMLPreInitializationEvent e) {
    GalacticraftProxy.gtConf = new Configuration(new File(new File(e.getModConfigurationDirectory(), "GregTech"), "GregTech.cfg"));
    GalacticraftProxy.uo_dimensionList.getConfig(GalacticraftProxy.gtConf, "undergroundfluid");
    BW_WorldGenRoss128b.initundergroundFluids();
    BW_WorldGenRoss128ba.init_undergroundFluids();
    if (GalacticraftProxy.gtConf.hasChanged())
        GalacticraftProxy.gtConf.save();
    BW_WorldGenRoss128b.initOres();
    BW_WorldGenRoss128ba.init_Ores();
    MinecraftForge.EVENT_BUS.register(BWAtmosphereManager.INSTANCE);
}
 
Example 2
Source File: ForgeMain.java    From FastAsyncWorldedit with GNU General Public License v3.0 5 votes vote down vote up
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
    this.logger = event.getModLog();
    File directory = new File(event.getModConfigurationDirectory() + File.separator + "FastAsyncWorldEdit");
    MinecraftForge.EVENT_BUS.register(this);
    FMLCommonHandler.instance().bus().register(this);
    this.IMP = new FaweForge(this, event.getModLog(), event.getModMetadata(), directory);
    try {
        Class.forName("org.spongepowered.api.Sponge");
        Settings.IMP.QUEUE.PARALLEL_THREADS = 1;
    } catch (Throwable ignore) {}
}
 
Example 3
Source File: GardenTrees.java    From GardenCollection with MIT License 5 votes vote down vote up
@Mod.EventHandler
public void preInit (FMLPreInitializationEvent event) {
    config = new ConfigManager(new File(event.getModConfigurationDirectory(), "GardenStuff/" + MOD_ID + ".cfg"));

    blocks.init();
    items.init();
}
 
Example 4
Source File: GardenContainers.java    From GardenCollection with MIT License 5 votes vote down vote up
@Mod.EventHandler
public void preInit (FMLPreInitializationEvent event) {
    config = new ConfigManager(new File(event.getModConfigurationDirectory(), MOD_ID + ".patterns.cfg"));

    blocks.init();
    items.init();
}
 
Example 5
Source File: GardenCore.java    From GardenCollection with MIT License 5 votes vote down vote up
@Mod.EventHandler
public void preInit (FMLPreInitializationEvent event) {
    config = new ConfigManager(new File(event.getModConfigurationDirectory(), "GardenStuff/" + MOD_ID + ".cfg"));

    blocks.init();
    items.init();
}
 
Example 6
Source File: Config.java    From SimplyJetpacks with MIT License 5 votes vote down vote up
public static void preInit(FMLPreInitializationEvent evt) {
    FMLCommonHandler.instance().bus().register(new Config());
    
    config = new Configuration(new File(evt.getModConfigurationDirectory(), SimplyJetpacks.MODID + ".cfg"));
    configClient = new Configuration(new File(evt.getModConfigurationDirectory(), SimplyJetpacks.MODID + "-client.cfg"));
    
    syncConfig();
    SimplyJetpacks.proxy.updateCustomKeybinds(flyKey, descendKey);
}
 
Example 7
Source File: CommonProxy.java    From OmniOcular with Apache License 2.0 4 votes vote down vote up
@Override
public void initConfig(FMLPreInitializationEvent event) {
    ConfigHandler.minecraftConfigDirectory = event.getModConfigurationDirectory();
    ConfigHandler.initConfigFiles();
    //JSHandler.initEngine();
}
 
Example 8
Source File: Config.java    From NEI-Integration with MIT License 4 votes vote down vote up
public static void preInit(FMLPreInitializationEvent evt) {
    FMLCommonHandler.instance().bus().register(new Config());
    config = new Configuration(new File(evt.getModConfigurationDirectory(), NEIIntegration.MODID + ".cfg"));
    syncConfig();
}
 
Example 9
Source File: WailaNBT.java    From wailanbt with MIT License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
    config.modConfigurationDirectory = event.getModConfigurationDirectory();
}