Wire up Mining/Excavation/Herbalism/Woodcutting XP values

This commit is contained in:
nossr50
2019-04-30 02:08:11 -07:00
parent 2efa64ae17
commit 4d8e4d0e70
6 changed files with 40 additions and 22 deletions

View File

@@ -4,6 +4,7 @@ import com.gmail.nossr50.config.experience.ExperienceConfig;
import com.gmail.nossr50.config.treasure.ExcavationTreasureConfig;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
import com.gmail.nossr50.datatypes.treasure.ExcavationTreasure;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.util.StringUtils;
import org.bukkit.block.BlockState;
@@ -25,11 +26,7 @@ public class Excavation {
}
protected static int getBlockXP(BlockState blockState) {
int xp = ExperienceConfig.getInstance().getXp(PrimarySkillType.EXCAVATION, blockState.getType());
/*if (xp == 0 && mcMMO.getModManager().isCustomExcavationBlock(blockState)) {
xp = mcMMO.getModManager().getBlock(blockState).getXpGain();
}*/
int xp = mcMMO.getConfigManager().getExperienceMapManager().getExcavationXp(blockState.getType());
return xp;
}

View File

@@ -148,7 +148,7 @@ public class HerbalismManager extends SkillManager {
// }
// }
// else {
xp = ExperienceConfig.getInstance().getXp(skill, blockState.getType());
xp = mcMMO.getConfigManager().getExperienceMapManager().getHerbalismXp(blockState.getType());
if (!oneBlockPlant) {
//Kelp is actually two blocks mixed together

View File

@@ -34,11 +34,7 @@ public class Mining {
* @param blockState The {@link BlockState} to check ability activation for
*/
public static int getBlockXp(BlockState blockState) {
int xp = ExperienceConfig.getInstance().getXp(PrimarySkillType.MINING, blockState.getType());
/*if (xp == 0 && mcMMO.getModManager().isCustomMiningBlock(blockState)) {
xp = mcMMO.getModManager().getBlock(blockState).getXpGain();
}*/
int xp = mcMMO.getConfigManager().getExperienceMapManager().getMiningXp(blockState.getType());
return xp;
}

View File

@@ -45,7 +45,7 @@ public final class Woodcutting {
return mcMMO.getModManager().getBlock(blockState).getXpGain();
}*/
return ExperienceConfig.getInstance().getXp(PrimarySkillType.WOODCUTTING, blockState.getType());
return mcMMO.getConfigManager().getExperienceMapManager().getWoodcuttingXp(blockState.getType());
}
/**