Creators-of-Create / Create

[Forge Mod] Building Tools and Aesthetic Technology
MIT License
2.87k stars 899 forks source link

Bring back the "Group" attribute for attribute filters in the newest version. #6314

Closed AV1rgin closed 2 months ago

AV1rgin commented 6 months ago

Describe the Suggestion

The Group filter attribute was the most useful when creating sorting machines, alas since the 1.20 update it seems this feature is not present anymore.

Screenshots and Videos

No response

Additional Context

No response

AV1rgin commented 6 months ago

I realized that this may be due to the updated creative tab from the 1.20 update.

HateMeLikeAPro commented 5 months ago

I did some digging through the code, and found that in CreativeModeInventoryScreen there is this snippet that vanilla uses to render the creative tab name into the tooltip for the current hovered over item.

for(CreativeModeTab creativemodetab : CreativeModeTabs.tabs()) {
    if (!creativemodetab.hasSearchBar() && creativemodetab.contains(pStack)) {
        list1.add(i++, creativemodetab.getDisplayName().copy().withStyle(ChatFormatting.BLUE));
    }
}

(this comes from the function public List<Component> getTooltipFromContainerItem(ItemStack pStack), I used parchment mappings so the names might be different for you if you don't)