Better translation

This commit is contained in:
BruceChen 2022-10-17 20:00:33 +08:00
parent bce2bc8b7f
commit 117a38b5f9
21 changed files with 95 additions and 156 deletions

View file

@ -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;
}
}
}