From 007a365e39518c1ebb9a27db2bfba4f24bd6746f Mon Sep 17 00:00:00 2001 From: Okkapel Date: Tue, 19 May 2015 20:07:51 +0300 Subject: [PATCH] Added a config option for configuring the mana cost of Flugel Tiara --- .../vazkii/botania/common/core/handler/ConfigHandler.java | 4 ++++ .../botania/common/item/equipment/bauble/ItemFlightTiara.java | 4 ++-- src/main/resources/assets/botania/lang/en_US.lang | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) 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 996f383c0..0ce47ac48 100644 --- a/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java +++ b/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java @@ -60,6 +60,7 @@ public final class ConfigHandler { public static boolean relicsEnabled = true; public static boolean stones18Enabled = true; public static boolean ringOfOdinFireResist = true; + public static int flightTiaraManaCost = 35; public static int flowerQuantity = 2; public static int flowerDensity = 16; @@ -179,6 +180,9 @@ public final class ConfigHandler { desc = "Set this to false to make the Ring of Odin not apply fire resistance. Mostly for people who use Witchery transformations."; ringOfOdinFireResist = loadPropBool("ringOfOdin.fireResist", desc, ringOfOdinFireResist); + desc = "The mana cost of Flugel tiara. Default: 35."; + flightTiaraManaCost = loadPropInt("flightTiara.manaCost", desc, flightTiaraManaCost); + 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); diff --git a/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemFlightTiara.java b/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemFlightTiara.java index 090013cf4..29787ede1 100644 --- a/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemFlightTiara.java +++ b/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemFlightTiara.java @@ -47,6 +47,7 @@ import vazkii.botania.client.core.helper.IconHelper; import vazkii.botania.client.core.helper.ShaderHelper; import vazkii.botania.client.lib.LibResources; import vazkii.botania.common.Botania; +import vazkii.botania.common.core.handler.ConfigHandler; import vazkii.botania.common.achievement.ICraftAchievement; import vazkii.botania.common.achievement.ModAchievements; import vazkii.botania.common.lib.LibItemNames; @@ -63,7 +64,6 @@ public class ItemFlightTiara extends ItemBauble implements IManaUsingItem, IBaub private static ResourceLocation textureHalo = new ResourceLocation(LibResources.MISC_HALO); public static List playersWithFlight = new ArrayList(); - private static final int COST = 35; public static IIcon[] wingIcons; private static final int SUBTYPES = 8; @@ -153,7 +153,7 @@ public class ItemFlightTiara extends ItemBauble implements IManaUsingItem, IBaub player.capabilities.allowFlying = true; if(player.capabilities.isFlying) { if(!player.worldObj.isRemote) - ManaItemHandler.requestManaExact(tiara, player, COST, true); + ManaItemHandler.requestManaExact(tiara, player, ConfigHandler.flightTiaraManaCost, true); else if(Math.abs(player.motionX) > 0.1 || Math.abs(player.motionZ) > 0.1) { double x = event.entityLiving.posX - 0.5; double y = event.entityLiving.posY - 1.7; diff --git a/src/main/resources/assets/botania/lang/en_US.lang b/src/main/resources/assets/botania/lang/en_US.lang index 6bf4d74f8..04621a5c2 100644 --- a/src/main/resources/assets/botania/lang/en_US.lang +++ b/src/main/resources/assets/botania/lang/en_US.lang @@ -251,6 +251,7 @@ manaFluxfield.enabled=Enable Mana Fluxfield relics.enabled=Enable Relics 18stones.enabled=Enable 1.8 Stones ringOfOdin.fireResist=Enable Ring of Odin Fire Resist +flightTiara.manaCost=Flügel Tiara Mana Cost flower.forceCheck=Flower Force Checking enderPickpocket.enabled=Enable Ender Pickpocketing thermalily.obsidian=Thermalily Needs Obsidian