mirror of
https://github.com/GTNewHorizons/IguanaTweaksTConstruct.git
synced 2026-11-25 22:34:38 +00:00
Unify config file references
This commit is contained in:
1 parent
e60cf9b2ec
commit
842bb420fa
3 files changed
+6
-6
No files matched your search
@@ -63,7 +63,6 @@ public class IguanaTweaksTConstruct {
|
||||
|
||||
public static List<Item> toolParts = null;
|
||||
|
||||
// TODO: decide wether or not the same cfg as tcon should be used
|
||||
// use the PulseManager. This allows us to separate the different parts into independend modules and have stuff together. yay.
|
||||
private IConfiguration pulseCFG;
|
||||
private PulseManager pulsar;
|
||||
@@ -77,12 +76,12 @@ public class IguanaTweaksTConstruct {
|
||||
configPath.mkdirs();
|
||||
|
||||
// init pulse manager
|
||||
pulseCFG = new PulsarCFG(new File(configPath, "Modules.cfg"), "Tinker's Construct Addon: Iguana Tweaks for Tinkers Construct");
|
||||
pulseCFG = new PulsarCFG(Reference.configFile("Modules.cfg"), "Tinker's Construct Addon: Iguana Tweaks for Tinkers Construct");
|
||||
pulseCFG.load();
|
||||
pulsar = new PulseManager(Reference.MOD_ID, pulseCFG);
|
||||
|
||||
Config config = new Config();
|
||||
config.init(new File(configPath, "main.cfg"));
|
||||
config.init(Reference.configFile("main.cfg"));
|
||||
// register config as eventhandler to get config changed updates
|
||||
FMLCommonHandler.instance().bus().register(config);
|
||||
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ public class IguanaPartRestriction {
|
||||
RestrictionHelper.init();
|
||||
|
||||
RestrictionConfig config = new RestrictionConfig();
|
||||
config.init(new File(IguanaTweaksTConstruct.configPath, "restrictions.cfg"));
|
||||
config.init("restrictions.cfg");
|
||||
|
||||
adaptChestLoot();
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package iguanaman.iguanatweakstconstruct.restriction;
|
||||
|
||||
import iguanaman.iguanatweakstconstruct.reference.Reference;
|
||||
import iguanaman.iguanatweakstconstruct.util.Log;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
@@ -13,8 +14,8 @@ public class RestrictionConfig {
|
||||
private Configuration configfile;
|
||||
// public static Map<String, Set<Integer>> restrictedParts = new HashMap<String, Set<Integer>>();
|
||||
|
||||
public void init(File file) {
|
||||
configfile = new Configuration(file);
|
||||
public void init(String fileName) {
|
||||
configfile = new Configuration(Reference.configFile(fileName));
|
||||
configfile.load();
|
||||
|
||||
Log.info("Applying Tool Part restrictions");
|
||||
|
||||
Reference in new issue
Block a user