No reason to have this many functions...

This commit is contained in:
GJ 2013-10-01 08:57:21 -04:00 committed by TfT_02
parent 68eb51a3d0
commit a25dc24c6c
11 changed files with 229 additions and 697 deletions

View File

@ -7,6 +7,7 @@ import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.datatypes.skills.SkillType; import com.gmail.nossr50.datatypes.skills.SkillType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.skills.fishing.Fishing; import com.gmail.nossr50.skills.fishing.Fishing;
import com.gmail.nossr50.skills.fishing.Fishing.Tier;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.player.UserManager;
@ -135,7 +136,7 @@ public class FishingCommand extends SkillCommand {
} }
if (canTreasureHunt) { if (canTreasureHunt) {
player.sendMessage(LocaleLoader.getString("Fishing.Ability.Rank", lootTier)); player.sendMessage(LocaleLoader.getString("Fishing.Ability.Rank", lootTier, Tier.EIGHT.toNumerical()));
} }
if (canMagicHunt) { if (canMagicHunt) {
@ -143,7 +144,7 @@ public class FishingCommand extends SkillCommand {
} }
if (canShake) { if (canShake) {
int unlockLevel = AdvancedConfig.getInstance().getFishingTierLevelsTier1(); int unlockLevel = AdvancedConfig.getInstance().getFishingTierLevel(Tier.ONE);
if (skillValue < unlockLevel) { if (skillValue < unlockLevel) {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Fishing.Ability.Locked.0", unlockLevel))); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Fishing.Ability.Locked.0", unlockLevel)));

View File

@ -3,6 +3,7 @@ package com.gmail.nossr50.commands.skills;
import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.datatypes.skills.SkillType; import com.gmail.nossr50.datatypes.skills.SkillType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.skills.mining.BlastMining.Tier;
import com.gmail.nossr50.skills.mining.Mining; import com.gmail.nossr50.skills.mining.Mining;
import com.gmail.nossr50.skills.mining.MiningManager; import com.gmail.nossr50.skills.mining.MiningManager;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
@ -114,18 +115,18 @@ public class MiningCommand extends SkillCommand {
} }
if (canBlast) { if (canBlast) {
int unlockLevel = AdvancedConfig.getInstance().getBlastMiningRank1(); int unlockLevel = AdvancedConfig.getInstance().getBlastMiningRankLevel(Tier.ONE);
if (skillValue < unlockLevel) { if (skillValue < unlockLevel) {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.0", unlockLevel))); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.0", unlockLevel)));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Mining.Blast.Rank", blastMiningRank, LocaleLoader.getString("Mining.Blast.Effect", oreBonus, debrisReduction, bonusTNTDrops))); player.sendMessage(LocaleLoader.getString("Mining.Blast.Rank", blastMiningRank, Tier.EIGHT.toNumerical(), LocaleLoader.getString("Mining.Blast.Effect", oreBonus, debrisReduction, bonusTNTDrops)));
} }
} }
if (canBiggerBombs) { if (canBiggerBombs) {
int unlockLevel = AdvancedConfig.getInstance().getBlastMiningRank2(); int unlockLevel = AdvancedConfig.getInstance().getBlastMiningRankLevel(Tier.TWO);
if (skillValue < unlockLevel) { if (skillValue < unlockLevel) {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.1", unlockLevel))); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.1", unlockLevel)));
@ -136,7 +137,7 @@ public class MiningCommand extends SkillCommand {
} }
if (canDemoExpert) { if (canDemoExpert) {
int unlockLevel = AdvancedConfig.getInstance().getBlastMiningRank4(); int unlockLevel = AdvancedConfig.getInstance().getBlastMiningRankLevel(Tier.FOUR);
if (skillValue < unlockLevel) { if (skillValue < unlockLevel) {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.2", unlockLevel))); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.2", unlockLevel)));

View File

@ -6,6 +6,7 @@ import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.datatypes.skills.SkillType; import com.gmail.nossr50.datatypes.skills.SkillType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.skills.repair.ArcaneForging; import com.gmail.nossr50.skills.repair.ArcaneForging;
import com.gmail.nossr50.skills.repair.ArcaneForging.Tier;
import com.gmail.nossr50.skills.repair.Repair; import com.gmail.nossr50.skills.repair.Repair;
import com.gmail.nossr50.skills.repair.RepairManager; import com.gmail.nossr50.skills.repair.RepairManager;
import com.gmail.nossr50.skills.repair.repairables.Repairable; import com.gmail.nossr50.skills.repair.repairables.Repairable;
@ -145,7 +146,7 @@ public class RepairCommand extends SkillCommand {
if (canArcaneForge) { if (canArcaneForge) {
RepairManager repairManager = mcMMOPlayer.getRepairManager(); RepairManager repairManager = mcMMOPlayer.getRepairManager();
player.sendMessage(LocaleLoader.getString("Repair.Arcane.Rank", repairManager.getArcaneForgingRank())); player.sendMessage(LocaleLoader.getString("Repair.Arcane.Rank", repairManager.getArcaneForgingRank(), Tier.EIGHT.toNumerical()));
if (ArcaneForging.arcaneForgingEnchantLoss) { if (ArcaneForging.arcaneForgingEnchantLoss) {
player.sendMessage(LocaleLoader.getString("Repair.Arcane.Chance.Success", (arcaneBypass ? 100 : repairManager.getKeepEnchantChance()))); player.sendMessage(LocaleLoader.getString("Repair.Arcane.Chance.Success", (arcaneBypass ? 100 : repairManager.getKeepEnchantChance())));

View File

@ -4,6 +4,7 @@ import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.datatypes.skills.SkillType; import com.gmail.nossr50.datatypes.skills.SkillType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.skills.smelting.Smelting; import com.gmail.nossr50.skills.smelting.Smelting;
import com.gmail.nossr50.skills.smelting.Smelting.Tier;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
public class SmeltingCommand extends SkillCommand { public class SmeltingCommand extends SkillCommand {
@ -94,7 +95,7 @@ public class SmeltingCommand extends SkillCommand {
} }
if (canVanillaXPBoost) { if (canVanillaXPBoost) {
int unlockLevel = AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank1Level(); int unlockLevel = AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRankLevel(Tier.ONE);
if (skillValue < unlockLevel) { if (skillValue < unlockLevel) {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Smelting.Ability.Locked.0", unlockLevel))); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Smelting.Ability.Locked.0", unlockLevel)));

View File

@ -1,8 +1,14 @@
package com.gmail.nossr50.config; package com.gmail.nossr50.config;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
import com.gmail.nossr50.skills.fishing.Fishing;
import com.gmail.nossr50.skills.mining.BlastMining;
import com.gmail.nossr50.skills.repair.ArcaneForging;
import com.gmail.nossr50.skills.smelting.Smelting;
public class AdvancedConfig extends AutoUpdateConfigLoader { public class AdvancedConfig extends AutoUpdateConfigLoader {
private static AdvancedConfig instance; private static AdvancedConfig instance;
@ -173,32 +179,36 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
} }
/* FISHING */ /* FISHING */
if (getFishingTierLevelsTier1() >= getFishingTierLevelsTier2()) { List<Fishing.Tier> fishingTierList = Arrays.asList(Fishing.Tier.values());
reason.add("Skills.Fishing.Tier_Levels.Tier1 should be less than Skills.Fishing.Tier_Levels.Tier2!");
}
if (getFishingTierLevelsTier2() >= getFishingTierLevelsTier3()) { for (Fishing.Tier tier : fishingTierList) {
reason.add("Skills.Fishing.Tier_Levels.Tier2 should be less than Skills.Fishing.Tier_Levels.Tier3!"); if (getFishingTierLevel(tier) < 0) {
} reason.add("Skills.Fishing.Tier_Levels.Tier" + tier.toNumerical() + " should be at least 0!");
}
if (getFishingTierLevelsTier3() >= getFishingTierLevelsTier4()) { if (getShakeChance(tier) < 0) {
reason.add("Skills.Fishing.Tier_Levels.Tier3 should be less than Skills.Fishing.Tier_Levels.Tier4!"); reason.add("Skills.Fishing.Shake_Chance.Rank_" + tier.toNumerical() + " should be at least 0!");
} }
if (getFishingTierLevelsTier4() >= getFishingTierLevelsTier5()) { if (getFishingVanillaXPModifier(tier) < 0) {
reason.add("Skills.Fishing.Tier_Levels.Tier4 should be less than Skills.Fishing.Tier_Levels.Tier5!"); reason.add("Skills.Fishing.VanillaXPBoost.Rank_" + tier.toNumerical() + " should be at least 0!");
} }
if (getFishingTierLevelsTier5() >= getFishingTierLevelsTier6()) { if (tier != Fishing.Tier.EIGHT) {
reason.add("Skills.Fishing.Tier_Levels.Tier5 should be less than Skills.Fishing.Tier_Levels.Tier6!"); Fishing.Tier nextTier = fishingTierList.get(fishingTierList.indexOf(tier) - 1);
}
if (getFishingTierLevelsTier6() >= getFishingTierLevelsTier7()) { if (getFishingTierLevel(tier) >= getFishingTierLevel(nextTier)) {
reason.add("Skills.Fishing.Tier_Levels.Tier6 should be less than Skills.Fishing.Tier_Levels.Tier7!"); reason.add("Skills.Fishing.Tier_Levels.Tier" + tier.toNumerical() + " should be less than Skills.Fishing.Tier_Levels.Tier" + nextTier.toNumerical() + "!");
} }
if (getFishingTierLevelsTier7() >= getFishingTierLevelsTier8()) { if (getShakeChance(tier) > getShakeChance(nextTier)) {
reason.add("Skills.Fishing.Tier_Levels.Tier7 should be less than Skills.Fishing.Tier_Levels.Tier8!"); reason.add("Skills.Fishing.Shake_Chance.Rank_" + tier.toNumerical() + " should be less than or equal to Skills.Fishing.Shake_Chance.Rank_" + nextTier.toNumerical() + "!");
}
if (getFishingVanillaXPModifier(tier) > getFishingVanillaXPModifier(nextTier)) {
reason.add("Skills.Fishing.VanillaXPBoost.Rank_" + tier.toNumerical() + " should be less than or equal to Skills.Fishing.VanillaXPBoost.Rank_" + nextTier.toNumerical() + "!");
}
}
} }
if (getFishingMagicMultiplier() <= 0) { if (getFishingMagicMultiplier() <= 0) {
@ -213,94 +223,6 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
reason.add("Skills.Fishing.Ice_Fishing_UnlockLevel should be at least 1!"); reason.add("Skills.Fishing.Ice_Fishing_UnlockLevel should be at least 1!");
} }
if (getShakeChanceRank1() > getShakeChanceRank2()) {
reason.add("Skills.Fishing.Shake_Chance.Rank_1 should be less or equal to Skills.Fishing.Shake_Chance.Rank_2!");
}
if (getShakeChanceRank2() > getShakeChanceRank3()) {
reason.add("Skills.Fishing.Shake_Chance.Rank_2 should be less or equal to Skills.Fishing.Shake_Chance.Rank_3!");
}
if (getShakeChanceRank3() > getShakeChanceRank4()) {
reason.add("Skills.Fishing.Shake_Chance.Rank_3 should be less or equal to Skills.Fishing.Shake_Chance.Rank_4!");
}
if (getShakeChanceRank4() > getShakeChanceRank5()) {
reason.add("Skills.Fishing.Shake_Chance.Rank_4 should be less or equal to Skills.Fishing.Shake_Chance.Rank_5!");
}
if (getShakeChanceRank5() > getShakeChanceRank6()) {
reason.add("Skills.Fishing.Shake_Chance.Rank_5 should be less or equal to Skills.Fishing.Shake_Chance.Rank_6!");
}
if (getShakeChanceRank6() > getShakeChanceRank7()) {
reason.add("Skills.Fishing.Shake_Chance.Rank_6 should be less or equal to Skills.Fishing.Shake_Chance.Rank_7!");
}
if (getShakeChanceRank7() > getShakeChanceRank8()) {
reason.add("Skills.Fishing.Shake_Chance.Rank_7 should be less or equal to Skills.Fishing.Shake_Chance.Rank_8!");
}
if (getFishingVanillaXPModifierRank1() > getFishingVanillaXPModifierRank2()) {
reason.add("Skills.Fishing.VanillaXPBoost.Rank_1 should be less or equal to Skills.Fishing.VanillaXPBoost.Rank_2!");
}
if (getFishingVanillaXPModifierRank2() > getFishingVanillaXPModifierRank3()) {
reason.add("Skills.Fishing.VanillaXPBoost.Rank_2 should be less or equal to Skills.Fishing.VanillaXPBoost.Rank_3!");
}
if (getFishingVanillaXPModifierRank3() > getFishingVanillaXPModifierRank4()) {
reason.add("Skills.Fishing.VanillaXPBoost.Rank_3 should be less or equal to Skills.Fishing.VanillaXPBoost.Rank_4!");
}
if (getFishingVanillaXPModifierRank4() > getFishingVanillaXPModifierRank5()) {
reason.add("Skills.Fishing.VanillaXPBoost.Rank_4 should be less or equal to Skills.Fishing.VanillaXPBoost.Rank_5!");
}
if (getFishingVanillaXPModifierRank5() > getFishingVanillaXPModifierRank6()) {
reason.add("Skills.Fishing.VanillaXPBoost.Rank_5 should be less or equal to Skills.Fishing.VanillaXPBoost.Rank_6!");
}
if (getFishingVanillaXPModifierRank6() > getFishingVanillaXPModifierRank7()) {
reason.add("Skills.Fishing.VanillaXPBoost.Rank_6 should be less or equal to Skills.Fishing.VanillaXPBoost.Rank_7!");
}
if (getFishingVanillaXPModifierRank7() > getFishingVanillaXPModifierRank8()) {
reason.add("Skills.Fishing.VanillaXPBoost.Rank_7 should be less or equal to Skills.Fishing.VanillaXPBoost.Rank_8!");
}
if (getFishingVanillaXPModifierRank1() < 0) {
reason.add("Skills.Fishing.VanillaXPBoost.Rank_1 should be at least 0!");
}
if (getFishingVanillaXPModifierRank2() < 0) {
reason.add("Skills.Fishing.VanillaXPBoost.Rank_2 should be at least 0!");
}
if (getFishingVanillaXPModifierRank3() < 0) {
reason.add("Skills.Fishing.VanillaXPBoost.Rank_3 should be at least 0!");
}
if (getFishingVanillaXPModifierRank4() < 0) {
reason.add("Skills.Fishing.VanillaXPBoost.Rank_4 should be at least 0!");
}
if (getFishingVanillaXPModifierRank5() < 0) {
reason.add("Skills.Fishing.VanillaXPBoost.Rank_5 should be at least 0!");
}
if (getFishingVanillaXPModifierRank6() < 0) {
reason.add("Skills.Fishing.VanillaXPBoost.Rank_6 should be at least 0!");
}
if (getFishingVanillaXPModifierRank7() < 0) {
reason.add("Skills.Fishing.VanillaXPBoost.Rank_7 should be at least 0!");
}
if (getFishingVanillaXPModifierRank8() < 0) {
reason.add("Skills.Fishing.VanillaXPBoost.Rank_8 should be at least 0!");
}
/* HERBALISM */ /* HERBALISM */
if (getFarmerDietRankChange() < 1) { if (getFarmerDietRankChange() < 1) {
reason.add("Skills.Herbalism.Farmer_Diet_RankChange should be at least 1!"); reason.add("Skills.Herbalism.Farmer_Diet_RankChange should be at least 1!");
@ -351,172 +273,60 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
reason.add("Skills.Mining.DoubleDrops_MaxBonusLevel should be at least 1!"); reason.add("Skills.Mining.DoubleDrops_MaxBonusLevel should be at least 1!");
} }
if (getBlastMiningRank1() > getBlastMiningRank2()) { List<BlastMining.Tier> blastMiningTierList = Arrays.asList(BlastMining.Tier.values());
reason.add("Skills.Mining.BlastMining_Rank1 should be less or equal to Skills.Mining.BlastMining_Rank2!");
}
if (getBlastMiningRank2() > getBlastMiningRank3()) { for (BlastMining.Tier tier : blastMiningTierList) {
reason.add("Skills.Mining.BlastMining_Rank2 should be less or equal to Skills.Mining.BlastMining_Rank3!"); if (getBlastMiningRankLevel(tier) < 0) {
} reason.add("Skills.Mining.BlastMining_Rank" + tier.toNumerical() + " should be at least 0!");
}
if (getBlastMiningRank3() > getBlastMiningRank4()) { if (getBlastDamageDecrease(tier) < 0) {
reason.add("Skills.Mining.BlastMining_Rank3 should be less or equal to Skills.Mining.BlastMining_Rank4!"); reason.add("Skills.Mining.BlastDamageDecrease_Rank" + tier.toNumerical() + " should be at least 0!");
} }
if (getBlastMiningRank4() > getBlastMiningRank5()) { if (getOreBonus(tier) < 0) {
reason.add("Skills.Mining.BlastMining_Rank4 should be less or equal to Skills.Mining.BlastMining_Rank5!"); reason.add("Skills.Mining.OreBonus_Rank" + tier.toNumerical() + " should be at least 0!");
} }
if (getBlastMiningRank5() > getBlastMiningRank6()) { if (getDebrisReduction(tier) < 0) {
reason.add("Skills.Mining.BlastMining_Rank5 should be less or equal to Skills.Mining.BlastMining_Rank6!"); reason.add("Skills.Mining.DebrisReduction_Rank" + tier.toNumerical() + " should be at least 0!");
} }
if (getBlastMiningRank6() > getBlastMiningRank7()) { if (getDropMultiplier(tier) < 0) {
reason.add("Skills.Mining.BlastMining_Rank6 should be less or equal to Skills.Mining.BlastMining_Rank7!"); reason.add("Skills.Mining.DropMultiplier_Rank" + tier.toNumerical() + " should be at least 0!");
} }
if (getBlastMiningRank7() > getBlastMiningRank8()) { if (getBlastRadiusModifier(tier) < 0) {
reason.add("Skills.Mining.BlastMining_Rank7 should be less or equal to Skills.Mining.BlastMining_Rank8!"); reason.add("Skills.Mining.BlastRadiusModifier_Rank" + tier.toNumerical() + " should be at least 0!");
} }
if (getBlastDamageDecreaseRank1() > getBlastDamageDecreaseRank2()) { if (tier != BlastMining.Tier.EIGHT) {
reason.add("Skills.Mining.BlastDamageDecrease_Rank1 should be less or equal to Skills.Mining.BlastDamageDecrease_Rank2!"); BlastMining.Tier nextTier = blastMiningTierList.get(blastMiningTierList.indexOf(tier) - 1);
}
if (getBlastDamageDecreaseRank2() > getBlastDamageDecreaseRank3()) { if (getBlastMiningRankLevel(tier) >= getBlastMiningRankLevel(nextTier)) {
reason.add("Skills.Mining.BlastDamageDecrease_Rank2 should be less or equal to Skills.Mining.BlastDamageDecrease_Rank3!"); reason.add("Skills.Mining.BlastMining_Rank" + tier.toNumerical() + " should be less than Skills.Mining.BlastMining_Rank" + nextTier.toNumerical() + "!");
} }
if (getBlastDamageDecreaseRank3() > getBlastDamageDecreaseRank4()) { if (getBlastDamageDecrease(tier) > getBlastDamageDecrease(nextTier)) {
reason.add("Skills.Mining.BlastDamageDecrease_Rank3 should be less or equal to Skills.Mining.BlastDamageDecrease_Rank4!"); reason.add("Skills.Mining.BlastDamageDecrease_Rank" + tier.toNumerical() + " should be less than or equal to Skills.Mining.BlastDamageDecrease_Rank" + nextTier.toNumerical() + "!");
} }
if (getBlastDamageDecreaseRank4() > getBlastDamageDecreaseRank5()) { if (getOreBonus(tier) > getOreBonus(nextTier)) {
reason.add("Skills.Mining.BlastDamageDecrease_Rank4 should be less or equal to Skills.Mining.BlastDamageDecrease_Rank5!"); reason.add("Skills.Mining.OreBonus_Rank" + tier.toNumerical() + " should be less than or equal to Skills.Mining.OreBonus_Rank" + nextTier.toNumerical() + "!");
} }
if (getBlastDamageDecreaseRank5() > getBlastDamageDecreaseRank6()) { if (getDebrisReduction(tier) > getDebrisReduction(nextTier)) {
reason.add("Skills.Mining.BlastDamageDecrease_Rank5 should be less or equal to Skills.Mining.BlastDamageDecrease_Rank6!"); reason.add("Skills.Mining.DebrisReduction_Rank" + tier.toNumerical() + " should be less than or equal to Skills.Mining.DebrisReduction_Rank" + nextTier.toNumerical() + "!");
} }
if (getBlastDamageDecreaseRank6() > getBlastDamageDecreaseRank7()) { if (getDropMultiplier(tier) > getDropMultiplier(nextTier)) {
reason.add("Skills.Mining.BlastDamageDecrease_Rank6 should be less or equal to Skills.Mining.BlastDamageDecrease_Rank7!"); reason.add("Skills.Mining.DropMultiplier_Rank" + tier.toNumerical() + " should be less than or equal to Skills.Mining.DropMultiplier_Rank" + nextTier.toNumerical() + "!");
} }
if (getBlastDamageDecreaseRank7() > getBlastDamageDecreaseRank8()) { if (getBlastRadiusModifier(tier) > getBlastRadiusModifier(nextTier)) {
reason.add("Skills.Mining.BlastDamageDecrease_Rank7 should be less or equal to Skills.Mining.BlastDamageDecrease_Rank8!"); reason.add("Skills.Mining.BlastRadiusModifier_Rank" + tier.toNumerical() + " should be less than or equal to Skills.Mining.BlastRadiusModifier_Rank" + nextTier.toNumerical() + "!");
} }
}
if (getOreBonusRank1() > getOreBonusRank2()) {
reason.add("Skills.Mining.OreBonus_Rank1 should be less or equal to Skills.Mining.OreBonus_Rank2!");
}
if (getOreBonusRank2() > getOreBonusRank3()) {
reason.add("Skills.Mining.OreBonus_Rank2 should be less or equal to Skills.Mining.OreBonus_Rank3!");
}
if (getOreBonusRank3() > getOreBonusRank4()) {
reason.add("Skills.Mining.OreBonus_Rank3 should be less or equal to Skills.Mining.OreBonus_Rank4!");
}
if (getOreBonusRank4() > getOreBonusRank5()) {
reason.add("Skills.Mining.OreBonus_Rank4 should be less or equal to Skills.Mining.OreBonus_Rank5!");
}
if (getOreBonusRank5() > getOreBonusRank6()) {
reason.add("Skills.Mining.OreBonus_Rank5 should be less or equal to Skills.Mining.OreBonus_Rank6!");
}
if (getOreBonusRank6() > getOreBonusRank7()) {
reason.add("Skills.Mining.OreBonus_Rank6 should be less or equal to Skills.Mining.OreBonus_Rank7!");
}
if (getOreBonusRank7() > getOreBonusRank8()) {
reason.add("Skills.Mining.OreBonus_Rank7 should be less or equal to Skills.Mining.OreBonus_Rank8!");
}
if (getDebrisReductionRank1() > getDebrisReductionRank2()) {
reason.add("Skills.Mining.DebrisReduction_Rank1 should be less or equal to Skills.Mining.DebrisReduction_Rank2!");
}
if (getDebrisReductionRank2() > getDebrisReductionRank3()) {
reason.add("Skills.Mining.DebrisReduction_Rank2 should be less or equal to Skills.Mining.DebrisReduction_Rank3!");
}
if (getDebrisReductionRank3() > getDebrisReductionRank4()) {
reason.add("Skills.Mining.DebrisReduction_Rank3 should be less or equal to Skills.Mining.DebrisReduction_Rank4!");
}
if (getDebrisReductionRank4() > getDebrisReductionRank5()) {
reason.add("Skills.Mining.DebrisReduction_Rank4 should be less or equal to Skills.Mining.DebrisReduction_Rank5!");
}
if (getDebrisReductionRank5() > getDebrisReductionRank6()) {
reason.add("Skills.Mining.DebrisReduction_Rank5 should be less or equal to Skills.Mining.DebrisReduction_Rank6!");
}
if (getDebrisReductionRank6() > getDebrisReductionRank7()) {
reason.add("Skills.Mining.DebrisReduction_Rank6 should be less or equal to Skills.Mining.DebrisReduction_Rank7!");
}
if (getDebrisReductionRank7() > getDebrisReductionRank8()) {
reason.add("Skills.Mining.DebrisReduction_Rank7 should be less or equal to Skills.Mining.DebrisReduction_Rank8!");
}
if (getDropMultiplierRank1() > getDropMultiplierRank2()) {
reason.add("Skills.Mining.DropMultiplier_Rank1 should be less or equal to Skills.Mining.DropMultiplier_Rank2!");
}
if (getDropMultiplierRank2() > getDropMultiplierRank3()) {
reason.add("Skills.Mining.DropMultiplier_Rank2 should be less or equal to Skills.Mining.DropMultiplier_Rank3!");
}
if (getDropMultiplierRank3() > getDropMultiplierRank4()) {
reason.add("Skills.Mining.DropMultiplier_Rank3 should be less or equal to Skills.Mining.DropMultiplier_Rank4!");
}
if (getDropMultiplierRank4() > getDropMultiplierRank5()) {
reason.add("Skills.Mining.DropMultiplier_Rank4 should be less or equal to Skills.Mining.DropMultiplier_Rank5!");
}
if (getDropMultiplierRank5() > getDropMultiplierRank6()) {
reason.add("Skills.Mining.DropMultiplier_Rank5 should be less or equal to Skills.Mining.DropMultiplier_Rank6!");
}
if (getDropMultiplierRank6() > getDropMultiplierRank7()) {
reason.add("Skills.Mining.DropMultiplier_Rank6 should be less or equal to Skills.Mining.DropMultiplier_Rank7!");
}
if (getDropMultiplierRank7() > getDropMultiplierRank8()) {
reason.add("Skills.Mining.DropMultiplier_Rank7 should be less or equal to Skills.Mining.DropMultiplier_Rank8!");
}
if (getBlastRadiusModifierRank1() > getBlastRadiusModifierRank2()) {
reason.add("Skills.Mining.BlastRadiusModifier_Rank1 should be less or equal to Skills.Mining.BlastRadiusModifier_Rank2!");
}
if (getBlastRadiusModifierRank2() > getBlastRadiusModifierRank3()) {
reason.add("Skills.Mining.BlastRadiusModifier_Rank2 should be less or equal to Skills.Mining.BlastRadiusModifier_Rank3!");
}
if (getBlastRadiusModifierRank3() > getBlastRadiusModifierRank4()) {
reason.add("Skills.Mining.BlastRadiusModifier_Rank3 should be less or equal to Skills.Mining.BlastRadiusModifier_Rank4!");
}
if (getBlastRadiusModifierRank4() > getBlastRadiusModifierRank5()) {
reason.add("Skills.Mining.BlastRadiusModifier_Rank4 should be less or equal to Skills.Mining.BlastRadiusModifier_Rank5!");
}
if (getBlastRadiusModifierRank5() > getBlastRadiusModifierRank6()) {
reason.add("Skills.Mining.BlastRadiusModifier_Rank5 should be less or equal to Skills.Mining.BlastRadiusModifier_Rank6!");
}
if (getBlastRadiusModifierRank6() > getBlastRadiusModifierRank7()) {
reason.add("Skills.Mining.BlastRadiusModifier_Rank6 should be less or equal to Skills.Mining.BlastRadiusModifier_Rank7!");
}
if (getBlastRadiusModifierRank7() > getBlastRadiusModifierRank8()) {
reason.add("Skills.Mining.BlastRadiusModifier_Rank7 should be less or equal to Skills.Mining.BlastRadiusModifier_Rank8!");
} }
/* REPAIR */ /* REPAIR */
@ -540,100 +350,36 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
reason.add("Skills.Repair.Salvage_UnlockLevel should be at least 1!"); reason.add("Skills.Repair.Salvage_UnlockLevel should be at least 1!");
} }
if (getArcaneForgingDowngradeChanceRank1() < 0 || getArcaneForgingDowngradeChanceRank1() > 100) { List<ArcaneForging.Tier> arcaneForgingTierList = Arrays.asList(ArcaneForging.Tier.values());
reason.add("Skills.Repair.Arcane_Forging.Downgrades.Chance.Rank_1 only accepts values from 0 to 100!");
}
if (getArcaneForgingDowngradeChanceRank2() < 0 || getArcaneForgingDowngradeChanceRank2() > 100) { for (ArcaneForging.Tier tier : arcaneForgingTierList) {
reason.add("Skills.Repair.Arcane_Forging.Downgrades.Chance.Rank_2 only accepts values from 0 to 100!"); if (getArcaneForgingRankLevel(tier) < 0) {
} reason.add("Skills.Repair.Arcane_Forging.Rank_Levels.Rank_" + tier.toNumerical() + " should be at least 0!");
}
if (getArcaneForgingDowngradeChanceRank3() < 0 || getArcaneForgingDowngradeChanceRank3() > 100) { if (getArcaneForgingDowngradeChance(tier) < 0 || getArcaneForgingDowngradeChance(tier) > 100) {
reason.add("Skills.Repair.Arcane_Forging.Downgrades.Chance.Rank_3 only accepts values from 0 to 100!"); reason.add("Skills.Repair.Arcane_Forging.Downgrades.Chance.Rank_" + tier.toNumerical() + " only accepts values from 0 to 100!");
} }
if (getArcaneForgingDowngradeChanceRank4() < 0 || getArcaneForgingDowngradeChanceRank4() > 100) { if (getArcaneForgingKeepEnchantsChance(tier) < 0 || getArcaneForgingKeepEnchantsChance(tier) > 100) {
reason.add("Skills.Repair.Arcane_Forging.Downgrades.Chance.Rank_4 only accepts values from 0 to 100!"); reason.add("Skills.Repair.Arcane_Forging.Keep_Enchants.Chance.Rank_" + tier.toNumerical() + " only accepts values from 0 to 100!");
} }
if (getArcaneForgingDowngradeChanceRank5() < 0 || getArcaneForgingDowngradeChanceRank5() > 100) { if (tier != ArcaneForging.Tier.EIGHT) {
reason.add("Skills.Repair.Arcane_Forging.Downgrades.Chance.Rank_5 only accepts values from 0 to 100!"); ArcaneForging.Tier nextTier = arcaneForgingTierList.get(arcaneForgingTierList.indexOf(tier) - 1);
}
if (getArcaneForgingDowngradeChanceRank6() < 0 || getArcaneForgingDowngradeChanceRank6() > 100) { if (getArcaneForgingRankLevel(tier) >= getArcaneForgingRankLevel(nextTier)) {
reason.add("Skills.Repair.Arcane_Forging.Downgrades.Chance.Rank_6 only accepts values from 0 to 100!"); reason.add("Skills.Repair.Arcane_Forging.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than Skills.Repair.Arcane_Forging.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
} }
if (getArcaneForgingDowngradeChanceRank7() < 0 || getArcaneForgingDowngradeChanceRank7() > 100) { if (getArcaneForgingDowngradeChance(nextTier) > getArcaneForgingDowngradeChance(tier)) {
reason.add("Skills.Repair.Arcane_Forging.Downgrades.Chance.Rank_7 only accepts values from 0 to 100!"); reason.add("Skills.Repair.ArcaneForging.Downgrades.Chance.Rank_" + nextTier.toNumerical() + " should be less than or equal to Skills.Repair.ArcaneForging.Downgrades.Chance.Rank_" + tier.toNumerical() + "!");
} }
if (getArcaneForgingDowngradeChanceRank8() < 0 || getArcaneForgingDowngradeChanceRank8() > 100) { if (getArcaneForgingKeepEnchantsChance(tier) > getArcaneForgingKeepEnchantsChance(nextTier)) {
reason.add("Skills.Repair.Arcane_Forging.Downgrades.Chance.Rank_8 only accepts values from 0 to 100!"); reason.add("Skills.Repair.Arcane_Forging.Keep_Enchants.Chance.Rank_" + tier.toNumerical() + " should be less than or equal to Skills.Repair.Arcane_Forging.Keep_Enchants.Chance.Rank_" + nextTier.toNumerical() + "!");
} }
}
if (getArcaneForgingKeepEnchantsChanceRank1() < 0 || getArcaneForgingKeepEnchantsChanceRank1() > 100) {
reason.add("Skills.Repair.Arcane_Forging.Keep_Enchants.Chance.Rank_1 only accepts values from 0 to 100!");
}
if (getArcaneForgingKeepEnchantsChanceRank2() < 0 || getArcaneForgingKeepEnchantsChanceRank2() > 100) {
reason.add("Skills.Repair.Arcane_Forging.Keep_Enchants.Chance.Rank_2 only accepts values from 0 to 100!");
}
if (getArcaneForgingKeepEnchantsChanceRank3() < 0 || getArcaneForgingKeepEnchantsChanceRank3() > 100) {
reason.add("Skills.Repair.Arcane_Forging.Keep_Enchants.Chance.Rank_3 only accepts values from 0 to 100!");
}
if (getArcaneForgingKeepEnchantsChanceRank4() < 0 || getArcaneForgingKeepEnchantsChanceRank4() > 100) {
reason.add("Skills.Repair.Arcane_Forging.Keep_Enchants.Chance.Rank_4 only accepts values from 0 to 100!");
}
if (getArcaneForgingKeepEnchantsChanceRank5() < 0 || getArcaneForgingKeepEnchantsChanceRank5() > 100) {
reason.add("Skills.Repair.Arcane_Forging.Keep_Enchants.Chance.Rank_5 only accepts values from 0 to 100!");
}
if (getArcaneForgingKeepEnchantsChanceRank6() < 0 || getArcaneForgingKeepEnchantsChanceRank6() > 100) {
reason.add("Skills.Repair.Arcane_Forging.Keep_Enchants.Chance.Rank_6 only accepts values from 0 to 100!");
}
if (getArcaneForgingKeepEnchantsChanceRank7() < 0 || getArcaneForgingKeepEnchantsChanceRank7() > 100) {
reason.add("Skills.Repair.Arcane_Forging.Keep_Enchants.Chance.Rank_7 only accepts values from 0 to 100!");
}
if (getArcaneForgingKeepEnchantsChanceRank8() < 0 || getArcaneForgingKeepEnchantsChanceRank8() > 100) {
reason.add("Skills.Repair.Arcane_Forging.Keep_Enchants.Chance.Rank_8 only accepts values from 0 to 100!");
}
if (getArcaneForgingRankLevels1() < 0) {
reason.add("Skills.Repair.Arcane_Forging.Rank_Levels.Rank_1 should be at least 0!");
}
if (getArcaneForgingRankLevels2() < 0) {
reason.add("Skills.Repair.Arcane_Forging.Rank_Levels.Rank_2 should be at least 0!");
}
if (getArcaneForgingRankLevels3() < 0) {
reason.add("Skills.Repair.Arcane_Forging.Rank_Levels.Rank_3 should be at least 0!");
}
if (getArcaneForgingRankLevels4() < 0) {
reason.add("Skills.Repair.Arcane_Forging.Rank_Levels.Rank_4 should be at least 0!");
}
if (getArcaneForgingRankLevels5() < 0) {
reason.add("Skills.Repair.Arcane_Forging.Rank_Levels.Rank_5 should be at least 0!");
}
if (getArcaneForgingRankLevels6() < 0) {
reason.add("Skills.Repair.Arcane_Forging.Rank_Levels.Rank_6 should be at least 0!");
}
if (getArcaneForgingRankLevels7() < 0) {
reason.add("Skills.Repair.Arcane_Forging.Rank_Levels.Rank_7 should be at least 0!");
}
if (getArcaneForgingRankLevels8() < 0) {
reason.add("Skills.Repair.Arcane_Forging.Rank_Levels.Rank_8 should be at least 0!");
} }
/* SMELTING */ /* SMELTING */
@ -661,64 +407,28 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
reason.add("Skills.Smelting.FluxMining_Chance should be at least 1!"); reason.add("Skills.Smelting.FluxMining_Chance should be at least 1!");
} }
if (getSmeltingVanillaXPBoostRank1Level() > getSmeltingVanillaXPBoostRank2Level()) { List<Smelting.Tier> smeltingTierList = Arrays.asList(Smelting.Tier.values());
reason.add("Skills.Smelting.VanillaXPBoost_Rank1Level should be less or equal to Skills.Smelting.VanillaXPBoost_Rank2Level!");
}
if (getSmeltingVanillaXPBoostRank2Level() > getSmeltingVanillaXPBoostRank3Level()) { for (Smelting.Tier tier : smeltingTierList) {
reason.add("Skills.Smelting.VanillaXPBoost_Rank2Level should be less or equal to Skills.Smelting.VanillaXPBoost_Rank3Level!"); if (getSmeltingVanillaXPBoostRankLevel(tier) < 0) {
} reason.add("Skills.Smelting.VanillaXPBoost.Rank_Levels.Rank_" + tier.toNumerical() + " should be at least 0!");
}
if (getSmeltingVanillaXPBoostRank3Level() > getSmeltingVanillaXPBoostRank4Level()) { if (getSmeltingVanillaXPBoostMultiplier(tier) < 1) {
reason.add("Skills.Smelting.VanillaXPBoost_Rank3Level should be less or equal to Skills.Smelting.VanillaXPBoost_Rank4Level!"); reason.add("Skills.Smelting.VanillaXPBoost.XP_Multiplier.Rank_" + tier.toNumerical() + " should be at least 1!");
} }
if (getSmeltingVanillaXPBoostRank4Level() > getSmeltingVanillaXPBoostRank5Level()) { if (tier != Smelting.Tier.EIGHT) {
reason.add("Skills.Smelting.VanillaXPBoost_Rank4Level should be less or equal to Skills.Smelting.VanillaXPBoost_Rank5Level!"); Smelting.Tier nextTier = smeltingTierList.get(smeltingTierList.indexOf(tier) - 1);
}
if (getSmeltingVanillaXPBoostRank5Level() > getSmeltingVanillaXPBoostRank6Level()) { if (getSmeltingVanillaXPBoostRankLevel(tier) >= getSmeltingVanillaXPBoostRankLevel(nextTier)) {
reason.add("Skills.Smelting.VanillaXPBoost_Rank5Level should be less or equal to Skills.Smelting.VanillaXPBoost_Rank6Level!"); reason.add("Skills.Smelting.VanillaXPBoost.Rank_Levels.Rank_" + tier.toNumerical() + " should be less than Skills.Smelting.VanillaXPBoost.Rank_Levels.Rank_" + nextTier.toNumerical() + "!");
} }
if (getSmeltingVanillaXPBoostRank6Level() > getSmeltingVanillaXPBoostRank7Level()) { if (getSmeltingVanillaXPBoostMultiplier(tier) > getSmeltingVanillaXPBoostRankLevel(nextTier)) {
reason.add("Skills.Smelting.VanillaXPBoost_Rank6Level should be less or equal to Skills.Smelting.VanillaXPBoost_Rank7Level!"); reason.add("Skills.Smelting.VanillaXPBoost.XP_Multiplier.Rank_" + tier.toNumerical() + " should be less than or equal to Skills.Smelting.VanillaXPBoost.XP_Multiplier.Rank_" + nextTier.toNumerical() + "!");
} }
}
if (getSmeltingVanillaXPBoostRank7Level() > getSmeltingVanillaXPBoostRank8Level()) {
reason.add("Skills.Smelting.VanillaXPBoost_Rank7Level should be less or equal to Skills.Smelting.VanillaXPBoost_Rank8Level!");
}
if (getSmeltingVanillaXPBoostRank1Multiplier() < 1) {
reason.add("Skills.Smelting.VanillaXPBoost_Rank1Multiplier should be at least 1!");
}
if (getSmeltingVanillaXPBoostRank2Multiplier() < 1) {
reason.add("Skills.Smelting.VanillaXPBoost_Rank2Multiplier should be at least 1!");
}
if (getSmeltingVanillaXPBoostRank3Multiplier() < 1) {
reason.add("Skills.Smelting.VanillaXPBoost_Rank3Multiplier should be at least 1!");
}
if (getSmeltingVanillaXPBoostRank4Multiplier() < 1) {
reason.add("Skills.Smelting.VanillaXPBoost_Rank4Multiplier should be at least 1!");
}
if (getSmeltingVanillaXPBoostRank5Multiplier() < 1) {
reason.add("Skills.Smelting.VanillaXPBoost_Rank5Multiplier should be at least 1!");
}
if (getSmeltingVanillaXPBoostRank6Multiplier() < 1) {
reason.add("Skills.Smelting.VanillaXPBoost_Rank6Multiplier should be at least 1!");
}
if (getSmeltingVanillaXPBoostRank7Multiplier() < 1) {
reason.add("Skills.Smelting.VanillaXPBoost_Rank7Multiplier should be at least 1!");
}
if (getSmeltingVanillaXPBoostRank8Multiplier() < 1) {
reason.add("Skills.Smelting.VanillaXPBoost_Rank8Multiplier should be at least 1!");
} }
/* SWORDS */ /* SWORDS */
@ -959,14 +669,9 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
//Nothing to configure, everything is already configurable in config.yml //Nothing to configure, everything is already configurable in config.yml
/* FISHING */ /* FISHING */
public int getFishingTierLevelsTier1() { return config.getInt("Skills.Fishing.Rank_Levels.Rank_1", 125); } public int getFishingTierLevel(Fishing.Tier tier) { return config.getInt("Skills.Fishing.Rank_Levels.Rank_" + tier.toNumerical()); }
public int getFishingTierLevelsTier2() { return config.getInt("Skills.Fishing.Rank_Levels.Rank_2", 250); } public double getShakeChance(Fishing.Tier tier) { return config.getDouble("Skills.Fishing.Shake_Chance.Rank_" + tier.toNumerical()); }
public int getFishingTierLevelsTier3() { return config.getInt("Skills.Fishing.Rank_Levels.Rank_3", 375); } public int getFishingVanillaXPModifier(Fishing.Tier tier) { return config.getInt("Skills.Fishing.VanillaXPBoost.Rank_" + tier.toNumerical()); }
public int getFishingTierLevelsTier4() { return config.getInt("Skills.Fishing.Rank_Levels.Rank_4", 500); }
public int getFishingTierLevelsTier5() { return config.getInt("Skills.Fishing.Rank_Levels.Rank_5", 625); }
public int getFishingTierLevelsTier6() { return config.getInt("Skills.Fishing.Rank_Levels.Rank_6", 750); }
public int getFishingTierLevelsTier7() { return config.getInt("Skills.Fishing.Rank_Levels.Rank_7", 875); }
public int getFishingTierLevelsTier8() { return config.getInt("Skills.Fishing.Rank_Levels.Rank_8", 1000); }
public double getFishingMagicMultiplier() { return config.getDouble("Skills.Fishing.MagicHunter_Multiplier", 5.0D); } public double getFishingMagicMultiplier() { return config.getDouble("Skills.Fishing.MagicHunter_Multiplier", 5.0D); }
@ -974,26 +679,6 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
public int getIceFishingUnlockLevel() { return config.getInt("Skills.Fishing.Ice_Fishing_UnlockLevel", 50); } public int getIceFishingUnlockLevel() { return config.getInt("Skills.Fishing.Ice_Fishing_UnlockLevel", 50); }
/* Shake */
public double getShakeChanceRank1() { return config.getDouble("Skills.Fishing.Shake_Chance.Rank_1", 25.0D); }
public double getShakeChanceRank2() { return config.getDouble("Skills.Fishing.Shake_Chance.Rank_2", 25.0D); }
public double getShakeChanceRank3() { return config.getDouble("Skills.Fishing.Shake_Chance.Rank_3", 35.0D); }
public double getShakeChanceRank4() { return config.getDouble("Skills.Fishing.Shake_Chance.Rank_4", 35.0D); }
public double getShakeChanceRank5() { return config.getDouble("Skills.Fishing.Shake_Chance.Rank_5", 45.0D); }
public double getShakeChanceRank6() { return config.getDouble("Skills.Fishing.Shake_Chance.Rank_6", 55.0D); }
public double getShakeChanceRank7() { return config.getDouble("Skills.Fishing.Shake_Chance.Rank_7", 65.0D); }
public double getShakeChanceRank8() { return config.getDouble("Skills.Fishing.Shake_Chance.Rank_8", 75.0D); }
/* Vanilla XP Boost */
public int getFishingVanillaXPModifierRank1() { return config.getInt("Skills.Fishing.VanillaXPBoost.Rank_1", 1); }
public int getFishingVanillaXPModifierRank2() { return config.getInt("Skills.Fishing.VanillaXPBoost.Rank_2", 1); }
public int getFishingVanillaXPModifierRank3() { return config.getInt("Skills.Fishing.VanillaXPBoost.Rank_3", 2); }
public int getFishingVanillaXPModifierRank4() { return config.getInt("Skills.Fishing.VanillaXPBoost.Rank_4", 2); }
public int getFishingVanillaXPModifierRank5() { return config.getInt("Skills.Fishing.VanillaXPBoost.Rank_5", 3); }
public int getFishingVanillaXPModifierRank6() { return config.getInt("Skills.Fishing.VanillaXPBoost.Rank_6", 4); }
public int getFishingVanillaXPModifierRank7() { return config.getInt("Skills.Fishing.VanillaXPBoost.Rank_7", 5); }
public int getFishingVanillaXPModifierRank8() { return config.getInt("Skills.Fishing.VanillaXPBoost.Rank_8", 6); }
/* HERBALISM */ /* HERBALISM */
public int getFarmerDietRankChange() { return config.getInt("Skills.Herbalism.Farmer_Diet_RankChange", 200); } public int getFarmerDietRankChange() { return config.getInt("Skills.Herbalism.Farmer_Diet_RankChange", 200); }
@ -1014,59 +699,12 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
public double getMiningDoubleDropChance() { return config.getDouble("Skills.Mining.DoubleDrops_ChanceMax", 100.0D); } public double getMiningDoubleDropChance() { return config.getDouble("Skills.Mining.DoubleDrops_ChanceMax", 100.0D); }
public int getMiningDoubleDropMaxLevel() { return config.getInt("Skills.Mining.DoubleDrops_MaxBonusLevel", 1000); } public int getMiningDoubleDropMaxLevel() { return config.getInt("Skills.Mining.DoubleDrops_MaxBonusLevel", 1000); }
public int getBlastMiningRank1() { return config.getInt("Skills.Mining.BlastMining_Rank1", 125); } public int getBlastMiningRankLevel(BlastMining.Tier tier) { return config.getInt("Skills.Mining.BlastMining_Rank" + tier.toNumerical()); }
public int getBlastMiningRank2() { return config.getInt("Skills.Mining.BlastMining_Rank2", 250); } public double getBlastDamageDecrease(BlastMining.Tier tier) { return config.getDouble("Skills.Mining.BlastDamageDecrease_Rank" + tier.toNumerical()); }
public int getBlastMiningRank3() { return config.getInt("Skills.Mining.BlastMining_Rank3", 375); } public double getOreBonus(BlastMining.Tier tier) { return config.getDouble("Skills.Mining.OreBonus_Rank" + tier.toNumerical()); }
public int getBlastMiningRank4() { return config.getInt("Skills.Mining.BlastMining_Rank4", 500); } public double getDebrisReduction(BlastMining.Tier tier) { return config.getDouble("Skills.Mining.DebrisReduction_Rank" + tier.toNumerical()); }
public int getBlastMiningRank5() { return config.getInt("Skills.Mining.BlastMining_Rank5", 625); } public int getDropMultiplier(BlastMining.Tier tier) { return config.getInt("Skills.Mining.DropMultiplier_Rank" + tier.toNumerical()); }
public int getBlastMiningRank6() { return config.getInt("Skills.Mining.BlastMining_Rank6", 750); } public double getBlastRadiusModifier(BlastMining.Tier tier) { return config.getDouble("Skills.Mining.BlastRadiusModifier_Rank" + tier.toNumerical()); }
public int getBlastMiningRank7() { return config.getInt("Skills.Mining.BlastMining_Rank7", 875); }
public int getBlastMiningRank8() { return config.getInt("Skills.Mining.BlastMining_Rank8", 1000); }
public double getBlastDamageDecreaseRank1() { return config.getDouble("Skills.Mining.BlastDamageDecrease_Rank1", 0.0D); }
public double getBlastDamageDecreaseRank2() { return config.getDouble("Skills.Mining.BlastDamageDecrease_Rank2", 0.0D); }
public double getBlastDamageDecreaseRank3() { return config.getDouble("Skills.Mining.BlastDamageDecrease_Rank3", 0.0D); }
public double getBlastDamageDecreaseRank4() { return config.getDouble("Skills.Mining.BlastDamageDecrease_Rank4", 25.0D); }
public double getBlastDamageDecreaseRank5() { return config.getDouble("Skills.Mining.BlastDamageDecrease_Rank5", 25.0D); }
public double getBlastDamageDecreaseRank6() { return config.getDouble("Skills.Mining.BlastDamageDecrease_Rank6", 50.0D); }
public double getBlastDamageDecreaseRank7() { return config.getDouble("Skills.Mining.BlastDamageDecrease_Rank7", 50.0D); }
public double getBlastDamageDecreaseRank8() { return config.getDouble("Skills.Mining.BlastDamageDecrease_Rank8", 100.0D); }
public double getOreBonusRank1() { return config.getDouble("Skills.Mining.OreBonus_Rank1", 35.0D); }
public double getOreBonusRank2() { return config.getDouble("Skills.Mining.OreBonus_Rank2", 40.0D); }
public double getOreBonusRank3() { return config.getDouble("Skills.Mining.OreBonus_Rank3", 45.0D); }
public double getOreBonusRank4() { return config.getDouble("Skills.Mining.OreBonus_Rank4", 50.0D); }
public double getOreBonusRank5() { return config.getDouble("Skills.Mining.OreBonus_Rank5", 55.0D); }
public double getOreBonusRank6() { return config.getDouble("Skills.Mining.OreBonus_Rank6", 60.0D); }
public double getOreBonusRank7() { return config.getDouble("Skills.Mining.OreBonus_Rank7", 65.0D); }
public double getOreBonusRank8() { return config.getDouble("Skills.Mining.OreBonus_Rank8", 70.0D); }
public double getDebrisReductionRank1() { return config.getDouble("Skills.Mining.DebrisReduction_Rank1", 10.0D); }
public double getDebrisReductionRank2() { return config.getDouble("Skills.Mining.DebrisReduction_Rank2", 20.0D); }
public double getDebrisReductionRank3() { return config.getDouble("Skills.Mining.DebrisReduction_Rank3", 30.0D); }
public double getDebrisReductionRank4() { return config.getDouble("Skills.Mining.DebrisReduction_Rank4", 30.0D); }
public double getDebrisReductionRank5() { return config.getDouble("Skills.Mining.DebrisReduction_Rank5", 30.0D); }
public double getDebrisReductionRank6() { return config.getDouble("Skills.Mining.DebrisReduction_Rank6", 30.0D); }
public double getDebrisReductionRank7() { return config.getDouble("Skills.Mining.DebrisReduction_Rank7", 30.0D); }
public double getDebrisReductionRank8() { return config.getDouble("Skills.Mining.DebrisReduction_Rank8", 30.0D); }
public int getDropMultiplierRank1() { return config.getInt("Skills.Mining.DropMultiplier_Rank1", 1); }
public int getDropMultiplierRank2() { return config.getInt("Skills.Mining.DropMultiplier_Rank2", 1); }
public int getDropMultiplierRank3() { return config.getInt("Skills.Mining.DropMultiplier_Rank3", 1); }
public int getDropMultiplierRank4() { return config.getInt("Skills.Mining.DropMultiplier_Rank4", 1); }
public int getDropMultiplierRank5() { return config.getInt("Skills.Mining.DropMultiplier_Rank5", 2); }
public int getDropMultiplierRank6() { return config.getInt("Skills.Mining.DropMultiplier_Rank6", 2); }
public int getDropMultiplierRank7() { return config.getInt("Skills.Mining.DropMultiplier_Rank7", 3); }
public int getDropMultiplierRank8() { return config.getInt("Skills.Mining.DropMultiplier_Rank8", 3); }
public double getBlastRadiusModifierRank1() { return config.getDouble("Skills.Mining.BlastRadiusModifier_Rank1", 1.0); }
public double getBlastRadiusModifierRank2() { return config.getDouble("Skills.Mining.BlastRadiusModifier_Rank2", 1.0); }
public double getBlastRadiusModifierRank3() { return config.getDouble("Skills.Mining.BlastRadiusModifier_Rank3", 2.0); }
public double getBlastRadiusModifierRank4() { return config.getDouble("Skills.Mining.BlastRadiusModifier_Rank4", 2.0); }
public double getBlastRadiusModifierRank5() { return config.getDouble("Skills.Mining.BlastRadiusModifier_Rank5", 3.0); }
public double getBlastRadiusModifierRank6() { return config.getDouble("Skills.Mining.BlastRadiusModifier_Rank6", 3.0); }
public double getBlastRadiusModifierRank7() { return config.getDouble("Skills.Mining.BlastRadiusModifier_Rank7", 4.0); }
public double getBlastRadiusModifierRank8() { return config.getDouble("Skills.Mining.BlastRadiusModifier_Rank8", 4.0); }
/* REPAIR */ /* REPAIR */
public double getRepairMasteryMaxBonus() { return config.getDouble("Skills.Repair.RepairMastery_MaxBonusPercentage", 200.0D); } public double getRepairMasteryMaxBonus() { return config.getDouble("Skills.Repair.RepairMastery_MaxBonusPercentage", 200.0D); }
@ -1076,34 +714,13 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
public int getSalvageUnlockLevel() { return config.getInt("Skills.Repair.Salvage_UnlockLevel", 600); } public int getSalvageUnlockLevel() { return config.getInt("Skills.Repair.Salvage_UnlockLevel", 600); }
/* Arcane Forging */ /* Arcane Forging */
public int getArcaneForgingRankLevels1() { return config.getInt("Skills.Repair.Arcane_Forging.Rank_Levels.Rank_1", 125); } public int getArcaneForgingRankLevel(ArcaneForging.Tier tier) { return config.getInt("Skills.Repair.Arcane_Forging.Rank_Levels.Rank_" + tier.toNumerical()); }
public int getArcaneForgingRankLevels2() { return config.getInt("Skills.Repair.Arcane_Forging.Rank_Levels.Rank_2", 250); }
public int getArcaneForgingRankLevels3() { return config.getInt("Skills.Repair.Arcane_Forging.Rank_Levels.Rank_3", 375); }
public int getArcaneForgingRankLevels4() { return config.getInt("Skills.Repair.Arcane_Forging.Rank_Levels.Rank_4", 500); }
public int getArcaneForgingRankLevels5() { return config.getInt("Skills.Repair.Arcane_Forging.Rank_Levels.Rank_5", 625); }
public int getArcaneForgingRankLevels6() { return config.getInt("Skills.Repair.Arcane_Forging.Rank_Levels.Rank_6", 750); }
public int getArcaneForgingRankLevels7() { return config.getInt("Skills.Repair.Arcane_Forging.Rank_Levels.Rank_7", 875); }
public int getArcaneForgingRankLevels8() { return config.getInt("Skills.Repair.Arcane_Forging.Rank_Levels.Rank_8", 1000); }
public boolean getArcaneForgingEnchantLossEnabled() { return config.getBoolean("Skills.Repair.Arcane_Forging.May_Lose_Enchants", true); } public boolean getArcaneForgingEnchantLossEnabled() { return config.getBoolean("Skills.Repair.Arcane_Forging.May_Lose_Enchants", true); }
public double getArcaneForgingKeepEnchantsChanceRank1() { return config.getDouble("Skills.Repair.Arcane_Forging.Keep_Enchants_Chance.Rank_1", 10.0D); } public double getArcaneForgingKeepEnchantsChance(ArcaneForging.Tier tier) { return config.getDouble("Skills.Repair.Arcane_Forging.Keep_Enchants_Chance.Rank_" + tier.toNumerical()); }
public double getArcaneForgingKeepEnchantsChanceRank2() { return config.getDouble("Skills.Repair.Arcane_Forging.Keep_Enchants_Chance.Rank_2", 20.0D); }
public double getArcaneForgingKeepEnchantsChanceRank3() { return config.getDouble("Skills.Repair.Arcane_Forging.Keep_Enchants_Chance.Rank_3", 30.0D); }
public double getArcaneForgingKeepEnchantsChanceRank4() { return config.getDouble("Skills.Repair.Arcane_Forging.Keep_Enchants_Chance.Rank_4", 40.0D); }
public double getArcaneForgingKeepEnchantsChanceRank5() { return config.getDouble("Skills.Repair.Arcane_Forging.Keep_Enchants_Chance.Rank_5", 50.0D); }
public double getArcaneForgingKeepEnchantsChanceRank6() { return config.getDouble("Skills.Repair.Arcane_Forging.Keep_Enchants_Chance.Rank_6", 50.0D); }
public double getArcaneForgingKeepEnchantsChanceRank7() { return config.getDouble("Skills.Repair.Arcane_Forging.Keep_Enchants_Chance.Rank_7", 60.0D); }
public double getArcaneForgingKeepEnchantsChanceRank8() { return config.getDouble("Skills.Repair.Arcane_Forging.Keep_Enchants_Chance.Rank_8", 60.0D); }
public boolean getArcaneForgingDowngradeEnabled() { return config.getBoolean("Skills.Repair.Arcane_Forging.Downgrades_Enabled", true); } public boolean getArcaneForgingDowngradeEnabled() { return config.getBoolean("Skills.Repair.Arcane_Forging.Downgrades_Enabled", true); }
public double getArcaneForgingDowngradeChanceRank1() { return config.getDouble("Skills.Repair.Arcane_Forging.Downgrades_Chance.Rank_1", 75.0D); } public double getArcaneForgingDowngradeChance(ArcaneForging.Tier tier) { return config.getDouble("Skills.Repair.Arcane_Forging.Downgrades_Chance.Rank_" + tier.toNumerical()); }
public double getArcaneForgingDowngradeChanceRank2() { return config.getDouble("Skills.Repair.Arcane_Forging.Downgrades_Chance.Rank_2", 50.0D); }
public double getArcaneForgingDowngradeChanceRank3() { return config.getDouble("Skills.Repair.Arcane_Forging.Downgrades_Chance.Rank_3", 40.0D); }
public double getArcaneForgingDowngradeChanceRank4() { return config.getDouble("Skills.Repair.Arcane_Forging.Downgrades_Chance.Rank_4", 30.0D); }
public double getArcaneForgingDowngradeChanceRank5() { return config.getDouble("Skills.Repair.Arcane_Forging.Downgrades_Chance.Rank_5", 25.0D); }
public double getArcaneForgingDowngradeChanceRank6() { return config.getDouble("Skills.Repair.Arcane_Forging.Downgrades_Chance.Rank_6", 20.0D); }
public double getArcaneForgingDowngradeChanceRank7() { return config.getDouble("Skills.Repair.Arcane_Forging.Downgrades_Chance.Rank_7", 15.0D); }
public double getArcaneForgingDowngradeChanceRank8() { return config.getDouble("Skills.Repair.Arcane_Forging.Downgrades_Chance.Rank_8", 10.0D); }
/* SMELTING */ /* SMELTING */
public int getBurnModifierMaxLevel() { return config.getInt("Skills.Smelting.FuelEfficiency_MaxBonusLevel", 1000); } public int getBurnModifierMaxLevel() { return config.getInt("Skills.Smelting.FuelEfficiency_MaxBonusLevel", 1000); }
@ -1115,23 +732,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
public int getFluxMiningUnlockLevel() { return config.getInt("Skills.Smelting.FluxMining_UnlockLevel", 250); } public int getFluxMiningUnlockLevel() { return config.getInt("Skills.Smelting.FluxMining_UnlockLevel", 250); }
public double getFluxMiningChance() { return config.getDouble("Skills.Smelting.FluxMining_Chance", 33.0D); } public double getFluxMiningChance() { return config.getDouble("Skills.Smelting.FluxMining_Chance", 33.0D); }
public int getSmeltingVanillaXPBoostRank1Level() { return config.getInt("Skills.Smelting.VanillaXPBoost.Rank_Levels.Rank_1", 125); } public int getSmeltingVanillaXPBoostRankLevel(Smelting.Tier tier) { return config.getInt("Skills.Smelting.VanillaXPBoost.Rank_Levels.Rank_" + tier.toNumerical()); }
public int getSmeltingVanillaXPBoostRank2Level() { return config.getInt("Skills.Smelting.VanillaXPBoost.Rank_Levels.Rank_2", 250); } public int getSmeltingVanillaXPBoostMultiplier(Smelting.Tier tier) { return config.getInt("Skills.Smelting.VanillaXPBoost.XP_Multiplier.Rank_" + tier.toNumerical()); }
public int getSmeltingVanillaXPBoostRank3Level() { return config.getInt("Skills.Smelting.VanillaXPBoost.Rank_Levels.Rank_3", 375); }
public int getSmeltingVanillaXPBoostRank4Level() { return config.getInt("Skills.Smelting.VanillaXPBoost.Rank_Levels.Rank_4", 500); }
public int getSmeltingVanillaXPBoostRank5Level() { return config.getInt("Skills.Smelting.VanillaXPBoost.Rank_Levels.Rank_5", 625); }
public int getSmeltingVanillaXPBoostRank6Level() { return config.getInt("Skills.Smelting.VanillaXPBoost.Rank_Levels.Rank_6", 750); }
public int getSmeltingVanillaXPBoostRank7Level() { return config.getInt("Skills.Smelting.VanillaXPBoost.Rank_Levels.Rank_7", 875); }
public int getSmeltingVanillaXPBoostRank8Level() { return config.getInt("Skills.Smelting.VanillaXPBoost.Rank_Levels.Rank_8", 1000); }
public int getSmeltingVanillaXPBoostRank1Multiplier() { return config.getInt("Skills.Smelting.VanillaXPBoost.XP_Multiplier.Rank_1", 1); }
public int getSmeltingVanillaXPBoostRank2Multiplier() { return config.getInt("Skills.Smelting.VanillaXPBoost.XP_Multiplier.Rank_2", 2); }
public int getSmeltingVanillaXPBoostRank3Multiplier() { return config.getInt("Skills.Smelting.VanillaXPBoost.XP_Multiplier.Rank_3", 3); }
public int getSmeltingVanillaXPBoostRank4Multiplier() { return config.getInt("Skills.Smelting.VanillaXPBoost.XP_Multiplier.Rank_4", 3); }
public int getSmeltingVanillaXPBoostRank5Multiplier() { return config.getInt("Skills.Smelting.VanillaXPBoost.XP_Multiplier.Rank_5", 4); }
public int getSmeltingVanillaXPBoostRank6Multiplier() { return config.getInt("Skills.Smelting.VanillaXPBoost.XP_Multiplier.Rank_6", 4); }
public int getSmeltingVanillaXPBoostRank7Multiplier() { return config.getInt("Skills.Smelting.VanillaXPBoost.XP_Multiplier.Rank_7", 5); }
public int getSmeltingVanillaXPBoostRank8Multiplier() { return config.getInt("Skills.Smelting.VanillaXPBoost.XP_Multiplier.Rank_8", 5); }
/* SWORDS */ /* SWORDS */
public double getBleedChanceMax() { return config.getDouble("Skills.Swords.Bleed_ChanceMax", 75.0D); } public double getBleedChanceMax() { return config.getDouble("Skills.Swords.Bleed_ChanceMax", 75.0D); }

View File

@ -15,39 +15,15 @@ import com.gmail.nossr50.util.Misc;
public final class Fishing { public final class Fishing {
// The order of the values is extremely important, a few methods depend on it to work properly // The order of the values is extremely important, a few methods depend on it to work properly
protected enum Tier { public enum Tier {
EIGHT(8) { EIGHT(8),
@Override public int getLevel() { return AdvancedConfig.getInstance().getFishingTierLevelsTier8(); } SEVEN(7),
@Override public double getShakeChance() { return AdvancedConfig.getInstance().getShakeChanceRank8(); } SIX(6),
@Override public int getVanillaXPBoostModifier() { return AdvancedConfig.getInstance().getFishingVanillaXPModifierRank8(); }}, FIVE(5),
SEVEN(7) { FOUR(4),
@Override public int getLevel() { return AdvancedConfig.getInstance().getFishingTierLevelsTier7(); } THREE(3),
@Override public double getShakeChance() { return AdvancedConfig.getInstance().getShakeChanceRank7(); } TWO(2),
@Override public int getVanillaXPBoostModifier() { return AdvancedConfig.getInstance().getFishingVanillaXPModifierRank7(); }}, ONE(1);
SIX(6) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getFishingTierLevelsTier6(); }
@Override public double getShakeChance() { return AdvancedConfig.getInstance().getShakeChanceRank6(); }
@Override public int getVanillaXPBoostModifier() { return AdvancedConfig.getInstance().getFishingVanillaXPModifierRank6(); }},
FIVE(5) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getFishingTierLevelsTier5(); }
@Override public double getShakeChance() { return AdvancedConfig.getInstance().getShakeChanceRank5(); }
@Override public int getVanillaXPBoostModifier() { return AdvancedConfig.getInstance().getFishingVanillaXPModifierRank5(); }},
FOUR(4) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getFishingTierLevelsTier4(); }
@Override public double getShakeChance() { return AdvancedConfig.getInstance().getShakeChanceRank4(); }
@Override public int getVanillaXPBoostModifier() { return AdvancedConfig.getInstance().getFishingVanillaXPModifierRank4(); }},
THREE(3) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getFishingTierLevelsTier3(); }
@Override public double getShakeChance() { return AdvancedConfig.getInstance().getShakeChanceRank3(); }
@Override public int getVanillaXPBoostModifier() { return AdvancedConfig.getInstance().getFishingVanillaXPModifierRank3(); }},
TWO(2) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getFishingTierLevelsTier2(); }
@Override public double getShakeChance() { return AdvancedConfig.getInstance().getShakeChanceRank2(); }
@Override public int getVanillaXPBoostModifier() { return AdvancedConfig.getInstance().getFishingVanillaXPModifierRank2(); }},
ONE(1) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getFishingTierLevelsTier1(); }
@Override public double getShakeChance() { return AdvancedConfig.getInstance().getShakeChanceRank1(); }
@Override public int getVanillaXPBoostModifier() { return AdvancedConfig.getInstance().getFishingVanillaXPModifierRank1(); }};
int numerical; int numerical;
@ -59,9 +35,17 @@ public final class Fishing {
return numerical; return numerical;
} }
abstract protected int getLevel(); protected int getLevel() {
abstract protected double getShakeChance(); return AdvancedConfig.getInstance().getFishingTierLevel(this);
abstract protected int getVanillaXPBoostModifier(); }
protected double getShakeChance() {
return AdvancedConfig.getInstance().getShakeChance(this);
}
protected int getVanillaXPBoostModifier() {
return AdvancedConfig.getInstance().getFishingVanillaXPModifier(this);
}
} }
protected static final HashMap<Material, List<Enchantment>> ENCHANTABLE_CACHE = new HashMap<Material, List<Enchantment>>(); protected static final HashMap<Material, List<Enchantment>> ENCHANTABLE_CACHE = new HashMap<Material, List<Enchantment>>();

