LoadingUtils.makeACrash("[DummyCore]Catched an attempt to register configuration file for not registered mod, this should not be possible and many things will go wrong as a result!",newIllegalStateException(c+" Is not a valid DCMod!"),false);
}else
{
DCModmod=getModFromClass(c);
Filefile=newFile(path,mod.ufName+".cfg");
if(file.isDirectory())
file.delete();
if(!file.exists())
file.createNewFile();
Configurationcfg=newConfiguration(file);
cfg.save();
mod.injectFMLConfig(cfg);
Notifier.notifySimple("Configuration File for mod "+mod+" was successfully created with path "+path+mod.ufName+".cfg");
}
}
catch(IOExceptione)
{
DCModmod=getModFromClass(c);
LoadingUtils.makeACrash("[DummyCore]Could not create a config file for mod "+mod+" - check your file system!",e,true);
* Use this in you Pre-Initialization functions. This will register your mod in the DummyCore system and automatically create all config and .lang files.
* From DummyCore v1.1 you no longer need to use IMCEvent to register all blocks and items.
* @param c - class file of your mod. MUST be registered from the mod itself. Use getClass().
* @param modname - this name will be used to name CreativeTabs, config and .lang files.
* @param configPath - the path to your configuration file. You can use FMLPreInitialisationEvent.getModConfigurationDirectory().getAbsolutePath() to get your path.
* Use this in you Pre-Initialization functions. This will register your mod in the DummyCore system and automatically create all config and .lang files.
* From DummyCore v1.1 you no longer need to use IMCEvent to register all blocks and items.
* @param c - class file of your mod. MUST be registered from the mod itself. Use getClass().
* @param modname - this name will be used to name CreativeTabs, config and .lang files.
* @param configPath - the path to your configuration file. You can use FMLPreInitialisationEvent.getModConfigurationDirectory().getAbsolutePath() to get your path.
* @param config - the initialized! object, that implements IDummyConfig.
* @param addCreativeTabs if the custom creative tabs for your mod should be created.
LoadingUtils.makeACrash("[DummyCore]Catched an attempt to register IDummyConfig for not registered mod, this should not be possible and many things will go wrong as a result!",newIllegalStateException(c+" Is not a valid DCMod!"),false);
LoadingUtils.makeACrash("[DummyCore]Catched an attempt to load IDummyConfig for not registered mod, this should not be possible and many things will go wrong as a result!",newIllegalStateException(c+" Is not a valid DCMod!"),false);