Robotics

A robot is a mobile computer. Install a CPU, RAM and firmware, charge it using a charger, and boot its terminal. Robots use modules instead of cards and cannot connect to the external device bus.

The demonstration robot on its charger, with a chest above it. (Minecraft 26.1.2)

The demonstration robot on its charger, with a chest above it. (Minecraft 26.1.2)

Set up Lua as described in scripting, then run:

r = require("robot")
print(r.move("forward"))
print(r.turn("left"))

These library functions wait for completion and return success. Direct devices calls enqueue actions instead; successful enqueueing is not completed movement.

Robot inventory slot numbers start at zero. Use an inventory operations module for item transfer, a block operations module for excavation/placement, a crafting module for recipes and a scanner for inspection.

r.facing() returns a compass direction. r.position() reports coordinates relative to the placement/calibration origin; r.calibrate() resets it. These are not absolute world coordinates or GPS. See the robot API for asynchronous actions and detailed methods.

In game

Actual Minecraft 26.1.2 screenshots from the OC2R demonstration world.

An oc2ctl robot-demo output excerpt: every queued action completed with SUCCESS. (Minecraft 26.1.2)

An oc2ctl robot-demo output excerpt: every queued action completed with SUCCESS. (Minecraft 26.1.2)


OC2R source · 2d55dce5a222