diff --git a/src/com/jaquadro/minecraft/storagedrawers/config/ConfigManager.java b/src/com/jaquadro/minecraft/storagedrawers/config/ConfigManager.java index 7fafe9e..6b4a849 100644 --- a/src/com/jaquadro/minecraft/storagedrawers/config/ConfigManager.java +++ b/src/com/jaquadro/minecraft/storagedrawers/config/ConfigManager.java @@ -88,6 +88,7 @@ public class ConfigManager public final ConfigSection sectionBlocksHalfDrawers1x2 = new ConfigSection(blockSections, sectionBlocks, "halfdrawers2", "blocks.halfDrawers2"); public final ConfigSection sectionBlocksHalfDrawers2x2 = new ConfigSection(blockSections, sectionBlocks, "halfdrawers4", "blocks.halfDrawers4"); public final ConfigSection sectionBlocksCompDrawers = new ConfigSection(blockSections, sectionBlocks, "compdrawers", "blocks.compDrawers"); + public final ConfigSection sectionBlocksController = new ConfigSection(blockSections, sectionBlocks, "controller", "blocks.controller"); public Map blockSectionsMap = new HashMap(); @@ -149,6 +150,8 @@ public class ConfigManager config.get(sectionBlocksCompDrawers.getQualifiedName(), "baseStorage", 8).setLanguageKey(LANG_PREFIX + "prop.baseStorage").setRequiresWorldRestart(true); config.get(sectionBlocksCompDrawers.getQualifiedName(), "recipeOutput", 1).setLanguageKey(LANG_PREFIX + "prop.recipeOutput").setRequiresMcRestart(true); + config.get(sectionBlocksController.getQualifiedName(), "enabled", true).setLanguageKey(LANG_PREFIX + "prop.enabled").setRequiresMcRestart(true); + cache.level2Mult = config.get(sectionUpgrades.getQualifiedName(), "level2Mult", 2).setLanguageKey(LANG_PREFIX + "upgrades.level2Mult").setRequiresWorldRestart(true).getInt(); cache.level3Mult = config.get(sectionUpgrades.getQualifiedName(), "level3Mult", 3).setLanguageKey(LANG_PREFIX + "upgrades.level3Mult").setRequiresWorldRestart(true).getInt(); cache.level4Mult = config.get(sectionUpgrades.getQualifiedName(), "level4Mult", 5).setLanguageKey(LANG_PREFIX + "upgrades.level4Mult").setRequiresWorldRestart(true).getInt(); diff --git a/src/com/jaquadro/minecraft/storagedrawers/core/ModBlocks.java b/src/com/jaquadro/minecraft/storagedrawers/core/ModBlocks.java index 941a187..efa29c6 100644 --- a/src/com/jaquadro/minecraft/storagedrawers/core/ModBlocks.java +++ b/src/com/jaquadro/minecraft/storagedrawers/core/ModBlocks.java @@ -54,10 +54,10 @@ public class ModBlocks GameRegistry.registerBlock(compDrawers, ItemCompDrawers.class, "compDrawers"); GameRegistry.registerTileEntity(TileEntityDrawersComp.class, ModBlocks.getQualifiedName(compDrawers)); } - //if (config.isBlockEnabled("controller")) { + if (config.isBlockEnabled("controller")) { GameRegistry.registerBlock(controller, ItemController.class, "controller"); GameRegistry.registerTileEntity(TileEntityController.class, ModBlocks.getQualifiedName(controller)); - //} + } } public static String getQualifiedName (Block block) { diff --git a/src/com/jaquadro/minecraft/storagedrawers/core/ModRecipes.java b/src/com/jaquadro/minecraft/storagedrawers/core/ModRecipes.java index 697d077..d7aba7e 100644 --- a/src/com/jaquadro/minecraft/storagedrawers/core/ModRecipes.java +++ b/src/com/jaquadro/minecraft/storagedrawers/core/ModRecipes.java @@ -34,8 +34,9 @@ public class ModRecipes GameRegistry.addRecipe(new ItemStack(ModBlocks.compDrawers, config.getBlockRecipeOutput("compdrawers")), "xxx", "zwz", "xyx", 'x', new ItemStack(Blocks.stone), 'y', Items.iron_ingot, 'z', new ItemStack(Blocks.piston), 'w', new ItemStack(ModBlocks.fullDrawers2, 1, OreDictionary.WILDCARD_VALUE)); - GameRegistry.addRecipe(new ItemStack(ModBlocks.controller), "xxx", "yzy", "xwx", - 'x', new ItemStack(Blocks.stone), 'y', Items.comparator, 'z', new ItemStack(ModBlocks.fullDrawers2, 1, OreDictionary.WILDCARD_VALUE), 'w', Items.diamond); + if (config.isBlockEnabled("controller")) + GameRegistry.addRecipe(new ItemStack(ModBlocks.controller), "xxx", "yzy", "xwx", + 'x', new ItemStack(Blocks.stone), 'y', Items.comparator, 'z', new ItemStack(ModBlocks.fullDrawers2, 1, OreDictionary.WILDCARD_VALUE), 'w', Items.diamond); if (config.isBlockEnabled("fulldrawers2")) GameRegistry.addRecipe(new ItemStack(ModItems.upgradeTemplate, 2), "xxx", "xyx", "xxx",