COWMODSКаталог модов

CC: Relative Routing

Call peripherals using relative coordinates instead of ids

Автор: tomtomato1,8 тыс.4обновлён 29 авг. 2026 г.
Механики игрыТехнологииУтилиты

Описание

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 reproducible.


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 redstone
print(router.getRedstone(3, 0, -2, "north"))  -- 15

-- Remove all active signals
router.clearAll()

API

MethodDescription
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")

-- You can even move fluids
local input_fluid_tank = router.wrap(1,0,0)
local output_fluid_tank = router.wrap(3,0,0)
local moved = output_fluid_tank.pullFluid(input_fluid_tank, 1000, "minecraft:water")
print(moved .. " mB moved")

API

MethodDescription
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:

  1. Right-click a Redstone Router or Peripheral Router to select it as the controller.
  2. 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.

OptionDefaultDescription
maxRange128Maximum distance for Redstone Router offsets
peripheralMaxRange128Maximum distance for Peripheral Router offsets

Последние версии

Все версии →
release

CC: Relative Routing 1.2.1

1.2.1
29 авг. 2026 г.453Minecraft: 1.21.1neoforge
Скачать
Что нового
Fluid movement not working on certain modded fluid tanks fixed
release

CC: Relative Routing 1.2.0

1.2.0
19 авг. 2026 г.195Minecraft: 1.21.1neoforge
Скачать
Что нового
Routers can be rotate. Their relative coordinates rotate with them. This fixes setups breaking on schematic pastes that are rotated.
release

CC: Relative Routing 1.1.4

1.1.4
9 авг. 2026 г.276Minecraft: 1.21.1neoforge
Скачать
Что нового
- Blocks can now be mined faster with right tool (pickaxe) - Blocks now drop upon being mined with the right tool (pickaxe)
beta

CC: Relative Routing 1.1.3

1.1.3
11 июн. 2026 г.616Minecraft: 1.21.1neoforge
Скачать
Что нового
Fluid movement now works with wrapped peripheral name instead of string name
beta

CC: Relative Routing 1.1.2

1.1.2
10 июн. 2026 г.30Minecraft: 1.21.1neoforge
Скачать
Что нового
## 1.1.2 ### Fixed - `wrap()` now correctly wraps generic peripherals (fluid storage, item storage) previously these blocks would throw "No peripheral at (x,y,z)".
beta

CC: Relative Routing 1.1.1

1.1.1
8 июн. 2026 г.170Minecraft: 1.21.1neoforge
Скачать
Что нового
Crafting recipes added
beta

CC: Relative Routing 1.1.0

1.1.0
8 июн. 2026 г.17Minecraft: 1.21.1neoforge
Скачать
Что нового
Implementet peripheral router which allows wrapping peripherals using relative coordinates
beta

CC: Relative Routing 1.0.0

1.0.0
7 июн. 2026 г.31Minecraft: 1.21.1neoforge
Скачать
Что нового
Redstone Router added (can route redstone by using relative coordinates) Targeting Wand added (displays relative coordinates to a router)