ComputerCraft 2.0 brings programmable computers, robotic turtles, and connected devices to Minecraft 26.3 on NeoForge. Write Lua programs inside the game, automate mining and building, control redstone, create interactive displays, and connect your creations through wired or wireless networks.
Updated by CraftCore Studios, this project brings the classic ComputerCraft 1.80pr1 experience to a modern Minecraft environment. Whether you want a simple automatic door, a turtle that digs tunnels, or a network of computers running your base, ComputerCraft gives you the tools to build it.
You can start with the included programs and learn programming as you go.
What you can build
•
Programmable computers: Create and save Lua programs using an in-game terminal and text editor.
•
Robotic turtles: Program moving robots to mine, place blocks, collect items, interact with inventories, and perform tasks using equipped tools.
•
Redstone controllers: Read inputs and control outputs for doors, lights, alarms, farms, and other redstone machinery.
•
Display systems: Connect monitors to show messages, menus, information panels, and program output.
•
Computer networks: Exchange messages between computers and turtles using wired or wireless modems.
•
Portable terminals: Carry a pocket computer and use compatible upgrades for mobile projects.
•
Printed documents: Use printers to turn program-generated text into physical pages.
•
Sound systems: Use speakers to play notes and Minecraft sounds.
•
Custom projects: Combine these features to create games, control rooms, remote-operated robots, and automation systems.
Your programs determine how your creations behave. More advanced projects can respond to player input, incoming network messages, redstone changes, and attached peripherals.
Getting started with your first computer
Craft a basic computer using seven stone blocks, one redstone dust, and one glass pane:
Stone Stone Stone
Stone Redstone Stone
Stone Glass Pane Stone
Place the computer in your world and right-click it to open its terminal. The computer runs CraftOS, an in-game operating system where you type commands to launch programs and manage files.
Try these commands individually:
help
programs
help programming
help opens the built-in help system, programs lists available programs, and help programming explains how to start writing your own code.
Give your computer a recognizable name:
label set "Base Computer"
Standard computers provide a simple terminal, while advanced computers add color, mouse interaction, and support for running programs in multiple tabs.
Write your first Lua program
At the computer’s command prompt, type:
edit welcome
Enter this code:
print("Welcome to my Minecraft base!")
Press Ctrl to open the editor menu, select Save, then select Exit. At the command prompt, type:
welcome
The computer runs your program and prints your message.
You can use the same process to create larger programs. A program saved as startup in the computer’s root directory runs automatically when the computer starts, making it useful for dedicated displays and controllers.
To experiment with Lua without creating a file, run:
lua
If a program gets stuck, hold Ctrl+T for about one second to terminate it. Hold Ctrl+R to reboot the computer or Ctrl+S to shut it down.
Automate tasks with turtles
Turtles are computers that can move and interact with the world. A basic turtle is crafted using seven iron ingots, one basic computer, and one chest:
Iron Iron Iron
Iron Computer Iron
Iron Chest Iron
Turtles have a 16-slot inventory and can carry compatible upgrades on their left and right sides. Their abilities depend on their equipment: a diamond pickaxe creates a mining turtle, while other upgrades provide additional tool, crafting, networking, or sound capabilities.
To try automated mining:
1.
Craft a turtle and equip it with a diamond pickaxe using the corresponding crafting recipe.
2.
Place it facing the area you want to mine.
3.
Right-click it and put coal or another accepted fuel into its inventory.
4.
Run refuel 10 to consume up to ten fuel items.
5.
Run a mining program.
For a tunnel twenty blocks long, type:
tunnel 20
The included tunnel program digs a passage three blocks wide and two blocks high.
For a three-by-three excavation shaft, type:
excavate 3
The excavation program mines downward, collecting blocks as it goes. Start in an area you intend to excavate and provide enough fuel for the job.
Turtles normally need fuel to move, although server configuration can change that requirement. Their tools and available inventory space also affect what they can accomplish.
You can control a turtle using your own Lua programs. For example:
local moved, reason = turtle.forward()
if moved then
print("Moved forward!")
else
print("Could not move: " .. tostring(reason))
end
The turtle API includes movement, turning, digging, placing, inspecting blocks, selecting inventory slots, transferring items, and inserting or extracting items from adjacent inventories. These functions let you develop custom miners, builders, farming routines, and item-handling systems.
Control redstone from a computer
Computers can read and output redstone signals on their six sides. Side names are relative to the computer: front, back, left, right, top, and bottom.
Connect a redstone circuit to the computer’s right side, then type:
redstone set right true
To turn that output off:
redstone set right false
To inspect incoming signals:
redstone probe
You can also control redstone in Lua. This program turns on the right output for two seconds:
redstone.setOutput("right", true)
sleep(2)
redstone.setOutput("right", false)
Combine inputs, timers, and outputs to create controlled doors, timed lights, alarms, and other automated mechanisms.
Build displays with monitors
Place a monitor beside a computer to attach it as a peripheral. Compatible monitor blocks can join into larger displays.
If the monitor is on the computer’s left side, try:
monitor left hello
This runs the included hello program on the monitor.
To display your own text, create a program containing:
local screen = peripheral.wrap("left")
screen.clear()
screen.setCursorPos(1, 1)
screen.write("Base control online")
Replace "left" with the side where your monitor is attached.
Advanced monitors support color and generate touch events when players interact with them. With your own programs, you can build touch-controlled menus, status boards, and control panels.
Run peripherals to see the devices your computer can access.
Connect computers with modems
Modems allow computers and equipped turtles to exchange messages.
•
Wireless modems communicate within their available range.
•
Wired modems and networking cables connect devices through a physical network.
•
Ender modems support communication across dimensions without the ordinary wireless range limit.
For a simple multiplayer chat setup, attach a modem to each computer. Use wireless modems within range, or connect wired modems with networking cable.
On one computer, type:
chat host basechat
On another, type:
chat join basechat Builder
The second computer joins the room using the nickname Builder. Inside the chat program, type /help for its commands.
For custom projects, the rednet API lets programs send and receive messages. You can use it to build remote controls, coordinate turtles, or distribute information between computers.
Wired networks can also provide access to connected peripherals. Attach a wired modem to a peripheral and right-click the modem to enable peripheral access, then use its network name from a connected computer.
Use pocket computers, disks, printers, and speakers
Pocket computers provide a handheld terminal. Open one from your hand to run programs while moving around your world. Compatible modem upgrades let your programs communicate with a network while you carry the device.
Disk drives and floppy disks let you move files between computers. Place a disk drive beside a computer and insert a disk. Its files become available through a mounted directory, commonly disk, so you can copy programs onto it and transfer them to another machine.
Printers turn text into physical pages. Attach a printer to a computer, load it with paper and dye, and control it through the printer API. Printed pages can be combined into multipage documents and books using the supplied recipes.
Speakers play musical notes and Minecraft sounds through Lua. Use them for doorbells, notification tones, alarms, or programmed music.
Explore more advanced projects
A GPS network lets compatible computers and turtles determine their position using wireless host computers. Set up hosts at known coordinates, arrange them so they provide an unambiguous three-dimensional position, and run:
gps host X Y Z
Replace X Y Z with each host computer’s actual coordinates. On a device with a wireless modem, run:
gps locate
Your programs can use the resulting coordinates for navigation and location-aware tasks.
Where server settings permit HTTP access, the included wget and pastebin programs provide ways to download programs. Available destinations depend on the server’s configuration.
Command computers are also available for creative and administrative projects, subject to the relevant permissions. They allow Lua programs to execute Minecraft commands.
For further learning, use the help built into every computer:
help turtle
help redstone
help monitors
help rednet
help gps
help printers
help speakers
Start with one computer and a small program, then connect more devices as your projects grow.
The original mod can be found at: https://www.curseforge.com/minecraft/mc-mods/computercraft

