# techtastic/oc-sable architecture

> Architecture diagram of the GitHub repository techtastic/oc-sable, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/techtastic/oc-sable
- Repository: https://github.com/techtastic/oc-sable

## Overview

OC: Sable is an OpenComputers: Rebooted addon that exposes Sable sub-level and dimension-physics data through an installable computer card. A computer uses the card’s `sable` component: OpenComputers matches the card driver, creates a server-side environment, and dispatches Lua callbacks; those callbacks query Sable state and return values for OpenComputers conversion. The addon also converts Sable poses and physics settings, including callable pressure curves. README capabilities guide the feature scope; sampled source confirms the runtime wiring shown.

Main entry points: [`src/main/java/io/github/techtastic/ocsable/OCSable.java`](https://github.com/techtastic/oc-sable/blob/master/src/main/java/io/github/techtastic/ocsable/OCSable.java) (Mod entrypoint), [`src/main/java/io/github/techtastic/ocsable/oc/SableEnvironment.java`](https://github.com/techtastic/oc-sable/blob/master/src/main/java/io/github/techtastic/ocsable/oc/SableEnvironment.java) (Sable component), [`src/main/java/io/github/techtastic/ocsable/oc/SableCardDriver.java`](https://github.com/techtastic/oc-sable/blob/master/src/main/java/io/github/techtastic/ocsable/oc/SableCardDriver.java) (Card driver), [`src/main/java/io/github/techtastic/ocsable/oc/SableConverters.java`](https://github.com/techtastic/oc-sable/blob/master/src/main/java/io/github/techtastic/ocsable/oc/SableConverters.java) (Sable converter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_registration["Addon registration"]
  node_card["Sable card<br/>[Items.java]"]
  node_mod["Mod entrypoint<br/>[OCSable.java]"]
  node_manual["Manual resources<br/>[index.md]"]
end

subgraph group_runtime["Card runtime"]
  node_driver["Card driver"]
  node_environment["Sable component"]
end

subgraph group_conversion["Value conversion"]
  node_sableconverter["Sable converter"]
  node_jomlconverter["JOML converter<br/>[JOMLConverter.java]"]
  node_pressurecallback["Pressure callback"]
end

node_computer(("OC computer"))
node_ocruntime["OpenComputers runtime"]
node_sable["Sable API"]
node_dimensionphysics["Dimension physics"]

node_computer -->|"runs on"| node_ocruntime
node_computer -->|"installs"| node_card
node_mod -->|"registers"| node_card
node_mod -->|"registers"| node_driver
node_mod -->|"registers"| node_sableconverter
node_mod -->|"registers"| node_jomlconverter
node_mod -->|"registers resources"| node_manual
node_ocruntime -->|"matches card"| node_driver
node_driver -->|"creates component"| node_environment
node_ocruntime -->|"dispatches callbacks"| node_environment
node_environment -->|"reads sub-level state"| node_sable
node_environment -->|"queries physics"| node_dimensionphysics
node_ocruntime -->|"converts values"| node_sableconverter
node_ocruntime -->|"converts values"| node_jomlconverter
node_sableconverter -->|"wraps pressure curve"| node_pressurecallback
node_ocruntime -->|"returns component values"| node_computer

click node_card "https://github.com/techtastic/oc-sable/blob/master/src/main/java/io/github/techtastic/ocsable/init/Items.java"
click node_mod "https://github.com/techtastic/oc-sable/blob/master/src/main/java/io/github/techtastic/ocsable/OCSable.java"
click node_driver "https://github.com/techtastic/oc-sable/blob/master/src/main/java/io/github/techtastic/ocsable/oc/SableCardDriver.java"
click node_environment "https://github.com/techtastic/oc-sable/blob/master/src/main/java/io/github/techtastic/ocsable/oc/SableEnvironment.java"
click node_sableconverter "https://github.com/techtastic/oc-sable/blob/master/src/main/java/io/github/techtastic/ocsable/oc/SableConverters.java"
click node_jomlconverter "https://github.com/techtastic/oc-sable/blob/master/src/main/java/io/github/techtastic/ocsable/oc/JOMLConverter.java"
click node_pressurecallback "https://github.com/techtastic/oc-sable/blob/master/src/main/java/io/github/techtastic/ocsable/util/BezierResourceFunctionCallback.java"
click node_manual "https://github.com/techtastic/oc-sable/blob/master/src/main/resources/assets/ocsable/doc/ocsable/en_us/index.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_card,node_mod,node_manual toneBlue
class node_driver,node_environment toneAmber
class node_sableconverter,node_jomlconverter,node_pressurecallback,node_sable toneMint
class node_computer,node_ocruntime,node_dimensionphysics toneIndigo
```

## Components

### Addon registration

- [Sable card](https://github.com/techtastic/oc-sable/blob/master/src/main/java/io/github/techtastic/ocsable/init/Items.java): `src/main/java/io/github/techtastic/ocsable/init/Items.java`
- [Mod entrypoint](https://github.com/techtastic/oc-sable/blob/master/src/main/java/io/github/techtastic/ocsable/OCSable.java): `src/main/java/io/github/techtastic/ocsable/OCSable.java`
- [Manual resources](https://github.com/techtastic/oc-sable/blob/master/src/main/resources/assets/ocsable/doc/ocsable/en_us/index.md): `src/main/resources/assets/ocsable/doc/ocsable/en_us/index.md`

### Card runtime

- [Card driver](https://github.com/techtastic/oc-sable/blob/master/src/main/java/io/github/techtastic/ocsable/oc/SableCardDriver.java): `src/main/java/io/github/techtastic/ocsable/oc/SableCardDriver.java`
- [Sable component](https://github.com/techtastic/oc-sable/blob/master/src/main/java/io/github/techtastic/ocsable/oc/SableEnvironment.java): `src/main/java/io/github/techtastic/ocsable/oc/SableEnvironment.java`

### Value conversion

- [Sable converter](https://github.com/techtastic/oc-sable/blob/master/src/main/java/io/github/techtastic/ocsable/oc/SableConverters.java): `src/main/java/io/github/techtastic/ocsable/oc/SableConverters.java`
- [JOML converter](https://github.com/techtastic/oc-sable/blob/master/src/main/java/io/github/techtastic/ocsable/oc/JOMLConverter.java): `src/main/java/io/github/techtastic/ocsable/oc/JOMLConverter.java`
- [Pressure callback](https://github.com/techtastic/oc-sable/blob/master/src/main/java/io/github/techtastic/ocsable/util/BezierResourceFunctionCallback.java): `src/main/java/io/github/techtastic/ocsable/util/BezierResourceFunctionCallback.java`

### Other components

- **OC computer**
- **OpenComputers runtime**
- **Sable API**
- **Dimension physics**

## Connections

- OC computer → OpenComputers runtime: runs on
- OC computer → Sable card: installs
- Mod entrypoint → Sable card: registers
- Mod entrypoint → Card driver: registers
- Mod entrypoint → Sable converter: registers
- Mod entrypoint → JOML converter: registers
- Mod entrypoint → Manual resources: registers resources
- OpenComputers runtime → Card driver: matches card
- Card driver → Sable component: creates component
- OpenComputers runtime → Sable component: dispatches callbacks
- Sable component → Sable API: reads sub-level state
- Sable component → Dimension physics: queries physics
- OpenComputers runtime → Sable converter: converts values
- OpenComputers runtime → JOML converter: converts values
- Sable converter → Pressure callback: wraps pressure curve
- OpenComputers runtime → OC computer: returns component values
