This npm project automates the TypeScript compilation process so you don’t need to manually run tsc every time you make changes.
It also automatically copies the packs into the correct Minecraft com.mojang directories.
You must have a recent version of Npm and Node installed to run this project.
Npm is usually installed alongside Node.
To ensure all required files are installed run: npm install
src/main.ts→ Main entrypoint for all scripts. Write your TypeScript code here.bp/scripts→ Compiled scripts are output here. Do not edit directly.bp→ Behavior Pack files (safe to edit).rp→ Resource Pack files (safe to edit).
Before running make sure you've specified the correct configuration options.
Go to the config.json to control:
com.mojang— specify your Minecraft Bedrock directory (com.mojang directory) for exampleC:/Users/<PCNAME>/AppData/Local/Packages/Microsoft.MinecraftUWP_8wekyb3d8bbwe/LocalState/games/com.mojang- Set false to disable
name— Specify folder name used for add-onbpOnly— Set totrueif you only want the Behavior Pack copied (skips Resource Pack)
There are four main commands you can use:
-
Development with hot reloading
npm run devRuns continuously, rebuilding whenever files change. Keep this running for the duration of your development session. -
Build only
npm run buildCompiles the TypeScript files into JavaScript without copying into Minecraft. -
Copy Packs
npm run copyRuns the Rollup build and copies the packs into yourcom.mojangdirectory (no watching). -
Pack
npm run packCreates a .mcpack in the root folder.
- All commands will complie your scripts. Only 1 (Copy) will copy over the files into the dev pack folders.
- Do not modify files in
bp/scriptsdirectly; they will be overwritten on every build. - Always edit TypeScript in
srcand pack assets inbp/rp. - If automatic copying is disabled, you can manually copy the built packs into your Minecraft
development_behavior_packsanddevelopment_resource_packsfolders.