mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Hopefully addresses part of the empty enchant issue.
This commit is contained in:
parent
d9346ab260
commit
be4e62fe9d
@ -166,9 +166,8 @@ public class Fishing {
|
|||||||
Map<Enchantment, Integer> resultEnchantments = fishingResults.getEnchantments();
|
Map<Enchantment, Integer> resultEnchantments = fishingResults.getEnchantments();
|
||||||
|
|
||||||
for (Enchantment oldEnchant : resultEnchantments.keySet()) {
|
for (Enchantment oldEnchant : resultEnchantments.keySet()) {
|
||||||
if (oldEnchant.conflictsWith(newEnchant)) {
|
if (oldEnchant.conflictsWith(newEnchant))
|
||||||
return;
|
continue;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Actual chance to have an enchantment is related to your fishing skill */
|
/* Actual chance to have an enchantment is related to your fishing skill */
|
||||||
@ -180,6 +179,9 @@ public class Fishing {
|
|||||||
randomEnchantLevel = newEnchant.getStartLevel();
|
randomEnchantLevel = newEnchant.getStartLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(randomEnchantLevel >= 1000)
|
||||||
|
continue;
|
||||||
|
|
||||||
fishingResults.addEnchantment(newEnchant, randomEnchantLevel);
|
fishingResults.addEnchantment(newEnchant, randomEnchantLevel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user