mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Fix fishing not handling enchants right.
This commit is contained in:
parent
857bb00c8a
commit
5830bf461d
@ -2,6 +2,7 @@ package com.gmail.nossr50.skills.gathering;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import org.bukkit.DyeColor;
|
import org.bukkit.DyeColor;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@ -164,9 +165,10 @@ public class Fishing {
|
|||||||
if (Misc.getRandom().nextInt(randomChance) <= (lootTier * magicHunterMultiplier) && Permissions.fishingMagic(player)) {
|
if (Misc.getRandom().nextInt(randomChance) <= (lootTier * magicHunterMultiplier) && Permissions.fishingMagic(player)) {
|
||||||
for (Enchantment newEnchant : Enchantment.values()) {
|
for (Enchantment newEnchant : Enchantment.values()) {
|
||||||
if (newEnchant.canEnchantItem(fishingResults)) {
|
if (newEnchant.canEnchantItem(fishingResults)) {
|
||||||
|
Map<Enchantment, Integer> resultEnchantments = fishingResults.getEnchantments();
|
||||||
specificChance++;
|
specificChance++;
|
||||||
|
|
||||||
for (Enchantment oldEnchant : fishingResults.getEnchantments().keySet()) {
|
for (Enchantment oldEnchant : resultEnchantments.keySet()) {
|
||||||
if (oldEnchant.conflictsWith(newEnchant))
|
if (oldEnchant.conflictsWith(newEnchant))
|
||||||
specificChance--;
|
specificChance--;
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user