This commit is contained in:
BruceChen 2022-10-07 21:49:05 +08:00
parent 77d858dc35
commit c1a04fe5bf
12 changed files with 57 additions and 27 deletions

View file

@ -32,16 +32,16 @@ namespace MinecraftClient.Commands
sb.Append(World.GetChunkLoadingStatus(handler.GetWorld()));
sb.Append('\n');
sb.Append(String.Format("Current location{0}, chunk: ({1}, {2}).\n", current, current.ChunkX, current.ChunkZ));
sb.AppendLine(Translations.Get("cmd.chunk.current", current, current.ChunkX, current.ChunkZ));
if (markedChunkPos != null)
{
sb.Append("Marked location: ");
sb.Append(Translations.Get("cmd.chunk.marked"));
if (args.Length == 1 + 3)
sb.Append(String.Format("X:{0:0.00} Y:{1:0.00} Z:{2:0.00}, ",
double.Parse(args[1], NumberStyles.Any, CultureInfo.CurrentCulture),
double.Parse(args[2], NumberStyles.Any, CultureInfo.CurrentCulture),
double.Parse(args[3], NumberStyles.Any, CultureInfo.CurrentCulture)));
sb.Append(String.Format("chunk: ({0}, {1}).\n", markChunkX, markChunkZ));
sb.AppendLine(Translations.Get("cmd.chunk.chunk_pos", markChunkX, markChunkZ));;
}
int consoleHeight = Math.Max(Console.BufferHeight - 2, 25);
@ -127,7 +127,7 @@ namespace MinecraftClient.Commands
if (markedChunkPos != null &&
(((Math.Max(bottomMost, markChunkZ) - Math.Min(topMost, markChunkZ) + 1) > consoleHeight) ||
((Math.Max(rightMost, markChunkX) - Math.Min(leftMost, markChunkX) + 1) > consoleWidth)))
sb.Append("§x§0Since the marked chunk is outside the graph, it will not be displayed!§r\n");
sb.AppendLine(Translations.Get("cmd.chunk.outside"));
else
{
topMost = Math.Min(topMost, markChunkZ);
@ -165,8 +165,7 @@ namespace MinecraftClient.Commands
sb.Append('\n');
}
sb.Append("Player:§z §r, MarkedChunk:§w §r, ");
sb.Append(string.Format("NotReceived:{0}, Loading:{1}, Loaded:{2}", chunkStatusStr[0], chunkStatusStr[1], chunkStatusStr[2]));
sb.AppendLine(Translations.Get("cmd.chunk.icon", "§z §r", "§w §r", chunkStatusStr[0], chunkStatusStr[1], chunkStatusStr[2]));
return sb.ToString();
}
else if (args[0] == "setloading") // For debugging
@ -174,7 +173,7 @@ namespace MinecraftClient.Commands
Tuple<int, int>? chunkPos = ParseChunkPos(args);
if (chunkPos != null)
{
handler.Log.Info("§x§0This command is used for debugging, make sure you know what you are doing.§r");
handler.Log.Info(Translations.Get("cmd.chunk.for_debug"));
World world = handler.GetWorld();
(int chunkX, int chunkZ) = chunkPos;
ChunkColumn? chunkColumn = world[chunkX, chunkZ];
@ -191,7 +190,7 @@ namespace MinecraftClient.Commands
Tuple<int, int>? chunkPos = ParseChunkPos(args);
if (chunkPos != null)
{
handler.Log.Info("§x§0This command is used for debugging, make sure you know what you are doing.§r");
handler.Log.Info(Translations.Get("cmd.chunk.for_debug"));
World world = handler.GetWorld();
(int chunkX, int chunkZ) = chunkPos;
ChunkColumn? chunkColumn = world[chunkX, chunkZ];
@ -208,7 +207,7 @@ namespace MinecraftClient.Commands
Tuple<int, int>? chunkPos = ParseChunkPos(args);
if (chunkPos != null)
{
handler.Log.Info("§x§0This command is used for debugging, make sure you know what you are doing.§r");
handler.Log.Info(Translations.Get("cmd.chunk.for_debug"));
World world = handler.GetWorld();
(int chunkX, int chunkZ) = chunkPos;
world[chunkX, chunkZ] = null;