From 3a89ba213978f6ea3aa819e3b83fe5a57fe5b2f1 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sun, 16 Jun 2019 09:12:42 -0700 Subject: [PATCH] Wire up salvage config options --- .../java/com/gmail/nossr50/config/AdvancedConfig.java | 9 --------- .../com/gmail/nossr50/skills/salvage/SalvageManager.java | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/config/AdvancedConfig.java b/src/main/java/com/gmail/nossr50/config/AdvancedConfig.java index 961381eeb..658086763 100644 --- a/src/main/java/com/gmail/nossr50/config/AdvancedConfig.java +++ b/src/main/java/com/gmail/nossr50/config/AdvancedConfig.java @@ -173,15 +173,6 @@ public class AdvancedConfig extends ConfigValidated { return getDoubleValue(SKILLS, FISHING, MASTER_ANGLER, BIOME_MODIFIER); } - /* MINING */ - public double getArcaneSalvageExtractFullEnchantsChance(int rank) { - return getDoubleValue(SKILLS, SALVAGE, ARCANE_SALVAGE, EXTRACT_FULL_ENCHANT, RANK, String.valueOf(rank)); - } - - public double getArcaneSalvageExtractPartialEnchantsChance(int rank) { - return getDoubleValue(SKILLS, SALVAGE, ARCANE_SALVAGE, EXTRACT_PARTIAL_ENCHANT, RANK, String.valueOf(rank)); - } - /* SWORDS */ public double getRuptureDamagePlayer() { return getDoubleValue(SKILLS, SWORDS, RUPTURE, DAMAGE_PLAYER); diff --git a/src/main/java/com/gmail/nossr50/skills/salvage/SalvageManager.java b/src/main/java/com/gmail/nossr50/skills/salvage/SalvageManager.java index b58369b02..6bda2875b 100644 --- a/src/main/java/com/gmail/nossr50/skills/salvage/SalvageManager.java +++ b/src/main/java/com/gmail/nossr50/skills/salvage/SalvageManager.java @@ -200,11 +200,11 @@ public class SalvageManager extends SkillManager { if (Permissions.hasSalvageEnchantBypassPerk(getPlayer())) return 100.0D; - return AdvancedConfig.getInstance().getArcaneSalvageExtractFullEnchantsChance(getArcaneSalvageRank()); + return mcMMO.getConfigManager().getConfigSalvage().getConfigArcaneSalvage().getExtractFullEnchantChance().get(getArcaneSalvageRank()); } public double getExtractPartialEnchantChance() { - return AdvancedConfig.getInstance().getArcaneSalvageExtractPartialEnchantsChance(getArcaneSalvageRank()); + return mcMMO.getConfigManager().getConfigSalvage().getConfigArcaneSalvage().getExtractPartialEnchantChance().get(getArcaneSalvageRank()); } private ItemStack arcaneSalvageCheck(Map enchants) {