Fix ME Interface Terminal localization (#522)

This commit is contained in:
Forever-178
2025-03-10 14:06:22 +08:00
committed by GitHub
parent 37e7c02c3c
commit 9749faa692
3 changed files with 14 additions and 3 deletions
@@ -1455,7 +1455,13 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
}
if (what.getItem() != Items.AIR) {
return what.getItem().getItemStackDisplayName(what);
/* getTranslationKey() and getUnlocalizedNameInefficiently() have different return values in some mod
* For the Thermal Expansion
* getTranslationKey() returns complete key ending with ".name".
* getUnlocalizedNameInefficiently() returns localized name
* Because CoFH Core overrides method getTranslationKey()
*/
return what.getItem().getTranslationKey(what);
}
final Item item = Item.getItemFromBlock(directedBlock);