diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29b..042fdc4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1 @@ +- fix #226 \ No newline at end of file diff --git a/src/main/java/de/mari_023/ae2wtlib/AE2wtlibEvents.java b/src/main/java/de/mari_023/ae2wtlib/AE2wtlibEvents.java index a8e0b5eb..3edc249b 100644 --- a/src/main/java/de/mari_023/ae2wtlib/AE2wtlibEvents.java +++ b/src/main/java/de/mari_023/ae2wtlib/AE2wtlibEvents.java @@ -30,6 +30,8 @@ public class AE2wtlibEvents { public static void restock(ServerPlayer player, ItemStack item, int count, Consumer setStack) { if (player.isCreative()) return; + if (item.isEmpty()) + return; CraftingTerminalHandler cTHandler = CraftingTerminalHandler.getCraftingTerminalHandler(player); if (!cTHandler.inRange() || !ItemWT.getBoolean(cTHandler.getCraftingTerminal(), "restock") || cTHandler.getTargetGrid() == null || cTHandler.getTargetGrid().getStorageService() == null)