View File

@ -68,7 +68,7 @@ public class FishingManager extends SkillManager {
} }
public boolean canShake(Entity target) { public boolean canShake(Entity target) {
return target instanceof LivingEntity && getSkillLevel() >= AdvancedConfig.getInstance().getFishingTierLevelsTier1() && Permissions.shake(getPlayer()); return target instanceof LivingEntity && getSkillLevel() >= Tier.ONE.getLevel() && Permissions.shake(getPlayer());
} }
public boolean canMasterAngler() { public boolean canMasterAngler() {

View File

@ -7,63 +7,15 @@ import com.gmail.nossr50.config.Config;
public class BlastMining { public class BlastMining {
// The order of the values is extremely important, a few methods depend on it to work properly // The order of the values is extremely important, a few methods depend on it to work properly
protected enum Tier { public enum Tier {
EIGHT(8) { EIGHT(8),
@Override public int getLevel() { return AdvancedConfig.getInstance().getBlastMiningRank8(); } SEVEN(7),
@Override public double getBlastRadiusModifier() { return AdvancedConfig.getInstance().getBlastRadiusModifierRank8(); } SIX(6),
@Override public double getOreBonus() { return AdvancedConfig.getInstance().getOreBonusRank8(); } FIVE(5),
@Override public double getDebrisReduction() { return AdvancedConfig.getInstance().getDebrisReductionRank8(); } FOUR(4),
@Override public double getBlastDamageDecrease() { return AdvancedConfig.getInstance().getBlastDamageDecreaseRank8(); } THREE(3),
@Override public int getDropMultiplier() { return AdvancedConfig.getInstance().getDropMultiplierRank8(); }}, TWO(2),
SEVEN(7) { ONE(1);
@Override public int getLevel() { return AdvancedConfig.getInstance().getBlastMiningRank7(); }
@Override public double getBlastRadiusModifier() { return AdvancedConfig.getInstance().getBlastRadiusModifierRank7(); }
@Override public double getOreBonus() { return AdvancedConfig.getInstance().getOreBonusRank7(); }
@Override public double getDebrisReduction() { return AdvancedConfig.getInstance().getDebrisReductionRank7(); }
@Override public double getBlastDamageDecrease() { return AdvancedConfig.getInstance().getBlastDamageDecreaseRank7(); }
@Override public int getDropMultiplier() { return AdvancedConfig.getInstance().getDropMultiplierRank7(); }},
SIX(6) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getBlastMiningRank6(); }
@Override public double getBlastRadiusModifier() { return AdvancedConfig.getInstance().getBlastRadiusModifierRank6(); }
@Override public double getOreBonus() { return AdvancedConfig.getInstance().getOreBonusRank6(); }
@Override public double getDebrisReduction() { return AdvancedConfig.getInstance().getDebrisReductionRank6(); }
@Override public double getBlastDamageDecrease() { return AdvancedConfig.getInstance().getBlastDamageDecreaseRank6(); }
@Override public int getDropMultiplier() { return AdvancedConfig.getInstance().getDropMultiplierRank6(); }},
FIVE(5) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getBlastMiningRank5(); }
@Override public double getBlastRadiusModifier() { return AdvancedConfig.getInstance().getBlastRadiusModifierRank5(); }
@Override public double getOreBonus() { return AdvancedConfig.getInstance().getOreBonusRank5(); }
@Override public double getDebrisReduction() { return AdvancedConfig.getInstance().getDebrisReductionRank5(); }
@Override public double getBlastDamageDecrease() { return AdvancedConfig.getInstance().getBlastDamageDecreaseRank5(); }
@Override public int getDropMultiplier() { return AdvancedConfig.getInstance().getDropMultiplierRank5(); }},
FOUR(4) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getBlastMiningRank4(); }
@Override public double getBlastRadiusModifier() { return AdvancedConfig.getInstance().getBlastRadiusModifierRank4(); }
@Override public double getOreBonus() { return AdvancedConfig.getInstance().getOreBonusRank4(); }
@Override public double getDebrisReduction() { return AdvancedConfig.getInstance().getDebrisReductionRank4(); }
@Override public double getBlastDamageDecrease() { return AdvancedConfig.getInstance().getBlastDamageDecreaseRank4(); }
@Override public int getDropMultiplier() { return AdvancedConfig.getInstance().getDropMultiplierRank4(); }},
THREE(3) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getBlastMiningRank3(); }
@Override public double getBlastRadiusModifier() { return AdvancedConfig.getInstance().getBlastRadiusModifierRank3(); }
@Override public double getOreBonus() { return AdvancedConfig.getInstance().getOreBonusRank3(); }
@Override public double getDebrisReduction() { return AdvancedConfig.getInstance().getDebrisReductionRank3(); }
@Override public double getBlastDamageDecrease() { return AdvancedConfig.getInstance().getBlastDamageDecreaseRank3(); }
@Override public int getDropMultiplier() { return AdvancedConfig.getInstance().getDropMultiplierRank3(); }},
TWO(2) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getBlastMiningRank2(); }
@Override public double getBlastRadiusModifier() { return AdvancedConfig.getInstance().getBlastRadiusModifierRank2(); }
@Override public double getOreBonus() { return AdvancedConfig.getInstance().getOreBonusRank2(); }
@Override public double getDebrisReduction() { return AdvancedConfig.getInstance().getDebrisReductionRank2(); }
@Override public double getBlastDamageDecrease() { return AdvancedConfig.getInstance().getBlastDamageDecreaseRank2(); }
@Override public int getDropMultiplier() { return AdvancedConfig.getInstance().getDropMultiplierRank2(); }},
ONE(1) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getBlastMiningRank1(); }
@Override public double getBlastRadiusModifier() { return AdvancedConfig.getInstance().getBlastRadiusModifierRank1(); }
@Override public double getOreBonus() { return AdvancedConfig.getInstance().getOreBonusRank1(); }
@Override public double getDebrisReduction() { return AdvancedConfig.getInstance().getDebrisReductionRank1(); }
@Override public double getBlastDamageDecrease() { return AdvancedConfig.getInstance().getBlastDamageDecreaseRank1(); }
@Override public int getDropMultiplier() { return AdvancedConfig.getInstance().getDropMultiplierRank1(); }};
int numerical; int numerical;
@ -75,12 +27,29 @@ public class BlastMining {
return numerical; return numerical;
} }
abstract protected int getLevel(); protected int getLevel() {
abstract protected double getBlastRadiusModifier(); return AdvancedConfig.getInstance().getBlastMiningRankLevel(this);
abstract protected double getOreBonus(); }
abstract protected double getDebrisReduction();
abstract protected double getBlastDamageDecrease(); protected double getBlastRadiusModifier() {
abstract protected int getDropMultiplier(); return AdvancedConfig.getInstance().getBlastRadiusModifier(this);
}
protected double getOreBonus() {
return AdvancedConfig.getInstance().getOreBonus(this);
}
protected double getDebrisReduction() {
return AdvancedConfig.getInstance().getDebrisReduction(this);
}
protected double getBlastDamageDecrease() {
return AdvancedConfig.getInstance().getBlastDamageDecrease(this);
}
protected int getDropMultiplier() {
return AdvancedConfig.getInstance().getDropMultiplier(this);
}
} }
public static Material detonator = Config.getInstance().getDetonatorItem(); public static Material detonator = Config.getInstance().getDetonatorItem();

