Fixing Double Drops for Mining -- READ THE FULL COMMIT MSG

This fix is very similar to what was deployed for Herbalism in 2.1.22

NOTE: Here's what your Double_Drop entries in Config.yml for Mining should look like

https://paste.gg/p/anonymous/dcd06f1215844311b4f2225f200090d1

IMPORTANT: Version 2.1.22 which came before this had a similar fix for Herbalism, instructions on how to fix your Herbalism Double Drops can be found here
        https://www.spigotmc.org/resources/official-mcmmo.64348/update?update=269868
This commit is contained in:
nossr50
2019-03-23 18:07:23 -07:00
parent b1f4ea8cba
commit faab64864a
5 changed files with 18 additions and 10 deletions

View File

@ -34,6 +34,9 @@ public class Mining {
Material blockType = blockState.getType();
switch (blockType) {
case ANDESITE:
case DIORITE:
case GRANITE:
case END_STONE:
case TERRACOTTA:
case CLAY:

View File

@ -91,15 +91,8 @@ public class MiningManager extends SkillManager {
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)) {
if (silkTouch) {
Mining.handleSilkTouchDrops(blockState);
}
else {
Mining.handleMiningDrops(blockState);
}
}
if (RandomChanceUtil.checkRandomChanceExecutionSuccess(getPlayer(), SubSkillType.MINING_DOUBLE_DROPS, true)) {
BlockUtils.markBlocksForBonusDrops(blockState, mcMMOPlayer.getAbilityMode(skill.getAbility()));
}
}

View File

@ -457,6 +457,9 @@ Double_Drops:
Rose_Bush: true
Peony: true
Mining:
Andesite: true
Diorite: true
Granite: true
Coal_Ore: true
Diamond_Ore: true
Emerald_Ore: true