Example Forge 1.7.10 mod for exercising the Electrical Age public API from Kotlin.
This repository is meant for API development and validation. It contains small, focused blocks that each cover part of the integration surface and make regressions visible quickly in-game.
API Test Block: basic power load exposurePlacement Resistor: oriented two-terminal 200 ohm resistorSignal Voltage Display: reads a signal wire and renders the voltage on top of the blockFixed Signal Source: outputs a constant3.3VsignalFixed Voltage Source: outputs a constant240Vpower voltageSignal Bus Monitor: renders a 4x4 top-face grid from signal bus channel voltages
All example blocks are grouped under the Electrical Age API Tests creative tab.
This project uses a checked-in local Electrical Age API jar from libs/Eln-1.24.7-api.jar. The current dependency is declared in dependencies.gradle.
When the API changes:
- Build a fresh deobfuscated API jar.
- Replace the jar in
libs/. - Update the filename in
dependencies.gradleif needed. - Update the canonical API documentation in the Electrical Age repo:
docs/electrical-api-v1.md. - Rebuild this example mod and retest the affected example blocks.
- Compile:
./gradlew compileKotlin compileJava - Run client:
./gradlew runClient
Waila is included as a compile-only dependency. The mod still loads without Waila present at runtime.
src/main/kotlin/mods/elnapi: mod code and example blockssrc/main/kotlin/mods/elnapi/client: client-side rendererssrc/main/kotlin/mods/elnapi/integration/waila: Waila integrationsrc/main/resources/assets/elnapitest: lang and textures- Canonical API docs:
https://github.com/age-series/ElectricalAge/blob/main/docs/electrical-api-v1.md