Installation command
!!MCDR plugin install llm_translatorAuthor
Repository
Homepage
Synced at
...
Last update
...
Latest version
Total downloads
373
Back to catalogue
LLM-Translator
The development inspiration for this plugin comes from the MCDR plugin SimpleTranslator - Plugin Repository - MCDReforged
Uses Large Language Models to provide in-game translation for player chat messages, sign text, and book content.
The plugin uses the deepseek-chat large language model for translation by default.
Installation
-
Install MCDReforged (Python 3.8+).
-
Install the Python dependencies in the Python environment MCDR runs on:
python -m pip install openai nbtlib- The
requirements.txtinside the.mcdrarchive is only used for a version check at load time; MCDR does not install it automatically. When deploying from source you can runpython -m pip install -r requirements.txt. - Use the Python interpreter that runs MCDR (the bundled Python for the all-in-one Windows build).
- On Python 3.8, use
python -m pip install "openai<2" nbtlibif the install fails.
- The
-
Install the required plugin MinecraftDataAPI (plugin id
minecraft_data_api, version >= 1.4.0). Run!!MCDR plugin install minecraft_data_apiin the console, or download it from the plugin catalogue into thepluginsdirectory. -
Put
llm-translator-1.6.1.mcdrinto thepluginsdirectory, then run!!MCDR plugin load llm-translator-1.6.1.mcdror restart MCDR.
If loading fails, check the log:
| Log | Cause and fix |
|---|---|
Unsatisfied Python library requirement ... required package 'openai' not installed | Dependencies missing in MCDR's Python environment; do step 2 |
Dependency minecraft_data_api not found | Required plugin missing; do step 3 |
Introduction
When players speak different languages on the server, this plugin can significantly improve communication. Supports synchronized forwarding of translated player chat messages across multiple servers. Using LLM translation offers higher accuracy and better adaptability compared to traditional machine translation. Supports translating the following in-game:
- Player chat messages
- Text on Signs
- Book content on Lecterns
- The sign or lectern book you are looking at (no coordinates needed)
Configuration
-
After the plugin is successfully loaded for the first time, a configuration file will be generated in the
/config/llm-translator/folder. -
The configuration file uses the
deepseek-chatmodel for Chinese-English translation by default. If this meets your needs, simply enter your API key in theapi_keyfield. Otherwise, please modify the configuration file as described below.{ "first_language": "zh_cn", "secondary_language": "en_us", "base_url": "https://api.deepseek.com", "model": "deepseek-chat", "api_key": "enter-your-api-key", "enable_system_prompt": true, "look_translate_max_distance": 6.0, "is_proxy_to_other_servers": false, "proxy_servers": [ { "address": "127.0.0.1", "port": 25575, "password": "" }, { "address": "127.0.0.1", "port": 25576, "password": "" } ] }
| Field Name | Data Type | Default Value | Description |
|---|---|---|---|
| first_language | string | "zh_cn" | The primary language, usually the user's native or main language. |
| secondary_language | string | "en_us" | The secondary language, the target language for translation. |
| base_url | string | "https://api.deepseek.com" | The base request URL for the API. |
| model | string | "deepseek-chat" | The name of the language model to use. |
| api_key | string | No default | The API access key. |
| enable_system_prompt | boolean | true | Whether to enable system prompt. |
| system_prompt | string | Built-in | Custom system prompt, supports {first_language} and {secondary_language} placeholders. When omitted, the built-in Minecraft/TMC SOP prompt is used. |
| look_translate_max_distance | float | 6.0 | Maximum raycast distance (blocks) for crosshair translation. Requires RCON. |
| is_proxy_to_other_servers | boolean | false | Whether to forward translated chat messages to other servers. |
| proxy_servers | list[dict] | [] | List of target server configurations for forwarding. Requires RCON. |
proxy_servers RCON server configuration:
| Field Name | Data Type | Default Value | Description |
|---|---|---|---|
| address | string | "127.0.0.1" | The address of the target server. |
| port | int | No default | The RCON port of the target server. |
| password | string | "" | The RCON password for the target server (if required). |
Configuration Notes
-
Basic Setup: Just fill in the
api_keyto use the default DeepSeek model for Chinese-English player chat translation. -
Other Language Pairs: Modify
first_languageandsecondary_languageto support other language pairs. -
Multiple Model Support: Change
base_urlandmodelto switch to other LLM providers. -
System Prompt Customization: Use
enable_system_promptto control whether to use system prompts, andsystem_promptto customize translation prompts.{first_language}and{secondary_language}are expanded to a readable language name plus code (e.g.Chinese (Simplified) (zh_cn)). The built-in prompt is concise and states the translation direction explicitly. On first load, an unmodified legacy built-in prompt inconfig.jsonis replaced automatically; custom prompts are left untouched. -
Chat Message Forwarding: To forward translated player messages to other servers (typically used in setups like Velocity with multiple backend servers and pre-configured chat forwarding), set
is_proxy_to_other_serverstotrueand configure theproxy_serverslist.
Usage
In-game operation notices are in English;
!!helpentries are bilingual (Chinese / English).
Player Chat Translation
In the game chat, prefix your message with t and a space to translate it.
Sign and Book Translation
Book Content: The book must be placed on a Lectern to be translated.
Use the command !!tr <x> <y> <z> to translate (the parameters are the coordinates of the sign or the book on a lectern; you can use ~ to represent the current player's coordinates).
You can also look at a sign or a lectern book and run !!tr without parameters. The plugin raycasts along your line of sight and translates the target it finds. This requires RCON to be enabled in the MCDR configuration (matching enable-rcon, rcon.port and rcon.password in the server's server.properties). The maximum detection distance is controlled by look_translate_max_distance.
Other
This is my first time developing a plugin, so there might be imperfections or areas for improvement. If you encounter bugs or have suggestions while using it, please feel free to submit an Issue on the plugin's Github repository.
Introduction source: README_EN.md