CC: Tweaked

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 better performance, stability, and a wealth of new features.

CC: Tweaked can be installed from CurseForge or Modrinth. It requires the Minecraft Forge mod loader, but versions are available for Fabric.

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.

A ComputerCraft terminal open and ready to be programmed.

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!

A turtle tunneling in Minecraft.

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.

A chest's contents being read by a computer and displayed on a monitor.

Getting Started

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.

If you get stuck, do pop in to the Minecraft Computer Mod Discord guild or ComputerCraft's IRC channel.

Get Involved

CC: Tweaked lives on GitHub. If you've got any ideas, feedback or bugs please do create an issue.

Globals

_GFunctions in the global environment, defined in bios.lua.
colorsThe Colors API allows you to manipulate sets of colors.
coloursColours for lovers of British spelling.
commandsThe commands API allows your system to directly execute Minecraftcommands and gather data from the results.
diskThe Disk API allows you to interact with disk drives.
fsThe FS API allows you to manipulate files and the filesystem.
gpsThe GPS API provides a method for turtles and computers to retrieve theirown locations.
helpProvides an API to read help files.
httpThe http library allows communicating with web servers, sending andreceiving data from them.
ioEmulates Lua's standard io library.
keysThe Keys API provides a table of numerical codes corresponding to keyboardkeys, suitable for decoding key events.
multishellMultishell allows multiple programs to be run at the same time.
osThe os API allows interacting with the current computer.
paintutilsAn API for advanced systems which can draw pixels and lines, load and drawimage files.
parallelProvides a simple implementation of multitasking.
peripheralThe Peripheral API is for interacting with peripherals connected to thecomputer, such as the Disk Drive, the Advanced Monitor and Monitor.
pocketControl the current pocket computer, adding or removing upgrades.
rednetThe Rednet API allows systems to communicate between each other withoutusing redstone.
redstoneInteract with redstone attached to this computer.
settingsThe settings API allows to store values and save them to a file forpersistent configurations for CraftOS and your programs.
shellThe shell API provides access to CraftOS's command line interface.
termThe Terminal API provides functions for writing text to the terminal and monitors, and drawing ASCII graphics.
textutilsThe textutils API provides helpful utilities for formatting andmanipulating strings.
turtleThe turtle API allows you to control your turtle.
vectorThe vector API provides methods to create and manipulate vectors.
windowThe Window API allows easy definition of spaces within the display that canbe written/drawn to, then later redrawn/repositioned/etc as need be.

Modules

cc.completionA collection of helper methods for working with input completion, suchas that require by _G.read.
cc.expectThe cc.expect library provides helper functions for verifying thatfunction arguments are well-formed and of the correct type.
cc.image.nftProvides utilities for working with "nft" images.
cc.prettyProvides a "pretty printer", for rendering data structures in anaesthetically pleasing manner.
cc.requireThis provides a pure Lua implementation of the builtin require functionand package library.
cc.shell.completionA collection of helper methods for working with shell completion.
cc.stringsVarious utilities for working with strings and text.

Peripherals

commandThis peripheral allows you to interact with command blocks.
computerA computer or turtle wrapped as a peripheral.
driveDisk drives are a peripheral which allow you to read and write to floppy disks and other "mountable media" (such ascomputers or turtles).
modemThe modem peripheral allows you to send messages between computers.
monitorMonitors are a block which act as a terminal, displaying information on one side.
printerThe printer peripheral allows pages and books to be printed.
speakerSpeakers allow playing notes and other sounds.

Generic Peripherals

energy_storageMethods for interacting with blocks using Forge's energy storage system.
fluid_storageMethods for interacting with tanks and other fluid storage blocks.
inventoryMethods for interacting with inventories.

Events

alarmThe timer event is fired when an alarm started with os.setAlarm completes.
charThe char event is fired when a character is typed on the keyboard.
computer_commandThe computer_command event is fired when the /computercraft queue command is run for the current computer.
diskThe disk event is fired when a disk is inserted into an adjacent or networked disk drive.
disk_ejectThe disk_eject event is fired when a disk is removed from an adjacent or networked disk drive.
http_checkThe http_check event is fired when a URL check finishes.
http_failureThe http_failure event is fired when an HTTP request fails.
http_successThe http_success event is fired when an HTTP request returns successfully.
keyThis event is fired when any key is pressed while the terminal is focused.
key_upFired whenever a key is released (or the terminal is closed while a key was being pressed).
modem_messageThe modem_message event is fired when a message is received on an open channel on any modem.
monitor_resizeThe monitor_resize event is fired when an adjacent or networked monitor's size is changed.
monitor_touchThe monitor_touch event is fired when an adjacent or networked Advanced Monitor is right-clicked.
mouse_clickThis event is fired when the terminal is clicked with a mouse.
mouse_dragThis event is fired every time the mouse is moved while a mouse button is being held.
mouse_scrollThis event is fired when a mouse wheel is scrolled in the terminal.
mouse_upThis event is fired when a mouse button is released or a held mouse leaves the computer's terminal.
pasteThe paste event is fired when text is pasted into the computer through Ctrl-V (or ⌘V on Mac).
peripheralThe peripheral event is fired when a peripheral is attached on a side or to a modem.
peripheral_detachThe peripheral_detach event is fired when a peripheral is detached from a side or from a modem.
rednet_messageThe rednet_message event is fired when a message is sent over Rednet.
redstoneThe redstone event is fired whenever any redstone inputs on the computer change.
task_completeThe task_complete event is fired when an asynchronous task completes.
term_resizeThe term_resize event is fired when the main terminal is resized, mainly when a new tab is opened or closed in multishell
terminateThe terminate event is fired when Ctrl-T is held down.
timerThe timer event is fired when a timer started with os.startTimer completes.
turtle_inventoryThe turtle_inventory event is fired when a turtle's inventory is changed.
websocket_closedThe websocket_closed event is fired when an open WebSocket connection is closed.
websocket_failureThe websocket_failure event is fired when a WebSocket connection request fails.
websocket_messageThe websocket_message event is fired when a message is received on an open WebSocket connection.
websocket_successThe websocket_success event is fired when a WebSocket connection request returns successfully.