Difference between revisions of "Turtle (API)"
From ComputerCraft Wiki
Huettner94 (Talk | contribs) (Added the Table) |
(add function links) |
||
Line 4: | Line 4: | ||
!style="background:#EEE" width="*"|Description | !style="background:#EEE" width="*"|Description | ||
|- | |- | ||
− | |turtle.forward() | + | |[[turtle.forward]]() |
|Let the Turtle move forward | |Let the Turtle move forward | ||
|- | |- | ||
− | |turtle.back() | + | |[[turtle.back]]() |
|Let the Turtle move back | |Let the Turtle move back | ||
|- | |- | ||
− | |turtle.up() | + | |[[turtle.up]]() |
|Let the Turtle move up | |Let the Turtle move up | ||
|- | |- | ||
− | |turtle.down() | + | |[[turtle.down]]() |
|Let the Turtle move down | |Let the Turtle move down | ||
|- | |- | ||
− | |turtle.turnLeft() | + | |[[turtle.turnLeft]]() |
|The Turtle turns left | |The Turtle turns left | ||
|- | |- | ||
− | |turtle.turnRight() | + | |[[turtle.turnRight]]() |
|The Turtle turns right | |The Turtle turns right | ||
|- | |- | ||
− | |turtle.select( slotNum ) | + | |[[turtle.select]]( slotNum ) |
|The Turtle selects the given Slot (1 is top left, 9 is bottom right) | |The Turtle selects the given Slot (1 is top left, 9 is bottom right) | ||
|- | |- | ||
− | |turtle.getItemCount( slotNum ) | + | |[[turtle.getItemCount]]( slotNum ) |
|Counts how many items are in the given Slot | |Counts how many items are in the given Slot | ||
|- | |- | ||
− | |turtle.getItemSpace( slotNum ) | + | |[[turtle.getItemSpace]]( slotNum ) |
|Counts how many items you need to fill the stack in the given Slot | |Counts how many items you need to fill the stack in the given Slot | ||
|- | |- | ||
− | |turtle.dig() | + | |[[turtle.dig]]() |
|Breaks the Block in front | |Breaks the Block in front | ||
|- | |- | ||
− | |turtle.digUp() | + | |[[turtle.digUp]]() |
|Breaks the Block above | |Breaks the Block above | ||
|- | |- | ||
− | |turtle.digDown() | + | |[[turtle.digDown]]() |
|Breaks the Block below | |Breaks the Block below | ||
|- | |- | ||
− | |turtle.place() | + | |[[turtle.place]]() |
|Places a Block of the selected Slot in front | |Places a Block of the selected Slot in front | ||
|- | |- | ||
− | |turtle.placeUp() | + | |[[turtle.placeUp]]() |
|Places a Block of the selected Slot above | |Places a Block of the selected Slot above | ||
|- | |- | ||
− | |turtle.placeDown() | + | |[[turtle.placeDown]]() |
|Places a Block of the selected Slot below | |Places a Block of the selected Slot below | ||
|- | |- | ||
− | |turtle.detect() | + | |[[turtle.detect]]() |
|Detects if there is a Block in front | |Detects if there is a Block in front | ||
|- | |- | ||
− | |turtle.detectUp() | + | |[[turtle.detectUp]]() |
|Detects if there is a Block above | |Detects if there is a Block above | ||
|- | |- | ||
− | |turtle.detectDown() | + | |[[turtle.detectDown]]() |
|Detects if there is a Block below | |Detects if there is a Block below | ||
|- | |- | ||
− | |turtle.drop() | + | |[[turtle.drop]]() |
|Drops everything of the selected Slot | |Drops everything of the selected Slot | ||
|} | |} | ||
[[Category:APIs]] | [[Category:APIs]] |
Revision as of 21:23, 26 February 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 selected Slot in front |
turtle.placeUp() | Places a Block of the selected Slot above |
turtle.placeDown() | Places a Block of the selected 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.drop() | Drops everything of the selected Slot |