Fix double drops for mining

This commit is contained in:
nossr50
2019-06-16 04:59:34 -07:00
parent 43ca43cc48
commit a1e3bb18a4
23 changed files with 108 additions and 321 deletions

View File

@ -136,7 +136,7 @@ public class HerbalismManager extends SkillManager {
int amount;
int xp;
boolean greenTerra = mcMMOPlayer.getAbilityMode(skill.getAbility());
boolean greenTerra = mcMMOPlayer.getAbilityMode(skill.getSuperAbility());
// if (mcMMO.getModManager().isCustomHerbalismBlock(blockState)) {
// CustomBlock customBlock = mcMMO.getModManager().getBlock(blockState);
@ -317,7 +317,7 @@ public class HerbalismManager extends SkillManager {
ItemStack seedStack = new ItemStack(seed);
if (!greenTerra && !RandomChanceUtil.checkRandomChanceExecutionSuccess(player, SubSkillType.HERBALISM_GREEN_THUMB, true)) {
if (!greenTerra && !RandomChanceUtil.checkRandomChanceExecutionSuccess(player, SubSkillType.HERBALISM_GREEN_THUMB)) {
return;
}

View File

@ -87,7 +87,7 @@ public class MiningManager extends SkillManager {
return;
}
if (mcMMOPlayer.getAbilityMode(skill.getAbility())) {
if (mcMMOPlayer.getAbilityMode(skill.getSuperAbility())) {
SkillUtils.handleDurabilityChange(getPlayer().getInventory().getItemInMainHand(), mcMMO.getConfigManager().getConfigSuperAbilities().getSuperAbilityLimits().getToolDurabilityDamage());
}
@ -101,8 +101,8 @@ public class MiningManager extends SkillManager {
return;
//TODO: Make this readable
if (RandomChanceUtil.checkRandomChanceExecutionSuccess(getPlayer(), SubSkillType.MINING_DOUBLE_DROPS, true)) {
BlockUtils.markDropsAsBonus(blockState, mcMMOPlayer.getAbilityMode(skill.getAbility()));
if (RandomChanceUtil.checkRandomChanceExecutionSuccess(getPlayer(), SubSkillType.MINING_DOUBLE_DROPS)) {
BlockUtils.markDropsAsBonus(blockState, mcMMOPlayer.getAbilityMode(skill.getSuperAbility()));
}
}