mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
Fix level buypass not buypassing merge limit
This commit is contained in:
parent
d19cd30ad7
commit
5e098c5118
2 changed files with 5 additions and 3 deletions
|
|
@ -86,8 +86,10 @@ object EnchantmentUtil {
|
|||
// ... and they're the same level
|
||||
else {
|
||||
// We test if it is allowed to merge at this level
|
||||
val maxBeforeDisabled = ConfigOptions.maxBeforeMergeDisabled(enchantment)
|
||||
if((maxBeforeDisabled > 0) && (oldLevel >= maxBeforeDisabled)) return@forEach
|
||||
if(!bypassLevel){
|
||||
val maxBeforeDisabled = ConfigOptions.maxBeforeMergeDisabled(enchantment)
|
||||
if((maxBeforeDisabled > 0) && (oldLevel >= maxBeforeDisabled)) return@forEach
|
||||
}
|
||||
|
||||
// Now we increase the enchantment level by 1
|
||||
var newLevel = oldLevel + 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue