←  Turtle Programs

ComputerCraft | Programmable Computers for Minecraft


AE2 Pure Certus, Quartz, or Fluix Grower

ariqbailey's Photo ariqbailey 23 Aug 2014

This is a simple program I made (it is my first program so I am sorry if it could be done better), and it does exactly what it needs to.

It is a simple program designed to grow Pure Certus Crystals, Pure Nether Quartz Crystals, and Pure Fluix Crystals from AE2 (Applied Energistics 2).

Materials: 1 of any turtle, 1 chest, and a water bucket, also 1 of each type of crystal (the ones stated above).

To set it up all you have to do is put a turtle above a water block, and above the turtle put the output chest:


Of, course, you could always add vibration chambers, but make sure the me cables aren't on the sides of the turtle, because the dropped items seem to derp out if the cables are on the sides.

You can use this setup with vibration chambers:

Posted Image

Now, you want to go into the turtle and get this pastebin: qLqff7D4
Or just type in: pastebin get qLqff7D4 certus.

Now you need to open up the turtle, and in the 14th, 15th, and 16th slot you have to put (not in this order necessarily) a piece of Pure Certus Quartz Crystal, a piece of Pure Nether Quartz Crystal, and a Piece of Pure Fluix Crystal.

These serve as what the turtle uses to check if the crystals you are growing are done. Keep in mind if you don't plan on using one of these 3, or don't plan on using 2 of them you don't have to put them in the turtle.

Posted Image

You could make the program run all the time by editing startup and typing:

while true do

And that should be about all, so all you have to do now is put the seeds in any other slot inside the turtles inventory, and run certus.

When the seeds are done growing, they will be put in the chest above, would could be any inventory, I suppose.

Thanks for using my program, or even just reading this, it means a lot to me.

Edited by ariqbailey, 24 August 2014 - 11:47 AM.

DolbsB's Photo DolbsB 02 Nov 2014


Thank you for this - saves a ton of time. I'm a total newbie to ComputerCraft but was able to modify the code slightly to add the crafting of Fluix Crystals. I have a ME Interface on the left-side (doesn't seem to interfere yet) and a import bus attached to the chest.

Posted Image

The code modification uses slot 13 for the Fluix Crystal

Posted Image

Of course I've assigned the proper crafting recipes to the ME Interface and tested. The pastebin code is



Last note for those using NEI (who doesn't?). Make sure you TURN OFF magnet mode!
Edited by DolbsB, 05 November 2014 - 01:50 AM.

koniv00's Photo koniv00 27 Nov 2014

Hope you dont mind, but i thought i could add to this.

I've taken it one step further, and added an automatic on/off switch for the growth accelerators.

Just add something to the back of the turtle that can relay a redstone signal to a toggle switch
and connect it to said toggle switch. It should automatically turn the accelerators on if there's
work to do.

Hope you like it :)


Dog's Photo Dog 28 Nov 2014

I really enjoy when small projects like this become community add-on projects :)

I cleaned up the code, fixed an error with the newly added fluix crystal select/compare/drop (it was including slot 13 in select/compare/drop which is the slot for the fluix comparison crystal), and localized the variables.

This also includes koniv00's redstone output.

Edited by Dog, 28 November 2014 - 03:29 AM.

koniv00's Photo koniv00 28 Nov 2014

View PostDog, on 28 November 2014 - 03:27 AM, said:

I cleaned up the code, fixed an error with the newly added fluix crystal select/compare/drop (it was including slot 13 in select/compare/drop which is the slot for the fluix comparison crystal), and localized the variables.

Yeah, realized that later as well, apparently trying to code lua for the first time late at night is a recipe for errors... :P/>

There are two other issues with the code as well i haven't been able to get working yet:
  • the "workToDo" variable will never get set back to false after the first time work has been done.
  • the CheckWorkStatus needs to be inside the if statement in the main, otherwise it will allways execute it, even when not needed
I am off to work for now, will continue working on this when i get home.
Edited by koniv00, 28 November 2014 - 06:38 AM.

Dog's Photo Dog 28 Nov 2014

I fixed the workToDo issue, significantly reduced the code in the CheckWorkStatus() function, and moved the CheckWorkStatus() call inside the if statement.

Edited by Dog, 28 November 2014 - 07:09 AM.

koniv00's Photo koniv00 28 Nov 2014

Wow, you are much better at this then I am, good Sir! Cant wait to try it when i get home.

I am wondering though, your solution to the problems is basically the same as i was trying, but for
me the turtle somehow stopped cycling through the inventory slots after i made these changes.
The only difference i can see is that i had the extra os.sleep outside the if statement.

If you wouldn't mind, could you elaborate a bit why you put it inside it?
I'm eager to learn and especially understand more about how LUA works.


Dog's Photo Dog 28 Nov 2014

Without seeing your code I couldn't tell you why your attempt didn't work. The reason I put the sleep statement inside the if statement is because the program is either going to do one action or the other (if/else); and it should sleep after either action (but at different intervals). I'd ask you to post your code, but we've kind of hijacked ariqbaily's thread and should probably wait to hear back from ariqbaily as to whether these additions/changes are even desired.

koniv00's Photo koniv00 28 Nov 2014

You are absolutely correct, but the post DolbsB made got me thinking about optimising it even further. I've managed to strip it down to
one turtle and a single ME interface with the final code:


PS: This is what i managed to cobble together after i got home from work. Still need to clean it up a bit.
PPS: apparently i'm not just a noob at LUA, but also at embedding images. Will fix it after i figure it out.
Edited by koniv00, 28 November 2014 - 05:27 PM.

Simon_Bitdiddle's Photo Simon_Bitdiddle 18 Dec 2014

I made few changes to Dog's code, namely using

while turtle.suckDown() do

to pull up everything instead of only one type of item.

It's kinda ugly but it works and gets rid of an edge case where the seed gathered by the suckDown isn't complete but the other ones are but are still dangling in the soup.

If there's a less ugly way to do it, I'm more than happy to hear it.

Also, moved the Iteration status output out of the loop so it prints cleaner.
Edited by Simon_Bitdiddle, 18 December 2014 - 08:41 AM.

Anora's Photo Anora 01 Apr 2020

this is an old script could use a clean up and update as it has problems in 1.12.2.

having a problem were it will stop processing what it got if one of the crystals is fully grown
Edited by Anora, 03 April 2020 - 12:41 AM.

Anora's Photo Anora 09 Apr 2020

I figured what needs to be fixed in this script it needs to pick up all crystals underneath, then compare if work still needs to be done drop those that are not completed and put the ones done in chest