Skip to content

Commit aa5c6de

Browse files
authored
Merge pull request #137 from Forever-178/getTranslationKey
Override method 'getTranslationKey'
2 parents e022619 + 9784965 commit aa5c6de

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/hellfirepvp/modularmachinery/common/item/ItemBlockCustomName.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,13 @@ public int getMetadata(int damage) {
3636

3737
@Nonnull
3838
@Override
39-
public String getUnlocalizedNameInefficiently(@Nonnull ItemStack stack) {
39+
public String getTranslationKey(@Nonnull ItemStack stack)
40+
{
4041
Block block = getBlock();
4142
if (block instanceof BlockCustomName) {
4243
String identifier = ((BlockCustomName) block).getIdentifierForMeta(stack.getItemDamage());
43-
return super.getUnlocalizedNameInefficiently(stack) + "." + identifier;
44+
return super.getTranslationKey(stack) + "." + identifier;
4445
}
45-
return super.getUnlocalizedNameInefficiently(stack);
46+
return super.getTranslationKey(stack);
4647
}
4748
}

0 commit comments

Comments
 (0)