From 823b3ec1d70e44c8987ab2e8749abab3bfae5fc4 Mon Sep 17 00:00:00 2001 From: Hao_cen Date: Thu, 18 Jul 2024 15:58:54 +0800 Subject: [PATCH] fix shulker stack cause dupe Signed-off-by: Hao_cen --- src/main/java/net/kyrptonaught/quickshulker/api/Util.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/kyrptonaught/quickshulker/api/Util.java b/src/main/java/net/kyrptonaught/quickshulker/api/Util.java index cc578bf..1800721 100644 --- a/src/main/java/net/kyrptonaught/quickshulker/api/Util.java +++ b/src/main/java/net/kyrptonaught/quickshulker/api/Util.java @@ -60,7 +60,8 @@ public static boolean canOpenInHand(ItemStack stack) { } public static boolean areItemsEqual(ItemStack stack1, ItemStack stack2) { - return ItemStack.areItemsEqual(stack1, stack2) && ItemStack.areEqual(stack1, stack2) && stack1.getCount() == stack2.getCount(); + QuickShulkerData qsdata = QuickOpenableRegistry.getQuickie(stack1.getItem()); + return ItemStack.areItemsEqual(stack1, stack2) && ItemStack.areEqual(stack1, stack2) && stack1.getCount() == stack2.getCount() && (qsdata.ignoreSingleStackCheck || stack1.getCount() == 1); } public static ScreenHandlerListener forceCloseScreenIfNotPresent(PlayerEntity player, int slotID, ItemStack stack) {