Re-Add mutually exclusive check to merge
This commit is contained in:
parent
5fb902d46f
commit
e679ca85fa
@ -219,7 +219,13 @@ public class EnchantmentContainer implements Iterable<Map.Entry<Enchantment, Int
|
||||
if (first == null || first.isEmpty())
|
||||
return second;
|
||||
|
||||
final Map<Enchantment, Integer> combined = new HashMap<>();
|
||||
final List<Enchantment> blackList =
|
||||
second.keySet().stream()
|
||||
.flatMap(ench -> getMutuallyExclusiveEnchantments(ench).stream())
|
||||
.toList();
|
||||
blackList.forEach(first.keySet()::remove);
|
||||
|
||||
final Map<Enchantment, Integer> combined = new HashMap<>(first);
|
||||
for (Map.Entry<Enchantment, Integer> entry : second.entrySet())
|
||||
{
|
||||
// Check for enchants with higher level
|
||||
|
Loading…
Reference in New Issue
Block a user