mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Silk Touch toggle in advanced.yml for double drops
This commit is contained in:
parent
68e43e3641
commit
f9f6d1550e
@ -8,6 +8,7 @@ Key:
|
|||||||
- Removal
|
- Removal
|
||||||
|
|
||||||
Version 2.1.14
|
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!)
|
Mycelium removed from Woodcutting XP tables (because its soil!)
|
||||||
Kelp added to Herbalism XP tables
|
Kelp added to Herbalism XP tables
|
||||||
mcMMO now flags blocks moved by piston as not natural to prevent automated XP farms
|
mcMMO now flags blocks moved by piston as not natural to prevent automated XP farms
|
||||||
|
@ -903,6 +903,7 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
public int getGreenThumbStageChange() { return config.getInt("Skills.Herbalism.GreenThumb.StageChange", 200); }
|
public int getGreenThumbStageChange() { return config.getInt("Skills.Herbalism.GreenThumb.StageChange", 200); }
|
||||||
|
|
||||||
/* MINING */
|
/* 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 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 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); }
|
public double getOreBonus(int rank) { return config.getDouble("Skills.Mining.BlastMining.OreBonus.Rank_" + rank); }
|
||||||
|
@ -87,6 +87,9 @@ public class MiningManager extends SkillManager {
|
|||||||
|
|
||||||
boolean silkTouch = player.getInventory().getItemInMainHand().containsEnchantment(Enchantment.SILK_TOUCH);
|
boolean silkTouch = player.getInventory().getItemInMainHand().containsEnchantment(Enchantment.SILK_TOUCH);
|
||||||
|
|
||||||
|
if(silkTouch && !AdvancedConfig.getInstance().getDoubleDropSilkTouchEnabled())
|
||||||
|
return;
|
||||||
|
|
||||||
//TODO: Make this readable
|
//TODO: Make this readable
|
||||||
for (int i = mcMMOPlayer.getAbilityMode(skill.getAbility()) ? 2 : 1; i != 0; i--) {
|
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)) {
|
if (RandomChanceUtil.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.MINING_DOUBLE_DROPS, player)) {
|
||||||
|
@ -271,6 +271,7 @@ Skills:
|
|||||||
###
|
###
|
||||||
Mining:
|
Mining:
|
||||||
DoubleDrops:
|
DoubleDrops:
|
||||||
|
SilkTouch: true
|
||||||
# ChanceMax: Maximum chance of receiving double drops when on <MaxBonusLevel> or higher
|
# ChanceMax: Maximum chance of receiving double drops when on <MaxBonusLevel> or higher
|
||||||
# MaxBonusLevel: Level when <ChanceMax> of receiving double drops is reached
|
# MaxBonusLevel: Level when <ChanceMax> of receiving double drops is reached
|
||||||
ChanceMax: 100.0
|
ChanceMax: 100.0
|
||||||
|
Loading…
Reference in New Issue
Block a user