Closed leefy-greens closed 4 months ago
It seems there is an issue with calculating the amount of enchants, I'll try and work on a fix ASAP. I'm currently sick unfortunately so I'm not sure when I'll be able to. Sorry for the inconvenience
After reviewing the code, the fix was very simple, I uploaded an updated version on spigot. Let me know if that fixes the issues. https://www.spigotmc.org/resources/fishing-rewards.84717/
Thanks, I will test it today.
Version 2.2 is better, and has resolved my issue. Thanks!
With the following (and ONLY the following) in my rewards.yml with FishingRewards 2.1:
When I fish, I always get a book, which is working as intended. The book I get is enchanted, which is working as intended. The book I get always has 4 enchantments, with the above rewards.yml, rather than 1. It's a random selection of the 8 total, but it's always 4 (3+1?). Changing the guaranteed-enchantment-amount to 2 increases the enchantment count to 5 (3+2?), consistently.
It appears there is some base value of 3(?), despite the comment in the rewards.yml of:
# guaranteed-enchantment-amount: Determines the number of guaranteed enchantments an item can have. For an example, if an item has 5 guaranteed enchantments, but the amount is set to 2, it will pick 2 enchantments randomly and apply them.
which doesn't appear to be true, at the moment. Or there is some other bug affecting the count of returned enchantments.Additionally: Also, with 7 or 8 enchantments in the list, the returned number of enchantments with guaranteed-enchantment-amount: 1 is 4. However, with 5 or 6 enchantments in the list, the returned number of enchantments with guaranteed-enchantment-amount: 1 is 3.
That seems to indicate some kind of undocumented calculation based on half the total list, possibly?