mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
FishingManager: force enchant on enchanted book
Added a small conditional to ensure that enchanted books get an enchantment.
This commit is contained in:
parent
307d483323
commit
6d5ab0edda
@ -572,6 +572,11 @@ public class FishingManager extends SkillManager {
|
|||||||
double dropRate = TreasureConfig.getInstance().getEnchantmentDropRate(getLootTier(), rarity);
|
double dropRate = TreasureConfig.getInstance().getEnchantmentDropRate(getLootTier(), rarity);
|
||||||
|
|
||||||
if (diceRoll <= dropRate) {
|
if (diceRoll <= dropRate) {
|
||||||
|
// Make sure enchanted books always get some kind of enchantment. --hoorigan
|
||||||
|
if (treasureDrop.getType() == Material.ENCHANTED_BOOK) {
|
||||||
|
diceRoll = dropRate + 1;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
fishingEnchantments = TreasureConfig.getInstance().fishingEnchantments.get(rarity);
|
fishingEnchantments = TreasureConfig.getInstance().fishingEnchantments.get(rarity);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user