mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 10:14:43 +02:00
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:
@ -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:
|
||||
|
@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user