Refactoring code part 1 to prep for adding a bunch of unit tests

This commit is contained in:
nossr50
2021-04-08 10:39:07 -07:00
parent 0636f578dd
commit 5080d86e44
115 changed files with 993 additions and 970 deletions

View File

@ -1,6 +1,5 @@
package com.gmail.nossr50.util.experience;
import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.config.experience.ExperienceConfig;
import com.gmail.nossr50.datatypes.experience.FormulaType;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
@ -89,7 +88,7 @@ public class FormulaManager {
public int[] calculateNewLevel(PrimarySkillType primarySkillType, int experience, FormulaType formulaType) {
int newLevel = 0;
int remainder = 0;
int maxLevel = Config.getInstance().getLevelCap(primarySkillType);
int maxLevel = mcMMO.p.getGeneralConfig().getLevelCap(primarySkillType);
while (experience > 0 && newLevel < maxLevel) {
int experienceToNextLevel = getXPtoNextLevel(newLevel, formulaType);