Supported API

This page is the list of types your mod may build on, and the promise that comes with them. Every public type of exlib.dll is on it. A type that is public in the assembly but absent from this page carries [EditorBrowsable(Never)]: it is public because the game engine has to see it, not because a mod is meant to call it, and it can change in any release. A test in this repository fails when the assembly and this page disagree in either direction, so the list cannot quietly go stale.

The promise is a deprecation window, not permanence. A public member listed here is never deleted outright: it spends one full release marked [Obsolete], with the attribute naming its replacement, and only then goes. Everything currently in that window is listed under Obsolete members at the foot of the page. Versions follow the same rule from 0.8.0 on: a minor bump may change a signature on this page, a patch bump does not.

The industry layer is the exception. It ships as a second assembly, exlib.industry.dll, beside the framework in the same mod folder and as the ExpandedLib.Industry package. Its types are public and meant to be reused, but they are the family's content layer rather than the framework: they change without notice, they are listed separately under Extending Industry, and the promise above does not cover them.

Read the page by activity. The sections are named for what you are doing - registering classes, persisting state, wiring a network - rather than by namespace, and each row names its type, says in one line what it is for, and links to the page that teaches it. Follow that link when you want to learn the system; the row itself is the answer when all you need to know is whether something is safe to depend on.

Starting a mod

Two source-generated classes covering exlib's own assets: the framework's lang keys, and its config values. ExlibValues.AmbientTemperature is the kind of thing a machine reads from here. Your mod gets the same pair under its own domain's name once you set <AssetDomain> - see Source Generators.

TypeWhat it is forPage
ExlibLangSource-generated typed lang-key class for assets/exlib/lang/en.json: one public const string member per key.this page
ExlibValuesSource-generated static accessor for ExlibConfig's tunables: ConfigFileName, Load(ICoreAPI) and one read-only property per config value.this page

Registering classes and commands

The game wants every block, item, behaviour, command and preference class handed to it by name, in a list you maintain and can silently fall out of step with. These types replace that list with attributes and one reflection pass. The neighbouring questions that come with registration are here too: registering a recipe type of your own, asking whether another mod is installed before gating content on it, and applying Harmony patches once per process rather than once per load.

