From e9f57f301ecf4af94872de7648033ea1e8d8ec7d Mon Sep 17 00:00:00 2001 From: dmzz-yyhyy Date: Fri, 5 Apr 2024 19:36:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=BA=9C=E6=A7=BD=E5=92=8C?= =?UTF-8?q?=E5=90=88=E6=88=90=E5=99=A8=E7=9A=84=E8=BD=AE=E8=AE=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../anvilcraft/block/entity/AutoCrafterBlockEntity.java | 6 +----- .../dev/dubhe/anvilcraft/block/entity/ChuteBlockEntity.java | 6 +++++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common/src/main/java/dev/dubhe/anvilcraft/block/entity/AutoCrafterBlockEntity.java b/common/src/main/java/dev/dubhe/anvilcraft/block/entity/AutoCrafterBlockEntity.java index c98c675b4..629cd8fbf 100644 --- a/common/src/main/java/dev/dubhe/anvilcraft/block/entity/AutoCrafterBlockEntity.java +++ b/common/src/main/java/dev/dubhe/anvilcraft/block/entity/AutoCrafterBlockEntity.java @@ -149,11 +149,7 @@ public boolean canPlaceItem(int index, ItemStack insertingStack) { private boolean smallerStackExist(int count, ItemStack itemStack, int index) { for (int index2 = index + 1; index2 < 9; ++index2) { ItemStack itemStack1; - if (this.getDisabled().get(index2) || - (isRecord() && getFilter().get(index2).isEmpty()) || - (!(itemStack1 = this.getItem(index2)).isEmpty() && (itemStack1.getCount() >= count) || - !ItemStack.isSameItemSameTags(itemStack1, itemStack) || - (itemStack1).isEmpty())) + if (this.getDisabled().get(index2) || isRecord() && getFilter().get(index2).isEmpty() || !(itemStack1 = this.getItem(index2)).isEmpty() && (itemStack1.getCount() >= count || !ItemStack.isSameItemSameTags(itemStack1, itemStack))) continue; return true; } diff --git a/common/src/main/java/dev/dubhe/anvilcraft/block/entity/ChuteBlockEntity.java b/common/src/main/java/dev/dubhe/anvilcraft/block/entity/ChuteBlockEntity.java index 1f338d01d..3bbf11a58 100644 --- a/common/src/main/java/dev/dubhe/anvilcraft/block/entity/ChuteBlockEntity.java +++ b/common/src/main/java/dev/dubhe/anvilcraft/block/entity/ChuteBlockEntity.java @@ -67,7 +67,11 @@ public boolean canPlaceItem(int index, @NotNull ItemStack insertingStack) { private boolean smallerStackExist(int count, ItemStack itemStack, int index) { for (int index2 = index + 1; index2 < 9; ++index2) { ItemStack itemStack1; - if (this.getDisabled().get(index2) || isRecord() && getFilter().get(index2).isEmpty() || !(itemStack1 = this.getItem(index2)).isEmpty() && (itemStack1.getCount() >= count || !ItemStack.isSameItemSameTags(itemStack1, itemStack))) + if (this.getDisabled().get(index2) || + (isRecord() && getFilter().get(index2).isEmpty()) || + (!(itemStack1 = this.getItem(index2)).isEmpty() && (itemStack1.getCount() >= count) || + !ItemStack.isSameItemSameTags(itemStack1, itemStack) || + (itemStack1).isEmpty())) continue; return true; }