View File

@ -4,39 +4,15 @@ import com.gmail.nossr50.config.AdvancedConfig;
public class ArcaneForging { public class ArcaneForging {
// The order of the values is extremely important, a few methods depend on it to work properly // The order of the values is extremely important, a few methods depend on it to work properly
protected enum Tier { public enum Tier {
EIGHT(8) { EIGHT(8),
@Override public int getLevel() { return AdvancedConfig.getInstance().getArcaneForgingRankLevels8(); } SEVEN(7),
@Override public double getKeepEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingKeepEnchantsChanceRank8(); } SIX(6),
@Override public double getDowngradeEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingDowngradeChanceRank8(); }}, FIVE(5),
SEVEN(7) { FOUR(4),
@Override public int getLevel() { return AdvancedConfig.getInstance().getArcaneForgingRankLevels7(); } THREE(3),
@Override public double getKeepEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingKeepEnchantsChanceRank7(); } TWO(2),
@Override public double getDowngradeEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingDowngradeChanceRank7(); }}, ONE(1);
SIX(6) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getArcaneForgingRankLevels6(); }
@Override public double getKeepEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingKeepEnchantsChanceRank6(); }
@Override public double getDowngradeEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingDowngradeChanceRank6(); }},
FIVE(5) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getArcaneForgingRankLevels5(); }
@Override public double getKeepEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingKeepEnchantsChanceRank5(); }
@Override public double getDowngradeEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingDowngradeChanceRank5(); }},
FOUR(4) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getArcaneForgingRankLevels4(); }
@Override public double getKeepEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingKeepEnchantsChanceRank4(); }
@Override public double getDowngradeEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingDowngradeChanceRank4(); }},
THREE(3) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getArcaneForgingRankLevels3(); }
@Override public double getKeepEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingKeepEnchantsChanceRank3(); }
@Override public double getDowngradeEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingDowngradeChanceRank3(); }},
TWO(2) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getArcaneForgingRankLevels2(); }
@Override public double getKeepEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingKeepEnchantsChanceRank2(); }
@Override public double getDowngradeEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingDowngradeChanceRank2(); }},
ONE(1) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getArcaneForgingRankLevels1(); }
@Override public double getKeepEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingKeepEnchantsChanceRank1(); }
@Override public double getDowngradeEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingDowngradeChanceRank1(); }};
int numerical; int numerical;
@ -48,9 +24,17 @@ public class ArcaneForging {
return numerical; return numerical;
} }
abstract protected int getLevel(); protected int getLevel() {
abstract protected double getKeepEnchantChance(); return AdvancedConfig.getInstance().getArcaneForgingRankLevel(this);
abstract protected double getDowngradeEnchantChance(); }
protected double getKeepEnchantChance() {
return AdvancedConfig.getInstance().getArcaneForgingKeepEnchantsChance(this);
}
protected double getDowngradeEnchantChance() {
return AdvancedConfig.getInstance().getArcaneForgingDowngradeChance(this);
}
} }
public static boolean arcaneForgingDowngrades = AdvancedConfig.getInstance().getArcaneForgingDowngradeEnabled(); public static boolean arcaneForgingDowngrades = AdvancedConfig.getInstance().getArcaneForgingDowngradeEnabled();

