Wire up Super Ability config pt 1

This commit is contained in:
nossr50
2019-03-19 05:00:21 -07:00
parent e933efcee0
commit 45430d9c25
13 changed files with 113 additions and 53 deletions

View File

@ -17,9 +17,6 @@ import java.util.List;
import java.util.Set;
public final class Woodcutting {
public static int treeFellerThreshold = MainConfig.getInstance().getTreeFellerThreshold();
protected static boolean treeFellerReachedThreshold = false;
protected enum ExperienceGainMethod {
@ -152,7 +149,7 @@ public final class Woodcutting {
for (BlockState blockState : treeFellerBlocks) {
if (BlockUtils.isLog(blockState)) {
durabilityLoss += MainConfig.getInstance().getAbilityToolDamage();
durabilityLoss += mcMMO.getConfigManager().getConfigSuperAbilities().getSuperAbilityLimits().getToolDurabilityDamage();
}
}
@ -178,7 +175,7 @@ public final class Woodcutting {
}
// Without this check Tree Feller propagates through leaves until the threshold is hit
if (treeFellerBlocks.size() > treeFellerThreshold) {
if (treeFellerBlocks.size() > mcMMO.getConfigManager().getConfigSuperAbilities().getSuperAbilityLimits().getTreeFeller().getTreeFellerLimit()) {
treeFellerReachedThreshold = true;
}