From b2ee9ea71a2d80bc888e7432e4cbfcbb2d9e5b90 Mon Sep 17 00:00:00 2001 From: SHsuperCM Date: Thu, 16 Sep 2021 04:49:51 +0300 Subject: Fixed crash when cit enchantmentLevels is specified Fixes #26 --- src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/shcm/shsupercm/fabric/citresewn') diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CIT.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CIT.java index e306cbe..5971b35 100644 --- a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CIT.java +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CIT.java @@ -289,7 +289,7 @@ public abstract class CIT { if (!matches) return false; } else if (!enchantmentLevelsAny) { - Collection levels = EnchantmentHelper.get(stack).values(); + Collection levels = new ArrayList<>(EnchantmentHelper.get(stack).values()); levels.add(0); boolean matches = false; -- cgit