From 8ff2f7a6184b75ddaedff205c03825f5df6af672 Mon Sep 17 00:00:00 2001 From: Maya <10861407+serenibyss@users.noreply.github.com> Date: Wed, 9 Apr 2025 12:28:34 -0500 Subject: [PATCH] Fix chisel slot voiding in some conditions --- .../java/team/chisel/inventory/ContainerChisel.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/team/chisel/inventory/ContainerChisel.java b/src/main/java/team/chisel/inventory/ContainerChisel.java index 0c6570a6..ddf247c2 100644 --- a/src/main/java/team/chisel/inventory/ContainerChisel.java +++ b/src/main/java/team/chisel/inventory/ContainerChisel.java @@ -96,6 +96,7 @@ public class ContainerChisel extends Container { itemstack = itemstack1.copy(); if (slotIdx > InventoryChiselSelection.normalSlots) { + // clicked in player inventory if (!this.mergeItemStack( itemstack1, InventoryChiselSelection.normalSlots, @@ -104,10 +105,13 @@ public class ContainerChisel extends Container { return null; } } else { - entity.inventory.setItemStack(itemstack1.copy()); - slot.onPickupFromSlot(entity, itemstack1); - itemstack1 = entity.inventory.getItemStack(); - entity.inventory.setItemStack(null); + // only run this logic if a chisel selection slot was clicked (i.e. not the input slot) + if (slotIdx != InventoryChiselSelection.normalSlots) { + entity.inventory.setItemStack(itemstack1.copy()); + slot.onPickupFromSlot(entity, itemstack1); + itemstack1 = entity.inventory.getItemStack(); + entity.inventory.setItemStack(null); + } if (!this.mergeItemStack( itemstack1,