
[Mod Compat] EmiTooltipMetadata API fails when other mods add components before title
AHilyard opened this issue · 0 comments
When other mods (e.g., Legendary Tooltips) prepend custom tooltip components before the item name/title, EMI’s EmiTextTooltipWrapper assumes the first line is the item’s title and fails to attach context data.
Reproduction Steps
- Install EMI alongside Legendary Tooltips.
- Find an item in the sidebar that displays a 3D item model, such as a weapon or armor, and click it. (I recommend a mace because it should also have border decorations by default)
- Note that the tooltip rendered by EMI in the recipe window lacks a title separator and applicable decorations, whereas tooltips without a 3D item model render properly.
Proposed Solution
- Insert a non-rendering marker component that contains contextual information towards the end of the tooltip component list instead of using a wrapper component.
- EmiTooltipMetadata can then search backwards from the end of the list to find this marker instead of checking the first component.
Thank you!