Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,6 @@ protected void saveData(ItemStack filterItem) {
});
filterItem.getOrCreateTag()
.put("MatchedAttributes", attributes);

if (attributes.isEmpty() && whitelistMode == WhitelistMode.WHITELIST_DISJ)
filterItem.setTag(null);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,6 @@ public boolean test(Level world, FluidStack stack, boolean matchNBT) {

@Override
public boolean test(Level world, ItemStack stack, boolean matchNBT) {
if (attributeTests.isEmpty())
return super.test(world, stack, matchNBT);
for (Pair<ItemAttribute, Boolean> test : attributeTests) {
ItemAttribute attribute = test.getFirst();
boolean inverted = test.getSecond();
Expand Down Expand Up @@ -248,8 +246,7 @@ public PackageFilterItemStack(ItemStack filter) {

@Override
public boolean test(Level world, ItemStack stack, boolean matchNBT) {
return (filterString.isBlank() && super.test(world, stack, matchNBT))
|| PackageItem.isPackage(stack) && PackageItem.matchAddress(stack, filterString);
return PackageItem.isPackage(stack) && PackageItem.matchAddress(stack, filterString);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@ protected void saveData(ItemStack filterItem) {
CompoundTag tag = filterItem.getOrCreateTag();
tag.putBoolean("RespectNBT", respectNBT);
tag.putBoolean("Blacklist", blacklist);

if (respectNBT || blacklist)
return;
for (int i = 0; i < ghostInventory.getSlots(); i++)
if (!ghostInventory.getStackInSlot(i)
.isEmpty())
return;
filterItem.setTag(null);
}

}