From a5d7260c1f073a0ee20202f3f9be7802a4c3da55 Mon Sep 17 00:00:00 2001 From: progwml6 Date: Wed, 2 Jul 2014 21:10:56 -0400 Subject: [PATCH] update mantle, autogenerate the configs for pulsar modules --- build.properties | 2 +- src/main/java/tconstruct/TConstruct.java | 12 +++------ .../tconstruct/smeltery/TinkerSmeltery.java | 2 +- .../java/tconstruct/tools/TinkerTools.java | 2 +- .../tconstruct/util/config/PHConstruct.java | 26 +------------------ .../java/tconstruct/world/TinkerWorld.java | 2 +- 6 files changed, 8 insertions(+), 38 deletions(-) diff --git a/build.properties b/build.properties index 4f27045e..a1e2dfcc 100644 --- a/build.properties +++ b/build.properties @@ -1,7 +1,7 @@ minecraft_version=1.7.10 minecraft_version_old=1.7.2 forge_version=10.13.0.1151 -mantle_version=155.504b639 +mantle_version=161.45beb09 FMP_version=1.1.0.268 CCLIB_version=1.1.0.77 NEI_version=1.0.1 diff --git a/src/main/java/tconstruct/TConstruct.java b/src/main/java/tconstruct/TConstruct.java index 320ed1ef..557a5fc4 100644 --- a/src/main/java/tconstruct/TConstruct.java +++ b/src/main/java/tconstruct/TConstruct.java @@ -3,6 +3,7 @@ package tconstruct; import java.util.Random; import mantle.lib.TabTools; +import mantle.pulsar.config.ForgeCFG; import mantle.pulsar.control.PulseManager; import mantle.pulsar.pulse.IPulse; import net.minecraft.world.gen.structure.MapGenStructureIO; @@ -80,7 +81,7 @@ public class TConstruct public static TProxyCommon proxy; /* Loads modules in a way that doesn't clutter the @Mod list */ - private PulseManager pulsar = new PulseManager(modID); + private PulseManager pulsar = new PulseManager(modID, new ForgeCFG("TinkersModules", "Modules: Disabling these will disable a chunk of the mod")); public TConstruct() { @@ -102,19 +103,12 @@ public class TConstruct { PHConstruct.initProps(event.getModConfigurationDirectory()); - if (PHConstruct.worldModule) pulsar.registerPulse(new TinkerWorld()); - if (PHConstruct.toolModule) pulsar.registerPulse(new TinkerTools()); - if (PHConstruct.smelteryModule) pulsar.registerPulse(new TinkerSmeltery()); - if (PHConstruct.mechworksModule) pulsar.registerPulse(new TinkerMechworks()); - if (PHConstruct.armorModule) pulsar.registerPulse(new TinkerArmor()); - /*if (PHConstruct.prayerModule) - pulsar.registerPulse(new TinkerPrayers()); - if (PHConstruct.cropifyModule) + /*pulsar.registerPulse(new TinkerPrayers()); pulsar.registerPulse(new TinkerCropify());*/ TConstructRegistry.materialTab = new TabTools("TConstructMaterials"); diff --git a/src/main/java/tconstruct/smeltery/TinkerSmeltery.java b/src/main/java/tconstruct/smeltery/TinkerSmeltery.java index 54667912..1b1e2985 100644 --- a/src/main/java/tconstruct/smeltery/TinkerSmeltery.java +++ b/src/main/java/tconstruct/smeltery/TinkerSmeltery.java @@ -84,7 +84,7 @@ import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder; @ObjectHolder(TConstruct.modID) -@Pulse(id = "Tinker's Smeltery", description = "Liquid metals, casting, and the multiblock structure.") +@Pulse(id = "Tinkers' Smeltery", description = "Liquid metals, casting, and the multiblock structure.") public class TinkerSmeltery { @PulseProxy(clientSide = "tconstruct.smeltery.SmelteryProxyClient", serverSide = "tconstruct.smeltery.SmelteryProxyCommon") diff --git a/src/main/java/tconstruct/tools/TinkerTools.java b/src/main/java/tconstruct/tools/TinkerTools.java index e86c6d3a..465c7061 100644 --- a/src/main/java/tconstruct/tools/TinkerTools.java +++ b/src/main/java/tconstruct/tools/TinkerTools.java @@ -105,7 +105,7 @@ import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder; @ObjectHolder(TConstruct.modID) -@Pulse(id = "Tinker's Tools", description = "The main core of the mod! All of the tools, the tables, and the patterns are here.") +@Pulse(id = "Tinkers' Tools", description = "The main core of the mod! All of the tools, the tables, and the patterns are here.") public class TinkerTools { /* Proxies for sides, used for graphics processing */ diff --git a/src/main/java/tconstruct/util/config/PHConstruct.java b/src/main/java/tconstruct/util/config/PHConstruct.java index 344a63ae..105c54da 100644 --- a/src/main/java/tconstruct/util/config/PHConstruct.java +++ b/src/main/java/tconstruct/util/config/PHConstruct.java @@ -15,30 +15,6 @@ public class PHConstruct public static void initProps (File location) { - /* Before we do anything, let's set up which modules can and cannot load. */ - File modules = new File(location + "/TinkersModules.cfg"); - - /* Some basic debugging will go a long way */ - try - { - modules.createNewFile(); - } - catch (IOException e) - { - TConstruct.logger.warn("Could not create module configuration file for TConstruct. Reason:"); - TConstruct.logger.warn(e.getLocalizedMessage()); - } - Configuration config = new Configuration(modules); - config.load(); - worldModule = config.get("Modules: Disabling these will disable a chunk of the mod", "World", true, "Ores, slime islands, essence berries, and the like.").getBoolean(true); - toolModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Tools", true, "The main core of the mod! All of the tools, the tables, and the patterns are here.") - .getBoolean(true); - smelteryModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Smeltery", true, "Liquid metals, casting, and the multiblock structure.").getBoolean(true); - mechworksModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Smeltery", true, "Mechanical machinations and steampunk inspired shenanigans.").getBoolean(true); - armorModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Armor", true, "Modifyable armors, such as the traveller's gear.").getBoolean(true); - prayerModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Prayers", true, "Area of effect and time delayed status changes. Scrolltastic!").getBoolean(true); - cropifyModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Cropify", true, "Tinkering with the world never felt this bushy.").getBoolean(true); - config.save(); /* Here we will set up the config file for the mod * First: Create a folder inside the config folder @@ -64,7 +40,7 @@ public class PHConstruct TConstruct.logger.warn(e.getLocalizedMessage()); } - config = new Configuration(mainFile); + Configuration config = new Configuration(mainFile); //config.load(); /* Load happens in the constructor */ superfunWorld = config.get("Superfun", "All the world is Superfun", false).getBoolean(false); diff --git a/src/main/java/tconstruct/world/TinkerWorld.java b/src/main/java/tconstruct/world/TinkerWorld.java index 8fcfb3d9..cb10edb4 100644 --- a/src/main/java/tconstruct/world/TinkerWorld.java +++ b/src/main/java/tconstruct/world/TinkerWorld.java @@ -89,7 +89,7 @@ import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder; @ObjectHolder(TConstruct.modID) -@Pulse(id = "Tinker's World", description = "Ores, slime islands, essence berries, and the like.") +@Pulse(id = "Tinkers' World", description = "Ores, slime islands, essence berries, and the like.") public class TinkerWorld { @Instance("TinkerWorld")