mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Fixed some issues with calculating drop chances.
This commit is contained in:
parent
6c1ee24101
commit
8b4c86c8ba
@ -8,9 +8,11 @@ Key:
|
|||||||
- Removal
|
- Removal
|
||||||
|
|
||||||
Version 1.3.05-dev
|
Version 1.3.05-dev
|
||||||
|
+ Added ExperienceAPI and PartyAPI classes for developer use
|
||||||
= Fixed XP bar not updating when XP was gained
|
= Fixed XP bar not updating when XP was gained
|
||||||
= Fixed bug with repairing wooden tools
|
= Fixed bug with repairing wooden tools
|
||||||
= Fixed bug where spawned wolves only had 8 health.
|
= Fixed bug where spawned wolves only had 8 health.
|
||||||
|
= Fixed bug where rare Treasures from Excavation were dropping too often
|
||||||
! Changed Tree Feller to account for ability durability loss but not leaves.
|
! Changed Tree Feller to account for ability durability loss but not leaves.
|
||||||
! Changed bypass node for Arcane Forging to not default to true for OPs
|
! Changed bypass node for Arcane Forging to not default to true for OPs
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ public class Excavation {
|
|||||||
|
|
||||||
for (ExcavationTreasure treasure : treasures) {
|
for (ExcavationTreasure treasure : treasures) {
|
||||||
if (skillLevel >= treasure.getDropLevel()) {
|
if (skillLevel >= treasure.getDropLevel()) {
|
||||||
if (random.nextInt(100) <= treasure.getDropChance()) {
|
if (random.nextDouble() * 100.0d <= treasure.getDropChance()) {
|
||||||
xp += treasure.getXp();
|
xp += treasure.getXp();
|
||||||
is.add(treasure.getDrop());
|
is.add(treasure.getDrop());
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ public class Fishing {
|
|||||||
if (LoadProperties.fishingDrops) {
|
if (LoadProperties.fishingDrops) {
|
||||||
FishingTreasure treasure = rewards.get(random.nextInt(rewards.size()));
|
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());
|
Users.getProfile(player).addXP(SkillType.FISHING, treasure.getXp());
|
||||||
theCatch.setItemStack(treasure.getDrop());
|
theCatch.setItemStack(treasure.getDrop());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user