Skip to content

Repository files navigation

Ward

CI   Modrinth   PyPI   Discord

Ward runs automated tests for Minecraft datapacks. Tests are plain .mcfunction files in a test/ folder.

demo

A test run with ward, results stream in live.

Ward comes in two parts:

🧩 Mod - Modrinth Adds the test commands (/assert, /await, /fail, /succeed, /dummy) and a headless test server that streams results live.
🐍 CLI - PyPI Installs test servers and runs your packs on one or more Minecraft versions. Java and the mod are downloaded for you. Also ships a beet plugin that adds beet test.

Quickstart

Install the CLI (requires Python 3.14 or newer):

uv tool install mcward[cli]   # or: pip install mcward[cli]

Write a test in your datapack under data/<namespace>/test/:

# @max_ticks 20
summon minecraft:zombie ~ ~ ~ {Tags: ["target"]}
kill @e[tag=target]
await not entity @e[tag=target]

Ward finds your packs, picks matching versions, and runs the tests:

ward

Comments starting with @ are directives. They configure the test. await and assert are the test commands.

Documentation

Acknowledgements

Ward is heavily inspired by packtest by misode, and implements its full command set.

About

A testing framework for Minecraft datapacks using mcfunction.

Resources

Code of conduct

Contributing

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages