mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 03:34:43 +02:00
Make the MagicHunter Chance configurable
This commit is contained in:
@ -151,6 +151,7 @@ public class Fishing {
|
||||
|
||||
if (theCatch.getItemStack().getType() != Material.RAW_FISH) {
|
||||
int lootTier = Fishing.getFishingLootTier(profile);
|
||||
int magicHunterMultiplier = advancedConfig.getFishingMagicMultiplier();
|
||||
int specificChance = 1;
|
||||
boolean enchanted = false;
|
||||
ItemStack fishingResults = theCatch.getItemStack();
|
||||
@ -171,7 +172,7 @@ public class Fishing {
|
||||
* 20% - Tier 4
|
||||
* 25% - Tier 5
|
||||
*/
|
||||
if (Misc.getRandom().nextInt(randomChance) <= (lootTier * 5) && Permissions.fishingMagic(player)) {
|
||||
if (Misc.getRandom().nextInt(randomChance) <= (lootTier * magicHunterMultiplier) && Permissions.fishingMagic(player)) {
|
||||
for (Enchantment newEnchant : Enchantment.values()) {
|
||||
if (newEnchant.canEnchantItem(fishingResults)) {
|
||||
specificChance++;
|
||||
|
Reference in New Issue
Block a user