mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 08:17:35 +00:00
Make NBSP character display as a space. MC-2595 (#3522)
Add easy getter for the Locale: MinecraftForgeClient.getLocale()
This commit is contained in:
1 parent
bdcfefeb42
commit
b9ebc44790
3 files changed
+55
-9
No files matched your search
@@ -25,8 +25,10 @@
|
||||
package net.minecraftforge.client;
|
||||
|
||||
import java.util.BitSet;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.ChunkCache;
|
||||
@@ -50,6 +52,15 @@ public class MinecraftForgeClient
|
||||
return ForgeHooksClient.renderLayer.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the Locale set by the player in Minecraft.
|
||||
* Useful for creating string and number formatters.
|
||||
*/
|
||||
public static Locale getLocale()
|
||||
{
|
||||
return Minecraft.getMinecraft().getLanguageManager().getCurrentLanguage().getJavaLocale();
|
||||
}
|
||||
|
||||
private static BitSet stencilBits = new BitSet(8);
|
||||
static
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user