Advanced Peripherals Mod Guide: CC:Tweaked Bridges, Detectors & Automation
Advanced Peripherals extends CC:Tweaked with powerful peripheral blocks that let your ComputerCraft computers interact with Applied Energistics 2, Refined Storage, players, the environment, and energy systems. From sending chat messages via Lua scripts to automating your entire ME system, this mod bridges the gap between ComputerCraft and the rest of your modded Minecraft world.
Overview
Advanced Peripherals adds seven peripheral blocks and four turtle/pocket upgrades to CC:Tweaked (ComputerCraft). These peripherals let your computers communicate with players via chat, detect nearby players and environmental conditions, monitor energy flow, force-load chunks with turtles, and most importantly, fully control Applied Energistics 2 and Refined Storage networks through Lua scripts. If you've ever wanted to build a chat-controlled base, an automated crafting system triggered by Lua code, or a smart energy monitoring dashboard on a ComputerCraft monitor, this is the mod that makes it possible.
You can browse all items and recipes this mod adds using the tabs at the top of this page. This guide focuses on understanding what each peripheral does, how to set them up, and practical scripting examples to get you started.
Prerequisites
Advanced Peripherals is an addon for CC:Tweaked (the modern continuation of ComputerCraft). You need CC:Tweaked installed and should be familiar with placing Computers, opening the Lua prompt, and running basic programs. You do not need Applied Energistics 2 or Refined Storage to use the standalone peripherals (
Chat Box, Player Detector,
Environment Detector, Energy Detector), but the
ME Bridge requires a working AE2 network and the
RS Bridge requires a Refined Storage network.
All peripheral blocks are crafted using a
Peripheral Casing as the central ingredient, so that is always your first crafting step.
Getting Started
- 1
Craft a Peripheral Casing
The
Peripheral Casing is the foundation of every Advanced Peripherals block. It requires 4 Iron Ingots, 4 Iron Bars, and 1 Observer arranged in a crafting grid. Craft several of these since you will need one for each peripheral block you build. - 2
Build Your First Peripheral: The Chat Box
The
Chat Box is the easiest peripheral to test. Craft one using a
Peripheral Casing, a Gold Ingot, and Smooth Stone. Place it adjacent to a CC:Tweaked Computer and the computer will detect it as a "chatBox" peripheral. You can immediately start sending and receiving chat messages through Lua. - 3
Wrap the Peripheral in Lua
Open the Computer's terminal and type: local chatBox = peripheral.wrap("chatBox_0") (or use peripheral.find("chatBox")). You can now call chatBox.sendMessage("Hello world!") to broadcast a message to all players, or chatBox.sendMessageToPlayer("Hello!", "Steve") to message a specific player.
- 4
Listen for Chat Events
The
Chat Box fires a "chat" event whenever a player sends a message in game chat. Write a simple listener: while true do local event, username, message = os.pullEvent("chat") print(username .. ": " .. message) end. Messages that start with "$" are intercepted and hidden from other players, making them perfect for private commands to your computer. - 5
Expand to Other Peripherals
Once comfortable with the
Chat Box pattern, craft a Player Detector or
Environment Detector and connect them the same way. Each peripheral exposes different Lua functions that you can combine into powerful automation scripts. The storage bridges (
ME Bridge and
RS Bridge) are the most advanced and should be tackled once you have a working AE2 or RS network.
Core Crafting: Peripheral Casing










