From c5368ba283a857005632440678eba3a2975cc810 Mon Sep 17 00:00:00 2001 From: tgame14 Date: Thu, 10 Apr 2014 20:57:21 +0300 Subject: [PATCH] Added support for any phase loading, This will leave no values unconfigured --- .../core/ResonantInduction.java | 18 +++++++++--------- .../scala/resonantinduction/core/Settings.java | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/scala/resonantinduction/core/ResonantInduction.java b/src/main/scala/resonantinduction/core/ResonantInduction.java index f8371c4fd..578c7a9be 100644 --- a/src/main/scala/resonantinduction/core/ResonantInduction.java +++ b/src/main/scala/resonantinduction/core/ResonantInduction.java @@ -137,15 +137,15 @@ public class ResonantInduction proxy.postInit(); Settings.CONFIGURATION.save(); } -// -// @ForgeSubscribe -// public void configAnnotationAdded(ConfigAnnotationEvent event) -// { -// if (event.sourceClass.startsWith("resonantinduction")) -// { -// ConfigHandler.handleClass(event.sourceClass, Settings.CONFIGURATION); -// } -// } + + @ForgeSubscribe + public void configAnnotationAdded(ConfigAnnotationEvent event) + { + if (event.sourceClass.startsWith(Settings.DOMAIN)) + { + ConfigHandler.handleClass(event.sourceClass, Settings.CONFIGURATION); + } + } /** * Recipe Types diff --git a/src/main/scala/resonantinduction/core/Settings.java b/src/main/scala/resonantinduction/core/Settings.java index 73146c652..4c47c104e 100644 --- a/src/main/scala/resonantinduction/core/Settings.java +++ b/src/main/scala/resonantinduction/core/Settings.java @@ -16,7 +16,7 @@ import cpw.mods.fml.common.ModMetadata; public class Settings { public static final Configuration CONFIGURATION = new Configuration(new File(Loader.instance().getConfigDir(), Reference.NAME + ".cfg")); - + public static final String DOMAIN = "resonantinduction"; /** IDs suggested by Jyzarc and Horfius */ public static final IDManager idManager; @@ -27,7 +27,7 @@ public class Settings CONFIGURATION.save(); } - public static int getNextBlockID() + public static int getNextBlockID() { return idManager.getNextBlockID(); }