summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2014-10-19 15:06:11 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2014-10-19 15:06:11 +0100
commit6f0d61677fd3142988dac892c55f3dcf7064511a (patch)
tree8bbf29b0cc765eef8e7609132533890c2ebcb36d
parent62fb391a76901643a9f9baba4faeb11a4d84616a (diff)
downloadnoctis-6f0d61677fd3142988dac892c55f3dcf7064511a.tar.bz2
Fix configuration to work cleanly
-rw-r--r--src/main/java/net/flarn/noctis/Noctis.java3
-rw-r--r--src/main/java/net/flarn/noctis/handler/ConfigHandler.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/net/flarn/noctis/Noctis.java b/src/main/java/net/flarn/noctis/Noctis.java
index 8dda04f..7c10203 100644
--- a/src/main/java/net/flarn/noctis/Noctis.java
+++ b/src/main/java/net/flarn/noctis/Noctis.java
@@ -1,5 +1,6 @@
package net.flarn.noctis;
+import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
@@ -22,7 +23,7 @@ public class Noctis {
public void preInit(FMLPreInitializationEvent event) {
// Network, mod config, items, blocks
ConfigHandler.init(event.getSuggestedConfigurationFile());
-
+ FMLCommonHandler.instance().bus().register(new ConfigHandler());
}
@Mod.EventHandler
diff --git a/src/main/java/net/flarn/noctis/handler/ConfigHandler.java b/src/main/java/net/flarn/noctis/handler/ConfigHandler.java
index b0cf38c..4240cbd 100644
--- a/src/main/java/net/flarn/noctis/handler/ConfigHandler.java
+++ b/src/main/java/net/flarn/noctis/handler/ConfigHandler.java
@@ -17,10 +17,11 @@ public class ConfigHandler {
public static void init(File configFile) {
if (configuration == null) {
configuration = new Configuration(configFile);
+ loadConfiguration();
}
}
- public void loadConfiguration() {
+ private static void loadConfiguration() {
try {
cheapRecipes = configuration.getBoolean("cheapRecipes", Configuration.CATEGORY_GENERAL, false,
"Use cheap recipes (e.g. sticks instead of diamond swords)");