Standalone Peripherals
These peripherals work independently and don't require any storage mod. They are the core of Advanced Peripherals and cover chat communication, player tracking, environmental data, and energy monitoring.
Chat Box
The
Chat Box (peripheral type: "chatBox") is a two-way communication bridge between your CC:Tweaked Computer and the Minecraft chat. It exposes two Lua functions: sendMessage(message) broadcasts a text message to every online player, while sendMessageToPlayer(message, playerName) targets a specific player by their username.
The
Chat Box also listens to all incoming chat. Any message a player sends fires a "chat" event on connected computers with the username and message text. Messages prefixed with "$" are special: they get intercepted before reaching other players, making them invisible in public chat. This lets you create private command systems where typing "$lights on" in chat triggers your computer without anyone else seeing it.
There is a configurable cooldown between sent messages (default: 10 ticks, which is 0.5 seconds). Attempting to send messages faster than the cooldown throws a Lua error. The
Chat Box also works as a Turtle upgrade and a Pocket Computer upgrade, so you can carry chat functionality with you.
Prefix any chat message with "$" to send a hidden command that only your
Chat Box computers will see. Other players won't see the message at all. This is perfect for building chat-controlled door locks, lighting systems, or base defense toggles without cluttering the public chat.
Player Detector
The Player Detector (peripheral type: "playerDetector") lets your computer know who is nearby. It provides four Lua functions: getPlayersInRange(range) returns a list of player names within the specified block range. isPlayersInRange(range) returns true if any player is within range. isPlayerInRange(range, username) checks for a specific player. getPlayerPos(username) returns a table with the player's x, y, z coordinates.
The maximum detection range is configurable (default: 2,147,483,646 blocks, effectively unlimited). If a script requests a range higher than the configured maximum, the detector silently caps it. The Player Detector is available as both a Turtle upgrade and a Pocket Computer upgrade, which is particularly useful for building tracking systems or proximity-based automation.
Environment Detector
The
Environment Detector (peripheral type: "environmentDetector") provides comprehensive information about the world around it. It exposes a rich set of Lua functions covering light levels, weather, time, dimensions, moon phases, and biome detection.
Light functions include getSkyLightLevel(), getBlockLightLevel(), and getDayLightLevel() which returns the effective daylight accounting for sun angle and weather. getBiome() returns the biome name at the detector's position. Weather functions isRaining(), isThunder(), and isSunny() report current weather conditions.
Dimension functions include getDimensionName(), getDimensionProvider(), isDimension(name), and listDimensions() which returns all loaded dimensions. Moon tracking comes via getMoonId() (0-7) and getMoonName() (e.g. "Full moon", "Waxing crescent"). The isSlimeChunk() function is especially handy for finding Slime spawning chunks without external tools. getTime() returns the world time in ticks.
Energy Detector
The Energy Detector (peripheral type: "energyDetector") measures Forge Energy (FE/RF) flowing through it. Place it between an energy source and a consumer, and it acts as both a passthrough and a monitoring device. The block is directional: energy enters from the front face and exits from the back face.
It exposes three Lua functions: getTransferRate() returns the current FE/t flowing through the detector. getTransferRateLimit() returns the maximum transfer rate limit currently set. setTransferRateLimit(rate) caps the energy throughput to a specified FE/t value (up to Integer.MAX_VALUE). This means you can use it not just to monitor energy flow, but also to throttle it programmatically from Lua.
The internal buffer capacity matches the transfer rate limit, so changing the limit also adjusts how much energy the detector can buffer at once. The Energy Detector persists its rate limit and stored energy across chunk loads via NBT data.
The Energy Detector is directional. Energy flows in through the face you placed it from and out the opposite side. If your energy isn't flowing, try breaking and replacing the block while facing the correct direction. The input and output faces are determined by the block's facing property.
Storage System Bridges
The
ME Bridge and
RS Bridge are the flagship peripherals of Advanced Peripherals. They give your CC:Tweaked Computers full programmatic access to your Applied Energistics 2 or Refined Storage networks, enabling scripted inventory management, automated crafting requests, and energy monitoring, all from Lua.
ME Bridge (Applied Energistics 2)
The
ME Bridge (peripheral type: "meBridge") connects to an AE2 network and requires a channel to operate (it has the REQUIRE_CHANNEL grid flag). It consumes 500 AE/t of idle power, so make sure your network has sufficient energy generation. The block connects to AE2 cables on all six sides.
The
ME Bridge provides a comprehensive set of Lua functions for inventory and crafting management. listItems() returns every item stored in the network with name, amount, and tags. listCraftableItems() lists only items that have crafting patterns registered. listFluid() and listCraftableFluid() do the same for fluids.
For item movement, exportItem(item, direction) pushes items from the ME network into an adjacent inventory on the specified side (e.g. "north", "south"). importItem(item, direction) pulls items from an adjacent inventory into the network. There are also exportItemToChest(item, peripheralName) and importItemFromChest(item, peripheralName) variants that work with networked CC:Tweaked peripherals (like wrapped chests on a wired modem network).
For crafting, craftItem(item) submits an autocrafting request and returns when the job completes via a "crafting" event. isItemCrafting(item) checks if a particular item is currently being crafted. getCraftingCPUs() lists all crafting CPUs in the network. Energy monitoring is available through getEnergyUsage(), getEnergyStorage(), and getMaxEnergyStorage().
The
ME Bridge requires a free channel on your AE2 network, just like any other AE2 device. If you are running out of channels, connect it through a P2P tunnel or place it on a less crowded cable segment. It also draws 500 AE/t of idle power, so account for this in your energy budget.
RS Bridge (Refined Storage)
The
RS Bridge (peripheral type: "rsBridge") provides nearly identical functionality to the
ME Bridge but for Refined Storage networks. It integrates as a proper RS network node with redstone mode support.
It offers listItems(), listCraftableItems(), listFluids(), and listCraftableFluids() for querying stored and craftable resources. Item transfer functions exportItem(), importItem(), exportItemToChest(), and importItemFromChest() work the same way as the
ME Bridge equivalents. Crafting is handled through craftItem(item) and craftFluid(fluid, count), with isItemCrafting(item) to check active tasks.
Network energy monitoring is available via getEnergyUsage(), getEnergyStorage(), and getMaxEnergyStorage(). One advantage the
RS Bridge has over the
ME Bridge is craftFluid() for fluid autocrafting, which the
ME Bridge does not expose directly.
ME Bridge vs RS Bridge
| ME Bridge (AE2) | RS Bridge (RS) | |
|---|---|---|
| Peripheral Type | meBridge | rsBridge |
| Required Mod | Applied Energistics 2 | Refined Storage |
| Idle Power | 500 AE/t | Network default |
| Requires Channel | Yes | No |
| List Items | Yes | Yes |
| List Fluids | Yes | Yes |
| Item Crafting | Yes (async event) | Yes (synchronous) |
| Fluid Crafting | No | Yes |
| Export/Import | Direction + Peripheral | Direction + Peripheral |
| Crafting CPU Info | Yes | No |
Turtle & Pocket Upgrades
Chunky Turtle
The Chunky Turtle upgrade (crafted with a
Chunk Controller item) turns any CC:Tweaked Turtle into a chunk loader. When equipped, the turtle forces its current chunk to remain loaded even when no players are nearby. This uses Forge's built-in chunk loading system, so loaded chunks persist across server restarts and are properly validated when the world loads.
This is essential for any long-running turtle programs like mining operations, farming scripts, or patrol routines. Without chunk loading, the turtle would freeze the moment you walk away. The
Chunk Controller item requires a Respawn Anchor as its centerpiece, making it a mid-game craft that requires Crying Obsidian from the Nether.
Other Turtle & Pocket Upgrades
The
Chat Box,
Environment Detector, and Player Detector are all available as both Turtle upgrades and Pocket Computer upgrades. This means you can equip a turtle with a Chat Box to create a mobile chat relay, or carry a Pocket Computer with a Player Detector to always know who is nearby. Turtle upgrades are installed by placing the peripheral item in a Crafting Table with a Turtle, following standard CC:Tweaked upgrade conventions.
Chunk Controller Recipe








