Added a config option for configuring the mana cost of Flugel Tiara

This commit is contained in:
Okkapel committed 2015-05-19 20:07:51 +03:00
1 parent 66d18b17b3
commit 007a365e39
3 files changed
+7 -2

No files matched your search

@@ -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);
@@ -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<String> 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;