mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 02:53:43 +01:00 
			
		
		
		
	Silk Touch toggle in advanced.yml for double drops
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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); }
 | 
			
		||||
 
 | 
			
		||||
@@ -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)) {
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user