Skip to main content

Run the Project

The template is built as a Regolith project, but Regolith is not required. Choose the workflow that matches how you already develop Bedrock addons.

Workflow A: run with Regolith

This is the recommended workflow because the repository already provides tested profiles for readable development exports and bundled builds.

1. Open the project root

Run all commands from the folder containing config.json and package.json.

2. Install development dependencies

npm install

This installs Minecraft Script API types, TypeScript, and esbuild. It does not install UtilityCraft into Minecraft.

3. Validate the source

npm run check
npm run verify:imports

The checks verify JavaScript types, resource display sequences, creative catalog entries, and the rule that addon code imports DoriosCore only through its public root.

4. Export readable development packs

regolith run buildDev

The result is written to build/ as:

build/
├── UtilityCraft Addon Template BP/
└── UtilityCraft Addon Template RP/

Use buildDev while learning because the exported scripts remain readable.

5. Create a bundled build

regolith run build

The build profile bundles the runtime into one script and exports production-shaped packs. Use it after the readable development build works.

CommandPurpose
regolith run buildDevReadable development BP and RP in build/.
regolith run buildBundled, non-minified BP and RP in build/.
regolith run releaseMinified release export using the configured local target.
npm run bundleScript-only bundle at dist/scripts/main.js; it does not export complete packs.

Workflow B: run without Regolith

The repository contains normal Bedrock pack roots:

BP/
RP/

If you do not use Regolith, copy, package, or integrate those two folders with your preferred Bedrock workflow. Preserve:

  • every file inside each pack;
  • both manifest.json files;
  • the BP-to-RP dependency;
  • the UtilityCraft BP and RP dependencies;
  • BP/scripts/DoriosCore and BP/scripts/DoriosLib;
  • the script entry at BP/scripts/main.js.

For manual development, the two folders can be placed in the corresponding Minecraft development pack locations and renamed as folders if desired. Folder names do not replace manifest UUIDs; change the manifest identifiers before distributing your own addon.

You can still use Node.js validation without Regolith:

npm install
npm run check
npm run verify:imports

If your own toolchain bundles JavaScript, keep the public import aliases mapped to the local BP/scripts/DoriosCore, BP/scripts/DoriosLib, and addon-core folders.

Enable the packs in a world

Enable all four packs:

  1. UtilityCraft Resource Pack.
  2. Your extension Resource Pack.
  3. UtilityCraft Behavior Pack.
  4. Your extension Behavior Pack.

Keep the extension Resource Pack above UtilityCraft when its chest_screen.json routes custom machine interfaces and references shared @uc.* controls. The manifests declare the required pack relationships, but the world still needs the corresponding UtilityCraft version installed.

Create or open a test world using the Script API settings required by your current Minecraft version.

Test the unchanged template

Enter the world and run:

/function example/kit

The function gives the example machines, generators, upgrades, resource containers, tools, and multiblock parts. Place a few blocks and open their interfaces before editing the source.

A successful first run means:

  • the function is recognized;
  • example blocks and items exist;
  • machine screens open;
  • no template error stops scripts/main.js;
  • UtilityCraft and the extension are using compatible versions.

Common first-run problems

ProblemCheck
The example function does not existConfirm the extension BP is enabled and contains functions/example/kit.mcfunction.
Blocks appear without texturesConfirm the extension RP is enabled and paired with its BP.
A shared UI control is missingConfirm UtilityCraft RP is installed and the extension RP is above it in the stack.
DoriosCore/index.js or DoriosLib/index.js cannot loadConfirm the complete BP/scripts/DoriosCore and BP/scripts/DoriosLib folders were not removed.
A dependency version is rejectedCompare the installed UtilityCraft version with the template manifest requirement.
Regolith cannot find the projectRun it from the folder containing config.json.

Do not begin deleting examples until this unchanged baseline works.

Next: Understand the project structure.