From 591da50c0d8d6dd27a02ce4f99b27e4f98cd0021 Mon Sep 17 00:00:00 2001 From: Andrew Wong <42793301+md5sha256@users.noreply.github.com> Date: Wed, 25 Sep 2024 22:52:51 +1000 Subject: [PATCH] Dont instantiate itemstacks with invalid materials --- .../implementation/items/magical/runes/EnchantmentRune.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/magical/runes/EnchantmentRune.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/magical/runes/EnchantmentRune.java index 33e54e7544..7b817ad890 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/magical/runes/EnchantmentRune.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/magical/runes/EnchantmentRune.java @@ -50,6 +50,9 @@ public EnchantmentRune(ItemGroup itemGroup, SlimefunItemStack item, RecipeType r super(itemGroup, item, recipeType, recipe); for (Material mat : Material.values()) { + if (!mat.isItem()) { + continue; + } if (Slimefun.instance().isUnitTest() && mat.isLegacy()) continue; List enchantments = new ArrayList<>();