Fix wrong capitalization of item names (Fixes #549, #557)

Regression caused from change in ed642ccf
This commit is contained in:
Phoenix616 2023-06-17 14:53:47 +01:00
parent dc6aa21a91
commit 54cc1ce842
No known key found for this signature in database
GPG Key ID: 40E2321E71738EB0
1 changed files with 1 additions and 1 deletions

View File

@ -292,7 +292,7 @@ public class MaterialUtil {
* @return The name shortened to the max length
*/
public static String getShortenedName(String itemName, int maxWidth) {
itemName = StringUtil.capitalizeFirstLetter(itemName, '_');
itemName = StringUtil.capitalizeFirstLetter(itemName.replace('_', ' '), ' ');
int width = getMinecraftStringWidth(itemName);
if (width <= maxWidth) {
return itemName;