Skip to main content

DoriosLib API reference

The supported API is available from one namespace import:

import * as DoriosLib from "DoriosLib/index.js";

The current declaration exposes 186 runtime paths across 15 namespaces and 43 type-only contracts. Anything that is not reachable from this root entry point is an implementation detail.

Root member

VERSION

DoriosLib.VERSION: "2.0.0"

Identifies the installed DoriosLib public API version. Use it for diagnostics; feature detection is still preferable when supporting multiple generations.

Namespaces

NamespaceScopePurpose
blockFoundationBlock states, facing, adjacency, entity lookup, and registered block checks.
configConfigurationMetadata and dependency options for the installed UtilityCraft copy.
constantsFoundationCommand aliases, directions, dimensions, equipment slots, and block policies.
containerInfrastructureGeneric item containers, persisted IO documents, insertion, and transfer.
dependenciesIntegrationCross-addon discovery and minimum-version validation.
entityFoundationInventory, health, and equipment operations.
itemFoundationItem creation, item type checks, durability, and Unbreaking-aware damage.
linkNodeInfrastructurePhysical/logical endpoint resolution and per-port resource IO overrides.
mathFoundationRanges, scaling, random values, vectors, and Roman numerals.
messagesFoundationWorld chat, player chat, action bar, and formatted JSON output.
playerFoundationGame-mode checks, item giving, and equipment aliases.
registryIntegrationUtilityCraft payloads, custom components, and custom commands.
textFoundationMinecraft formatting codes and identifier labels.
timeFoundationTick constants, duration formatting, callbacks, and asynchronous waits.
utilsFoundationArrays, plain-object checks, safe JSON, and cloning.

Type-only contracts

Types are available to TypeScript and JSDoc consumers but do not exist as JavaScript properties at runtime.

AreaContracts
Core aliasesBlockStateValue, ContainerFace, ScaleMode, LinkNodeIOResource, LinkNodeIOOperation, RegistrationPayload, JsonResult
Container IOSimpleItemConfig, FaceSlotConfig, ComplexItemConfig, ItemConfig, ResolvedContainer, ContainerTarget, InsertOptions, TransferOptions, SlotQueryOptions, ContainerStatus
DependenciesDependencyRequirement, AddonMetadata, DependencyIssue, ValidationResult, InitializeDependencyOptions
Entities/itemsInventoryEntry, SetItemOptions, SetNewItemOptions, TryAddItemOptions, AddItemResult, ChangeItemAmountOptions, HealthInfo, SetEquipmentOptions, CreateItemOptions, DurabilityInfo, DamageResult, GiveItemOptions
Link nodesResolvedLinkNode, LinkNodeIOSelection, LinkNodeIOUpdate
Registries/JSONCoolantRegistration, CommandParameter, CommandDefinition, RegistrarOptions, Registrar, JsonStringifyOptions

Each contract is documented beside the function that consumes or returns it.

Common conventions

  • Positions use the Script API Vector3 shape.
  • Item IO faces are absolute: up, down, north, south, east, and west.
  • Indexed liquid and gas selections use integers from 0 through 255.
  • Methods returning arrays use deterministic order; preserve it when attempting insertion or transfer.
  • Safe lookup methods return undefined, false, 0, or empty arrays when the target is unavailable.
  • Configuration errors generally throw rather than silently producing invalid state.
  • Registration payloads must be JSON serializable.