mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Fixed bug where it was impossible to get max level of enchants from
fishing.
This commit is contained in:
parent
123e96e39d
commit
81ab8692ad
@ -1077,12 +1077,10 @@ public class Fishing {
|
|||||||
if(Math.random() * 15 < Fishing.getFishingLootTier(PP))
|
if(Math.random() * 15 < Fishing.getFishingLootTier(PP))
|
||||||
{
|
{
|
||||||
enchanted = true;
|
enchanted = true;
|
||||||
int randomEnchantLevel = (int)(Math.random() * x.getMaxLevel());
|
int randomEnchantLevel = (int)(Math.random() * x.getMaxLevel()) + 1;
|
||||||
|
|
||||||
if(randomEnchantLevel == 0)
|
if(randomEnchantLevel == 0)
|
||||||
randomEnchantLevel = 1;
|
randomEnchantLevel = 1;
|
||||||
if(randomEnchantLevel > x.getMaxLevel())
|
|
||||||
randomEnchantLevel = x.getMaxLevel();
|
|
||||||
|
|
||||||
fishingResults.addEnchantment(x, randomEnchantLevel);
|
fishingResults.addEnchantment(x, randomEnchantLevel);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user