dsh-plugin-minecraft-devtest: A Clientless Minecraft Development & Testing Workbench

Introduction

A typical use case for DeepSeek Harness (DSH) is: after an AI model modifies code or a datapack, you need to verify it works correctly without opening the game client. Traditional approaches either rely on manually launching the client to test, or require maintaining complex local automation scripts. dsh-plugin-minecraft-devtest is a DSH plugin that wraps operations like “launching a headless Minecraft server, executing commands, controlling a player bot, and validating datapacks” into 12 tools that a model can invoke directly.

This plugin is maintained by huiyaoxingkong and categorized under “Workflow.” It solves the problem of “after an AI modifies code/datapacks, how do you know it actually works and meets expectations without opening the game client?”

Core Features

The plugin provides the following capabilities:

1. Headless Server Control

Start a server from an existing test server directory (server.jar / fabric-server-launch.jar / Forge/NeoForge’s run.bat / the project’s gradlew runServer), automatically handling EULA and offline mode, reusing the server’s existing port and RCON password, and waiting for Done (...) before returning.

Supported launch forms:
- Any version of server.jar (in-directory, out-of-directory, or a sibling server-<version>.jar are all accepted)
- Fabric launch jar
- Forge/NeoForge installer directory (run.bat or legacy executable Forge jar)
- Paper/Spigot/Purpur
- Gradle projects

2. RCON Command Layer

mcdt_command executes RCON commands on the test server started by the plugin and retrieves the text response. Use cases include:
- /data get
- /execute if
- /scoreboard
- /datapack list
- /reload

3. Player Bot (Mineflayer + Compatibility Layer)

mcdt_bot is a player bot interface covering versions 1.7.10–26.4, internally auto-selecting the implementation mode based on version:

  • legacy: 1.7.x in-house native 1.7 protocol bot
  • native: 1.8.8–26.1 Mineflayer + official window
  • emulated: 26.2/26.3 bundled upstream 26.3 protocol PR package (~13.7 MB)
  • emulated-future: 26.4 best-effort
  • unsupported: 26.5+ throws BOT_VERSION_UNSUPPORTED

4. Built-in Forge Test Bridge (1.20.1)

The plugin ships with a tiny Forge 1.20.1 test bridge mod (located at vendor/forge-bridge/), allowing vanilla-protocol test bots to join modded Forge test servers. NeoForge/other versions are not supported yet.

5. YAML Test Cards

Write a set of checks as a YAML card (commands + bot actions + assertions). The plugin executes them locally in sequence and only returns a pass/fail summary to the model.

6. One-Click Health Check

mcdt_quickcheck auto-detects datapack / mod project / test server, then runs “validate + start server + RCON + deploy & reload + log scan + bot smoke test” and returns a compact checklist.

7. Built-in Guide

mcdt_guide contains format tables, error meanings, and card syntax inline, reducing the model’s need to browse the web or dig through docs (saving tokens).

Installation & Activation

Install via the DSH plugin manager (target can be a local directory, an npm package name, or a github: URL):

plugin_manager action=install_bundle target=D:\path\to\dsh-plugin-minecraft-devtest
plugin_manager action=install_bundle target=dsh-plugin-minecraft-devtest

After installation, the plugin registers 12 mcdt_* tools. Verified on DSH 0.2.2-rc.5.

Tool Overview

  • mcdt_server: start / stop / status / logs
  • mcdt_command: execute RCON commands
  • mcdt_bot: player bot (1.7.10–26.4)
  • mcdt_bridge: Forge 1.20.1 test bridge
  • mcdt_datapack: scan / validate / deploy / reload / list datapacks
  • mcdt_test: run a YAML/JSON test card
  • mcdt_suite: run all test cards in a directory
  • mcdt_quickcheck: one-click health check
  • mcdt_init: scan a project and generate a test card skeleton
  • mcdt_gradle: run any Gradle task
  • mcdt_logs: read-only tail or parsed errors/datapack issues
  • mcdt_guide: built-in guide

Typical Usage

Suppose you have a datapack project at D:\mc\datapack and want to verify its pack_format is correct and that it loads properly:

  1. Run mcdt_quickcheck in the project directory. The plugin will auto-detect the datapack, validate the version, start the server, deploy & reload, check logs, and return the results.
  2. If you need finer-grained assertions, write YAML test cards in the mc-tests directory and execute them with mcdt_test.

Applicable Scenarios & Caveats

Suitable for scenarios requiring “automated testing of Minecraft mods or datapacks in a headless environment,” such as:
- Automatic verification after a DSH agent modifies code
- Integrating MC tests into CI/CD pipelines
- Multi-version server validation (1.7.10–26.4)

Caveats:
- The bot can only connect to the test server started by this plugin via mcdt_server; arbitrary host/port is not supported
- On startup, online-mode=false is enforced and RCON config is auto-completed — do NOT point it at a production server
- The 1.7.x legacy bot has no inventory / crafting / container functionality
- The bot’s goto is pure walking — it does not mine blocks, build bridges, or build towers
- The test bridge is built only for Forge 1.20.1
- Each test session manages only one test server at a time; for multi-version validation, start/stop sequentially

Conclusion

dsh-plugin-minecraft-devtest consolidates what was previously scattered across the client, scripts, RCON, and logs into a single toolset, enabling models to more directly verify the correctness of Minecraft code and datapacks. Related documentation and source code are available on the directory page and GitHub.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye