mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 13:46:46 +01:00
c5e6704530
There was a small bug in magic hunter, where it tried to apply an enchantment level between 1 and the Enchantment.getMaxLevel(), however it didn't take into account Enchantment.getStartLevel(), so when it tried to apply an enchantment level below the start level, an IllegalArgumentException was being thrown and the magic hunter event wasn't happening. Also, it's potentially inefficient to recalculate which enchantments are possible for each ItemStack every time, so I added a HashMap to cache the possibleEnchantments for each material type, then check this cache instead of just looping to regenerate the list each time. |
||
---|---|---|
.. | ||
com/gmail/nossr50 | ||
net/shatteredlands/shatt/backup |