mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 10:14:43 +02:00
Fixed some issues with calculating drop chances.
This commit is contained in:
@ -104,7 +104,7 @@ public class Excavation {
|
||||
|
||||
for (ExcavationTreasure treasure : treasures) {
|
||||
if (skillLevel >= treasure.getDropLevel()) {
|
||||
if (random.nextInt(100) <= treasure.getDropChance()) {
|
||||
if (random.nextDouble() * 100.0d <= treasure.getDropChance()) {
|
||||
xp += treasure.getXp();
|
||||
is.add(treasure.getDrop());
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ public class Fishing {
|
||||
if (LoadProperties.fishingDrops) {
|
||||
FishingTreasure treasure = rewards.get(random.nextInt(rewards.size()));
|
||||
|
||||
if (random.nextInt(100) <= treasure.getDropChance()) {
|
||||
if (random.nextDouble() * 100.0d <= treasure.getDropChance()) {
|
||||
Users.getProfile(player).addXP(SkillType.FISHING, treasure.getXp());
|
||||
theCatch.setItemStack(treasure.getDrop());
|
||||
}
|
||||
|
Reference in New Issue
Block a user