mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Better translation
This commit is contained in:
parent
bce2bc8b7f
commit
117a38b5f9
21 changed files with 95 additions and 156 deletions
|
|
@ -112,6 +112,13 @@ namespace MinecraftClient.Mapping
|
|||
blockIdAndMeta = typeAndMeta;
|
||||
}
|
||||
|
||||
public string GetTypeString()
|
||||
{
|
||||
string typeStr = Type.ToString();
|
||||
string? trans = Protocol.ChatParser.TranslateString("block.minecraft." + typeStr.ToUnderscoreCase());
|
||||
return string.IsNullOrEmpty(trans) ? typeStr : trans;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// String representation of the block
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -154,5 +154,12 @@ namespace MinecraftClient.Mapping
|
|||
Yaw = yaw * (1 / 256) * 360; // to angle in 360 degree
|
||||
Pitch = pitch * (1 / 256) * 360;
|
||||
}
|
||||
|
||||
public string GetTypeString()
|
||||
{
|
||||
string typeStr = Type.ToString();
|
||||
string? trans = Protocol.ChatParser.TranslateString("entity.minecraft." + typeStr.ToUnderscoreCase());
|
||||
return string.IsNullOrEmpty(trans) ? typeStr : trans;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ namespace MinecraftClient.Mapping
|
|||
|
||||
/// <summary>
|
||||
/// Parse location from the string.
|
||||
/// return NULL if the parsing fails.
|
||||
/// throw FormatException if the parsing fails.
|
||||
/// </summary>
|
||||
/// <param name="x">The string representation of the X-axis coordinate.</param>
|
||||
/// <param name="y">The string representation of the Y-axis coordinate.</param>
|
||||
|
|
@ -99,7 +99,7 @@ namespace MinecraftClient.Mapping
|
|||
|
||||
/// <summary>
|
||||
/// Parse location from the string (relative coordinate representation is supported).
|
||||
/// return NULL if the parsing fails.
|
||||
/// throw FormatException if the parsing fails.
|
||||
/// </summary>
|
||||
/// <param name="current">Relative position base point.</param>
|
||||
/// <param name="x">The string representation of the X-axis coordinate.</param>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue