This post attempts to describe my setup for growing maxed-out astral sorcery crystals using integrated dynamics and integrated tunnels.
To make all this work, we use several ID channels. Each channel has a single chest or fluid tank. The components work by exporting and importing crystals between appropriate channels.
Run fluid pipe from beneath your lightwell into a tank. If you are using Thermal Dynamics for this, it must be at least hardened or it will break (starlight is extremely cold). You will need a servo, because lightwells don’t auto-extract. Attach a fluid interface to the tank – my setup uses channel 0.
Add three chests to the network each with its own item interface on channels 1,2, and 3. Channel 1 will be for crystals needing to be grown, channel 2 for crystals needing to be cut, and channel 3 for completed maxed-out crystals.
Budding off new crystals
Create a spot for the budding pool. This spot will have an entity reader, a world fluid exporter, and an world item importer. Easiest way to to this is to place a solid block, put the components on that, then break the solid block.
Create a fluid variable from a bucket of starlight. This goes in the place fluids aspect of the fluid placer, using channel 0. This will keep the block full of starlight as it is used up.
Throw a celestial crystal with a purity of 100% in the pool. To get one of these, go through the process manually: you only need to do it once.
Make a variable from the ‘entities’ aspect of the reader. This will be of list type. Make an integer variable from the len of that list. Make a constant variable 1. Make a boolean variable that is true when the list length > 1. Put this in the ‘pick up all item entities’ aspect of the world item importer. Set the channel to 1 (or 2, that also works). The rate does not matter, because each crystal counts as its own stack.
The result is that the crystal in the pool will be grown, the starlight replenished as needed, and when a new crystal buds off, it will be put in the chest on channel 1.
Growing the crystals
Make another pool. This one needs a world fluid exporter exporting starlight from channel 0, an entity reader, a world item exporter, and two world item importers.
As with the budding-off pool, read the entities aspect to get a list variable and use the ‘is empty’ list operator to get a boolean variable (easier than len()==0). This goes in the ‘place all item entities’ aspect of the world item exporter, which must get its items from channel 1. The effect of this is that it will pick out a crystal from the ‘needing to be grown’ chest whenever there is no crystal in the pool.
And now it gets a little complicated. 🙂
Take a variable off the ‘entity’ aspect of the reader. Make a variable entity off this using ‘entity NBT’, to give an NBT object. Create String variables with the strings ‘Item’, ‘tag’, ‘astralsorcery’, ‘crystalProperties’, ‘size’, and ‘collectiveCapability’. These are probably case sensitive.
Using the NBT.tag function, create a series of variables drilling down the NBT tree -> ‘Item’, ‘tag’, astralsorcery’, ‘crystalProperties’, then on that final NBT create two integer variables using NBT.integer for ‘size’ and ‘collectiveCapability’. Use your labeller. In my setup, I label the ‘collectiveCapability’ variable to ‘cut’, and the ‘size’ variable to ‘size’, duh.
Create two integer variables with values 100 and 900 (assuming we are making celestial crystals. You’d use 400 for regular crystals … but why would you bother? You only need one to start with). Create three boolean variables size==900 (which I label ‘big’), cut==100 (which I label ‘perfect’), and cut!=100 (which I label ‘imperfect’).
Create a variable using the && operator for ‘big && perfect’. This goes in the ‘pick up all item entities’ aspect of one of the world item importers and should import into to channel 3. This is the output.
Create a variable for ‘big && imperfect’. This goes in the ‘pick up all entities’ aspect of the other world item importer and should import into channel 2.
The end result is that whenever this pool is empty, a crystal will be placed into it from chest #1 and the crystal will be grown until it has size 900. At that point it will get put either in chest 2 or 3 depending on whether is it properly cut or not.
Cutting the crystals
Place a grindstone. This will need 3 player simulators and a block reader. Place another chest with an inventory reader, an item interface, and an item exporter. The item interface will be on channel 4.
Take a variable from the ‘inventory empty’ aspect of the inventory reader. I label this ‘4empty’.
Take a variable from the Tile Entity NBT aspect of the block reader on the grindstone. Make string variables ‘tag’, ‘astralsorcery’, ‘crystalProperties’, ‘size’ and ‘collectiveCapability’ (or re-use the ones you already have).
As with the growth pool, descend the NBT tree on the grindstone to get integer variables for tag.astralsorcery.crystalProperties.size and .collectiveCapability . I prefix all the label names with gs_ for ‘grindstone’, and so these two variables get labelled ‘gs_size’ and ‘gs_cut’.
Use the NBT.hasKey(‘tag’) operator on the root tile entity NBT variable to make a variable named ‘gs_hasCrystal’, and the negation of this to make a variable named ‘gs_noCrystal’. This works because the ‘tag’ NBT entry on the grindstone is only present if there is a crystal in it (there is no ‘Item’ entry because the grindstone is not an inventory – that’s why you need player simulators).
Make a boolean variable labelled ‘gs_perfect’, from ‘gs_cut == 100’. Make another boolean variable ‘gs_imperfect’ from ‘gs_cut != 100’.
Make a boolean variable ‘gs_toosmall’ from ‘gs_size < 100'. I use 100 because a single pass of the grindstone takes less than 100 size off a crystal, and I already have an integer variable with a value 100, so I can re-use it 🙂 .
Make a boolean variable 'gs_done' from 'gs_toosmall || gs_perfect', and a variable 'gs_notdone' from '!gs_done'.
On the item exporter on the chest, have it 'export all items items' from channel 2 with the condition 'gs_noCrystal && 4empty'. This will place one and only one crystal needing to be cut in the chest when the grindstone is empty. Because the item interface on the chest is channel 4, and the item exporter takes from channel 2, the crystal is moved from channel 2 to channel 4 of the system.
Make an 'item' variable from any celestial crystal.
On the first player simulator on the grindstone, have it 'click item' using the celestial crystal item variable. Channel 4, right-click true, and check NBT to false (otherwise the crystal needing to be cut must be identical to the crystal you made the item variable with). This will place a single crystal from chest 4 into the grindstone, but because the chest only has a crystal when the grindstone is empty, it will not continuously right-click the grindstone and potentially ruin the crystal in there. In effect, what is happening is that chest #4 is used to overcome the problem that we cannot put a boolean on the 'right click with item' aspect of the player simulator. The presence or not of a crystal in chest 4 serves as that boolean.
I have just been watching direwolf’s youtube video. I was not aware of the tiny chest. Using one of these would make this system simpler, as you do not need the 4empty mechanism to ensure that the chest only has one item in it. You still need the gs_noCrystal so that it only gets filled when the grindstone has no crystal in it.
On the second player simulator, make a variable ‘gs_hasCrystal && gs_notDone’ and put it in the ‘click empty’ aspect. This will turn the grindstone until the crystal is too small to grind anymore or the cut is 100.
On the third player simulator, make a variable ‘gs_hasCrystal && gs_done’ and place it in the ‘click empty’ aspect with sneak == true. Set the channel to 1. This will pick up completed (or incomplete cut too-small) crystals and put them back in the bin of crystals to be grown.
The end result is that whenever the grindstone is empty, a crystal is right-clicked into it from chest 2 via chest 4. This gets empty clicked until the crystal is either perfect or too small to grind anymore. At that point, the third player simulator sneak-clicks it back into inventory #1, from where it will make its way to the growing pool.
And that’s it.
I use a separate variable store for each of the three processes – they’re not that expensive, and it helps with keeping things organised. Labelling the variables is also indispensably helpful when using the programmer. Label the strings, too.
Playing New Horizons III, I find that ID occasionally jams. This tends to happen when I reload the game, and when I AFK away at my main base which is several chunks away (my AS setup is in a sparkly star zone). To fix this, my variable stores are connected to the rest of the system via an extra length of logic cable. I find that breaking and then replacing it un-jams things.
I sometimes find that the World Item Importer on the budding pool fails to import an item. This leaves two crystals in the pool, and astral sorcery will only grow crystals if there’s just one. To fix, pick up both crystals and chuck one back in the pool. The other you can just put in chest 1.
Growing crystals is slow, but this system means you can AFK and come back to three or four maxed-out celestial crystals. One of these will make 11 lenses. The waste crystals that you got from creating your initial 100% pure crystal can be thrown into the lightwells.
And you can add more pools for growing and budding by making a new variable store, making a new set of variables for the pool, and importing/exporting to the existing chests. I’m finding that neither growing nor budding is obviously the critical path – budding is slow because once the crystal gets to 900, it will still be a couple more cycles before the crystal buds; but growing is also slow because after the crystal is grown to 900, cutting will reduce its size and it will need more growing anyway.
In the image at the top of this post, crystals are moving from right to left through the system, because that’s how I wound up building it.
The display reading 799 shows the size of the crystal in the budding pool. It will hit 900 and stay there until the crystal splits, at which point one of the smaller crystals will be removed and one will remain to be grown up to 900 again.
The displays reading 824 and 100 are the size and cut of the crystal in the growing pool.
Not visible in the image are two more displays showing the size and cut of the crystal in the grindstone. These are normally 0, because grinding happens very fast and the grindstone is usually empty.
The displays are not necessary, but they are kinda cool. They are also helpful in that you can see if the system is jammed or not – when it becomes jammed, the displays read 0 even though there should always be a crystal in the budding pool.
If you don’t want to build the full system, I’d suggest that the grindstone displays make it so much easier to grind crystals. Player simulators are expensive, so doing the grinding manually is an option – just come back to the setup every now and again and grind the crystals in chest 2. The displays make it a simple matter to just right-click that grindstone until the numbers are improved, and then it’s back into chest 1.
Personally, I think AS should be nerfed with the rule that if you bud off a new crystal from a celestial crystal, the new, purer crystal should just be a regular one. But as it is, with this system you can have a chestful of maxed crystals AFK.