From 0ee62f53e3d9759fd4d03bd5fac720141498fd23 Mon Sep 17 00:00:00 2001 From: Vasco Lavos Date: Thu, 25 Feb 2016 19:32:36 +0000 Subject: [PATCH] Added back the passive decay time config. --- .../java/vazkii/botania/client/gui/lexicon/GuiLexicon.java | 4 +++- .../vazkii/botania/common/core/handler/ConfigHandler.java | 5 ++++- .../java/vazkii/botania/common/lexicon/LexiconData.java | 7 +++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexicon.java b/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexicon.java index 7d20632fb..e329a7122 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexicon.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexicon.java @@ -59,6 +59,7 @@ import vazkii.botania.client.gui.lexicon.button.GuiButtonNotes; import vazkii.botania.client.gui.lexicon.button.GuiButtonOptions; import vazkii.botania.client.gui.lexicon.button.GuiButtonUpdateWarning; import vazkii.botania.client.lib.LibResources; +import vazkii.botania.common.core.handler.ConfigHandler; import vazkii.botania.common.item.ItemLexicon; import vazkii.botania.common.lexicon.LexiconData; import vazkii.botania.common.lexicon.page.PageText; @@ -519,7 +520,8 @@ public class GuiLexicon extends GuiScreen { tutorial.add(LexiconData.manaIntro); tutorial.add(LexiconData.pool); tutorial.add(LexiconData.spreader); - tutorial.add(LexiconData.generatingIntro); + if(ConfigHandler.hardcorePassiveGeneration > 0) + tutorial.add(LexiconData.generatingIntro); tutorial.add(LexiconData.passiveGen); tutorial.add(LexiconData.daybloom); tutorial.add(LexiconData.functionalIntro); diff --git a/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java b/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java index f85ab281f..84761a3db 100644 --- a/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java +++ b/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java @@ -39,7 +39,7 @@ public final class ConfigHandler { private static final String CATEGORY_POTIONS = "potions"; - public static final int hardcorePassiveGeneration = 72000; + public static int hardcorePassiveGeneration = 72000; public static boolean useAdaptativeConfig = true; @@ -261,6 +261,9 @@ public final class ConfigHandler { desc = "The quantity of Botania flower patches to generate in the world, defaults to 2, the lower the number the less patches generate."; flowerQuantity = loadPropInt("worldgen.flower.quantity", desc, flowerQuantity); + desc = "The amount of time it takes a Passive flower to decay and turn into a dead bush. Defaults to 72000, 60 minutes. Setting this to -1 disables the feature altogether."; + hardcorePassiveGeneration = loadPropInt("passiveDecay.time", desc, hardcorePassiveGeneration); + desc = "The density of each Botania flower patch generated, defaults to 2, the lower the number, the less each patch will have."; adaptor.addMappingInt(0, "worldgen.flower.density", 16); adaptor.addMappingInt(238, "worldgen.flower.density", 2); diff --git a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java index 7983815f9..f0a25e4d3 100644 --- a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java +++ b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java @@ -13,6 +13,7 @@ package vazkii.botania.common.lexicon; import java.util.ArrayList; import java.util.List; +import baubles.common.Config; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; @@ -536,8 +537,10 @@ public final class LexiconData { solegnolia.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.solegnoliaRecipe)); // GENERATING FLOWERS ENTRIES - generatingIntro = new BLexiconEntry(LibLexicon.GFLOWER_INTRO, categoryGenerationFlowers); - generatingIntro.setPriority().setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2")); + if(ConfigHandler.hardcorePassiveGeneration > 0) { + generatingIntro = new BLexiconEntry(LibLexicon.GFLOWER_INTRO, categoryGenerationFlowers); + generatingIntro.setPriority().setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2")); + } passiveGen = new BLexiconEntry(LibLexicon.GFLOWER_PASSIVE_GENERATION, categoryGenerationFlowers); passiveGen.setPriority().setLexiconPages(new PageText("0"), new PageText("1")).setIcon(new ItemStack(Blocks.deadbush));