mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Dealing with type conversion issues in the skill commands.
This commit is contained in:
@ -329,7 +329,7 @@ public class Mining {
|
||||
int skillCheck = Misc.skillCheck(skillLevel, MAX_BONUS_LEVEL);
|
||||
|
||||
int randomChance = 100;
|
||||
int chance = (MAX_CHANCE / MAX_BONUS_LEVEL) * skillLevel;
|
||||
int chance = (int) (((double) MAX_CHANCE / (double) MAX_BONUS_LEVEL) * (double) skillLevel);
|
||||
|
||||
if (player.hasPermission("mcmmo.perks.lucky.mining")) {
|
||||
randomChance = (int) (randomChance * 0.75);
|
||||
|
Reference in New Issue
Block a user