mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Randomize the treasure drop amounts instead of always dropping everything
For example, the guaranteed 5 diamonds will now be a 1-5 diamond drop.
This commit is contained in:
parent
9349416326
commit
748dba41dc
@ -485,6 +485,10 @@ public class FishingManager extends SkillManager {
|
||||
treasureDrop.setDurability((short) (Misc.getRandom().nextInt(maxDurability)));
|
||||
}
|
||||
|
||||
if (treasureDrop.getAmount() > 1) {
|
||||
treasureDrop.setAmount(Misc.getRandom().nextInt(treasureDrop.getAmount()) + 1);
|
||||
}
|
||||
|
||||
treasure.setDrop(treasureDrop);
|
||||
|
||||
return treasure;
|
||||
|
Loading…
Reference in New Issue
Block a user