mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-11-22 19:58:35 +01:00
added a mod filter modifier
This commit is contained in:
parent
b7cd8e5cdd
commit
4f78e7ecc8
7 changed files with 34 additions and 3 deletions
|
@ -17,7 +17,8 @@ public enum ItemEqualityType {
|
||||||
if (filterTags.isEmpty())
|
if (filterTags.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
return stackTags.containsAll(filterTags);
|
return stackTags.containsAll(filterTags);
|
||||||
}, true);
|
}, true),
|
||||||
|
MOD((stack, filter) -> stack.getItem().getCreatorModId(stack).equals(filter.getItem().getCreatorModId(filter)), true);
|
||||||
|
|
||||||
public final BiFunction<ItemStack, ItemStack, Boolean> filter;
|
public final BiFunction<ItemStack, ItemStack, Boolean> filter;
|
||||||
public final boolean ignoreItemEquality;
|
public final boolean ignoreItemEquality;
|
||||||
|
|
|
@ -7,7 +7,7 @@ import java.util.Comparator;
|
||||||
public enum ItemOrder {
|
public enum ItemOrder {
|
||||||
AMOUNT(Comparator.comparingInt(ItemStack::getCount)),
|
AMOUNT(Comparator.comparingInt(ItemStack::getCount)),
|
||||||
NAME(Comparator.comparing(s -> s.getDisplayName().getString())),
|
NAME(Comparator.comparing(s -> s.getDisplayName().getString())),
|
||||||
MOD(Comparator.comparing(s -> s.getItem().getRegistryName().getNamespace()));
|
MOD(Comparator.comparing(s -> s.getItem().getCreatorModId(s)));
|
||||||
|
|
||||||
public final Comparator<ItemStack> comparator;
|
public final Comparator<ItemStack> comparator;
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,7 @@ public class ItemTerminalGui extends ContainerScreen<ItemTerminalContainer> {
|
||||||
String search = searchText;
|
String search = searchText;
|
||||||
String toCompare;
|
String toCompare;
|
||||||
if (search.startsWith("@")) {
|
if (search.startsWith("@")) {
|
||||||
toCompare = s.getLeft().getItem().getRegistryName().getNamespace();
|
toCompare = s.getLeft().getItem().getCreatorModId(s.getLeft());
|
||||||
search = search.substring(1);
|
search = search.substring(1);
|
||||||
} else {
|
} else {
|
||||||
// don't use formatted text here since we want to search for name
|
// don't use formatted text here since we want to search for name
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
"item.prettypipes.damage_filter_modifier": "Damage Filter Modifier",
|
"item.prettypipes.damage_filter_modifier": "Damage Filter Modifier",
|
||||||
"item.prettypipes.nbt_filter_modifier": "Data Filter Modifier",
|
"item.prettypipes.nbt_filter_modifier": "Data Filter Modifier",
|
||||||
"item.prettypipes.tag_filter_modifier": "Tag Filter Modifier",
|
"item.prettypipes.tag_filter_modifier": "Tag Filter Modifier",
|
||||||
|
"item.prettypipes.mod_filter_modifier": "Mod Filter Modifier",
|
||||||
"item.prettypipes.redstone_module": "Redstone Module",
|
"item.prettypipes.redstone_module": "Redstone Module",
|
||||||
"item.prettypipes.filter_increase_modifier": "Filter Increase Modifier",
|
"item.prettypipes.filter_increase_modifier": "Filter Increase Modifier",
|
||||||
"info.prettypipes.extraction_module": "Pulls items from adjacent inventories\nFilters and pull rates vary by tier\nHigh tiers prevent over-sending",
|
"info.prettypipes.extraction_module": "Pulls items from adjacent inventories\nFilters and pull rates vary by tier\nHigh tiers prevent over-sending",
|
||||||
|
@ -36,6 +37,7 @@
|
||||||
"info.prettypipes.damage_filter_modifier": "Causes any filter slots to filter by item damage",
|
"info.prettypipes.damage_filter_modifier": "Causes any filter slots to filter by item damage",
|
||||||
"info.prettypipes.nbt_filter_modifier": "Causes any filter slots to filter by item data (NBT)",
|
"info.prettypipes.nbt_filter_modifier": "Causes any filter slots to filter by item data (NBT)",
|
||||||
"info.prettypipes.tag_filter_modifier": "Causes any filter slots to filter by tags\n(Modern equivalent of the Ore Dictionary)",
|
"info.prettypipes.tag_filter_modifier": "Causes any filter slots to filter by tags\n(Modern equivalent of the Ore Dictionary)",
|
||||||
|
"info.prettypipes.mod_filter_modifier": "Causes any filter slots to filter by mod",
|
||||||
"info.prettypipes.redstone_module": "Allows disabling the pipe with a redstone signal\nWorks for both extraction and retrieval",
|
"info.prettypipes.redstone_module": "Allows disabling the pipe with a redstone signal\nWorks for both extraction and retrieval",
|
||||||
"info.prettypipes.item_terminal": "Allows viewing and requesting all items in a pipe network\nAlso has slots for putting items into the network",
|
"info.prettypipes.item_terminal": "Allows viewing and requesting all items in a pipe network\nAlso has slots for putting items into the network",
|
||||||
"info.prettypipes.crafting_terminal": "Allows requesting ingredients for crafting recipes\nSupports auto-filling from JEI if installed",
|
"info.prettypipes.crafting_terminal": "Allows requesting ingredients for crafting recipes\nSupports auto-filling from JEI if installed",
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "prettypipes:item/mod_filter_modifier"
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 310 B |
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
" H ",
|
||||||
|
"RMR",
|
||||||
|
" R "
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"R": {
|
||||||
|
"item": "minecraft:redstone"
|
||||||
|
},
|
||||||
|
"H": {
|
||||||
|
"item": "minecraft:anvil"
|
||||||
|
},
|
||||||
|
"M": {
|
||||||
|
"item": "prettypipes:blank_module"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "prettypipes:mod_filter_modifier"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue