forked from GTNewHorizons/NotEnoughItems
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* @MOD->item searching has been added using item subsets, allowing for things like `@Blocks.MobSpawners->zombie` * DoubleFilteredFilter - Requires both filters to apply (Subset & Pattern) * Finally updated the README.md
- Loading branch information
1 parent
3899588
commit 254e625
Showing
6 changed files
with
64 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package codechicken.nei; | ||
|
||
import codechicken.nei.api.ItemFilter; | ||
import net.minecraft.item.ItemStack; | ||
|
||
public class DoubleFilteredFilter implements ItemFilter { | ||
private ItemFilter filter; | ||
private ItemList.PatternItemFilter patternFilter; | ||
|
||
public DoubleFilteredFilter(ItemFilter filter, String itemFilter) { | ||
this.filter = filter; | ||
this.patternFilter = new ItemList.PatternItemFilter(SearchField.getPattern(itemFilter)); | ||
} | ||
|
||
@Override | ||
public boolean matches(ItemStack item) { | ||
if(filter.matches(item)) { | ||
return patternFilter.matches(item); | ||
} | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters