feat: support translation key format resource pack desc#5965
feat: support translation key format resource pack desc#5965pynickle wants to merge 12 commits intoHMCL-dev:mainfrom
Conversation
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request implements localized description resolution for resource packs and refactors locale mapping to align with Minecraft's language tagging. Key updates include the introduction of ResourcepackDescriptionResolver to handle translated metadata, enhancements to LocaleUtils for identifying Minecraft-specific language files, and the propagation of locale information through the resource pack loading process. Review feedback recommends specifying UTF-8 encoding for metadata files to ensure cross-platform compatibility, optimizing loops by hoisting invariant calculations, and utilizing input streams for JSON parsing to improve memory efficiency.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds support for translated resource pack descriptions by implementing a ResourcepackDescriptionResolver and updating the loading logic to handle the translate field in pack.mcmeta. It also refactors language tag normalization and adds Minecraft-specific language file utilities to LocaleUtils. Review feedback highlights redundant JSON parsing, potential null pointer exceptions in the resolution logic, and the need for caching translation lookups to improve performance.
支持对 translation key 格式简介的资源包解析: