From bb64f94399d42b57bd918f175e669e9f70c73a65 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Sun, 7 Mar 2021 10:28:05 +0000 Subject: [PATCH] Fixed combining items of different amounts --- .../enchantments/support/merging/anvil/AnvilMerge.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/support/merging/anvil/AnvilMerge.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/support/merging/anvil/AnvilMerge.java index dcb41e4e..141d8b3f 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/support/merging/anvil/AnvilMerge.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/support/merging/anvil/AnvilMerge.java @@ -116,6 +116,10 @@ public class AnvilMerge { return new Pair<>(null, null); } + if (left.getAmount() != right.getAmount()) { + return new Pair<>(null, null); + } + HashMap leftEnchants = new HashMap<>(); HashMap rightEnchants = new HashMap<>();