mirror of
https://github.com/AlmostReliable/almostunified.git
synced 2024-12-01 03:47:08 -05:00
parent
3009c440e9
commit
9e0c36bf7b
1 changed files with 4 additions and 1 deletions
|
@ -25,7 +25,10 @@ public class HideHelper {
|
|||
|
||||
return filteredTagMap.getTags().stream().map(unifyTag -> {
|
||||
Collection<ResourceLocation> itemsByTag = filteredTagMap.getItems(unifyTag);
|
||||
if (itemsByTag.size() <= 1) return new ArrayList<ItemStack>();
|
||||
|
||||
// avoid hiding single entries and tags that only contain the same namespace for all items
|
||||
long namespaces = itemsByTag.stream().map(ResourceLocation::getNamespace).distinct().count();
|
||||
if (namespaces <= 1) return new ArrayList<ItemStack>();
|
||||
|
||||
Set<ResourceLocation> replacements = itemsByTag
|
||||
.stream()
|
||||
|
|
Loading…
Reference in a new issue