Jade ๐Ÿ”

Jade ๐Ÿ”

45M Downloads

[1.16.5] Block Name Format Error

SihenZhang opened this issue ยท 0 comments

commented
  • Forge Version: 36.1.24
  • Mod Version: 1.16.4-2.7.2
  • Can you reproduce this issue with relevant mods only?: yes

When looking at a block which name has parameters, Jade will show "Format error" while The One Probe will show correctly.
2021-07-21_17 46 35
The reason is that Jade uses the I18n.format method to get the block name directly.

String key = accessor.getBlock().getTranslationKey();
if (I18n.hasKey(key)) {
name = I18n.format(key);

However, The One Probe gets the block as an ItemStack first, and then gets the name of the ItemStack.
https://github.com/McJtyMods/TheOneProbe/blob/148f5013fb01a7eceea5bbd625fe8f9bb605775a/src/main/java/mcjty/theoneprobe/apiimpl/providers/DefaultProbeInfoProvider.java#L383-L390
https://github.com/McJtyMods/TheOneProbe/blob/148f5013fb01a7eceea5bbd625fe8f9bb605775a/src/main/java/mcjty/theoneprobe/apiimpl/elements/ElementItemLabel.java#L28-L32