2Peripheral Casing
The
Peripheral Casing is a crafting component, not a peripheral itself. It has no tile entity and no Lua functions. Every Advanced Peripherals block requires one Peripheral Casing in its recipe. All blocks in the mod use Iron-tier materials (mineable with a Pickaxe, harvest level 0) with a hardness of 1.0 and a blast resistance of 5.0, making them reasonably sturdy but not explosion-proof.
Configuration
Advanced Peripherals has a straightforward config file that lets server operators toggle individual peripherals and adjust key parameters. All settings are in the common config section.
Each peripheral can be independently enabled or disabled: enableChatBox, enableMeBridge, enableRsBridge, enablePlayerDetector, enableEnvironmentDetector, enableChunkyTurtle, and enableEnergyDetector are all true by default. When a peripheral is disabled, attempting to use it will print a debug message instead of registering as a peripheral.
The chatBoxCooldown setting (default: 10, range: 1-100,000) controls how many ticks must pass between
Chat Box messages. Lowering it allows faster messaging; raising it prevents chat spam on busy servers. The playerDetMaxRange setting (default: 2,147,483,646) caps the maximum detection range for the Player Detector. On large servers, you may want to lower this to prevent players from tracking others across the entire world.
Configuration Options
| chatBoxCooldown | 10 ticks (default), range 1-100,000 |
| playerDetMaxRange | 2,147,483,646 blocks (default) |
| enableChatBox | true |
| enableMeBridge | true |
| enableRsBridge | true |
| enablePlayerDetector | true |
| enableEnvironmentDetector | true |
| enableChunkyTurtle | true |
| enableEnergyDetector | true |
| enableDebugMode | false |
Frequently Asked Questions
Does the ME Bridge work without Applied Energistics 2 installed?
No. The
ME Bridge requires Applied Energistics 2 to function. Without AE2 installed, the block will still exist but cannot connect to any network. The same applies to the
RS Bridge and Refined Storage. However, all other peripherals (
Chat Box, Player Detector,
Environment Detector, Energy Detector, Chunky Turtle) work without any storage mods.
Why does my Chat Box say I'm sending messages too often?
The
Chat Box has a cooldown between messages (default: 10 ticks, or 0.5 seconds). If your script calls sendMessage() faster than the cooldown allows, it throws a Lua error. Add an os.sleep() call between messages, or check the cooldown config value and adjust your timing. The cooldown can be changed in the mod's config file.
Can I use Advanced Peripherals with wireless modems?
The peripheral blocks need to be physically adjacent to a Computer or connected via CC:Tweaked's wired modem network. Wireless modems handle rednet messages, not peripheral connections. However, you can write a script on a computer connected to the peripheral that relays data over rednet to a remote computer.
How do I use exportItem/importItem with the storage bridges?
Both functions take a table describing the item and a direction string. For example: bridge.exportItem({name="minecraft:diamond", count=64}, "north") exports up to 64 Diamonds to the inventory on the north side of the bridge block. The direction-based functions require the target inventory to be directly adjacent. Use the exportItemToChest/importItemFromChest variants to target inventories connected via CC:Tweaked's wired modem network instead.
Does the Chunky Turtle keep chunks loaded when I log off?
Yes. The Chunky Turtle uses Forge's built-in chunk loading system, which persists across server restarts and player logouts. When the server starts, it validates all existing chunk loading tickets and re-enables them for turtles that still have the Chunky upgrade. The chunk stays loaded as long as the turtle exists at that position with the upgrade equipped.
What is the $ prefix for in chat messages?
When a player types a message starting with "$" in chat, the
Chat Box intercepts it and cancels the normal chat broadcast. Other players will not see the message. The Chat Box strips the "$" and fires a "chat" event with the remaining text. This creates a private command channel between you and your computers, perfect for triggering automation without cluttering the server chat.