Jump to content




Automatic Tree Farm

turtle lua utility

10 replies to this topic

Poll: Rate my program (23 member(s) have cast votes)

How would you rate this program from 1 - 10? Keep in mind that this is my first CC program.

You cannot see the results of the poll until you have voted. Please login and cast your vote to see the results of this poll.
Vote Guests cannot vote

#1 GalaxyMaster

  • Members
  • 16 posts

Posted 16 May 2013 - 11:57 AM

Hello ComputerCrafters,

I just made a program which I call: Automatic Tree Farm.
This is also my first ComputerCraft program.

Note: It currently only works on birch, jungle and spruce saplings. As oak saplings have a chance of growing into a giant tree, it won't work.
Note: The bug where the turtle will do weird things when it runs out of saplings, bonemeal or fuel is now solved. However, you do need to place the exact same saplings, bonemeal and fuel (coal and charcoal are different items) in slots 14, 15 and 16. You only need 1 template item per slot. If you place the template items in the wrong order, or you don't even place them, the turtle will show a fake message saying it has run out of saplings, bonemeal or fuel.

If you didn't already guess, this is a fully automatic tree farm program. You need to give it saplings, bonemeal and some kind of fuel (coal, wood, lava, etc). The saplings go into the first slot, the bonemeal into the second slot and the fuel into the third slot. You now also need to place template items in slots 14, 15 and 16. The items must be exactly the same as the items the turtle is using. This is needed for the failsafe function. You only need 1 template item per slot. If you place the template items in the wrong order, or you don't even place them, the turtle will show a fake message saying it has run out of saplings, bonemeal or fuel. It currently only supports 1 stack of bonemeal, unfortunately.

How to install:
Spoiler

Version history:
Spoiler

Screenshots:
Spoiler

Code:
Spoiler

Be sure to leave feedback and report any bugs you encounter.
If you have questions feel free to ask them.

Also, if you have an idea on how it can support multiple (3 preferred) stacks of bonemeal, tell me.

#2 unobtanium

  • Members
  • 505 posts

Posted 16 May 2013 - 12:24 PM

Sweet :D
Great if you are early in the game and having the need of wood.

Spoiler


#3 GalaxyMaster

  • Members
  • 16 posts

Posted 16 May 2013 - 01:00 PM

View PostUNOBTANIUM, on 16 May 2013 - 12:24 PM, said:

Sweet :D
Great if you are early in the game and having the need of wood.

Spoiler
Thank you for taking the time to reply, vote and giving me tips on how to make my code cleaner. I will take a look at your suggestions and implement them if I feel that it is needed.

#4 GalaxyMaster

  • Members
  • 16 posts

Posted 16 May 2013 - 01:01 PM

View PostUNOBTANIUM, on 16 May 2013 - 12:24 PM, said:

Sweet :D
Great if you are early in the game and having the need of wood.

Spoiler
Oh, and i forgot to ask, in your first suggestion with the for loop, I don't understand the part with i=1. Can you explain that?
EDIT: I did my research and I saw that 'i' is a variable you can always use and don't have to create, and that for loops use a variable with the start value, and then it starts counting until it reaches the finish value and it counts in the steps you specify after that and if you don't specify the step then it will be 1.

#5 unobtanium

  • Members
  • 505 posts

Posted 16 May 2013 - 01:17 PM

Sure
Spoiler


#6 GalaxyMaster

  • Members
  • 16 posts

Posted 17 May 2013 - 09:32 AM

UPDATE: 1.1 - some minor coding changes thanks to UNOBTANIUM

#7 unobtanium

  • Members
  • 505 posts

Posted 17 May 2013 - 09:49 AM

No problem. I help where i can. Some folks here helped me as well, to become what i am at the moment ;D

Btw, one last thing :P

Spoiler


#8 GalaxyMaster

  • Members
  • 16 posts

Posted 17 May 2013 - 11:22 AM

View PostUNOBTANIUM, on 17 May 2013 - 09:49 AM, said:

No problem. I help where i can. Some folks here helped me as well, to become what i am at the moment ;D

Btw, one last thing :P

Spoiler
Thanks!

#9 GalaxyMaster

  • Members
  • 16 posts

Posted 17 May 2013 - 11:29 AM

UPDATE: 1.1.1 again some minor coding changes thanks to UNOBTANIUM

#10 GalaxyMaster

  • Members
  • 16 posts

Posted 18 May 2013 - 03:39 AM

UPDATE: 1.2 - added a failsafe. You now do need to place template items in slots 14, 15 and 16. More info in the notes section.

#11 tristan1301

  • New Members
  • 1 posts

Posted 13 September 2013 - 02:07 AM

One idea: Have it output slots 4-13 to a nearby chest. That would keep it from filling up with logs.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users