OC2R GregTech Bridge (Scaffold)
Minimal Forge 1.20.1 addon showing how to expose GregTech CEu capabilities to OC2R computers.
Structure
OC2RGTCEuModwires the OC2R device registration at construction time and relies on declared dependencies.BlockDeviceProvidersregisters OC2R block device providers viaDeferredRegister.WorkableDeviceProvideradaptsIWorkableto an OC2RObjectDevicewith callbacks mirroring the CC:Tweaked integration.ControllableDeviceProvider,EnergyInfoDeviceProvider,TurbineMachineDeviceProvider,CentralMonitorDeviceProvider, andCoverableDeviceProviderwrap the matching GregTech Forge capabilities so every CC:Tweaked peripheral has an OC2R equivalent.- Device implementations reuse OC2R's
ObjectDevicehelper to expose annotated callback classes while keeping state on GregTech capability instances. - Manual content under
assets/oc2rgtceu/doc/en_usmirrors the Create add-on layout so the OC2R handbook documents each capability bridge.
Next Steps
- Replace the placeholder Maven coordinates in
build.gradlewith real project dependencies (local or published jars). - Add OC2R documentation/manual pages and example scripts translating the existing CC workflows.
- Expand the device callbacks with parameter validation and documentation strings.
- Wire up tests or dev run configs once dependencies are resolved.
Compatibility Checklist
IWorkable(WorkableDevice)IControllable(ControllableDevice)IEnergyInfoProvider(EnergyInfoDevice)ITurbineMachine(TurbineMachineDevice)ICentralMonitor(CentralMonitorDevice)ICoverable(CoverableDevice)
References
sources/docs/oc2r-compatibility.mdfor OC2R's capability bridge guidelines and lifecycle notes.sources/oc2r/addon/oc2r-createfor block-entity focused provider examples that complement the capability approach.
Dev Testing Scripts
Sample Lua rigs for exercise with an OC2R computer live under src/test/lua:
workable_test.luacontrollable_test.luaenergy_info_test.luaturbine_test.luacentral_monitor_test.luacoverable_test.lua- At runtime these ship via a layered filesystem and appear in Minux under
/mnt/builtin/oc2rgtceu/tests/. - Run
./gradlew generateTestRom(or any build task) to regenerate the datapack ZIP if the scripts change.
Estimated Effort for Full Compatibility
- Capability coverage (6–8 interfaces): ~3–4 developer days to mirror CC:Tweaked behavior across workable, controllable, energy info, turbine, cover, and central monitor hooks.
- Provider infrastructure: ~1–2 days to harden reusable provider bases and side/neighbor validation logic.
- Testing & validation: ~2 days to exercise machines in singleplayer and dedicated server environments, plus regression scripts.
- Packaging & docs: ~0.5–1 day to finalize metadata, manuals, and usage examples.
Total: roughly 6–8 focused dev days to reach feature parity with the existing CC:Tweaked integration, leaving some buffer for polish or unexpected edge cases.
Description
Languages
Java
87.8%
Lua
12.2%