Skip to content

Commit

Permalink
Merge pull request #182 from dmzz-yyhyy/chute_fixed
Browse files Browse the repository at this point in the history
修复溜槽和合成器的轮询
  • Loading branch information
Gu-ZT authored Apr 5, 2024
2 parents 1dbce44 + e9f57f3 commit 2f2ef61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2f2ef61

Please sign in to comment.