2025-10-31 21:42:52 +01:00
2025-10-31 18:55:16 +01:00
2025-10-31 18:55:16 +01:00
2025-10-31 21:42:52 +01:00
2025-10-31 18:55:16 +01:00
2025-10-31 18:55:16 +01:00
2025-10-31 18:55:16 +01:00
2025-10-31 18:55:16 +01:00
2025-10-31 18:55:16 +01:00
2025-10-31 18:55:16 +01:00
2025-10-31 18:55:16 +01:00
2025-10-31 18:55:16 +01:00

OC2R GregTech Bridge (Scaffold)

Minimal Forge 1.20.1 addon showing how to expose GregTech CEu capabilities to OC2R computers.

Structure

  • OC2RGTCEuMod wires the OC2R device registration at construction time and relies on declared dependencies.
  • BlockDeviceProviders registers OC2R block device providers via DeferredRegister.
  • WorkableDeviceProvider adapts IWorkable to an OC2R ObjectDevice with callbacks mirroring the CC:Tweaked integration.
  • ControllableDeviceProvider, EnergyInfoDeviceProvider, TurbineMachineDeviceProvider, CentralMonitorDeviceProvider, and CoverableDeviceProvider wrap the matching GregTech Forge capabilities so every CC:Tweaked peripheral has an OC2R equivalent.
  • Device implementations reuse OC2R's ObjectDevice helper to expose annotated callback classes while keeping state on GregTech capability instances.
  • Manual content under assets/oc2rgtceu/doc/en_us mirrors the Create add-on layout so the OC2R handbook documents each capability bridge.

Next Steps

  1. Replace the placeholder Maven coordinates in build.gradle with real project dependencies (local or published jars).
  2. Add OC2R documentation/manual pages and example scripts translating the existing CC workflows.
  3. Expand the device callbacks with parameter validation and documentation strings.
  4. 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.md for OC2R's capability bridge guidelines and lifecycle notes.
  • sources/oc2r/addon/oc2r-create for 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.lua
  • controllable_test.lua
  • energy_info_test.lua
  • turbine_test.lua
  • central_monitor_test.lua
  • coverable_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 (68 interfaces): ~34 developer days to mirror CC:Tweaked behavior across workable, controllable, energy info, turbine, cover, and central monitor hooks.
  • Provider infrastructure: ~12 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.51 day to finalize metadata, manuals, and usage examples.

Total: roughly 68 focused dev days to reach feature parity with the existing CC:Tweaked integration, leaving some buffer for polish or unexpected edge cases.

Description
No description provided
Readme 122 KiB
Languages
Java 87.8%
Lua 12.2%