diff --git a/src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java b/src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java index 1e63b77ac..7b9e78791 100644 --- a/src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java +++ b/src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java @@ -128,18 +128,6 @@ public class ExperienceConfig extends ConfigValidated { }*/ /* PVP modifier */ - public double getPlayerVersusPlayerXP() { - return getDoubleValue(EXPERIENCE_FORMULA, MULTIPLIER, PVP); - } - - /* Spawned Mob modifier */ - public double getSpawnedMobXpMultiplier() { - return getDoubleValue(EXPERIENCE_FORMULA, MOBSPAWNERS, MULTIPLIER); - } - - public double getBredMobXpMultiplier() { - return getDoubleValue(EXPERIENCE_FORMULA, BREEDING, MULTIPLIER); - } /* Skill modifiers */ public double getFormulaSkillModifier(PrimarySkillType skill) { @@ -186,10 +174,6 @@ public class ExperienceConfig extends ConfigValidated { return getDoubleValue(EXPERIENCE, COMBAT, MULTIPLIER, StringUtils.getEntityConfigName(entity)); } - public double getAnimalsXP() { - return getDoubleValue(EXPERIENCE, COMBAT, MULTIPLIER, ANIMALS); - } - public boolean hasCombatXP(EntityType entity) { return hasNode(EXPERIENCE, COMBAT, MULTIPLIER, StringUtils.getEntityConfigName(entity)); } diff --git a/src/main/java/com/gmail/nossr50/config/hocon/experience/ConfigExperience.java b/src/main/java/com/gmail/nossr50/config/hocon/experience/ConfigExperience.java index aa8af7f63..6610a5485 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/experience/ConfigExperience.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/experience/ConfigExperience.java @@ -177,6 +177,10 @@ public class ConfigExperience { return getConfigExperienceSkills().getSpawnedMobXPMult(); } + public double getPlayerBredMobsXPMult() { + return getExperienceCombat().getPlayerBredMobsXPMult(); + } + public double getPVPXPMult() { return getConfigExperienceSkills().getPVPXPMult(); } diff --git a/src/main/java/com/gmail/nossr50/config/hocon/experience/ConfigExperienceCombat.java b/src/main/java/com/gmail/nossr50/config/hocon/experience/ConfigExperienceCombat.java index f56b6b118..875f85ead 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/experience/ConfigExperienceCombat.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/experience/ConfigExperienceCombat.java @@ -112,4 +112,8 @@ public class ConfigExperienceCombat { public double getAnimalsXPMult() { return specialCombatExperienceMap.get("animals"); } + + public double getPlayerBredMobsXPMult() { + return specialCombatExperienceMap.get("player-bred-mobs"); + } } \ No newline at end of file diff --git a/src/main/java/com/gmail/nossr50/config/hocon/experience/ConfigExperienceSkills.java b/src/main/java/com/gmail/nossr50/config/hocon/experience/ConfigExperienceSkills.java index e9b127610..d096973c8 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/experience/ConfigExperienceSkills.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/experience/ConfigExperienceSkills.java @@ -47,6 +47,10 @@ public class ConfigExperienceSkills { * BOILER PLATE GETTERS */ + public double getPlayerBredMobsXPMult() { + return experienceCombat.getPlayerBredMobsXPMult(); + } + public ConfigExperienceAcrobatics getExperienceAcrobatics() { return experienceAcrobatics; } diff --git a/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java b/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java index 89a857d76..5c0c164b7 100644 --- a/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java +++ b/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java @@ -543,7 +543,7 @@ public final class CombatUtils { Player defender = (Player) target; if (defender.isOnline() && SkillUtils.cooldownExpired(mcMMOPlayer.getRespawnATS(), Misc.PLAYER_RESPAWN_COOLDOWN_SECONDS)) { - baseXP = 20 * ExperienceConfig.getInstance().getPlayerVersusPlayerXP(); + baseXP = 20 * mcMMO.getConfigManager().getConfigExperience().getPVPXPMult(); } } else { /*if (mcMMO.getModManager().isCustomEntity(target)) { @@ -552,7 +552,7 @@ public final class CombatUtils { //else if (target instanceof Animals) { if (target instanceof Animals) { EntityType type = target.getType(); - baseXP = ExperienceConfig.getInstance().getAnimalsXP(type); + baseXP = mcMMO.getConfigManager().getConfigExperience().getAnimalsXPMult(); } else if (target instanceof Monster) { EntityType type = target.getType(); baseXP = ExperienceConfig.getInstance().getCombatXP(type); @@ -574,11 +574,11 @@ public final class CombatUtils { } if (target.hasMetadata(mcMMO.entityMetadataKey)) { - baseXP *= ExperienceConfig.getInstance().getSpawnedMobXpMultiplier(); + baseXP *= mcMMO.getConfigManager().getConfigExperience().getSpawnedMobXPMult(); } if (target.hasMetadata(mcMMO.bredMetadataKey)) { - baseXP *= ExperienceConfig.getInstance().getBredMobXpMultiplier(); + baseXP *= mcMMO.getConfigManager().getConfigExperience().getPlayerBredMobsXPMult(); } xpGainReason = XPGainReason.PVE;