Modonomicon

Modonomicon

1M Downloads

Book link tooltips not fetching the actual linked entries name

DaFuqs opened this issue ยท 2 comments

commented

Describe the bug
The tooltips seem to be hardcoded to use the translation string book.<mod_id>.<book_id>.<category_id>.<entry_id>.name, instead of fetching the actual translation string set in that entries json.

To reproduce
When moving an entry from one folder to the other, I noticed the tooltips to that entry breaking.
I moved the entry magical_blocks/midnight_solution from the category magical_blocks to the general category, but did not update the category and translation strings to match the new location yet. (Since translations and location should not be connected).

This broke the tooltips in every entry that linked to it.

For reference the entry content of general/midnight_solution:

{
  "name": "book.spectrum.guidebook.magical_blocks.midnight_solution.name",
  "category": "spectrum:magical_blocks",
  "icon": "spectrum:midnight_solution_bucket",
  [...]
}

Expected behavior
The tooltip fetching the name of the corresponding entry

Screenshots
A link to the entry with id general/midnight_solution. The tooltip wants to resolve that tooltip translation as book.<mod_id>.<book_id>.<category_id>.<entry_id>.name, instead of using the actual entry translation string set in the targets entry json.
image

System (please complete the following information):

  • Modonomicon Version: 1.64.0; Fabric
  • OS: Windows
  • Minecraft Version: 1.20.1
  • Modpack Link and Version, or list of mods: Just Modonomicon & Spectrum
commented

Ok after a quick look I think that can be worked around.
Initially when the feature was added there was no guarantee that the entry would already be available in data, but now with multi phase loading it should be safe to query the entry and get its component

commented

Related to #183.
And I suspect the same underlying reason, I have to check that