Skip to content
RuanhoRPublic

About

A dev tool in Minecraft bedrock

Topics

Resources

Code of conduct

Contributing

Stars

5 stars

Watchers

0 watching

Forks

Repository files navigation

MBLER


CI npm License Node Gitee Star Codacy Badge


A development toolchain for Minecraft Bedrock Edition Addons, built on Rolldown.

Features

  • MCX DSL — Domain-specific language for Minecraft scripting with type safety
  • Manifest Generator — Auto-generates manifest.json with deterministic UUIDs and module dependencies
  • Bundle — Bundles scripts into single ESM files via Rolldown, with auto-externalization of Minecraft APIs
  • Component build — Asset import support (.png, .svg, etc.) via MCX image components
  • Watch mode — Incremental rebuild & file-copy on change via mbler watch
  • Minification — Supports oxc (default), terser, and esbuild minifiers
  • Build cache — Configurable caching (none/memory/file/filesystem/auto) for faster rebuilds
  • Release packaging — Build .mcaddon archives via BUILD_MODULE=release environment variable
  • PMNX Marketplace — Publish, install, uninstall, and manage addon packages
  • i18n — Built-in internationalization (English & Chinese)

Installation

Prerequisites: Node.js >= 20.0.0, pnpm (recommended) or npm

npm install -g mbler

Quick Start

pnpm create mbler

pnpm build

Dev WS Server

mbler watch can start a WebSocket server that pushes reloads to the in-game client:

mbler watch --enable-dev-ws                            # default port: 19145
mbler watch --enable-dev-ws --dev-ws-port 20000

Connect in-game via /connect ws://localhost:19145, then every rebuild triggers a live reload inside Minecraft.

Build Cache

Enable via the build.cache option in mbler.config.js (default auto):

export default defineConfig({
  build: { cache: 'file' }
})

Cache entries are validated by content hash + mtime, and Rolldown incremental builds are enabled when caching is on. Modes: none, memory, file (filesystem/auto fall back to file).

Example Project

Bedwars Addon | RedStonePlugin Addon: Place, Cut | Luckly Block Addon

CLI Commands

Command Alias Description
help [command] h Show help for a command
init [args...] Initialize a project config file
build Build the addon (behavior + resources)
watch Watch mode with incremental rebuild
work [path] c Set or display the working directory
set-work-dir <on|off> Enable/disable persistent working directory
version [version] Show or set version; -show commit|version
lang [zh|en] Switch CLI language
config <get|set|point> [key] [value] Global configuration
publish Publish to PMNX marketplace (-tag, -build skip|enable)
unpublish <package> Remove a package from PMNX
install <package> Install a PMNX package
uninstall <package> Remove a PMNX package
login [token] Authenticate with PMNX marketplace
profile View current user profile
view <package> View package details
log <point|clean> Log management

Other Language README

中文

Related Repos

MCX Core · MCX Language Server · MCX Template · MNX Market

Documentation

Release Platforms

GitHub · Gitee · npm

License

MIT

About

A dev tool in Minecraft bedrock

Topics

Resources

Code of conduct

Contributing

Stars

5 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages