From 54477583bf65da771428731b381a79ded400bd87 Mon Sep 17 00:00:00 2001 From: iouter <62897714+iouter@users.noreply.github.com> Date: Thu, 13 Oct 2022 00:54:33 +0800 Subject: fix comb localization (#1454) --- src/main/java/gregtech/common/items/CombType.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/main/java/gregtech/common') diff --git a/src/main/java/gregtech/common/items/CombType.java b/src/main/java/gregtech/common/items/CombType.java index 378ec4bdeb..8da914ddf3 100644 --- a/src/main/java/gregtech/common/items/CombType.java +++ b/src/main/java/gregtech/common/items/CombType.java @@ -209,6 +209,7 @@ public enum CombType { private final int id; private final String name; + private final String localizedName; private final int[] color; CombType(String pName, boolean show, Materials material, int chance, int... color) { @@ -218,6 +219,8 @@ public enum CombType { this.chance = chance; this.showInList = show; this.color = color; + this.localizedName = GT_LanguageManager.addStringLocalization( + "comb." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Comb"); } CombType(int id, String pName, boolean show, Materials material, int chance, int... color) { @@ -228,6 +231,8 @@ public enum CombType { this.chance = chance; this.showInList = show; this.color = color; + this.localizedName = GT_LanguageManager.addStringLocalization( + "comb." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Comb"); } public void setHidden() { @@ -236,8 +241,7 @@ public enum CombType { public String getName() { - return GT_LanguageManager.addStringLocalization( - "comb." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Comb"); + return this.localizedName; } public int[] getColours() { -- cgit