File Details
SPC Core 1.1.4 for SPC 0.2.0 (1.21.1)
- R
- Apr 12, 2026
- 49.66 KB
- 20
- 1.21.1
- NeoForge
File Name
storedprogramcontrols-1.1.4-api.jar
Supported Versions
- 1.21.1
Curse Maven Snippet
Stored Program Controls — API Changelog
API Version 1.1.4 (April 11, 2026)
Cumulative changelog covering all changes since API 1.1.0.
Custom Function Block Nodes
- SpcNodeSchema: Declares node type structure (type ID, execution phase, ports, parameters, display requirement) for addon registration via SpcNodeRegistry.
- ISpcNodeFactory + NodeCompilationContext: Factories receive resolved signal addresses and parameter values at compile time.
- ISpcCompiledNode: Per-tick execution interface with access to the signal bus and world context.
- SpcNodeRegistry: Thread-safe static registry for addon node types, frozen after setup.
SpcNodeSchema Optional Metadata
- displayName: Human-readable name for the palette and tooltips (e.g. "Rotation Input"). Falls back to a formatted version of the typeId.
- shortLabel: Abbreviated label for the palette glyph (e.g. "RI"). Falls back to the first two characters of displayName.
- description: Tooltip description text (e.g. "Reads rotation data from a kinetic source"). Falls back to "N inputs, M outputs".
- labelPrefix: 1-3 character prefix for PLC-style editor labels. When set and the node has a channel parameter, the editor shows prefix + channel (e.g. "RI1", "RQ2") instead of the generic "B001" label. (Added in 1.1.4)
Signal System
- 6 signal types: Digital, Integer, Decimal, Text, Item, Item_ID.
- Full cross-type conversion (asDigital, asInteger, asDecimal, asText).
- SpcSignalAddress (nodeId + portId) for resolved signal bus addressing.
- Signal domains for port compatibility checking.
- readDecimalSignal() and double persistent slots (getDoubleSlot/setPendingDoubleSlot) for precise floating-point state.
Four-Phase Execution Model
- Input Read → Logic Evaluation → State Update → Output Apply.
- SpcExecutionPhase enum for declaring node execution order.
Persistent Node State
- Slot-based storage that survives across ticks and world saves.
- Integer slots (getSlot/setPendingSlot) and double slots (getDoubleSlot/setPendingDoubleSlot).
Custom Node Colors
- SpcNodeColors: Addons define custom ARGB colors (fill, stroke, text, labelText, activeFill).
- Convenience factories: SpcNodeColors.fromAccent(int), SpcNodeColors.of(int fill, int stroke).
- Nodes without custom colors fall back to the default brass palette.
Node Categories & Palette
- SpcNodeCategory: Custom palette groups with categoryId, displayName, sortOrder, and optional iconTexture.
- Addon nodes merged into the palette sorted by category sortOrder.
Programming Block Categories
- SpcProgramBlockCategory: Themed Programming Block variants with custom display names and visual styles.
- SpcProgramBlockStyle: Defines primaryTint, secondaryTint, emissiveTint. Includes fromAccent(int) factory.
- SpcProgramBlockRegistry: Thread-safe static registry, frozen after setup.
Multiblock Module API
- SpcModuleTypeRegistry: Register custom multiblock module types with optional I/O handlers.
- ISpcMultiblockModule: Interface for blocks to participate in LOGO multiblock BFS discovery.
- ISpcPhysicalIoHandler: Channel-based I/O handling for custom input/output modules.
- SpcMultiblockPosition: Position tracking within the multiblock structure (INPUT_ROW, OUTPUT_ROW, MIDDLE_ROW, POWER_ROW).
- SpcModuleType: Record declaring module identity, display name, position, and I/O flag.
Multiblock Connected Textures
- MultiblockPosition enum (with MB_POS block state property) included in the API jar. (Added in 1.1.3)
- 10 position values (TOP_FIRST, TOP_MID, TOP_LAST, CENTER_FIRST, CENTER_MID, CENTER_LAST, BOTTOM_FIRST, BOTTOM_MID, BOTTOM_LAST) plus NONE for unformed state.
- Addon blocks that register MB_POS in createBlockStateDefinition() automatically receive position-aware connected textures when the LOGO multiblock forms — borders are removed on internal seams, matching built-in blocks.
- Provide blockstate JSON variants for each (facing, mb_pos) combination and models inheriting from SPC's logo_mb_* parent templates.
Connected Display API
- ISpcConnectedDisplay: Interface for addon display blocks to participate in display-to-display connected textures. Return the display facing direction via getDisplayFacing(BlockState). SPC's built-in displays recognize addon blocks as valid texture neighbours. (Added in 1.1.2)
Diagnostics Panel API
- ISpcDiagnosticsProvider: Interface for addon block entities to contribute live diagnostic entries to the programming editor's Diagnostics Panel. (Added in 1.1.2)
- SpcDiagnosticEntry: Data record with label (String), value (String), and active (boolean). 2-arg constructor auto-detects active state. Entries appear in a dedicated "Addon" section of the diagnostics overlay.
Network Device API
- SpcNetworkRegistry: Register custom network device types.
- ISpcNetworkDevice, ISpcNetworkActivation, ISpcCableTraversable: Interfaces for custom network-connected blocks (buttons, levers, displays, etc.).
Runtime Events API
- SpcRuntimeEventRegistry: Register ISpcRuntimeEventListener implementations.
- Listeners receive callbacks for program lifecycle events (start, stop, error, tick).
Context Extension System
- SpcContextExtensionRegistry: Register ISpcExecutionContextExtension implementations for custom world interactions (e.g. Create rotational force, Mekanism gas levels).
- Extensions receive onTickStart(ServerLevel, BlockPos) each tick before node execution.
- Compiled nodes retrieve extensions via ISpcExecutionContext.getExtension(Class).
Bug Fixes (included in runtime jar)
- Addon blocks now recognized by multiblock validator. Previously, blocks implementing ISpcMultiblockModule were invisible to BFS structure discovery and type validation, causing "Missing Input Block" / "Missing Output Block" errors. (Fixed in 1.1.1)
- Port signal type mismatches no longer block simulation. If an addon changes a port's signal type between versions, existing saved programs reported a blocking error. Now reported as a warning with "Re-place the node to update" message. (Fixed in 1.1.4)
API Jar Contents
- 39+ classes across 12 packages under com.hypernova.spc.api.**
- MultiblockPosition class from com.hypernova.spc.multiblock.model (since 1.1.3)
- Separate compile-only jar: storedprogramcontrols-1.1.4-api.jar
- Runtime jar: storedprogramcontrols-0.2.0.jar (required in run/mods/)
Version History
- 1.1.0: Initial public API release (39 classes, 12 packages).
- 1.1.1: Fixed multiblock validator not recognizing ISpcMultiblockModule blocks.
- 1.1.2: Added ISpcConnectedDisplay, ISpcDiagnosticsProvider, SpcDiagnosticEntry.
- 1.1.3: Exposed MultiblockPosition (MB_POS) in API jar for connected textures.
- 1.1.4: Added SpcNodeSchema.labelPrefix; port signal type mismatch downgraded to warning.

