mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Increase TreasureHunter chances for Luck enchantment
When the player is using a fishing rod with the ”Luck of the Sea” enchantment, the drop chances will increase with 1% for each level of the enchantment.
This commit is contained in:
parent
334c44760f
commit
225de799e8
@ -445,6 +445,8 @@ public class FishingManager extends SkillManager {
|
|||||||
*/
|
*/
|
||||||
private FishingTreasure getFishingTreasure() {
|
private FishingTreasure getFishingTreasure() {
|
||||||
double diceRoll = Misc.getRandom().nextDouble() * 100;
|
double diceRoll = Misc.getRandom().nextDouble() * 100;
|
||||||
|
diceRoll -= getPlayer().getItemInHand().getEnchantmentLevel(Enchantment.LUCK);
|
||||||
|
|
||||||
FishingTreasure treasure = null;
|
FishingTreasure treasure = null;
|
||||||
|
|
||||||
for (Rarity rarity : Rarity.values()) {
|
for (Rarity rarity : Rarity.values()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user