TypeWhat it is forPage
ExKeyedRegistry<T>A process-wide, case-insensitive registry of items keyed by a string code derived from each item.Registries
ReflectionScanShared reflection helper for the attribute-driven registries (EntityRegistry, CommandRegistry, PreferenceRegistry).Registries
ExModsThe three rungs for reacting to another mod being installed: IsLoaded/AtLeast, WhenLoaded, and a world-config flag a JSON patch condition can gate on.Registries
ExHarmonyThe Harmony bootstrap every reference mod copied by hand: patch an assembly's uncategorised classes once per process (by mod id or by an explicit string id), apply a category only when a required mod is loaded, and unpatch cleanly.Registries
ExModSystemThe zero-line registration rung: a ModSystem base whose Start/StartServerSide/StartClientSide/AssetsFinalize run the config, entity, command and preference registries for that phase and host the mod's own modules through ExModuleHost, then an empty overridable hook.Registries
ExModuleAttributeDeclares an assembly as a module - an extension driven through the lifecycle of the mod named in Host, with a Requires order, a shipping Mod id and an opt-in Harmony patch.Modules
IExModuleThe entry point of a module: driven through the phases of its host's lifecycle, in the order ExModules.For gives it among the host's other modules.Modules
ExModuleInfoOne discovered module: its id, host, shipping mod, requirements, assembly and entry points.Modules
ExModuleSetOne host's modules in dependency order, and the errors that excluded any of them.Modules
ExModulesFinds every module in the process and, per host, keeps only the ones whose shipping mod is enabled and orders the rest by Requires.Modules
ExModuleHostOne driver instance's modules: owns their entry-point instances and runs them through the same registries and phases as a main assembly.Modules
BlockBehaviorRegisterAttributeRegisters a BlockBehavior class.Registries
BlockEntityBehaviorRegisterAttributeRegisters a BlockEntityBehavior class.Registries
BlockEntityRegisterAttributeRegisters a BlockEntity class.Registries
BlockRegisterAttributeRegisters a Block class.Registries
CollectibleBehaviorRegisterAttributeRegisters a CollectibleBehavior class.Registries
CropBehaviorRegisterAttributeRegisters a CropBehavior class.Registries
EntityBehaviorRegisterAttributeRegisters an EntityBehavior class.Registries
EntityRegisterAttributeRegisters an Entity class.Registries
EntityRegistryReflection-driven class registration for mods built on ExpandedLib.Registries
ExDomainAttributeDeclares the asset domain an assembly's registered classes and code-first definitions are keyed under, so KeyFor can resolve a key from a Type alone rather than from the domain of whoever is asking.Registries
ItemRegisterAttributeRegisters an Item class.Registries
RegisterAttributeBase for the kind-specific registration attributes.Registries
CommandRegisterAttributeMarks an IExCommand class for automatic registration by RegisterAll; the class supplies an Register body and needs no wiring in the mod system.Commands
CommandRegistryReflection-driven chat-command registration, the command-side counterpart to EntityRegistry.Commands
IExCommandA self-contained chat command.Commands
IExSubCommandA chat sub-command that attaches itself to an existing top-level command rather than creating its own, so one mod can hang options off another's command (e.g. iiex's measure under the library's .exmod root) without that command declaring them up front.Commands
RegistrySubCommand<T>A /exmod <name> sub-command over one keyed registry: no argument lists every code, a code shows that entry, further words are handed to Set. Derive once for a new ExKeyedRegistry-backed /exmod sub-command.Commands
SubCommandRegisterAttributeMarks an IExSubCommand class for automatic registration by RegisterAll, the sub-command counterpart to CommandRegisterAttribute: the registry resolves the ParentName command and lets the class attach itself.Commands
ExPreferencesStore for per-player display preferences shared by every Expanded mod (e.g. iiex's metric/imperial unit system).Registries
IExPreferenceA single per-player, client-side display preference (e.g. the metric/imperial unit system).Registries
PreferenceRegisterAttributeMarks an IExPreference class for automatic registration by RegisterAll, so a mod system needs no hand-written wiring.Registries
PreferenceRegistryReflection-driven preference registration for mods built on ExpandedLib, the preference-side counterpart to CommandRegistry.Registries
ExRecipeCostsRewrites the ingredient quantities and grid output count of grid crafting recipes and right-click-construction (RCC) blocks to a named cost profile from a catalogue, giving a mod a balance toggle such as cheap against normal.Recipe-Costs
ExRecipeRegistryRegisters a RecipeRegistryGeneric<T> for a mod's own recipe type through ICoreAPI.RegisterRecipeRegistry, plus the server-side asset load into the list it returned.Registries
ExRecipeProfilesProcess-wide registry of RecipeProfiles keyed by mod code, for mods that expose recipe-cost levels (normal, cheap, ...).Recipe-Costs
RecipeCostEntryOne managed recipe in a mod's cost catalogue: its kind, the wildcard code that locates it, and one self-contained RecipeProfileCost per cost profile (normal, cheap, ...).Recipe-Costs
RecipeProfileA mod's registration with the shared recipe-cost framework: everything ExRecipeProfiles needs to read, fill, persist and apply that mod's cost catalogue, plus get and set the active level the /exmod recipes <code> <level> command flips.Recipe-Costs
RecipeProfileCostEverything one cost profile (e.g. cheap) changes for a single recipe, self-contained: a profile is the complete cost picture of that recipe at that level.Recipe-Costs

Configuring a mod

Gameplay numbers a player can edit, without the string keys and unchecked casts of reading a JSON file by hand. You declare a config class; these types load and save it, hold each value to a declared range in both directions, expose it to the generic /exmod config command, reset a tunable whose meaning changed in a later release, and carry the server's copy to clients when the server owns the answer.

TypeWhat it is forPage
ConfigSyncPacketOne mod's config section, carried server to client by ExConfigSyncModSystem: the host's ExportJson output, addressed by mod id so the receiving side can find the matching registered store.Config-System
ExConfigLoads every generated config accessor in an assembly by reflection (LoadAll), so a ModSystem never names its own config types.Config-System
ExConfigAccessorAttributeStamped by ExConfigGenerator on every accessor class it emits, so ExConfig.LoadAll can find it.Config-System
ExConfigDocumentA shared, mod-sectioned config file under ModConfig (e.g. ex_values.json / ex_recipes.json): one file whose top-level keys are mod ids, each holding that mod's config object.Config-System
ExConfigEditResultThe result of an attempted config edit, with enough detail for the command to report it.Config-System
ExConfigEditStatusOutcome category of an Set attempt.Config-System
ExConfigMigrationDeclares that upgrading a mod into or past ToVersion resets the named config properties to their coded defaults, discarding the player's saved tuning for those keys only.Config-System
ExConfigProfilesProcess-wide registry of the config stores mods expose to the generic /exmod config command, keyed by mod id.Config-System
ExConfigRangeAttributeDeclares the valid numeric range for a config tunable, enforced by ExConfigRegister both when a player edits it live (/exmod config rejects an out-of-range value) and on load (a file edited out of range is reset to the coded default).Config-System
ExConfigRegister<T>Shared loader and saver for a mod's JSON gameplay tunables.Config-System
ExConfigRegisterAttributeMarks a config POCO implementing IExVersionedConfig for which the ExConfigGenerator source generator emits a static accessor class.Config-System
ExRecipeProfileAttributeAdded alongside [ExConfigRegister] on a recipe-cost catalogue config to have ExConfigGenerator also emit that mod's RecipeProfile registration.Recipe-Costs
IExConfigAccessNon-generic view over a config store (ExConfigRegister) that the /exmod config command uses to list, read and set a mod's tunables by name without knowing the concrete config type.Config-System
IExVersionedConfigA JSON config POCO that records the mod version it was last written under.Config-System

Defining blocks, items and recipes in code

Blocks, items and recipes described in C# instead of hand-written JSON under assets/, so a renamed variant or a mistyped shape path is a compile error rather than a surprise at world load. The builders here produce exactly what the game's object loader reads, and the layout types turn an ASCII diagram of a structure into the tables that loader expects. Getting Started walks one block through from definition to boot.

TypeWhat it is forPage
ConstructionStageOne construction stage: the shape elements it adds/removes and the materials it requires.Code-First-Definitions
ConstructionStagesTyped builder for the ExRightClickConstructable behavior's stages table.Code-First-Definitions
ExBlockDefA code-first block definition: a fluent builder producing the JObject the vanilla object loader (ModRegistryObjectTypeLoader) consumes for a blocktypes/ asset.Code-First-Definitions
ExCodesCatalogue of exlib's own block codes that multiblock layouts are drawn from.Code-First-Definitions
ExDefDomainAttributeOverrides the domain a definition provider's Definitions(string) factory is handed, so one assembly can emit into several domains instead of only its own mod id.Code-First-Definitions
ExDefinitionsProcess-wide registry of code-first block definitions.Code-First-Definitions
ExIngredientsVanilla crafting ingredients shared across the mods' code-first recipe files.Code-First-Definitions
ExItemDefCode-first item definition, the item-side sibling of ExBlockDef.Code-First-Definitions
ExRecipeDefCode-first recipe file, the recipe-side sibling of ExBlockDef and ExItemDef.Code-First-Definitions
ExVariantGroupOne variant group of an ExBlockDef, as rendered into the block's code.Code-First-Definitions
GridRecipeBuilderFluent builder for one grid (crafting-table) recipe object, the entries of a recipes/grid/*.json file.Code-First-Definitions
IExBlockDefProviderImplemented by a block class that authors its own code-first definitions, co-located with the class they configure.Code-First-Definitions
IExDefThe common surface of a code-first definition - a block (ExBlockDef), item (ExItemDef) or recipe file (ExRecipeDef): the synthetic-asset AssetLocation the loader keys on, plus the built JSON payload.Code-First-Definitions
IExDefinitionContributorImplemented by a module or main assembly entry point that emits code-first definitions depending on loaded assets; run by ExDefinitions.RunContributors at AssetsLoaded 0.04, right before injection.Code-First-Definitions
IExItemDefProviderThe item-side sibling of IExBlockDefProvider: implemented by a class that authors its own code-first item definitions, one ExItemDef per itemtypes/ asset, co-located with the class they configure.Code-First-Definitions
IExRecipeDefProviderThe recipe-side sibling of IExBlockDefProvider and IExItemDefProvider: implemented by a class that authors its own code-first recipe files, one ExRecipeDef per recipes/{category}/ asset.Code-First-Definitions
IngredientBuilderFluent builder for one recipe ingredient - a slot in a grid recipe, or a barrel or other recipe ingredient: { type, code[, name, allowedVariants, quantity, isTool] }.Code-First-Definitions
KnownRootKeysThe top-level keys the game's object loader reads for a block or item type, taken by reflection from the loader's target types.Code-First-Definitions
LayoutCellOne parsed cell of a structure layout: its offset from the principal and the legend symbol.Code-First-Definitions
MultiblockBuilderTyped builder for a block's multiblockStructure attribute: the blockNumbers map and the offsets table.Code-First-Definitions
MultiblockLayoutBuilderAuthors a multiblockStructure from ASCII layer diagrams: Legend maps characters to block codes, one Layer per Y level draws the build as a top-down grid (grid rules in StructureLayout).Code-First-Definitions
StructureLayoutParses the ASCII layer diagrams the multiblock and filler DSLs are authored with.Code-First-Definitions
VanillaCodesThe catalogue of vanilla block codes the mod family's multiblock layouts are drawn from, named once here so that a typo in a Legend is a compile error rather than a blockNumbers entry matching no block, which throws nowhere and leaves the structure unable to complete.Code-First-Definitions

Checking content

The guards that catch a dangling block code, a name with no translation, a recipe whose output nothing registers. They already run at load and from /exmod verify without you naming them, so the types here are for the other two cases: running the same guards in your own test suite, against a repository tree rather than a live game, and registering a check of your own that runs beside the shipped ones.

TypeWhat it is forPage
ICheckSourceWhat a check reads: the codes, files and definitions of one or more domains, from the game's assets or from a repository tree.Checks
AssetCheckSourceThe in-game ICheckSource: codes off the live registries, recipes and lang off ICoreAPI.Assets, defs off ExDefinitions.Checks
CheckResultOne check's findings for one domain: its name, the domain and the error lines found.Checks
ExlibChecksRuns every content check against one ICheckSource (or the live game) and logs the results.Checks
ExCheckRegisterAttributeMarks a class exposing static CheckResult Run(ICheckSource, string) for automatic registration by ExCheckRegistry.RegisterAll, so a mod's own content check runs alongside the eight shipped ones.Checks
ExCheckRegistryReflection-driven registration for a mod's own content checks, the checks-side counterpart to EntityRegistry.Checks
DefinitionCatalogueCheckChecks that every code-first block definition actually produced a registered block.Checks
LateDefinitionCheckChecks that every registered block, item or recipe definition made the injection deadline.Checks
MultiblockCodesCheckChecks that every multiblockStructure layout cell names a block some mod registers.Checks
RecipeCodesCheckChecks that every grid recipe's block output names a block the mod registers.Checks
LangCoverageCheckChecks that every block code resolves to a name in every locale shipped.Checks
NetworkNodeContractCheckChecks the structural rules a network-node definition and a declared membership must obey.Checks
PinnedNetworkNodesCheckChecks that no shipped layout pins the orientation of a network node.Checks
CodePrefixCollisionCheckChecks that no block's base code is a proper prefix of another's at a - boundary.Checks

Writing a block entity and persisting its state

A block entity is the object the game attaches to one placed block, ticks, and saves with the chunk around it. Keeping a field across a reload normally means writing it into a tree attribute and reading it back, with the key spelled once in each direction and no complaint when you get one half wrong. The bases and the [Persist] attribute here do it from the declaration alone. The construction types in the same section cover a block the player raises in stages from materials, which has state of its own to keep.

TypeWhat it is forPage
ExBlockEntityBlock entity base that persists whatever it declares.Block-Entities
ExBlockEntityBehaviorBlock-entity behaviour base that persists whatever it declares - the ExBlockEntity convenience for a block entity whose base slot is already spent.Block-Entities
ExBlockEntityContainerBlock entity base that persists whatever it declares, on top of vanilla's own inventory - the ExBlockEntity convenience for a block entity based on BlockEntityContainer.Block-Entities
ExBlockStateA block entity's persisted fields, declared once and read and written from that one declaration.Block-Entities
PersistAttributeMarks a field or auto-property of a block entity as saved state, with no DeclareState entry needed.Block-Entities
IPersistableA value that writes itself into a sub-tree; a [Persist] member of this type is stored under its key as a nested tree.Block-Entities
PersistScanFinds every [Persist] member of a block entity's type by reflection and declares it into an ExBlockState.Block-Entities
BlockBehaviorExOrientablePlaces a block wearing the side variant the player's look implies; the family's replacement for vanilla's HorizontalOrientable.this page
ConstructedAnimatorOwns the animator and ExRightClickConstructable lifecycle shared by constructed, animator-rendered mega-blocks (boiler, engine, converter vessel, burdenmaker).Construction
ExConstructionIngredientA required material for a construction stage; port of vanilla ConstructionIngredient (1.20 and 1.21 only).Construction
ExConstructionStageOne construction stage: shape elements it adds/removes and the materials it needs; port of vanilla ConstructionStage (1.20 and 1.21 only).Construction
ExRccSettingsPlayer-tunable settings for the right-click construction system, supplied by each mod from its own config.Construction
ExRightClickConstructableexlib-owned right-click construction behavior referenced by the mega-blocks (engines, boilers, bessemer converter) under the JSON behavior name ExRightClickConstructable.Construction
ExRightClickConstructionPort of vanilla RightClickConstruction: the per-block construction state and logic (1.20 and 1.21 only).Construction

Renaming and healing blocks

Renaming or removing a block breaks every save that holds it: the world comes back with a hole where the old code was, or with an item stack nothing can resolve. Declare the old-to-new mapping with these types and the migrator rewrites the world on load. The healer covers the other half, a block whose block entity was lost to a failed deserialization or a desync and which is left inert, often unbreakable and impossible to build over.

TypeWhat it is forPage
BlockMigrationModSystemServer-side world migrator for renamed or re-variantted blocks and items, and a purger for codes a mod drops.Migrations-and-Healing
BlockMigrationModSystem.DeclaredRemapOne declared (oldCode, newCode) block remap, before resolution against the world.Migrations-and-Healing
CodeRelocationBuilds remaps for a block that kept its shape but changed identity - a domain move, a rename or both - pairing an explicitly named historical base code with a live one and carrying every variant suffix across unchanged.Migrations-and-Healing
IBlockCodeMigrationDeclares how block codes from an older version of a mod are rewritten to their current equivalents, for a renamed or re-varianted block.Migrations-and-Healing
IBlockEntityMigrationOptional companion to IBlockCodeMigration, implemented on the same class when the block carries block-entity state that must survive the swap (inventory, progress).Migrations-and-Healing
IBlockRemovalDeclares block codes purged from the world: deleted where they sit, and stripped from any container or player inventory holding them as an item stack.Migrations-and-Healing
IItemCodeMigrationThe item counterpart of IBlockCodeMigration: declares how item codes from an older version of a mod are rewritten to their current equivalents, for an item that was renamed or moved domain.Migrations-and-Healing
BlockEntityHealModSystemServer-side self-healer for orphaned block entities: a block still placed in the world whose BlockEntity was lost to a throwing deserialization or a desync, leaving it inert - no interaction, often unbreakable, impossible to build over.Migrations-and-Healing

Building a structure

A machine larger than one block needs its cells checked before it may run, an outline the player can see while building it, and collision on every cell rather than only the one holding the block entity. These types carry the layout, authored as ASCII diagrams rather than offset tables, the completion monitoring behind it, and the invisible filler blocks that reserve the rest of the footprint and can host a behaviour such as a power port.

TypeWhat it is forPage
BlockBehaviorMultiblockStructureCentralises the multiblock build-outline projection: Ctrl+Shift+right-click toggles the hologram of missing or incorrect blocks (routed to Interact) and contributes the help line.Multiblock-Structures
BlockEntityMultiblockConcrete BlockEntityMultiblockStructure for a JSON-only mega-block: orientation, completion monitoring and the incomplete/complete messages with no C# subclass.Multiblock-Structures
BlockEntityMultiblockMachineA multiblock that also runs a production process: the hand-built pattern of BlockEntityMultiblockStructure plus a server-side tick, gated by the readiness that form publishes and started and stopped by its monitor tick.Multiblock-Structures
BlockEntityMultiblockStructureBase block entity for the mod's multiblock machines (blast furnace, cowper stove, bessemer control).Multiblock-Structures
BlockEntityMultiblockStructure.MissingCellOne unsatisfied footprint cell: what stands there, the wanted code, and the outward face it must open to when the mismatch is only orientation.Multiblock-Structures
BlockEntityStructureFillerBlock entity for an invisible structure-filler block.Multiblock-Structures
BlockFilledMegastructureShared base for a mega-block that occupies one grid cell but renders across a multi-cell footprint reserved with invisible BlockStructureFiller cells (real per-cell collision, with interaction/break/info rerouted to the principal).Multiblock-Structures
BlockStructureFillerInvisible, solid placeholder that fills the grid cells a mega-block visually occupies (see StructureFillers).Multiblock-Structures
CellGridTurns rows of symbols into a cell list: one instance draws one plane (a floor level, an X slice or a Z face), and every layout DSL (multiblock, filler, the testing harness's scene diagrams) is a derivation over it.Multiblock-Structures
CellRoleWhat a multiblock layout cell is for, as opposed to what block may occupy it: the layout records the code per cell, a role records the purpose, so a machine can ask its own drawing where its tuyeres are.Multiblock-Structures
CellRolesFacts about CellRole that both the layout builder and its consumers read.Multiblock-Structures
DuplicatePolicyWhat SymbolLegend does when a symbol is mapped twice: Throw for a code-first layout, Replace for a filler footprint or a test scene.Multiblock-Structures
FillerBehaviorA single behaviour declared on a fillerOffsets cell: the registered class Code (e.g. exlib.BEBehaviorMPFillerPort), an optional north-orientation ConnectorFace (rotated into the placed orientation by FootprintCells) and optional Properties passed through to the behaviour.Multiblock-Structures
FillerBehaviorSpecOne behaviour hosted by a footprint filler cell: a block-entity behaviour code plus, optionally, the block face it exposes a connector on and a Properties config blob.Multiblock-Structures
FillerCellA resolved world-space filler cell carrying its per-cell attachment flag and, when the cell is only partially filled, its collision/selection boxes already rotated into the placed orientation.Multiblock-Structures
FillerCellSpecOne north-orientation footprint cell for a mega-block, authored in C#: the offset from the principal, whether other blocks may attach to the filler placed there, and any per-cell hosted FillerBehaviorSpec behaviours (MP/pipe ports).Multiblock-Structures
FillerLayoutBuilderAuthors a mega-block fillerOffsets footprint from ASCII diagrams (grid rules in Layout and StructureLayout).Multiblock-Structures
FillerOffsetA single structure-local filler cell as declared in the fillerOffsets JSON array: the offset from the principal (north orientation), whether other blocks may attach to the filler placed there, and an optional set of per-cell collision/selection boxes (north orientation) for footprint cells the mega-block only partially fills, such as a slab.Multiblock-Structures
GridOptionsHow a CellGrid reads its text: whether a space advances the column, which glyph means empty, and an optional anchor glyph.Multiblock-Structures
GridPlaneWhich plane a CellGrid draws: rows and columns map to two world axes, the depth argument to the third.Multiblock-Structures
IFillerHostA mega-block whose footprint cells are declared by its fillerOffsets attribute node.Multiblock-Structures
IFillerHostedBehaviorA behaviour a mega-block can host on one of its footprint cells (see StructureFillers).Multiblock-Structures
IFillerInteractionTargetOptional contract for a principal (controller) block whose interactions depend on which cell of its mega-block footprint was clicked, not merely that some footprint cell was clicked.Multiblock-Structures
IMultiblockComponentA functional component of a multiblock machine (a molten tap, a charging hopper, a tuyere) whose own block entity is not the anchor but belongs to one.Multiblock-Structures
JsonMultiblockLayoutResolves a block's multiblockLayout ASCII grid into the same multiblockStructure/fillerOffsets a code-first definition would have emitted.Multiblock-Structures
MultiblockAnchorLink<T>A throttled resolver a functional component (a molten tap, a charging hopper, a tuyere) keeps to find and keep reading the multiblock anchor it belongs to.Multiblock-Structures
MultiblockCellRolesReads the multiblockRoles attribute a code-first layout emits: CellRole to the authored (north-frame) offsets of the cells carrying that role.Multiblock-Structures
MultiblockConnectorsReads the multiblockConnectors attribute a code-first layout emits: for each authored (north-frame) offset, the outward faces that cell's occupant must expose a network connector on.Multiblock-Structures
MultiblockFacingsRotates the facing of a multiblock layout's oriented parts, so a structure can require a slab, stairs or door to be placed the right way round rather than merely be present.Multiblock-Structures
StructureFillersHelpers for the invisible mega-block footprint system.Multiblock-Structures
StructureFootprintComputes mega-block footprints (the fillerOffsets tables) from a compact description instead of listing every cell by hand.Multiblock-Structures
SymbolLegend<T>Maps a grid's symbols to whatever a caller resolves them into, with one duplicate-mapping rule and the "declared but never drawn" check every layout DSL needs.Multiblock-Structures

Running a machine

A machine that works over time needs a server-side tick on a fixed interval, a gate saying whether it may run at all, and a decision about the game time it spent unloaded while the player was away. These types provide that lifecycle and leave you the work itself. The station types add the window a player loads and unloads the machine through, with slots that accept only what they should and an output slot nothing can be dropped into.

TypeWhat it is forPage
BEBehaviorProductionMachineThe periodic work a machine does: a server-side tick on a fixed interval, gated each time by CanRunProduction, with a bounded dt and an opt-in replay of the game time the machine spent unloaded.Production-Machines
BlockEntityMachineStationBase block entity for a machine the player works through a window: a container whose slots are declared as MachineSlotSpecs, plus the open/close handshake that keeps the server inventory in step with what the player sees.Production-Machines
BlockEntityProductionMachineBase for a block entity whose whole reason to exist is periodic server-side production work - the standalone steam engines and their sub-machines.Production-Machines
IProductionReadinessOne answer to whether a machine may run its production process, published by whatever knows it: a multiblock's completed pattern, an RCC megablock's finished construction stages, a sub-machine's resolved master.Production-Machines
ItemSlotMachineInputAn input slot that accepts only stacks matching its predicate; a null predicate takes anything.Production-Machines
ItemSlotMachineOutputA take-only output slot, so a finished piece cannot be overwritten by hand.Production-Machines
MachinePortsNetwork-port access shared by every fixed machine that reads or feeds a block network through a connector face (boiler, engine, sub-machines, pumps, intake, converter, cowper).Production-Machines
MachineSlotSpecWhat one slot of a machine station accepts.Production-Machines
MachineStationInventoryA machine station's inventory, built from the station's MachineSlotSpec array.Production-Machines
ProductionProcessDrives the production process a machine carries, without naming the class that carries it.Production-Machines
ProductionReadinessReads the readiness a machine publishes.Production-Machines

Wiring a network

Pipes, wires and canals are a graph: which blocks join, what happens when a run is cut in two or two runs meet, how a node knows its orientation, what a chunk unload does to the run. One manager owns all of it. The types here are the two halves you meet - the graph model, and the block entities and blocks that sit in it - so your node only declares what it connects to and what flows.

TypeWhat it is forPage
BlockNetworkAbstract base for all live block-network instances.Block-Networks
INetworkConnectorA port: a face another network may couple to, on a block that is not itself a graph member - the lancashire boiler's water intake is one.Block-Networks
INetworkMemberOne cell's participation in a block network, as the graph walk sees it.Block-Networks
INetworkNodeBase interface for block entities that participate in a block network (gas pipes, molten canals).Block-Networks
BEBehaviorNetworkMemberOne network membership held by a block entity: which network it joins and which faces it couples on.Block-Networks
BlockEntityNetworkNodeBase block entity for any block that is a node in a BlockNetwork (gas pipes, molten canals).Block-Networks
BlockNetworkModSystemGraph manager for all block networks: node add/remove, BFS fracture detection, and per-tick dispatch.Block-Networks
BlockNetworkNodeBase class for Block types that auto-orient from the surrounding blocks of the same network to form a connected run.Block-Networks
NetworkMembershipFinds which network a cell belongs to.Block-Networks

Loading a catalogue

A catalogue is data a mod ships as JSON that another mod can extend without touching code: process routes, material roles, pipe and canal media, storage occupancy. The loaders here read every domain's files, merge them, invoke the code contributions JSON cannot express, and report which asset failed rather than swallowing it. Reach for them when your own content is a table other mods should be able to add rows to - Extending Processes works one through end to end.

TypeWhat it is forPage
AssetCatalogueLoaderReads every domain's config/<mine>/*.json under a path into a typed object and tells the caller what failed - the plain primitive ContributedCatalogueLoader<TSet, TRegistry> builds on.Extending-Processes
AssetCatalogueLoader.ReadResult<T>One path's read: the parsed items, their sources, the file count, and one error per asset that did not parse.Extending-Processes
CatalogueContributorsCode contributions to one catalogue, re-invoked after every load so a C# entry survives the clear that precedes each AssetsFinalize read.Extending-Processes
CatalogueLoadReportOne catalogue's load outcome: files read, entries accepted, and the errors, each naming its asset.Extending-Processes
ContributedCatalogueLoader<TSet, TRegistry>The base every hand-parsed catalogue with C# contributors derives from: read, audit keys, parse once, merge, invoke contributors, report.Extending-Processes
ItemDieA die: the swappable tooling a heading, nail or rivet bench works with, carrying the job it does in a machinejob attribute.Extending-Processes
MachineToolThe cutting tooling a machine is fitted with: a consumable carrying a hardness tier and nothing else.Extending-Processes
ProcessExtensionsThe public C# route into the process registries, for a mod that computes a spec at load or is happy to take a hard dependency on exlib.Extending-Processes
ProcessItemEmitterBuilds an ExItemDef for every stopping point in the stage catalogue, injected through the same path MetalFamilyEmitter uses for metal families.Extending-Processes
ProcessItemRenamesRewrites held stacks of a stage product that has been renamed, from the formerCodes the stage declares.Extending-Processes
ProcessJobOne terminal job: a piece goes in, one kind of thing comes out, and Count of them do.Extending-Processes
ProcessJobLoaderReads the terminal-job catalogue - every domain's config/processjobs/*.json - and populates ProcessJobRegistry from it.Extending-Processes
ProcessJobRegistryThe merged catalogue of every terminal job, keyed by machine.Extending-Processes
ProcessJobSetEvery terminal job one machine can do, as a mod declares them.Extending-Processes
ProcessRouteOne stock family's route of ProcessStages - every state that family can be worked into, across every machine family that works it.Extending-Processes
ProcessRouteLoaderReads the stage catalogue - every domain's config/processroutes/*.json - and populates ProcessRouteRegistry from it.Extending-Processes
ProcessRouteRegistryThe merged catalogue of every ProcessRoute in the world, keyed by stock family.Extending-Processes
ProcessStageOne state of a piece part-way through a sequence process: the thickness it sits at, the shape element that draws it, the machine families that accept it, and the item code it becomes when it is a stopping point.Extending-Processes
SpecSchemaThe versioning contract every spec attribute carries.Extending-Processes
MaterialRoleCatalogueThe config/materialroles.json file shape: one materials array of role entries, like LiquidCatalogue.Extending-Processes
MaterialRoleDefOne material-role assignment: the data a machine reads to classify a flux, fuel, ore, scrap or charge item.Extending-Processes
MaterialRoleLoaderPopulates MaterialRoleRegistry at AssetsFinalize: clear, overlay every domain's config/materialroles.json, then invoke the registered code contributors that cover the mod-gated registrations JSON cannot express.Extending-Processes
MaterialRoleRegistryProcess-wide catalogue of material-role assignments (MaterialRoleDef), consulted to tell flux, fuel, ore, scrap and charge apart.Extending-Processes
ExLiquidsProcess-wide catalogue of pipe and canal media (LiquidDef) and the single IMediumTaxonomy the pipe network reads.Block-Networks
IMediumTaxonomyMedium policy the pipe network consults instead of hardcoded medium strings, injected like IPipeVentStrategy.Block-Networks
LiquidCatalogueThe config/liquids.json file shape: one wrapper object carrying the medium entries.Block-Networks
LiquidCatalogueLoaderPopulates ExLiquids at AssetsFinalize: re-seed the built-ins, overlay every domain's config/liquids.json, invoke the code contributors.Block-Networks
LiquidDefOne pipe or canal medium descriptor: the data the network's compatibility, priority and phase-change logic reads in place of hardcoded medium strings.Block-Networks
LiquidPhasePhase of a pipe/canal medium: gases share one mixable family, while a liquid mixes only with the same liquid.Block-Networks
BayLayoutA row of storage cells filled by occupants of declared length: three one-cell stacks, a two-cell stack beside a one-cell one, or a single three-cell stack all fill a row of three.Registries
BayOccupancyHow many bay cells a stack of one item occupies.Registries
BayOccupancyLoaderReads the bay-occupancy catalogue - every domain's config/bayoccupancy/*.json - and populates BayOccupancyRegistry from it.Registries
BayOccupancyRegistryThe merged catalogue of what every item occupies, keyed by store.Registries
BayOccupancySetOne file's worth of occupancy rules, plus the store they are for.Registries
BayRunOne occupant of a bay row: the cell its run starts at and how many cells it spans.Registries

Helpers

The small things a machine ends up writing for itself: horizontal rotation math, a side check, particles and sounds, counting what a player is carrying, formatting a measurement for the look-at HUD, caching a tesselated mesh, hiding content behind a config gate. None of it is required to use exlib. Each entry is a few lines you do not have to get right a second time.

TypeWhat it is forPage
ExBlockAccessTyped block-entity lookups over IBlockAccessor: at a position, one step to a neighbour, or every matching neighbour around a position.Helpers-and-Renderers
ExChunkDataTyped per-chunk side-band data over IWorldChunk.GetModdata/SetModdata, keyed {domain}:{key}.Migrations-and-Healing
ExContentGateConfig-gated "disable this content" toggle: hides registered blocks and items from the creative inventory and handbook.Helpers-and-Renderers
ExCreativeTabsRegisters a mod's custom creative-inventory tab with the internal vanilla tab list.Helpers-and-Renderers
ExHighlightSlotsProcess-wide handout of distinct world.HighlightBlocks slot ids, so two features never collide by picking the same literal by hand.Helpers-and-Renderers
ExInfoGetBlockInfo line-builders: a plain Lang.Get line, the same guarded by a condition, and a measured value folded through ExMeasure.Helpers-and-Renderers
ExInteractionBuilds an Interaction from an interact handler's own arguments.Helpers-and-Renderers
InteractionWhat a click carried - held stack, tool, sneak, face, side - without deciding which side acts on it.Helpers-and-Renderers
ExInventoryShared inventory queries for machine costs: counting and consuming player items that match a predicate, over either the whole inventory or the hotbar only.Helpers-and-Renderers
ExItemsShared item-stack lookups for interaction help.Helpers-and-Renderers
ExMeasureDisplay-unit formatting shared across the mods.Helpers-and-Renderers
ExMeshSmall shared helpers for hand-tesselated block meshes.Helpers-and-Renderers
ExMeshCacheShared cache for tesselated block-entity meshes, keyed by everything that changes the mesh.Helpers-and-Renderers
ExOrientationHorizontal rotation math shared by the mod family's oriented blocks.Helpers-and-Renderers
ExOrientation.SegmentedCodeA block code's path split on -, for code that indexes or rewrites one dash-segment at a time and rejoins the rest unchanged.Helpers-and-Renderers
ExOrientationSchemeOne declared set of orientation tokens, plus the rotation rule that set implies.Helpers-and-Renderers
ExOrientationsThe named orientation schemes every mod declares against, so a block references a set instead of listing states inline.Helpers-and-Renderers
ExShapeElementsPrunes a loaded Shape to a chosen set of element paths - the mesh-side counterpart of a blocktype's selectiveElements, for a block entity that decides which parts to draw at runtime (a hearth showing only the pigs actually charged on it).Helpers-and-Renderers
ExSideThe Api.Side == EnumAppSide.X / World.Side == EnumAppSide.X check every machine writes by hand.Helpers-and-Renderers
ExTreeHelpers for reading values a block entity persisted into its attribute tree.Helpers-and-Renderers
ExWorldDataTyped per-world side-band data over ISaveGame.GetData/StoreData, keyed {domain}:{key}.Migrations-and-Healing
GameTimeAdvances a machine on game time (the world calendar) rather than real time.Helpers-and-Renderers
GraceTimerAccumulator for the "hold a condition for N seconds, then fire once" idiom used by boiler over-pressure and choke, engine over-pressure and pipe burst grace.Helpers-and-Renderers
MeasurementSystemThe unit system used when formatting measurements for the look-at HUD / block info / handbook.Helpers-and-Renderers
SurfaceRendererBase for renderers that draw a flat, textured horizontal surface (a liquid line) inside a block: boiler water, molten metal in canals, taps and molds.Helpers-and-Renderers
ToggleAnimatorRendering helper for a block entity that animates through BEBehaviorAnimatable and BlockEntityAnimationUtil but is not raised via RightClickConstructable (ExpandedLib.Blocks.ConstructedAnimator is the constructed equivalent).Helpers-and-Renderers

Supporting older game versions

exlib targets 1.22, and the family also builds and runs on 1.21 and 1.20 from this one source tree. If you target 1.22 alone you can ignore this section.

Compiled only for the 1.20 and 1.21 targets: shims that let code written against the 1.22 API build unchanged there (mods/LegacyUsings.cs brings them into scope on those targets). They are absent from the 1.22 assembly; the guard that checks this page resolves them from source instead of reflection on that target.

TypeWhat it is forPage
LegacyApiC# 14 extension members that fill in API members missing from the pre-1.22 game surface, so mod code written against 1.22 compiles unchanged on the legacy target frameworks.Getting Started
LegacyApi120Shims for members that arrived in 1.21 (player-aware drop stacks, the tool-mold mesh angle), compiled for 1.20 only.Getting Started
LegacyAnimUtilThe animation-utility overloads the 1.22 API gained, such as the five-argument CreateMesh, for the earlier game versions.Getting Started
LegacyLinqPolyfills of LINQ members added after net7.0, such as Enumerable.Index().Getting Started

Extending Industry

The systems the family mods are made of, in a separate assembly and package, exlib.industry.dll / ExpandedLib.Industry, referenced alongside ExpandedLib by a mod that wants them: gas and liquid pipes, molten metal, mechanical-power ports for mega-blocks, metal descriptors and a process heat balance. Reference it when your blocks carry gas, liquid, metal or shaft power, and leave it out otherwise.

It is public and reusable, but it is the family's content layer rather than the framework: it changes without notice, and the one-release deprecation promise above does not cover it.

ExpandedLib.Industry.Pipes

Gas and liquid runs: the pipe block and block entity you derive from, and the contracts a pipe opts into - burstable under pressure, throughput-limited, drawn on by a chimney.

TypeWhat it is forPage
BlockEntityPipeBlock entity for all pipe blocks.Block-Networks
BlockEntityPipePassthroughBlock entity for the pipe passthrough: a plain pipe node, used as a gas consumer by adjacent machines.Block-Networks
BlockPipeThe base pipe block: a self-orienting node of the unified "pipe" network.Block-Networks
BlockPipePassthroughPassthrough pipe: carries gas straight through a wall.Block-Networks
ChimneyVentPipe-network vent strategy: a vanilla chimney capping the top connector of an IChimneyVentable node draws gas out of the run and puffs smoke.Block-Networks
IBurstablePipeA pipe-network block that can fail under over-pressure.Block-Networks
IChimneyVentableMarker for a pipe-network node whose open top connector may be drawn through by a vanilla chimney, which acts as a sink rather than a leak.Block-Networks
IPipeNodeA block entity that participates in the pipe network as an addressable node: gas or liquid can be injected (TryProduce) or withdrawn (TryConsume) at its position, and the network's medium, temperature, pressure and volume can be read.Block-Networks
IPipeVentStrategyOptional per-network strategy for gas vents: open connectors that draw gas away as a sink rather than leaking it, such as a chimney capping a vertical pipe.Block-Networks
IThroughputLimitedPipeA pipe-network block that limits how much can move through a run per second.Block-Networks
PipeNetworkConcrete BlockNetwork for the pipe system.Block-Networks
PipeNetworkStateLive state of a pipe run.Block-Networks

ExpandedLib.Industry.Molten

Molten metal as a medium that flows: the per-cell store a block entity holds, the canal network that moves it between cells, and the chisel interaction that recovers it once it has set.

TypeWhat it is forPage
BEBehaviorMoltenCellOne molten-metal cell as a composable block-entity behaviour: holds a single cell's metal (amount, type, temperature) and the per-cell operations the molten system drives, so any block entity can be an IMoltenCell by composition, including a mega-block footprint cell hosted through IFillerHostedBehavior.Block-Networks
ChiselOutcomeWhat a chisel and hammer click resolved to on an IChiselableMolten holder.Block-Networks
IChiselableMoltenA block entity holding molten metal that, once solidified and cooled, can be chipped out with a chisel and hammer instead of breaking the whole block (canal cells, the molten barrel, the bessemer charge).Block-Networks
IMoltenCellThe per-cell contract the MoltenNetwork flow driver needs from each molten-canal block entity: stored metal (amount, type, temperature), capacity, the two flow-blocking latches, and two capability flags that stand in for concrete block-entity type checks - a flow source (the canal start, where the distance-from-start BFS roots) and a drain fitting (tap, mold pedestal) that accepts the final sub-minimum dregs so a run can empty completely.Block-Networks
MoltenCellHostAddressing molten cells on a block entity that hosts more than one.Block-Networks
MoltenChargeA body of molten metal held inside a machine or fitting: a temperature-tracked ItemStack carrier identifying the metal and its heat, plus a unit count.Block-Networks
MoltenChiselThe chip-solidified-metal-out interaction shared by every IChiselableMolten holder (canal cells, the molten barrel, the bessemer vessel): tool gating, not-ready feedback, the recovered drop, tool wear and sound.Block-Networks
MoltenContentsRound-trips the metal a carried barrel or tool-mold item holds through the stack's blockEntityAttributes tree.Block-Networks
MoltenMetalSingle source of truth for treating an ItemStack as a carrier of molten metal: creating the temperature-tracked stack, reading/writing temperature, classifying thermal state, the incandescent block-light scale, and player-facing metal/state formatting.Block-Networks
MoltenNetworkConcrete BlockNetwork for the molten-canal system.Block-Networks
MoltenStateCoarse thermal state of a metal stack relative to its melting point.Block-Networks

ExpandedLib.Industry.MechanicalPower

The shaft-power side: the port a mega-block hosts on one footprint cell so an axle has something to couple to, and the producer, consumer and storage roles a node takes on an energy run.

TypeWhat it is forPage
BEBehaviorMPFillerPortA minimal mechanical-power node a mega-block hosts on one of its invisible footprint cells (see StructureFillers / IFillerHostedBehavior), giving the MP network a participant at the cell where an axle couples - the principal block, two cells away, cannot accept power at that face.Block-Networks
BEBehaviorMPSubmachineBaseShared base for a mechanical-power node whose block renders a static body plus a vanilla-spun axle (the Bessemer transmission, the engine MP generator).Block-Networks
IMpEnergyConsumerA node that loads the run: a heavy machine such as a rolling pass, hammer or crusher.Block-Networks
IMpEnergyDirectionA node that knows which way the run turns.Block-Networks
IMpEnergyProducerA node that drives a mechanical-energy run, such as an engine generator or the flywheel's bridge to the vanilla MP network.Block-Networks
IMpEnergyStorageA node that stores energy: a flywheel, or the small inherent inertia of a cast-iron shaft or gear.Block-Networks
MPAnimPhase-lock math for mega-block parts (a rotor, a gear, a piston) that must turn in step with a mechanical-power axle rather than merely at a proportional speed.Block-Networks
MpEnergyNetworkConcrete BlockNetwork for the mechanical-energy system: one shared reservoir that IMpEnergyProducer engines drive, IMpEnergyStorage flywheels buffer, and IMpEnergyConsumer machines load.Block-Networks
MpEnergyNetworkStateLive state of one mechanical-energy run modelled as a single spinning shaft: a drive applies torque, machines and friction resist it, and the net torque spins a lumped inertia up or down; stored energy is half the inertia times the squared speed.Block-Networks

ExpandedLib.Industry.Metals

The metal and alloy catalogue the molten system reads instead of parsing item codes, and the emitter that generates a whole item family for a metal that opts in.

TypeWhat it is forPage
MetalAlloyIngredientOne ingredient of a MetalAlloySpec: a metal short code and its ratio band.Extending-Processes
MetalAlloySpecInline alloy ratios for a MetalDef (the vanilla AlloyRecipe shape).Extending-Processes
MetalCatalogueLoaderPopulates MetalRegistry at AssetsFinalize in two passes: a derived baseline of one convention entry per metal in every loaded worldproperties/block/metal (vanilla and mods), so a metal shipping no MetalDef still has an entry, then an overlay of every domain's config/metals/*.json MetalDef, which enriches or replaces that entry.Extending-Processes
MetalDefOne metal or alloy descriptor - the source of truth the molten system reads instead of string-munging item codes.Extending-Processes
MetalFamilyEmitterGenerates the resource item family (ingot / plate / bits / rod / nails) for every MetalDef that opts in via GenerateItemFamily, plus that metal's tools from MetalToolEmitter.Extending-Processes
MetalRegistryProcess-wide catalogue of MetalDefs, consulted by the molten system in place of item-code string surgery.Extending-Processes
MetalToolSpecTool stats for a generated metal family (Tools).Extending-Processes

ExpandedLib.Industry.Heat

One process heat balance, captured as the tick computed it, and the block-info readout a furnace or converter shows from it.

TypeWhat it is forPage
HeatBalanceOne evaluation of a process heat balance, captured as the tick computed it so block info reads the contributors without recomputing.Helpers-and-Renderers
HeatBalanceHudFormats the shared part of a furnace or converter heat-balance readout: internal temperature, the threshold it must clear, the heat-in and heat-loss ledger, and the blast state.Helpers-and-Renderers
HeatBalanceLedgerKeysThe lang keys a HeatBalance ledger reads, supplied by the machine because exlib ships no lang of its own.Helpers-and-Renderers

ExpandedLib.Industry.Helpers

Content helpers shared across the family mods: display names that carry a block's material variant, tool-mold drops, particles and sounds.

TypeWhat it is forPage
ExBlockNamesComposes block display names that include the block's material variant: pipe metal ("Piping (Straight, Steel)"), canal rock, passthrough brick and refractory tier, so that same-shaped blocks of different materials are distinguishable in the inventory, handbook and look-at HUD.Helpers-and-Renderers
ExMoldDropsReads a tool mold's cast-product templates off its block attributes: the vanilla drop (single) or drops (array) schema, resolved with the mold's own domain as the default for unqualified codes, matching BlockEntityToolMold.GetMoldedStacks.Helpers-and-Renderers
ExMoldGateCross-mod hook for asking whether a tool-mold type is currently disabled by a config gate, without the asker referencing the mod that owns the molds.Helpers-and-Renderers
ExParticlesShared catalogue of particle effects for the mod family (iiex + siex).Helpers-and-Renderers
ExSoundsShared catalogue of sound asset locations and play helpers used across the mod family (iiex + siex).Helpers-and-Renderers

ExpandedLib.Industry.Materials

The canonical role tokens the machines classify flux, fuel, ore, scrap and charge by.

TypeWhat it is forPage
RolesThe canonical material-role tokens the machines classify by.Extending-Processes

Obsolete members

A member on its way out is listed here, marked [Obsolete] in the code with its replacement named, for the one full release it stays deprecated before it is removed. If you call something in this table, the replacement column is the whole migration.

MemberReplacementObsolete sinceRemoved in
ExBlockDef.Raw(string, JToken) / Raw(string, object)ExBlockDef.RootKey0.8.00.9.0
ExBlockDef.RawByType(string, string, object)ExBlockDef.RootKeyByType0.8.00.9.0
ExItemDef.Raw(string, JToken) / Raw(string, object)ExItemDef.RootKey0.8.00.9.0
ExItemDef.RawByType(string, string, object)ExItemDef.RootKeyByType0.8.00.9.0
ExLiquids.Load(ICoreAPI)LiquidCatalogueLoader.Load(ICoreAPI)0.8.00.9.0
ExBlockDef.MineTool(EnumTool)none - mineTool is not a key the loader reads; use Material and MiningTier0.8.00.9.0