Make NBSP character display as a space. MC-2595 (#3522)

Add easy getter for the Locale: MinecraftForgeClient.getLocale()
This commit is contained in:
James Mitchell authored and LexManos committed 2016-12-17 13:27:45 -08:00
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
{