Added a config option to disable Relics.

This commit is contained in:
Lizbeth Rika committed 2015-04-09 17:15:35 +01:00
1 parent 0a1b759e01
commit 05c0c8d519
6 files changed
+34 -20

No files matched your search

@@ -15,6 +15,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
import net.minecraftforge.common.AchievementPage;
import vazkii.botania.common.block.ModBlocks;
import vazkii.botania.common.core.handler.ConfigHandler;
import vazkii.botania.common.item.ModItems;
import vazkii.botania.common.item.block.ItemBlockSpecialFlower;
import vazkii.botania.common.lib.LibAchievementNames;
@@ -104,14 +105,16 @@ public final class ModAchievements {
superCorporeaRequest = new AchievementMod(LibAchievementNames.SUPER_CORPOREA_REQUEST, -3, -5, ModBlocks.corporeaIndex, null).setSpecial();
pinkinator = new AchievementMod(LibAchievementNames.PINKINATOR, -5, -5, ModItems.pinkinator, null).setSpecial();
relicInfiniteFruit = new AchievementMod(LibAchievementNames.RELIC_INFINITE_FRUIT, -9, 4, ModItems.infiniteFruit, null);
relicExcaliber = new AchievementMod(LibAchievementNames.RELIC_EXCALIBER, -7, 7, ModItems.excaliber, null);
relicFlugelEye = new AchievementMod(LibAchievementNames.RELIC_FLUGEL_EYE, -5, 4, ModItems.flugelEye, null);
relicThorRing = new AchievementMod(LibAchievementNames.RELIC_THOR_RING, -7, 3, ModItems.thorRing, null);
relicOdinRing = new AchievementMod(LibAchievementNames.RELIC_ODIN_RING, -9, 6, ModItems.odinRing, null);
relicLokiRing = new AchievementMod(LibAchievementNames.RELIC_LOKI_RING, -5, 6, ModItems.lokiRing, null);
relicAesirRing = new AchievementMod(LibAchievementNames.RELIC_AESIR_RING, -7, 5, ModItems.aesirRing, null).setSpecial();
if(ConfigHandler.relicsEnabled) {
relicInfiniteFruit = new AchievementMod(LibAchievementNames.RELIC_INFINITE_FRUIT, -9, 4, ModItems.infiniteFruit, null);
relicExcaliber = new AchievementMod(LibAchievementNames.RELIC_EXCALIBER, -7, 7, ModItems.excaliber, null);
relicFlugelEye = new AchievementMod(LibAchievementNames.RELIC_FLUGEL_EYE, -5, 4, ModItems.flugelEye, null);
relicThorRing = new AchievementMod(LibAchievementNames.RELIC_THOR_RING, -7, 3, ModItems.thorRing, null);
relicOdinRing = new AchievementMod(LibAchievementNames.RELIC_ODIN_RING, -9, 6, ModItems.odinRing, null);
relicLokiRing = new AchievementMod(LibAchievementNames.RELIC_LOKI_RING, -5, 6, ModItems.lokiRing, null);
relicAesirRing = new AchievementMod(LibAchievementNames.RELIC_AESIR_RING, -7, 5, ModItems.aesirRing, null).setSpecial();
}
ItemStack desu = new ItemStack(ModItems.manaGun);
desu.setStackDisplayName("desu gun");
desuGun = new AchievementMod(LibAchievementNames.DESU_GUN, -8, -2, desu, null).setSpecial();
@@ -175,14 +175,16 @@ public final class BotaniaCreativeTab extends CreativeTabs {
addItem(ModItems.phantomInk);
addItem(ModItems.ancientWill);
addItem(ModItems.pinkinator);
addItem(ModItems.dice);
addItem(ModItems.infiniteFruit);
addItem(ModItems.excaliber);
addItem(ModItems.flugelEye);
addItem(ModItems.thorRing);
addItem(ModItems.odinRing);
addItem(ModItems.lokiRing);
addItem(ModItems.aesirRing);
if(ConfigHandler.relicsEnabled) {
addItem(ModItems.dice);
addItem(ModItems.infiniteFruit);
addItem(ModItems.excaliber);
addItem(ModItems.flugelEye);
addItem(ModItems.thorRing);
addItem(ModItems.odinRing);
addItem(ModItems.lokiRing);
addItem(ModItems.aesirRing);
}
addItem(ModItems.tinyPlanet);
addBlock(ModBlocks.tinyPlanet);
@@ -57,6 +57,7 @@ public final class ConfigHandler {
public static boolean darkQuartzEnabled = true;
public static boolean enchanterEnabled = true;
public static boolean fluxfieldEnabled = true;
public static boolean relicsEnabled = true;
public static int flowerQuantity = 2;
public static int flowerDensity = 16;
@@ -167,6 +168,9 @@ public final class ConfigHandler {
desc = "Set this to false to disable the Mana Fluxfield (generates RF from mana). This only disables the entry and creation. Old ones that are already in the world will stay.";
fluxfieldEnabled = loadPropBool("manaFluxfield.enabled", desc, fluxfieldEnabled);
desc = "Set this to false to disable the Relic System. This only disables the entries, drops and achievements. Old ones that are already in the world will stay.";
relicsEnabled = loadPropBool("relics.enabled", desc, relicsEnabled);
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);
@@ -56,6 +56,7 @@ import vazkii.botania.client.core.helper.ShaderHelper;
import vazkii.botania.common.Botania;
import vazkii.botania.common.achievement.ModAchievements;
import vazkii.botania.common.block.ModBlocks;
import vazkii.botania.common.core.handler.ConfigHandler;
import vazkii.botania.common.core.helper.Vector3;
import vazkii.botania.common.item.ModItems;
import vazkii.botania.common.lib.LibObfuscation;
@@ -315,7 +316,8 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
if(hard) {
entityDropItem(new ItemStack(ModItems.ancientWill, 1, rand.nextInt(6)), 1F);
entityDropItem(new ItemStack(ModItems.dice), 1F);
if(ConfigHandler.relicsEnabled)
entityDropItem(new ItemStack(ModItems.dice), 1F);
if(Math.random() < 0.25)
entityDropItem(new ItemStack(ModItems.overgrowthSeed, rand.nextInt(3) + 1), 1F);
@@ -817,8 +817,10 @@ public final class LexiconData {
elvenLore = new ALexiconEntry(LibLexicon.ALF_LORE, categoryAlfhomancy);
elvenLore.setLexiconPages(new PageText("0"), new PageLoreText("1"), new PageLoreText("2"), new PageLoreText("3"), new PageLoreText("4"), new PageLoreText("5"), new PageLoreText("6"), new PageLoreText("7")).setIcon(new ItemStack(Items.writable_book));
relics = new ALexiconEntry(LibLexicon.ALF_RELICS, categoryAlfhomancy);
relics.setLexiconPages(new PageText("0")).setIcon(new ItemStack(ModItems.dice));
if(ConfigHandler.relicsEnabled) {
relics = new ALexiconEntry(LibLexicon.ALF_RELICS, categoryAlfhomancy);
relics.setLexiconPages(new PageText("0")).setIcon(new ItemStack(ModItems.dice));
}
// MISCLENAEOUS ENTRIES
unstableBlocks = new BLexiconEntry(LibLexicon.MISC_UNSTABLE_BLOCKS, categoryMisc);