Development guide
Prerequisites
Section titled “Prerequisites”- Node.js 24 or later
- Bun 1.4.0 or later
- pnpm
- Git
-
Clone the repository.
ターミナルウィンドウ git clone https://github.com/tutinoko2048/discord-mcbe.gitcd discord-mcbe -
Install dependencies.
ターミナルウィンドウ pnpm install -
Build and check the workspace.
ターミナルウィンドウ pnpm buildpnpm check
Recommendation: Open .vscode/discord-mcbe.code-workspace to work with the entire workspace more easily in VS Code.
Monorepo layout
Section titled “Monorepo layout”| Path | Responsibility |
|---|---|
projects/server |
Discord bot and Minecraft connection server |
projects/launcher |
Launcher and updater |
projects/addon-local |
Behavior pack for regular worlds |
projects/addon-bds |
Behavior pack for BDS |
projects/docs |
Documentation website |
packages/client |
Script API client shared by both add-ons |
packages/shared |
Shared protocol code such as packet definitions, types, and enums |
packages/internal-config |
Workspace build and validation configuration |
devapp |
Local development environment |
Regular worlds use SocketBE, while BDS uses the @minecraft/server-net WebSocket API. Both connect to the same fixed-packet layer.
Common commands
Section titled “Common commands”| Command | Purpose |
|---|---|
pnpm build |
Build all packages with Turbo |
pnpm check |
Run types, lint, and package checks |
pnpm lint |
Lint the workspace |
pnpm format |
Format the workspace |
pnpm --filter @discord-mcbe/docs dev |
Start the documentation dev server |
pnpm --filter @discord-mcbe/docs build |
Build both locales and the TypeDoc API |
pnpm build:reference |
Generate the API into projects/docs/dist/reference |
Translation and documentation
Section titled “Translation and documentation”See Translation and text customization.
Contributing
Section titled “Contributing”Check Issues and existing pull requests first. Keep changes focused and include:
- Why the change is needed and how it works
- A related issue
- Builds, checks, and tests you ran
- Screenshots for visible UI or Discord output changes
- Japanese and English docs for behavior changes
Run pnpm build and pnpm check before submitting. Contributions are provided under the repository’s MIT License.
See the API reference for the public API.