Skip to content

Commit

Permalink
Fixed BHU filter not working properly now if there is items inside it…
Browse files Browse the repository at this point in the history
… will be the priority filter then it will use the filter, closes #1202 and closes #1181
  • Loading branch information
Buuz135 committed Nov 14, 2021
1 parent f947e06 commit c9da953
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@ public String getFormatedDisplayAmount() {
return NumberUtils.getFormatedBigNumber(stored);
}

public boolean isVoidItems() {
return voidItems;
}

private class BlackHoleHandler implements IItemHandler {

private int amount;
Expand Down Expand Up @@ -320,11 +324,8 @@ public int getSlotLimit(int slot) {
public boolean isItemValid(int slot, @Nonnull ItemStack stack) {
if (slot == 0){
ItemStack fl = blStack;
if (!filter.getFilterSlots()[slot].getFilter().isEmpty()) {
ItemStack filterStack = filter.getFilterSlots()[slot].getFilter();
if (filterStack.isItemEqual(fl) && ItemStack.areItemStackTagsEqual(filterStack, fl)) {
fl = filter.getFilterSlots()[slot].getFilter();
}
if (!filter.getFilterSlots()[slot].getFilter().isEmpty() && fl.isEmpty()) {
fl = filter.getFilterSlots()[slot].getFilter();
}
return fl.isEmpty() || (fl.isItemEqual(stack) && ItemStack.areItemStackTagsEqual(fl, stack));
}
Expand Down

0 comments on commit c9da953

Please sign in to comment.