mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 02:53:43 +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:
		@@ -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;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user