mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +01:00
Merge pull request #3330 from hoorigan/ench-book-fixes
Enchanted book fixes
This commit is contained in:
commit
2b159adefd
@ -586,6 +586,11 @@ public class FishingManager extends SkillManager {
|
||||
double dropRate = TreasureConfig.getInstance().getEnchantmentDropRate(getLootTier(), rarity);
|
||||
|
||||
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);
|
||||
break;
|
||||
}
|
||||
|
@ -503,6 +503,7 @@ public final class ItemUtils {
|
||||
*/
|
||||
public static boolean isEnchantable(ItemStack item) {
|
||||
switch (item.getType()) {
|
||||
case ENCHANTED_BOOK:
|
||||
case SHEARS:
|
||||
case FISHING_ROD:
|
||||
case CARROT_STICK:
|
||||
|
Loading…
Reference in New Issue
Block a user