mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
Transition to using FML's suggested config file, not Tinkers Workshop.txt
This commit is contained in:
1 parent
4698b28179
commit
3b3b439cfb
2 files changed
+5
-21
No files matched your search
@@ -3,6 +3,7 @@ package tconstruct.util.config;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.Property;
|
||||
import tconstruct.TConstruct;
|
||||
@@ -11,29 +12,11 @@ import tconstruct.library.tools.AbilityHelper;
|
||||
public class PHConstruct
|
||||
{
|
||||
|
||||
public static void initProps (File location)
|
||||
public static void initProps (File confFile)
|
||||
{
|
||||
/* Here we will set up the config file for the mod
|
||||
* First: Create a folder inside the config folder
|
||||
* Second: Create the actual config file
|
||||
* Note: Configs are a pain, but absolutely necessary for every mod.
|
||||
*/
|
||||
File newFile = new File(location + "/TinkersWorkshop.txt");
|
||||
|
||||
/* Some basic debugging will go a long way */
|
||||
try
|
||||
{
|
||||
newFile.createNewFile();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
TConstruct.logger.severe("Could not create configuration file for TConstruct. Reason:");
|
||||
TConstruct.logger.severe(e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
/* [Forge] Configuration class, used as config method */
|
||||
Configuration config = new Configuration(newFile);
|
||||
cfglocation = location;
|
||||
Configuration config = new Configuration(confFile);
|
||||
/* Load the configuration file */
|
||||
config.load();
|
||||
|
||||
@@ -387,6 +370,7 @@ public class PHConstruct
|
||||
/* Save the configuration file */
|
||||
config.save();
|
||||
|
||||
String location = Loader.instance().getConfigDir().toString();
|
||||
File gt = new File(location + "/GregTech");
|
||||
if (gt.exists())
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user