Add non-emoji representation for /chunk status

This commit is contained in:
BruceChen 2022-09-08 14:55:41 +08:00
parent b976550828
commit bfd01a5f78
4 changed files with 14 additions and 5 deletions

View file

@ -133,6 +133,11 @@ namespace MinecraftClient.Commands
rightMost = Math.Max(rightMost, markChunkX);
}
// \ud83d\udd33: 🔳, \ud83d\udfe8: 🟨, \ud83d\udfe9: 🟩, \u25A1: □, \u25A3: ▣, \u25A0: ■
string[] chunkStatusStr = Settings.EnableEmoji ?
new string[] { "\ud83d\udd33", "\ud83d\udfe8", "\ud83d\udfe9" } : new string[] { "\u25A1", "\u25A3", "\u25A0" };
// Output
for (int z = topMost; z <= bottomMost; ++z)
{
@ -145,11 +150,11 @@ namespace MinecraftClient.Commands
ChunkColumn? chunkColumn = world[x, z];
if (chunkColumn == null)
sb.Append("\ud83d\udd33"); // "🔳" white hollow square
sb.Append(chunkStatusStr[0]);
else if (chunkColumn.FullyLoaded)
sb.Append("\ud83d\udfe9"); // "🟩" green
sb.Append(chunkStatusStr[2]);
else
sb.Append("\ud83d\udfe8"); // "🟨" yellow
sb.Append(chunkStatusStr[1]);
if ((z == current.ChunkZ && x == current.ChunkX) || (z == markChunkZ && x == markChunkX))
sb.Append("§r"); // Reset background color
@ -157,7 +162,8 @@ namespace MinecraftClient.Commands
sb.Append('\n');
}
sb.Append("Player:§z §r, MarkedChunk:§w §r, NotReceived:\ud83d\udd33, Loading:\ud83d\udfe8, Loaded:\ud83d\udfe9");
sb.Append("Player:§z §r, MarkedChunk:§w §r, ");
sb.Append(string.Format("NotReceived:{0}, Loading:{1}, Loaded:{2}", chunkStatusStr[0], chunkStatusStr[1], chunkStatusStr[2]));
return sb.ToString();
}
else if (args[0] == "setloading") // For debugging

View file

@ -48,6 +48,7 @@ autorespawn=false # Toggle auto respawn if client player was de
minecraftrealms=false # Enable support for joining Minecraft Realms worlds
moveheadwhilewalking=true # Enable head movement while walking to avoid anti-cheat triggers
timeout=30 # Set a custom timeout in seconds (Default: 30). Use only if you know what you're doing.
enableemoji=true # If turned off, the emoji will be replaced with a simpler character (for /chunk status)
[Signature]
# Chat settings (affects minecraft 1.19+)

View file

@ -228,7 +228,7 @@ cmd.changeSlot.changed=Changed to slot {0}
cmd.changeSlot.fail=Could not change slot
# Chunk
cmd.chunk.desc=Displays the chunk loading status.
cmd.chunk.desc=Displays the chunk loading status.\nChange enableemoji=false in the settings if the display is confusing.
# Connect
cmd.connect.desc=connect to the specified server.

View file

@ -109,6 +109,7 @@ namespace MinecraftClient
public static bool MinecraftRealmsEnabled = true;
public static bool MoveHeadWhileWalking = true;
public static int Timeout = 30;
public static bool EnableEmoji = true;
// Signature
public static bool LoginWithSecureProfile = true;
@ -388,6 +389,7 @@ namespace MinecraftClient
case "minecraftrealms": MinecraftRealmsEnabled = str2bool(argValue); return true;
case "moveheadwhilewalking": MoveHeadWhileWalking = str2bool(argValue); return true;
case "timeout": Timeout = str2int(argValue); return true;
case "enableemoji": EnableEmoji = str2bool(argValue); return true;
case "botowners":
Bots_Owners.Clear();