Turtle API
|
|||||||||||
Attacks the entity in direction and range | |||||||||||
Syntax | turtle.attack(
|
||||||||||
Returns | bool didAttack | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | BIOS globals | ||||||||||
|
Turtle.attackDown Turtle.attackUp
|
|||||||||
When called, tries to move the turtle backwards 1 block in the direction it is facing. The function will return false if the destination is obstructed or protected, or if the turtle is out of fuel.
![]() |
|||||||||
Syntax | turtle.back() | ||||||||
Returns | boolean success [, string error ] | ||||||||
Part of | CC:Tweaked (source) | ||||||||
API | turtle | ||||||||
|
Turtle.compare Turtle.compareDown Turtle.compareTo Turtle.compareUp Turtle.craft
|
|||||||||||
When called, will return true if the block in front of the turtle is anything that is not air or liquid. | |||||||||||
Syntax | turtle.detect() | ||||||||||
Returns | boolean result | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | turtle | ||||||||||
|
|
|||||||||||
When called, will return true if the block below the turtle is anything that is not air or liquid. | |||||||||||
Syntax | turtle.detectDown() | ||||||||||
Returns | boolean result | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | turtle | ||||||||||
|
|
|||||||||||
When called, will return true if the block above the turtle is anything that is not air or liquid. | |||||||||||
Syntax | turtle.detectUp() | ||||||||||
Returns | boolean result | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | turtle | ||||||||||
|
Turtle.dig Turtle.digDown Turtle.digUp
|
|||||||||
When called, tries to move the turtle down 1 block. The function will return false if the destination is obstructed or protected, or if the turtle is out of fuel.
![]() |
|||||||||
Syntax | turtle.down() | ||||||||
Returns | boolean success [, string error ] | ||||||||
Part of | CC:Tweaked (source) | ||||||||
API | turtle | ||||||||
|
Turtle.drop Turtle.dropDown Turtle.dropUp Turtle.equipLeft Turtle.equipRight
|
|||||||||
When called, tries to move the turtle forward 1 block in the direction it is facing. The function will return false if the destination is obstructed or protected, or if the turtle is out of fuel.
![]() |
|||||||||
Syntax | turtle.forward() | ||||||||
Returns | boolean success [, string error ] | ||||||||
Part of | CC:Tweaked (source) | ||||||||
API | turtle | ||||||||
|
|
|||||||||||
Returns a number representing the current amount of fuel (block moves) the turtle currently holds. | |||||||||||
Syntax | turtle.getFuelLevel() | ||||||||||
Returns | number fuel | ||||||||||
Part of | CC:Tweaked | ||||||||||
API | turtle | ||||||||||
| |||||||||||
|
|
|||||||||||
Returns a number representing the maximum amount of fuel (block moves) the turtle can possibly hold. | |||||||||||
Syntax | turtle.getFuelLimit() | ||||||||||
Returns | number fuel | ||||||||||
Part of | CC:Tweaked | ||||||||||
API | turtle | ||||||||||
|
Turtle.getItemCount Turtle.getItemDetail Turtle.getItemSpace Turtle.getSelectedSlot Turtle.inspect Turtle.inspectDown Turtle.inspectUp Turtle.place Turtle.placeDown Turtle.placeUp Turtle.refuel Turtle.select Turtle.suck Turtle.suckDown Turtle.suckUp Turtle.transferTo
|
|||||||||
When called, tries to rotate the turtle 90 degrees to the left. Note that performing this action does not require fuel, and the turtle can not be obstructed or denied from rotating. | |||||||||
Syntax | turtle.turnLeft() | ||||||||
Returns | boolean success | ||||||||
Part of | CC:Tweaked (source) | ||||||||
API | turtle | ||||||||
|
|
|||||||||
When called, tries to rotate the turtle 90 degrees to the right. Note that performing this action does not require fuel, and the turtle can not be obstructed or denied from rotating. | |||||||||
Syntax | turtle.turnRight() | ||||||||
Returns | boolean success | ||||||||
Part of | CC:Tweaked (source) | ||||||||
API | turtle | ||||||||
|
|
|||||||||
When called, tries to move the turtle up 1 block. The function will return false if the destination is obstructed or protected, or if the turtle is out of fuel.
![]() |
|||||||||
Syntax | turtle.up() | ||||||||
Returns | boolean success [, string error ] | ||||||||
Part of | CC:Tweaked (source) | ||||||||
API | turtle | ||||||||
|