From 2fd0f8a0d8083cff10db4c11a8a807b60733ae0b Mon Sep 17 00:00:00 2001 From: Vaan1310 <61906290+Intybyte@users.noreply.github.com> Date: Thu, 8 Aug 2024 18:45:24 +0200 Subject: [PATCH] Fix ChargingBench (#4184) Resolves #4183 * Fix ChargingBench - ChargingBench can now only recharge ItemStacks with 1 item. --------- Co-authored-by: J3fftw <44972470+J3fftw1@users.noreply.github.com> Co-authored-by: JustAHuman-xD <65748158+JustAHuman-xD@users.noreply.github.com> --- .../implementation/items/electric/machines/ChargingBench.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/ChargingBench.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/ChargingBench.java index e3395e9f64..b535e44b40 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/ChargingBench.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/ChargingBench.java @@ -44,6 +44,10 @@ protected void tick(Block b) { for (int slot : getInputSlots()) { ItemStack item = inv.getItemInSlot(slot); + if (item == null || item.getAmount() != 1) { + continue; + } + if (charge(b, inv, slot, item)) { return; }