CC: Relative Routing
ModCall peripherals using relative coordinates instead of ids
Type
Mod
Modrinth Downloads
10
Modrinth ID
f9u6cNVe
Last Updated
Jun 8, 2026
Description
CC: Relative Routing
CC: Relative Routing adds two ComputerCraft peripherals that lets you interact with the world using relative coordinates instead of peripheral IDs, making your programs portable and replicable.
Blocks
Redstone Router
Send wireless redstone signals to relative coordinates and block faces.
Connect a CC computer to the Redstone Router, then use the redstone_router peripheral:
local router = peripheral.find("redstone_router") -- Power the north face of the block 3 east, 0 up, 2 north of the router router.setRedstone(3, 0, -2, "north", 15) -- Read back the stored value print(router.getRedstone(3, 0, -2, "north")) -- 15 -- Remove all active signals router.clearAll()API
Method Description setRedstone(x, y, z, side, power) Sets a redstone signal (power 0–15) on the given face of the target block. Power 0 removes the signal. getRedstone(x, y, z, side) Returns the currently stored power for that offset + face. clearAll() Removes all active signals from this router.side is one of: north south east west up down
Peripheral Router
Wrap any CC-compatible peripheral nearby using relative coordinates instead of a peripheral name or side. The peripheral can be used as if it was connected to the computer.
local router = peripheral.find("peripheral_router") -- Wrap a monitor at offset (3, 0, 0) local mon = router.wrap(3, 0, 0) mon.setTextScale(1) mon.clear() mon.setCursorPos(1, 1) mon.write("Hello from relative routing!") -- Check what's at an offset before wrapping if router.isPresent(0, 2, 0) then print(router.getType(0, 2, 0)) -- e.g. "monitor" print(router.getMethods(0, 2, 0)) -- list all methods end -- Call a single method without wrapping router.call(3, 0, 0, "write", "Hello")API
Method Description wrap(x, y, z) Returns a proxy object with all the target peripheral's methods. Prefer this for interacting with peripherals. isPresent(x, y, z) Returns true if a peripheral exists at the offset. getType(x, y, z) Returns the peripheral type string, or nil if none. getMethods(x, y, z) Returns a table of all method names on the peripheral. call(x, y, z, method, ...) Calls a single named method. Note: may return nil for value-returning methods — use wrap() when you need return values.Coordinates are relative to the Peripheral Router block itself. Works with any CC:Tweaked peripheral: monitors, speakers, disk drives, modems, and peripherals added by other mods.
Target Wand
The Target Wand is a helper item that prints the correct relative coordinates for any block relative to a router, so you never have to count blocks manually.
Usage:
- Right-click a Redstone Router or Peripheral Router to select it as the controller.
- Right-click any other block to print the relative coordinates and a ready-to-use Lua snippet in chat.
For Peripheral Router targets, it also detects what peripheral (if any) is at that position.
Configuration
The config file is at config/ccrelativerouting-common.toml.
Option Default Description maxRange 128 Maximum distance for Redstone Router offsets peripheralMaxRange 128 Maximum distance for Peripheral Router offsetsCompatibility
Mod Loaders
Game Versions
Similar Mods
Spectral's Simple Sabers
An in-depth, lore-accurate Lightsaber mod!
Signalis Mod
This mod adds Replikas from the survival horror game Signalis to your Minecraft world. Fight corrupted variants or craft...
Safe Reroll
Safe Reroll is a client-side Fabric mod that blocks further sword damage rerolls once your configured percentage limit i...
Space Station Craft 14
This project aims to recreate the game Space Station 14 in Minecraft.
CavesChaos: More Caves & Biomes
Explore dangerous new cavern systems across the Overworld. Greater challenges, unique loot, and total chaos await!
Cataclysm Era
A post-apocalyptic mod that makes zombies extremely dangerous. Try your best to survive!