View File

@ -8,31 +8,15 @@ import com.gmail.nossr50.datatypes.skills.SkillType;
public class Smelting { public class Smelting {
// The order of the values is extremely important, a few methods depend on it to work properly // The order of the values is extremely important, a few methods depend on it to work properly
protected enum Tier { public enum Tier {
EIGHT(8) { EIGHT(8),
@Override public int getLevel() { return AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank8Level(); } SEVEN(7),
@Override public int getVanillaXPBoostModifier() { return AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank8Multiplier(); }}, SIX(6),
SEVEN(7) { FIVE(5),
@Override public int getLevel() { return AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank7Level(); } FOUR(4),
@Override public int getVanillaXPBoostModifier() { return AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank7Multiplier(); }}, THREE(3),
SIX(6) { TWO(2),
@Override public int getLevel() { return AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank6Level(); } ONE(1);
@Override public int getVanillaXPBoostModifier() { return AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank6Multiplier(); }},
FIVE(5) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank5Level(); }
@Override public int getVanillaXPBoostModifier() { return AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank5Multiplier(); }},
FOUR(4) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank4Level(); }
@Override public int getVanillaXPBoostModifier() { return AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank4Multiplier(); }},
THREE(3) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank3Level(); }
@Override public int getVanillaXPBoostModifier() { return AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank3Multiplier(); }},
TWO(2) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank2Level(); }
@Override public int getVanillaXPBoostModifier() { return AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank2Multiplier(); }},
ONE(1) {
@Override public int getLevel() { return AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank1Level(); }
@Override public int getVanillaXPBoostModifier() { return AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank1Multiplier(); }};
int numerical; int numerical;
@ -44,8 +28,13 @@ public class Smelting {
return numerical; return numerical;
} }
abstract protected int getLevel(); protected int getLevel() {
abstract protected int getVanillaXPBoostModifier(); return AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRankLevel(this);
}
protected int getVanillaXPBoostModifier() {
return AdvancedConfig.getInstance().getSmeltingVanillaXPBoostMultiplier(this);
}
} }
public static int burnModifierMaxLevel = AdvancedConfig.getInstance().getBurnModifierMaxLevel(); public static int burnModifierMaxLevel = AdvancedConfig.getInstance().getBurnModifierMaxLevel();

