mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Temporary Debug info
This commit is contained in:
parent
ecc88fac06
commit
1db0792d7b
1 changed files with 28 additions and 9 deletions
|
|
@ -451,6 +451,8 @@ namespace MinecraftClient.Protocol.Message
|
||||||
{
|
{
|
||||||
object[] extras = (object[])value;
|
object[] extras = (object[])value;
|
||||||
for (int i = 0; i < extras.Length; i++)
|
for (int i = 0; i < extras.Length; i++)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var extraDict = extras[i] is string
|
var extraDict = extras[i] is string
|
||||||
? new Dictionary<string, object>() { { "text", (string)extras[i] } }
|
? new Dictionary<string, object>() { { "text", (string)extras[i] } }
|
||||||
|
|
@ -458,6 +460,13 @@ namespace MinecraftClient.Protocol.Message
|
||||||
|
|
||||||
extraBuilder.Append(NbtToString(extraDict) + "§r");
|
extraBuilder.Append(NbtToString(extraDict) + "§r");
|
||||||
}
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
ConsoleIO.WriteLine("[DEBUG] Full object:" + JsonSerializer.Serialize(extras));
|
||||||
|
ConsoleIO.WriteLine("[DEBUG] Value in question:" + JsonSerializer.Serialize(extras[i]));
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "translate":
|
case "translate":
|
||||||
|
|
@ -470,6 +479,8 @@ namespace MinecraftClient.Protocol.Message
|
||||||
{
|
{
|
||||||
var withs = (object[])withComponent;
|
var withs = (object[])withComponent;
|
||||||
for (int i = 0; i < withs.Length; i++)
|
for (int i = 0; i < withs.Length; i++)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var withDict = withs[i] is string
|
var withDict = withs[i] is string
|
||||||
? new Dictionary<string, object>() { { "text", (string)withs[i] } }
|
? new Dictionary<string, object>() { { "text", (string)withs[i] } }
|
||||||
|
|
@ -477,6 +488,14 @@ namespace MinecraftClient.Protocol.Message
|
||||||
|
|
||||||
translateString.Add(NbtToString(withDict));
|
translateString.Add(NbtToString(withDict));
|
||||||
}
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
ConsoleIO.WriteLine("[DEBUG] Full object:" + JsonSerializer.Serialize(withs));
|
||||||
|
ConsoleIO.WriteLine("[DEBUG] Value in question:" + JsonSerializer.Serialize(withs[i]));
|
||||||
|
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
message = TranslateString(translateKey, translateString);
|
message = TranslateString(translateKey, translateString);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue