Mystical Agriculture

Mystical Agriculture

86M Downloads

[1.16.5] Crop names aren't localized (botany pots)

ocram9 opened this issue ยท 3 comments

commented

Describe the bug
When looking at a mystical agriculture crop in a botany pot with jade(hywla) the crop names aren't localized (same issue as #316)

To Reproduce
Steps to reproduce the behavior:

  1. Install mystical agriculture, botany pots and jade.
  2. Put a seed in the botany pot.
  3. Look at the botany pot with jade.

Versions:

  • Minecraft: 1.16.5
  • Forge: 31.1.24
  • Cucumber: 4.1.9
  • Mystical Agriculture: 4.1.8
  • Botany pots: 7.0.18
  • Jade 2.7.1
commented

This would be an issue on their end as they seem to be using getTranslationKey instead of getDisplayName for their tooltips.

commented

Funny, almost exactly one years ago I reported the same issue to botany pots and it turned out it was this mod that needed to fix it and now I report it here first and it's the other way around. Seems we've come full circle xD

Anyway, I reported it to Botany Pots as well, thanks!

commented

@BlakeBr0 I looked into this issue and it seems to be on your end still. I only have a BlockState to work from and no ItemStack context. Both Block#getTranslationKey and Block#getTranslatedName return an undefined translationKey. I believe the appropriate fix would be to override getTranslationKey in your block and pull the name from the internal crop data.

Additional note: getTranslatedName is a client only method and The One Probe generates tooltips on only the server, so it can not be reliably used here.