View File

@ -103,7 +103,7 @@ Fishing.Ability.Chance=[[RED]]Bite Chance: [[YELLOW]]{0}
Fishing.Ability.Info=[[RED]]Magic Hunter: [[GRAY]] **Improves With Treasure Hunter Rank** Fishing.Ability.Info=[[RED]]Magic Hunter: [[GRAY]] **Improves With Treasure Hunter Rank**
Fishing.Ability.Locked.0=LOCKED UNTIL {0}+ SKILL (SHAKE) Fishing.Ability.Locked.0=LOCKED UNTIL {0}+ SKILL (SHAKE)
Fishing.Ability.Locked.1=LOCKED UNTIL {0}+ SKILL (ICE FISHING) Fishing.Ability.Locked.1=LOCKED UNTIL {0}+ SKILL (ICE FISHING)
Fishing.Ability.Rank=[[RED]]Treasure Hunter Rank: [[YELLOW]]{0}/5 Fishing.Ability.Rank=[[RED]]Treasure Hunter Rank: [[YELLOW]]{0}/{1}
Fishing.Ability.Shake=[[RED]]Shake Chance: [[YELLOW]]{0} Fishing.Ability.Shake=[[RED]]Shake Chance: [[YELLOW]]{0}
Fishing.Ability.IceFishing=[[RED]]Ice Fishing: Go fishing in ice Fishing.Ability.IceFishing=[[RED]]Ice Fishing: Go fishing in ice
Fishing.Ability.FD=[[RED]]Fisherman''s Diet: [[YELLOW]]Rank {0} Fishing.Ability.FD=[[RED]]Fisherman''s Diet: [[YELLOW]]Rank {0}
@ -197,7 +197,7 @@ Mining.Skillup=[[YELLOW]]Mining skill increased by {0}. Total ({1})
Mining.Blast.Boom=[[GRAY]]**BOOM** Mining.Blast.Boom=[[GRAY]]**BOOM**
Mining.Blast.Effect=+{0} ore yield, -{1} debris yield, {2}x drops Mining.Blast.Effect=+{0} ore yield, -{1} debris yield, {2}x drops
Mining.Blast.Radius.Increase=[[RED]]Blast Radius Increase: [[YELLOW]]+{0} Mining.Blast.Radius.Increase=[[RED]]Blast Radius Increase: [[YELLOW]]+{0}
Mining.Blast.Rank=[[RED]]Blast Mining: [[YELLOW]] Rank {0}/8 [[GRAY]]({1}) Mining.Blast.Rank=[[RED]]Blast Mining: [[YELLOW]] Rank {0}/{1} [[GRAY]]({2})
Mining.Blast.Other.On=[[GREEN]]{0}[[DARK_GREEN]] has used [[RED]]Blast Mining! Mining.Blast.Other.On=[[GREEN]]{0}[[DARK_GREEN]] has used [[RED]]Blast Mining!
Mining.Blast.Refresh=[[GREEN]]Your [[YELLOW]]Blast Mining [[GREEN]]ability is refreshed! Mining.Blast.Refresh=[[GREEN]]Your [[YELLOW]]Blast Mining [[GREEN]]ability is refreshed!
@ -249,7 +249,7 @@ Repair.Arcane.Downgrade=[[RED]]Arcane power has decreased for this item.
Repair.Arcane.Fail=[[RED]]Arcane power has permanently left the item. Repair.Arcane.Fail=[[RED]]Arcane power has permanently left the item.
Repair.Arcane.Lost=[[RED]]You were not skilled enough to keep any enchantments. Repair.Arcane.Lost=[[RED]]You were not skilled enough to keep any enchantments.
Repair.Arcane.Perfect=[[GREEN]]You have sustained the arcane energies in this item. Repair.Arcane.Perfect=[[GREEN]]You have sustained the arcane energies in this item.
Repair.Arcane.Rank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4 Repair.Arcane.Rank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/{1}
#SWORDS #SWORDS
Swords.Ability.Lower=[[GRAY]]**YOU LOWER YOUR SWORD** Swords.Ability.Lower=[[GRAY]]**YOU LOWER YOUR SWORD**