Blank Rune not properly listed in en_US.lang, fails on Block.getLocalizedName
TeamDman opened this issue ยท 7 comments
calling getLocalizedName() on bloodstone blocks (and others) returns
tile.BloodMagic.bloodstonebrick..name
rather than
Blank Rune
Example code:
ChatUtil.sendNoSpam(player,new TextComponentTranslation(ModBlocks.bloodRune.getLocalizedName()));
ChatUtil.sendNoSpam(player,new TextComponentTranslation( Utils.getBlockForComponent(EnumAltarComponent.BLOODSTONE).getLocalizedName()));
ChatUtil.sendNoSpam(player, new TextComponentTranslation(I18n.format(new ItemStack(Utils.getBlockForComponent(EnumAltarComponent.BLOODSTONE)).getUnlocalizedName())));
still returns
tile.BloodMagic.bloodstonebrick.large
unless I am doing that wrong?
Is using I18n.format not manual localization compared to using .getLocalizedName()?
There is a major difference between getUnlocalizedName()
and getUnlocalizedName(ItemStack)
.
Thanks for your help!
Working code in case someone else stumbles across this:
ChatUtil.sendNoSpam(player, new TextComponentTranslation(I18n.format( new ItemStack(Utils.getBlockForComponent(EnumAltarComponent.BLOODSTONE)).getItem().getUnlocalizedName(new ItemStack(Utils.getBlockForComponent(EnumAltarComponent.BLOODSTONE)))) + ".name" ));