mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-15 12:04:43 +02:00
Refactoring to make my life easier
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
package com.gmail.nossr50.util;
|
||||
|
||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
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(SkillType.HERBALISM, blockState.getBlockData())) {
|
||||
if (ExperienceConfig.getInstance().isSkillBlock(PrimarySkill.HERBALISM, blockState.getBlockData())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -188,7 +188,7 @@ public final class BlockUtils {
|
||||
* otherwise
|
||||
*/
|
||||
public static Boolean affectedBySuperBreaker(BlockState blockState) {
|
||||
if (ExperienceConfig.getInstance().isSkillBlock(SkillType.MINING, blockState.getBlockData()))
|
||||
if (ExperienceConfig.getInstance().isSkillBlock(PrimarySkill.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(SkillType.EXCAVATION, blockState.getBlockData()))
|
||||
if (ExperienceConfig.getInstance().isSkillBlock(PrimarySkill.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(SkillType.WOODCUTTING, blockState.getBlockData()))
|
||||
if (ExperienceConfig.getInstance().isSkillBlock(PrimarySkill.WOODCUTTING, blockState.getBlockData()))
|
||||
return true;
|
||||
return mcMMO.getModManager().isCustomLog(blockState);
|
||||
}
|
||||
|
Reference in New Issue
Block a user