general.mechanics.api package. All public types are safe to depend on from addon mods. Internal implementation types under general.mechanics.block, general.mechanics.item, etc. are not part of the stable API surface.
GM interface
general.mechanics.GM is the top-level entry point. It declares the mod ID constant, a resource location factory, and runtime accessors.
GM.getInstance().
Package reference
general.mechanics.api.energy
Energy storage and powered-block contracts.Key types:
CoreEnergyStorage, PoweredBlock, EnergizedCraftergeneral.mechanics.api.multiblock
Multiblock structure definition and runtime management.Key types:
MultiblockDefinition, MultiblockManager, MultiblockValidator, Layout, BlockPredicategeneral.mechanics.api.upgrade
Machine upgrade system.Key types:
UpgradeBase, UpgradeMap, Upgradeable, DeferredUpgradeMapgeneral.mechanics.api.item.element
Periodic-table element types and their item representations.Key types:
ElementType (enum), AlloyType (enum)general.mechanics.api.item.plastic
Plastic polymer types and their item/block representations.Key types:
PlasticType, PlasticTypeItem, ColoredPlasticItemgeneral.mechanics.api.electrical
Electronic component type enums and their item wrappers.Sub-packages:
capacitors, resistors, transistor, transformers, icsKey types: CapacitorType, ResistorType, TransistorType, TransformerType, IntegratedCircuitTypegeneral.mechanics.api.formula
Chemical formula display system, linking items to rendered chemical formulae.Key types:
Formula, IFormulaProvidergeneral.mechanics.api.fluid
Custom fluid definitions and client rendering extensions.Key types:
BaseFluid, FluidDefinition, IClientFluidExtensionsCore registries
All content registered by General Mechanics is accessible through static fields in thegeneral.mechanics.registries package. Each registry is a DeferredRegister instance bound to the gm namespace.
CoreBlocks
CoreItems
CoreElements
CoreElements registers element ingots and automatically derives six additional item forms per element: raw ore, nugget, dust, plate, pile, and rod.
ElementType is a comprehensive enum covering the entire periodic table. Each constant carries atomic number, symbol, display name, colour, mass, and flags such as isAlloy() and isNatural().
CoreFluids
CoreUpgrades
UpgradeBase is the base class for all upgrade items:
CoreRecipes
CoreComponents
CoreComponents registers NeoForge data component types for persisting machine state on item stacks:
persistent(Codec) so they survive item stack serialization to NBT.
CoreRegistries
CoreRegistries holds custom Registry instances for data-driven content:
DeferredRegister pattern
All GM registries follow the standard NeoForgeDeferredRegister pattern. When writing an addon you register against your own namespace, but you can reference GM’s DeferredRegister instances to look up existing entries or to obtain type information at startup.
DeferredRegister in your own namespace and reference GM API classes in your factories: