ON THIS WIKI
|ID Name|| |
|Affected by Gravity||No|
The Turtle is a block added by the ComputerCraft mod. It is essentially a robot with the ability to move around, detect, place blocks and pick-up or drop items. The programs it run are stored in its internal memory or on a Floppy Disk. The Turtle can be equipped with peripherals and tools, which will make it into an utility machine such as the Mining Turtle. The Turtle is submersible and Lava proof, this makes it particularly useful for retrieving valuable resources where lava pools can prevent access. The Turtle doesn't keep the chunk loaded, this means that the Player has to stay within the same chunk as the Turtle or use a Dimensional Anchor or Chunk Loader. Leaving the chunk or shutting down the game (or a server reboot) while a Turtle is running will cause it to forget its task.
The Turtle's programming is written in Lua an easy to learn code language, given some interest and a good resource. Turtle actions are defined by its API, a set of specific action commands to put the turtle in motion. Simple programs may be written to make the Turtle execute a task such as building stairs, bridges or structures, etc.
Upon placing the Turtle, access its User interface by 'Right-clicking' it. The command prompt window is where the Player types  commands and edit programs. It is recommended to name the Turtle using the command:
label set name. With the label set, the name displays above the Turtle (while pointing at it), this means that it can be removed safely and retain its memory and fuel. A folder  is created in the game folder, containing any files edited with the Turtle.
On the right of the Players inventory is a 4 by 4 grid , which is the Turtle inventory, where it stores the items harvested and picked up. Items to be placed or equipped by the Turtle are also placed in this inventory. At any time the Player may type: help for a list of help subjects. Adding the name of a program or command will give a summary of its use.
Built-in Command and Programs
To view a list of built-in commands and programs, at the prompt type:
programs. To run a program, simply type the name of the program or command followed by any parameters it requires. The Turtle can be programmed to execute a task automatically upon starting the game, at the prompt enter this simple code:
edit startup shell.run "nameOfTask"
where nameOfTask is one of the built-in programs, commands  or a Player writen task. Press the Control key (Ctrl) and choose Save (using arrow keys) then Ctrl again to Exit
Installing a tool, weapon or peripheral can be done in a crafting grid, or with the command:
turtle.equipLeft() as applicable. If a peripheral or tool is already equipped on the given side it will be swapped and returned to the Turtle's inventory. The programming commands enhances the Turtle's efficiency and autonomy, allowing it to swap the implement needed on the go to complete the diverse tasks assigned through programming.
Turtles require fuel. They accept combustible items (any item that burns in a vanilla furnace) and numerous items that store MJ or EU. The command to refuel a turtle is
turtle.refuel(). For example
turtle.refuel(64) will refuel the turtle with 64 items. The command
refuel all may also be used to tell the turtle to consume all the fuel in its inventory . The fuel values for combustible items is
burn time × 5 / 100, where burn time is the number of ticks a fuel burns in a normal furnace. Some examples of fuel  values for items are shown below:
|Coal • Charcoal||80m||Vanilla|
An optional unlimited fuel setting is available by setting the line
turtleNeedsFuel=true to false in the
config/ComputerCraft.cfg file. In this mode, Turtles use their internal Redstone Engine, and as such, they do not need to be re-charged, or receive any other form of external power. This is because Redstone continuously emits low levels of energy, and the Turtle's engine is very efficient.
A Turtle's memory data can be transferred and stored on a Floppy Disk using a Disk Drive placed beside it. However, if the Turtle is equipped with a Wireless Modem, the Disk Drive (or other peripherals) must be placed on the opposite side.
UsageTurtle can be used to create the following items:
Tutorial and Resource
- One line of text copied to the clipboard may be pasted at the prompt in the Turtle's interface.
- The Turtle folder is named with a number corresponding to the number of Turtles labelled. The typical folder path is:
FTB <Modpack name>/minecraft/saves/world/computer/1. A file codded with an editor such as Notepad++ can be saved as an existing Turtle file (User created program) in this folder and executed with the Turtle in-game. Once labelled the Turtle will no longer stack with other Turtles.
- The numbering of the inventory slots goes from left to right and top to bottom, from 1 to 16.
- The names of the programs and commands are case sensitive.
- By default, when the Turtle runs out of fuel it will scan its inventory and use any combustible items stored or harvested as fuel. To avoid the Turtle consuming resources harvested the Player can make sure the Turtle has enough fuel for the task at hand. Use the command
- Another way to fuel turtles is by using the Charge Station from Misc Peripherals.
The following items may also be of interest: