Fixing a lot of bugs involving calculating the success of skills

This commit is contained in:
nossr50
2019-01-27 19:36:16 -08:00
parent be9aeacd70
commit e969598f58
9 changed files with 24 additions and 22 deletions

View File

@ -60,9 +60,7 @@ public class SmeltingManager extends SkillManager {
public boolean processFluxMining(BlockState blockState) {
Player player = getPlayer();
SubSkillRandomCheckEvent event = new SubSkillRandomCheckEvent(getPlayer(), SubSkillType.SMELTING_FLUX_MINING, Smelting.fluxMiningChance / activationChance);
mcMMO.p.getServer().getPluginManager().callEvent(event);
if ((event.getChance() * activationChance) > Misc.getRandom().nextInt(activationChance)) {
if (RandomChanceUtil.checkRandomChanceExecutionSuccess(getPlayer(), SubSkillType.SMELTING_FLUX_MINING, true)) {
ItemStack item = null;
switch (blockState.getType()) {