Difference between revisions of "Turtle (API)"
From ComputerCraft Wiki
(Undo revision 2150 by 212.44.19.62 (talk)) |
|||
Line 59: | Line 59: | ||
|- | |- | ||
|[[turtle.compare]]() | |[[turtle.compare]]() | ||
− | |Detects if the block in front is the same as the | + | |Detects if the block in front is the same as the one in the first available slot |
|- | |- | ||
|[[turtle.compareUp]]() | |[[turtle.compareUp]]() | ||
− | |Detects if the block above is the same as the | + | |Detects if the block above is the same as the one in the first available slot |
|- | |- | ||
|[[turtle.compareDown]]() | |[[turtle.compareDown]]() | ||
− | |Detects if the block below is the same as the | + | |Detects if the block below is the same as the one in the first available slot |
|- | |- | ||
|[[turtle.drop]]( [count] ) | |[[turtle.drop]]( [count] ) |
Revision as of 14:00, 16 July 2012
The Turtle API is used to Work with your Turtles.
Method name | Description |
---|---|
turtle.forward() | Let the Turtle move forward |
turtle.back() | Let the Turtle move back |
turtle.up() | Let the Turtle move up |
turtle.down() | Let the Turtle move down |
turtle.turnLeft() | The Turtle turns left |
turtle.turnRight() | The Turtle turns right |
turtle.select( slotNum ) | The Turtle selects the given Slot (1 is top left, 9 is bottom right) |
turtle.getItemCount( slotNum ) | Counts how many items are in the given Slot |
turtle.getItemSpace( slotNum ) | Counts how many items you need to fill the stack in the given Slot |
turtle.dig() | Breaks the Block in front |
turtle.digUp() | Breaks the Block above |
turtle.digDown() | Breaks the Block below |
turtle.place() | Places a Block of the first available slot in front |
turtle.placeUp() | Places a Block of the first available slot above |
turtle.placeDown() | Places a Block of the first available slot below |
turtle.detect() | Detects if there is a Block in front |
turtle.detectUp() | Detects if there is a Block above |
turtle.detectDown() | Detects if there is a Block below |
turtle.compare() | Detects if the block in front is the same as the one in the first available slot |
turtle.compareUp() | Detects if the block above is the same as the one in the first available slot |
turtle.compareDown() | Detects if the block below is the same as the one in the first available slot |
turtle.drop( [count] ) | Drops all items in the first available slot, or if [count] is specified, drops that many items. |