Posted 20 March 2012 - 11:04 AM
The Turtle Control System API improves on the Default Turtle API to make the movements more intelligent and allow the user to specify the number blocks the turtle is to move.
The Turtle will destroy any block that gets in its path. Additionally if a mob or player steps in front of the Turtle it will stop and wait until its path is clear before it proceeds. This ensures that your turtle will follow the correct path and place items with accuracy.
There is also a function to harvest tree's and prep the specified area for planting.
Hopefully this will save some time and simple your coding some.
To install download the file from below and for SSP save the file to your %APPDATA%/.minecraft/mods/ComputerrCraft/lua/rom/apis/turtle folder.
For SMP save the file to your minecraftserver/mods/ComputerCraft/lua/rom/apis/turtle folder.
Alternatively you can save the file in your computers root directory and us os.loadAPI("TCS") in the start of your program to load the API manually. To unload the API simply use os.unloadAPI("TCS").
Functions:
- example: TCS.back( 5 ) - 5 spaces back
forward() moves the turtle forward the specified number of blocks, will destroy blocks in its path, and wait for its path to be clear before moving.
- example: TCS.forward( 5 ) - 5 spaces forward
up() moves the turtle up the specified number of spaces, will wait for its path to be clear before moving.
- example: TCS.up( 10 ) - 10 spaces up
down() moves the turtle down the specified number of spaces, will wait for its path to be clear before moving.
- example: TCS.down() - 1 space down
placeDown() places a block from the specified slot under the turtle. Will remove the block under the turtle prior to placement if one exist.
- example: TCS.placeDown()
harvestTree() will harvest a tree if there is one in front of the turtle.
- example: TCS.harvestTree()
prepSpace() will prepare the block for planting by removing any blocks above the block, and ensuring that the block is the same as the block in the selected inventory slot.
- example:
Place dirt in slot 1
turtle.select( 1 )
TCS.prepSpace( 10 ) - will prep the next 10 blocks
Video:
Download: TCS
The Turtle will destroy any block that gets in its path. Additionally if a mob or player steps in front of the Turtle it will stop and wait until its path is clear before it proceeds. This ensures that your turtle will follow the correct path and place items with accuracy.
There is also a function to harvest tree's and prep the specified area for planting.
Hopefully this will save some time and simple your coding some.
To install download the file from below and for SSP save the file to your %APPDATA%/.minecraft/mods/ComputerrCraft/lua/rom/apis/turtle folder.
For SMP save the file to your minecraftserver/mods/ComputerCraft/lua/rom/apis/turtle folder.
Alternatively you can save the file in your computers root directory and us os.loadAPI("TCS") in the start of your program to load the API manually. To unload the API simply use os.unloadAPI("TCS").
Functions:
Spoiler
back() moves the turtle back the specified number of blocks, will wait for its path to be clear before moving.- example: TCS.back( 5 ) - 5 spaces back
forward() moves the turtle forward the specified number of blocks, will destroy blocks in its path, and wait for its path to be clear before moving.
- example: TCS.forward( 5 ) - 5 spaces forward
up() moves the turtle up the specified number of spaces, will wait for its path to be clear before moving.
- example: TCS.up( 10 ) - 10 spaces up
down() moves the turtle down the specified number of spaces, will wait for its path to be clear before moving.
- example: TCS.down() - 1 space down
placeDown() places a block from the specified slot under the turtle. Will remove the block under the turtle prior to placement if one exist.
- example: TCS.placeDown()
harvestTree() will harvest a tree if there is one in front of the turtle.
- example: TCS.harvestTree()
prepSpace() will prepare the block for planting by removing any blocks above the block, and ensuring that the block is the same as the block in the selected inventory slot.
- example:
Place dirt in slot 1
turtle.select( 1 )
TCS.prepSpace( 10 ) - will prep the next 10 blocks
Video:
Spoiler
[media]http://youtu.be/QK5Y-ES4u-4[/media]Download: TCS
Edited on 17 April 2012 - 12:11 AM