Skip to content

Commit

Permalink
update getting a server / world name filtering out non-US Locale char…
Browse files Browse the repository at this point in the history
…acters (Hopefully)
  • Loading branch information
sakura-ryoko committed Feb 6, 2025
1 parent 9ba80f1 commit 8332bb1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/fi/dy/masa/malilib/util/StringUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,9 @@ public static String getWorldOrServerName()
// This used to be just MinecraftServer::getLevelName().
// Getting the name would now require an @Accessor for MinecraftServer.field_23784
String name = server.getSaveProperties().getLevelName();
return FileUtils.generateSimpleSafeFileName(name);
// todo this was probably breaking non-US Locale file names
//return FileUtils.generateSimpleSafeFileName(name);
return FileUtils.generateSafeFileName(name);
}
}
else
Expand Down Expand Up @@ -825,7 +827,6 @@ public static int getStringWidth(String text)
public static void drawString(int x, int y, int color, String text, DrawContext drawContext)
{
drawContext.drawText(net.minecraft.client.MinecraftClient.getInstance().textRenderer, text, x, y, color, false);
//RenderUtils.forceDraw(drawContext);
}

/**
Expand Down

0 comments on commit 8332bb1

Please sign in to comment.