What you will end up with
Two computers communicating wirelessly: a sender that broadcasts commands, and a receiver that listens and acts on them — for example, toggling a redstone output or printing a status message.
What you need
- Two Computers (from CC:Tweaked)
- Two Wireless Modems — one per computer, placed on any side
- Both computers within modem range (vanilla wireless modem: 64 blocks; Ender Modem: unlimited)
id. You will need the receiver's ID for the sender script.
How rednet works
rednet is a high-level messaging API built on top of the raw modem API.
You open it on the side where the modem is attached, then use
rednet.send() to send to a specific computer ID or
rednet.broadcast() to send to all computers in range.
Step 1 — Set up the receiver
On Computer A (the receiver), attach a wireless modem to the top and create this script:
Run it:
Note the ID printed on screen — you need it for the sender.
Step 2 — Set up the sender
On Computer B (the sender), attach a wireless modem to the top and create this script.
Replace TARGET_ID with the ID you noted from the receiver.
Run it:
The receiver should print the message and toggle its redstone output.
Broadcasting to all computers
If you want to send a message to every computer in range without specifying an ID,
use rednet.broadcast():
Using protocols
For more complex networks, pass a protocol string to filter messages by type:
Troubleshooting
- rednet.open() fails — make sure the modem is on the correct side and is a wireless modem (not wired).
- No messages received — check that both computers have their modems open and are within range. Ender Modems work at any distance.
- Messages from the wrong computer — always check the
senderIdreturned byrednet.receive()before acting on a message.