Refactoring + adding a new skillranks config (not functional yet)

This commit is contained in:
nossr50
2019-01-12 23:54:53 -08:00
parent 0beabbf1ec
commit 6f77bb206d
117 changed files with 1149 additions and 855 deletions

View File

@ -1,7 +1,7 @@
package com.gmail.nossr50.util;
import com.gmail.nossr50.config.experience.ExperienceConfig;
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.skills.repair.Repair;
import com.gmail.nossr50.skills.salvage.Salvage;
@ -172,7 +172,7 @@ public final class BlockUtils {
* @return true if the block should affected by Green Terra, false otherwise
*/
public static boolean affectedByGreenTerra(BlockState blockState) {
if (ExperienceConfig.getInstance().isSkillBlock(PrimarySkill.HERBALISM, blockState.getBlockData())) {
if (ExperienceConfig.getInstance().isSkillBlock(PrimarySkillType.HERBALISM, blockState.getBlockData())) {
return true;
}
@ -188,7 +188,7 @@ public final class BlockUtils {
* otherwise
*/
public static Boolean affectedBySuperBreaker(BlockState blockState) {
if (ExperienceConfig.getInstance().isSkillBlock(PrimarySkill.MINING, blockState.getBlockData()))
if (ExperienceConfig.getInstance().isSkillBlock(PrimarySkillType.MINING, blockState.getBlockData()))
return true;
return isOre(blockState) || mcMMO.getModManager().isCustomMiningBlock(blockState);
@ -203,7 +203,7 @@ public final class BlockUtils {
* otherwise
*/
public static boolean affectedByGigaDrillBreaker(BlockState blockState) {
if (ExperienceConfig.getInstance().isSkillBlock(PrimarySkill.EXCAVATION, blockState.getBlockData()))
if (ExperienceConfig.getInstance().isSkillBlock(PrimarySkillType.EXCAVATION, blockState.getBlockData()))
return true;
return mcMMO.getModManager().isCustomExcavationBlock(blockState);
}
@ -216,7 +216,7 @@ public final class BlockUtils {
* @return true if the block is a log, false otherwise
*/
public static boolean isLog(BlockState blockState) {
if (ExperienceConfig.getInstance().isSkillBlock(PrimarySkill.WOODCUTTING, blockState.getBlockData()))
if (ExperienceConfig.getInstance().isSkillBlock(PrimarySkillType.WOODCUTTING, blockState.getBlockData()))
return true;
return mcMMO.getModManager().isCustomLog(blockState);
}