mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Merge pull request #107 from Pokechu22/update-language-files
Update to 1.8's language files.
This commit is contained in:
commit
bd3f75cfc5
2 changed files with 9 additions and 8 deletions
|
|
@ -85,12 +85,13 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
ConsoleIO.WriteLine("Downloading '" + Settings.Language + ".lang' from Mojang servers...");
|
ConsoleIO.WriteLine("Downloading '" + Settings.Language + ".lang' from Mojang servers...");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string assets_index = downloadString(Settings.TranslationsFile_Website_Index);
|
string assets_index = downloadString(Settings.TranslationsFile_Website_Index);
|
||||||
string[] tmp = assets_index.Split(new string[] { "lang/" + Settings.Language + ".lang" }, StringSplitOptions.None);
|
string[] tmp = assets_index.Split(new string[] { "minecraft/lang/" + Settings.Language + ".lang" }, StringSplitOptions.None);
|
||||||
tmp = tmp[1].Split(new string[] { "hash\": \"" }, StringSplitOptions.None);
|
tmp = tmp[1].Split(new string[] { "hash\": \"" }, StringSplitOptions.None);
|
||||||
string hash = tmp[1].Split('"')[0]; //Translations file identifier on Mojang's servers
|
string hash = tmp[1].Split('"')[0]; //Translations file identifier on Mojang's servers
|
||||||
System.IO.File.WriteAllText(Language_File, downloadString(Settings.TranslationsFile_Website_Download + '/' + hash.Substring(0, 2) + '/' + hash));
|
System.IO.File.WriteAllText(Language_File, downloadString(Settings.TranslationsFile_Website_Download + '/' + hash.Substring(0, 2) + '/' + hash));
|
||||||
ConsoleIO.WriteLine("Done. File saved as '" + Language_File + '\'');
|
Console.WriteLine(hash);
|
||||||
|
ConsoleIO.WriteLine("Done. File saved as '" + Language_File + '\'');
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,8 @@ namespace MinecraftClient
|
||||||
public static string ProxyPassword = "";
|
public static string ProxyPassword = "";
|
||||||
|
|
||||||
//Other Settings
|
//Other Settings
|
||||||
public static string TranslationsFile_FromMCDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\.minecraft\assets\objects\9e\9e2fdc43fc1c7024ff5922b998fadb2971a64ee0"; //MC 1.7.4 en_GB.lang
|
public static string TranslationsFile_FromMCDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\.minecraft\assets\objects\03\03f31164d234f10a3230611656332f1756e570a9"; //MC 1.8 en_GB.lang
|
||||||
public static string TranslationsFile_Website_Index = "https://s3.amazonaws.com/Minecraft.Download/indexes/1.7.4.json";
|
public static string TranslationsFile_Website_Index = "https://s3.amazonaws.com/Minecraft.Download/indexes/1.8.json";
|
||||||
public static string TranslationsFile_Website_Download = "http://resources.download.minecraft.net";
|
public static string TranslationsFile_Website_Download = "http://resources.download.minecraft.net";
|
||||||
public static TimeSpan splitMessageDelay = TimeSpan.FromSeconds(2);
|
public static TimeSpan splitMessageDelay = TimeSpan.FromSeconds(2);
|
||||||
public static List<string> Bots_Owners = new List<string>();
|
public static List<string> Bots_Owners = new List<string>();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue