CC: Tweaked is a mod for Minecraft which adds programmable computers, turtles and more to the game. A fork of the much-beloved ComputerCraft, it continues its legacy with improved performance and stability, along with a wealth of new features.
Controlled using the Lua programming language, CC: Tweaked's computers provides all the tools you need to start writing code and automating your Minecraft world.
While computers are incredibly powerful, they're rather limited by their inability to move about. Turtles are the solution here. They can move about the world, placing and breaking blocks, swinging a sword to protect you from zombies, or whatever else you program them to!
Not all problems can be solved with a pickaxe though, and so CC: Tweaked also provides a bunch of additional peripherals for your computers. You can play a tune with speakers, display text or images on a monitor, connect all your computers together with modems, and much more.
Computers can now also interact with inventories such as chests, allowing you to build complex inventory and item management systems.
While ComputerCraft is lovely for both experienced programmers and for people who have never coded before, it can be a little daunting getting started. Thankfully, there's several fantastic tutorials out there:
Once you're a little more familiar with the mod, the sidebar and links below provide more detailed documentation on the various APIs and peripherals provided by the mod.
|Functions in the global environment, defined in
|Constants and functions for colour values, suitable for working with
|An alternative version of
colors for lovers of British spelling.
|Execute Minecraft commands and gather data from the results from a command computer.
|Interact with disk drives.
|Interact with the computer's files and filesystem, allowing you to manipulate files, directories and paths.
|Use modems to locate the position of the current turtle or computers.
|Find help files on the current computer.
|Make HTTP requests, sending and receiving data to a remote web server.
|Emulates Lua's standard io library.
|Constants for all keyboard "key codes", as queued by the
|Multishell allows multiple programs to be run at the same time.
os API allows interacting with the current computer.
|Utilities for drawing more complex graphics, such as pixels, lines and images.
|A simple way to run several functions at once.
|Find and control peripherals attached to this computer.
|Control the current pocket computer, adding or removing upgrades.
|Communicate with other computers by using modems.
|Get and set redstone signals adjacent to this computer.
|Read and write configuration options for CraftOS and your programs.
|The shell API provides access to CraftOS's command line interface.
|Interact with a computer's terminal or monitors, writing text and drawing ASCII graphics.
|Helpful utilities for formatting and manipulating strings.
|Turtles are a robotic device, which can break and place blocks, attack mobs, and move about the world.
|A basic 3D vector type and some common vector operations.
|A terminal redirect occupying a smaller area of an existing terminal.
|Convert between streams of DFPWM audio data and a list of amplitudes.
|A collection of helper methods for working with input completion, such as that require by
cc.expect library provides helper functions for verifying that function arguments are well-formed and of the correct type.
|Read and draw nft ("Nitrogen Fingers Text") images.
|A pretty printer for rendering data structures in an aesthetically pleasing manner.
|A pure Lua implementation of the builtin
require function and
|A collection of helper methods for working with shell completion.
|Various utilities for working with strings and text.
|This peripheral allows you to interact with command blocks.
|A computer or turtle wrapped as a peripheral.
|Disk drives are a peripheral which allow you to read and write to floppy disks and other "mountable media" (such as computers or turtles).
|Modems allow you to send messages between computers over long distances.
|Monitors are a block which act as a terminal, displaying information on one side.
|The printer peripheral allows printing text onto pages.
|The speaker peripheral allows your computer to play notes and other sounds.
|Methods for interacting with blocks which store energy.
|Methods for interacting with tanks and other fluid storage blocks.
|Methods for interacting with inventories.
alarm event is fired when an alarm started with
char event is fired when a character is typed on the keyboard.
computer_command event is fired when the
/computercraft queue command is run for the current computer.
disk event is fired when a disk is inserted into an adjacent or networked disk drive.
disk_eject event is fired when a disk is removed from an adjacent or networked disk drive.
file_transfer event is queued when a user drags-and-drops a file on an open computer.
http_check event is fired when a URL check finishes.
http_failure event is fired when an HTTP request fails.
http_success event is fired when an HTTP request returns successfully.
|This event is fired when any key is pressed while the terminal is focused.
|Fired whenever a key is released (or the terminal is closed while a key was being pressed).
modem_message event is fired when a message is received on an open channel on any
monitor_resize event is fired when an adjacent or networked monitor's size is changed.
monitor_touch event is fired when an adjacent or networked Advanced Monitor is right-clicked.
|This event is fired when the terminal is clicked with a mouse.
|This event is fired every time the mouse is moved while a mouse button is being held.
|This event is fired when a mouse wheel is scrolled in the terminal.
|This event is fired when a mouse button is released or a held mouse leaves the computer's terminal.
paste event is fired when text is pasted into the computer through Ctrl-V (or ⌘V on Mac).
peripheral event is fired when a peripheral is attached on a side or to a modem.
peripheral_detach event is fired when a peripheral is detached from a side or from a modem.
rednet_message event is fired when a message is sent over Rednet.
redstone event is fired whenever any redstone inputs on the computer change.
task_complete event is fired when an asynchronous task completes.
term_resize event is fired when the main terminal is resized.
terminate event is fired when Ctrl-T is held down.
timer event is fired when a timer started with
turtle_inventory event is fired when a turtle's inventory is changed.
websocket_closed event is fired when an open WebSocket connection is closed.
websocket_failure event is fired when a WebSocket connection request fails.
websocket_message event is fired when a message is received on an open WebSocket connection.
websocket_success event is fired when a WebSocket connection request returns successfully.
|Setting up GPS
gps API allows computers and turtles to find their current position using wireless modems.
|Allowing access to local IPs
|By default, ComputerCraft blocks access to local IP addresses for security.
|Playing audio with speakers
|CC: Tweaked's speaker peripheral provides a powerful way to play any audio you like with the
|Reusing code with require
|A library is a collection of useful functions and other definitions which is stored separately to your main program.
|Incompatibilities between versions
|CC: Tweaked tries to remain as compatible between versions as possible, meaning most programs written for older version
|Lua 5.2/5.3 features in CC: Tweaked
|CC: Tweaked is based off of the Cobalt Lua runtime, which uses Lua 5.