Curios API (Forge/NeoForge)

Curios API (Forge/NeoForge)

204M Downloads

[1.21] Issues with Attribute tooltips on Curio items

Shadows-of-Fire opened this issue ยท 0 comments

commented

Curios does not fire the GatherSkippedAttributeTooltipsEvent, which means that attribute modifiers on Curios cannot be hidden (i.e. allowing a mod to display them externally). The only check curios employs is a player != null check here:

if (player != null) {
AttributeUtil.applyTextFor(stack, attributesTooltip::add, attributes,
AttributeTooltipContext.of(player, context, evt.getFlags()));
}

On top of that, Curios adds the attribute tooltips using the ItemTooltipEvent, which is fired after all tooltips have been processed. This often leads to some unfortunate tooltip positions, such as elements being above or below other depending on various things (like event priority or registration order).

Curios should apply attribute tooltips during the AddAttributeTooltipsEvent so that the curio-added attribute tooltips are always positioned at the same location the vanilla attribute tooltips would be.