mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 19:54:44 +02:00
Copy-pasta code is bad.
This commit is contained in:
@ -132,14 +132,9 @@ public class MiningManager extends SkillManager{
|
||||
return;
|
||||
}
|
||||
|
||||
int randomChance = 100;
|
||||
if (Permissions.luckyMining(player)) {
|
||||
randomChance = 75;
|
||||
}
|
||||
|
||||
float chance = ((float) Mining.DOUBLE_DROPS_MAX_CHANCE / Mining.DOUBLE_DROPS_MAX_BONUS_LEVEL) * eventHandler.skillModifier;
|
||||
|
||||
if (chance > Misc.getRandom().nextInt(randomChance)) {
|
||||
if (chance > Misc.getRandom().nextInt(activationChance)) {
|
||||
eventHandler.processDrops();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user