diff --git a/CHANGELOG.md b/CHANGELOG.md index 9218479..9c7b3d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning]. ### Fixed - a compat issue on Fabric when REI is present +- items being hidden when they are the only entry in a tag ## [0.0.6] - 2022-09-02 diff --git a/Common/src/main/java/com/almostreliable/unified/compat/HideHelper.java b/Common/src/main/java/com/almostreliable/unified/compat/HideHelper.java index da37d55..47f8eaf 100644 --- a/Common/src/main/java/com/almostreliable/unified/compat/HideHelper.java +++ b/Common/src/main/java/com/almostreliable/unified/compat/HideHelper.java @@ -1,7 +1,6 @@ package com.almostreliable.unified.compat; import com.almostreliable.unified.AlmostUnified; -import com.almostreliable.unified.config.Config; import com.almostreliable.unified.config.UnifyConfig; import com.almostreliable.unified.utils.ReplacementMap; import com.almostreliable.unified.utils.TagMap; @@ -11,10 +10,7 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; -import java.util.Collection; -import java.util.List; -import java.util.Objects; -import java.util.Set; +import java.util.*; import java.util.stream.Collectors; public class HideHelper { @@ -26,6 +22,8 @@ public class HideHelper { return tagMap.getTags().stream().map(unifyTag -> { Collection itemsByTag = tagMap.getItems(unifyTag); + if (itemsByTag.size() <= 1) return new ArrayList(); + Set replacements = itemsByTag .stream() .map(repMap::getReplacementForItem)