Silk Touch toggle in advanced.yml for double drops

This commit is contained in:
nossr50 2019-03-09 17:31:45 -08:00
parent 68e43e3641
commit f9f6d1550e
4 changed files with 6 additions and 0 deletions

View File

@ -8,6 +8,7 @@ Key:
- Removal
Version 2.1.14
Added a config option to toggle double drops for Silk Touch pickaxes (advanced.yml "Skills.Mining.DoubleDrops.SilkTouch"
Mycelium removed from Woodcutting XP tables (because its soil!)
Kelp added to Herbalism XP tables
mcMMO now flags blocks moved by piston as not natural to prevent automated XP farms

View File

@ -903,6 +903,7 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
public int getGreenThumbStageChange() { return config.getInt("Skills.Herbalism.GreenThumb.StageChange", 200); }
/* MINING */
public boolean getDoubleDropSilkTouchEnabled() { return config.getBoolean("Skills.Mining.DoubleDrops.SilkTouch", true); }
public int getBlastMiningRankLevel(int rank) { return config.getInt("Skills.Mining.BlastMining.Rank_Levels.Rank_" + rank); }
public double getBlastDamageDecrease(int rank) { return config.getDouble("Skills.Mining.BlastMining.BlastDamageDecrease.Rank_" + rank); }
public double getOreBonus(int rank) { return config.getDouble("Skills.Mining.BlastMining.OreBonus.Rank_" + rank); }

View File

@ -87,6 +87,9 @@ public class MiningManager extends SkillManager {
boolean silkTouch = player.getInventory().getItemInMainHand().containsEnchantment(Enchantment.SILK_TOUCH);
if(silkTouch && !AdvancedConfig.getInstance().getDoubleDropSilkTouchEnabled())
return;
//TODO: Make this readable
for (int i = mcMMOPlayer.getAbilityMode(skill.getAbility()) ? 2 : 1; i != 0; i--) {
if (RandomChanceUtil.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.MINING_DOUBLE_DROPS, player)) {

View File

@ -271,6 +271,7 @@ Skills:
###
Mining:
DoubleDrops:
SilkTouch: true
# ChanceMax: Maximum chance of receiving double drops when on <MaxBonusLevel> or higher
# MaxBonusLevel: Level when <ChanceMax> of receiving double drops is reached
ChanceMax: 100.0