Refined Relocation 2

Refined Relocation 2

5M Downloads

SameModFilter

borg286 opened this issue · 3 comments

commented

I propose a subclass of SameItemFilter called SameModFilter. The main difference is that it passes filters when there is any item in the inventory that has the same mod as the item being passed in.
This provides an alternative way of making a mod-specific inventory. Instead of frontloading the pain of selecting what mods go in which inventory, the user would look at his catch-all chest, find an item from a mod he wants a specific chest for, then place the chest down, select SameMod and put the item in it.

I realize that mod families like Thermal X are more painful because you'd need to find a token item from each mod and make sure it was in the chest.

But for a lazy man's approach this would be a welcome option.

commented

It was a leftover from when I was trying to fix a bug thinking vanilla's modid would be returned as null.

However, the modid can be null in weird cases where mods don't register their items correctly, so at least the second null-check is necessary.

commented
commented

Can you help me understand what the purpose of this condition does

if (modId == null && otherModId == null) {
return true;
}

I don't know the cases when the modId is null.