Turtle (ComputerCraft)
Turtle | |
---|---|
| |
Name | Turtle |
Source Mod | ComputerCraft |
ID Name | ComputerCraft:CC-Turtle
|
Type | Block |
Stackable | Yes (64) |
Blast Resistance | 12.5 |
Hardness | 2.5 |
Solid | Yes |
Transparent | No |
Affected by Gravity | No |
Emits Light | No |
Flammable | No |
Required Tool |
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.
Recipe[edit]
Feed The Beast Infinity Evolved Expert Mode[edit]
Getting Started[edit]
Upon placing the Turtle, access its User interface by 'Right-clicking' it. The command prompt window is where the Player types [1] 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 [2] 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 [3], 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[edit]
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 [4] or a Player writen task. Press the Control key (Ctrl) and choose Save (using arrow keys) then Ctrl again to Exit
Equipment[edit]
Installing a tool, weapon or peripheral can be done in a crafting grid, or with the command: turtle.equipRight()
and 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.
Fuel[edit]
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 [5]. 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 [6] values for items are shown below:
Item | Distance | Mod |
---|---|---|
Scrap | 17m | IndustrialCraft2 |
Coalfuel Cell | 1,520m | IndustrialCraft2 |
Scaffold | 15m | IndustrialCraft2 |
Peat | 80m | Forestry |
Wooden Tools | 10m | Vanilla |
Lava Bucket | 1,000m | Vanilla |
Blaze Rod | 120m | Vanilla |
Wood | 15m | Vanilla |
Stick | 5m | Vanilla |
Coal • Charcoal | 80m | Vanilla |
Mushroom • Mushroom | 15m | Vanilla |
Coal Coke | 160m | Railcraft |
Fuel Mode[edit]
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.
Floppy Disk[edit]
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.
Usage[edit]
Turtle (ComputerCraft) can be used to create the following items:Tutorial and Resource[edit]
Note[edit]
- ↑ 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
turtle.getFuelLevel()
. - ↑ Another way to fuel turtles is by using the Charge Station from Misc Peripherals.
See Also[edit]
The following items may also be of interest:
Video[edit]
|