Redstone API
A Redstone Expansion is a control expansion addressed with the /redstone suffix: point("name/redstone"). It has no resource buffer and cannot be passed to move().
Interface settings
Section titled “Interface settings”| Setting | Options | Default | Description |
|---|---|---|---|
| Direction | Input / Output |
Input |
Selects whether this face reads incoming signal or drives outgoing signal. |
| Fault value | 0 – 15 |
0 |
Output signal applied automatically when the PLC is Stopped, Waiting, Faulted, broken, unbound, or orphaned. |
Methods
Section titled “Methods”P.get() -> int
Section titled “P.get() -> int”- On an Input: Returns incoming redstone signal strength (
0–15) at the attached face. On Tier 2/3 Interfaces, side views (P.north.get(), etc.) read incoming signal on that face of the attached block. - On a bare Output: Returns the currently held output signal level (
0–15). - On an Output side view: Faults (use the bare point).
P.set(level: int) -> None
Section titled “P.set(level: int) -> None”- Stages an outgoing redstone signal strength (
0to15) to be applied at commit and published to neighboring blocks. - On an Input: Faults.
- On a side view: Faults (always call
set()on the bare point). - Out-of-range level: Values outside
0–15fault.
Groups (points("lamp_*/redstone"))
Section titled “Groups (points("lamp_*/redstone"))”G.set(level)sets every member in the group. Faults if any member is configured as an Input.- Groups do not support
G.get(); iteratefor p in G:and callp.get()on each member.
Persistence & timing
Section titled “Persistence & timing”- Outputs hold their last committed level between scans while the PLC remains in Running mode.
- Inputs are sampled only during scans; pulses shorter than the scan interval that start and end between scans are not observed.
- If a PLC stops, waits, faults, breaks, or loses an Interface while chunks are unloaded, MPLC records the release and applies the configured Fault value as soon as the chunk loads again.
Not an official Minecraft website. Not approved by or associated with Mojang or Microsoft.