Skip to main content

DoriosCore documentation

UTILITYCRAFT DEVELOPMENT

DoriosCore

The machinery library shared by UtilityCraft and its extensions. Build compatible machines, generators, resource storage, configurable IO, upgrades, and multiblocks without changing the Core.

Stable public entry point

Every addon imports DoriosCore from DoriosCore/index.js. Imports from internal files are not part of the supported API.

import { Machine, EnergyStorage, registerIOInterface } from "DoriosCore/index.js";

What is DoriosCore?

DoriosCore is a JavaScript library for Minecraft Bedrock machinery addons. It supplies the common runtime used to create machines and generators that follow the same lifecycle and storage rules as UtilityCraft.

It is appropriate to call this an API: the term refers to the public classes, functions, constants, and type contracts that addon scripts can use. It is not a web API and it does not make HTTP requests.

MACHINERY

Machines and generators

Use runtime wrappers with scheduling, progress, energy, inventories, UI labels, preserved resources, and safe placement and destruction.

RESOURCES

Energy, liquids, and gases

Store large values, create multiple indexed tanks, render resource displays, and transfer resources between compatible containers.

CONFIGURATION

IO and upgrades

Expose six-face item, liquid, and gas controls and consume standard or addon-defined upgrade perks in your own processing logic.

STRUCTURES

Multiblocks

Detect structures, activate controllers, calculate component-based stats, route through ports, and restore blocks during deactivation.

Responsibilities

Understanding the library boundary prevents incompatible addons and duplicated systems.

ProjectResponsibility
DoriosLibGlobal Dorios utilities and registries used across different projects.
DoriosCoreMachinery runtime: machine classes, resource storage, IO documents, UI interfaces, upgrades, scheduling, rotation, and multiblocks.
UtilityCoreUtilityCraft-owned systems, including machinery networks. DoriosCore does not own the networks.
Your addon coreCustom reusable behavior that extends DoriosCore, such as heat, pressure, radiation, or a specialized recipe cycle.

Requirements

  • A Minecraft Bedrock project using the Script API versions supported by the current UtilityCraft manifest.
  • UtilityCraft 3.5.0 or newer enabled in the world.
  • DoriosLib and DoriosCore available through UtilityCraft.
  • A script bundler or Regolith configuration that resolves the public library aliases.

For a working starting point, clone the UtilityCraft Addon Template. It includes functional blocks, entities, screens, IO, upgrades, liquids, gases, generators, and multiblocks.

Library boundary

Treat the DoriosCore and DoriosLib dependency folders as read-only. Addons consume them; they do not patch them.

BP/scripts/
├─ DoriosCore/ # Dependency: do not modify
├─ DoriosLib/ # Dependency: do not modify
├─ ADDONNAME_CORE/ # Your reusable subclasses and systems
├─ config/ # Registrations and shared data
├─ examples/ # Concrete blocks and gameplay behavior
└─ main.js # Load order and initialization

When behavior does not belong in the shared machinery library, extend a public class in ADDONNAME_CORE:

// BP/scripts/MYADDON_CORE/ThermalMachine.js
import { Machine } from "DoriosCore/index.js";

export class ThermalMachine extends Machine {
getHeat() {
return Number(this.entity.getDynamicProperty("myaddon:heat") ?? 0);
}

setHeat(value) {
this.entity.setDynamicProperty("myaddon:heat", Math.max(0, value));
}
}

See Extend DoriosCore for the complete pattern and rules.

  1. Follow Get started to understand load order and create a machine runtime safely.
  2. Read Machine lifecycle before implementing processing logic.
  3. Learn how to extend DoriosCore without editing library code.
  4. Browse the complete API surface and open the reference page for the system you need.
  5. Compare your implementation with the public examples in the Addon Template, UtilityCraft, and Heavy Machinery.

API at a glance

AreaStart withUse it for
RuntimeMachine, GeneratorNormal processing machines and energy generators.
StorageEnergyStorage, FluidStorage, GasStorageEnergy, liquid, and gas capacity and transfer.
IOregisterIOInterface, IOInterfaceSix-face input/output configuration for items and indexed resources.
UpgradesMachineUpgradeRegistryStandard perks such as speed, energy_cost, energy_efficiency, and process_batch, plus addon-owned perks.
Runtime helpersTickScheduler, OutputTracker, RotationEfficient ticks, cached outputs, and block orientation.
MultiblocksMultiblock, MultiblockMachine, MultiblockGeneratorComponent-based structures and controller runtimes.

The API reference lists all 103 runtime exports and 93 type-only contracts currently exposed by DoriosCore/index.js.

Source and examples

These documentation examples describe how to use the public API. They do not mirror private file locations or require consumers to understand DoriosCore internals.