Budding Amethyst Farm

Post your coolest Hexcasting creations here.

New topics are NOT for chatting or asking help, put those in the comments of a post or in a different forum.
stevebutnottoomany
Posts: 12
Joined: Wed Dec 28, 2022 5:07 am

Budding Amethyst Farm

Post by stevebutnottoomany »

Hexal allows the creation of spells to trade with villagers. Villagers recieve experience from these trades, thus can be automatically levelled up. This allows one to entirely automate the mindflaying of villagers. I've created a setup to do this, at a rate of around one villager a second (in real time it's more like one every two second because lag).

There are three ways to acquire villagers. Finding them in villages, breeding them, and curing zombie villagers. I first considered using villager breeding to acquire my villagers, but it just doesn't scale to the rate that I desired. Villagers can breed every five minutes, so to get a baby every second we need 300 breeding pairs. Then it takes the babies 20 minutes to grow up. So we'd need 600 breeding villagers, and another 1200 babies at any one time, in order to produce a villager a second. This is infeasible on grounds of lag - my prototype breeders ran very poorly even without the full 1200 babies.

As such, I explored the curing option. It didn't initially appear promising, as zombie villagers are fairly rare, but if have a moderately sized spawning platform at y level -64 (thanks to Buggy for that tip) and clear it every tick, you get more than sufficient rates.

So then the setup. First is the spawning platform
Image
It sits at the bottom of the world, and is 80x80. You get ambit over this whole platform with a 5x5 grid of greater sentinels, summoned at the intersection of the lines. It's covered by a roof of bottom slabs, that extends well past it to ensure no light reaches the platform. You could improve spawn rates and therefore shrink the platform if you did light suppression to get rid of the requirement for the roof, but that sounds like effort.
Zombie villagers are harvested from the pad, all other mobs are gated to a gate above the void and further than 180 blocks from the player, so should immediately despawn and free up the mobcap.

Image
Image
The zombie villagers then chill out in a holding cell. By the each they're pulled out and hit with weakness and a golden apple (using Hexal's Use Item spell). This sets them to curing, which takes anywhere from 3 to 5 minutes. Curing zombie villagers don't despawn, but do appear to count towards the mobcap. To avoid filling the mobcap, they're sent through a portal to the nether to chill out for five minutes.

Image
To achieve the five minute timing the curing zombie villagers are picked up and taken for a minecart ride that takes five minutes. Note the boat with a chicken in it positioned in the portal to push zombie villagers out and into the minecart pickup chamber. A minecart is dispensed ~every second and picks them up.

Image
The ride needs to stay in the 3x3 of chunks loaded by our nether portal (Also it's important to ensure the nether stays loaded constantly, else the minecarts will end up clogged, they don't like unloading). The minecart ride has the bonus of preventing zombies from killing the cured villagers.

Image
At the end of the ride the villagers are booted from the cart with a detector rail, and encouraged to run through a nether portal by a nametagged zombie. The minecarts take a hopper line back to the minecart dispenser.

Image
Our cured villagers are again pushed out of the portal by a chicken boat, and fall to another holding chamber with water in the bottom. From the they are then moved to trading cells, and traded up (We tend to catch them before they hit the bottom of the chamber, so the trading cells also have water in them to avoid fall damage). Some fraction of villagers are nitwits, and some fraction see us being dispicable and raise their prices. We deal with this by voiding any villagers that stick around in the trading cells for more than ten seconds.

Image
Level three villagers are then moved to a mindflaying cell that's ajacent to the player, and our Greater Sentinel walks over to the next budding amethyst location, and we mindflay the villager. The floor for this cell is one block higher than the floor we're standing on, as our ambit is a sphere centered on our eye position, but entities are determined to be in ambit based on their foot position.

Video of the farm in operation: https://imgur.com/a/KTaKDe1

Improvements
Object suggested using wisps to clear the spawning pad to save media. This would be a substantial saving - the vast majority of the media use of the spell is walking the sentinel over the spawning pad. I didn't end up implementing this because lazy, and adding feedback to the decision to walk the pad and shrinking the size of the pad brought the cost down something like enough for me to be happy. I estimate the spell uses something like 600 dust a second, 500 for the sentinel walking and another hundred for the mindflay.

I intend to add another condition on the decision to walk the pad, that raycasts to a block that's pushed by a position, so the input of new zombie villagers can be halted via a redstone signal. This will allow the setup to cease operations gracefully, by finishing up with the remaining villagers in the system and doing no more. The plan is to run the farm for however long I find nearly depletes my circlespam setup, cease operations, then have a circle teleport me back to an afk spot at my amethyst farm, wait long enough to refill the circlespam setup, then send me back to recommence operations. This way I should be able to run the thing continuously without any player input. The hope's to eventually produce a 64x64x64 array of budding amethyst in my survival world.

The spell
So, here's a slightly cleaned up version of the hexpattern file I used to write the spell. If you want to replicate this setup, I'd strongly suggest re-writing the spell, it's a mess. It pollutes the stack, it does the same thing in three different places in three different ways, and it's cobbled together as I addressed issues the easiest way possible as they came up.

To run the spell I use a circlespam setup, and hold the spellbook in my main hand(for some reason unknown to me this dealt with a very stubborn bug).

Code: Select all

{
    {
        //time of last spell
        //list of all fifteen trading station occupations - 0 is empty, 1 means level 1 villager, 2 is level 2, etc
        //i flayed - iterate variable to track where to put the new budding block
        //list of remembered villagers - stored every 10 seconds - if still around after 10 seconds they get voided to deal with nitwits clogging the machine
    }



    //Halt spell if caster more than a block from designated position - let you walk away and see how stuff's going without breaking stuff
    {
        //position --
    }
    Flock's Disintegration
    Mind's Reflection
    Compass' Purification
    Subtractive Distillation
    Length Purification
    Numerical Reflection: 1
    Maximus Distillation
    Numerical Reflection: 1
    Numerical Reflection: 0
    Augur's Exaltation
    {
        Bookkeeper's Gambit: v
        Charon's Gambit
    }
    Jester's Gambit
    Selection Distillation
    Hermes' Gambit
    

    //Puts sentinel at feet to make sure everything's in range
    Mind's Reflection
    Compass' Purification II
    Summon Greater Sentinel

    //Grab a single zombie villager from holding cell and applies weakness, then uses a golden apple mote on them to start curing
    //Only do this once a second
    {
        //Runs with one entity from holding on the stack

        Gemini Decomposition
        Gemini Decomposition 

        Numerical Reflection: 5 
        Numerical Reflection: 1
        White Sun's Nadir

        {
            //golden apple mote
        }
        Flock's Disintegration
        Jester's Gambit
        Use Item On

        {
            //Gate - Apple chamber
        }
        Flock's Disintegration
        Gemini Decomposition
        Numerical Reflection: 3
        Fisherman's Gambit
        Gate's Opening
        Gate's Closing
    }

    //This section determines whether to run above - runs if there's a zombie in the holding chamber AND it's been more than a second since we last ran this code
    {
        Bookkeeper's Gambit: v
        Hermes' Gambit
    }
    {
        //storage chamber location - where zombie villagers are stored
    }
    //Gets zombie villager or null on stack, then above it places a boolean that's true iff it's not null
    Flock's Disintegration
    Numerical Reflection: 2
    Zone Distillation: Monster
    Numerical Reflection: 0
    Selection Distillation
    Gemini Decomposition
    Nullary Reflection
    Inequality Distillation

    //Get's time since last cast - at index 1 of spell is a number that's the time of last cast of this section. Returns true if been longer then a second
    Timekeeper's Reflection
    Scribe's Reflection
    Numerical Reflection: 1
    Selection Distillation
    Subtractive Distillation
    Numerical Reflection: 20
    Maximus Distillation II

    //ANDs the two booleans
    Conjunction Distillation
    
    
    //Runs or drops the curing part of the spell
    Numerical Reflection: 1
    Numerical Reflection: 0
    Augur's Exaltation
    //Stack should be: code, list, monster, 0 or 1
    Numerical Reflection: 2
    Swindler's Gambit
    //stack should be:code, monster, list, 0 or 1
    Selection Distillation
    Numerical Reflection: 2
    Swindler's Gambit
    //Stack should be monster, code, run or not run
    Hermes' Gambit
    

    //We wanna level and mindflay any fresh villagers
    //For this version we'll put amethyst near caster, so just walk over. Other possible handlings would be to send villagers to a specific flaying circle
    //or have a wisp do the flaying, but meh, walking works
    
    //Gets list of all the fallen villagers onto stac
    {
        //Position of waterfall - the place where fresh villagers fall after returning from nether
    }
    Flock's Disintegration
    Numerical Reflection: 2
    Zone Distillation: Living
    //Get's the occupation of trading cells list and puts it in the ravenmind. 
    Scribe's Reflection
    Numerical Reflection: 2
    Selection Distillation
    Huginn's Gambit

    //What to do with all the fresh villagers - put them into the first unoccupied cell
    {
        //There's a fallen villager on the stack
        {
            //floating gate - used for moving the villager to their cell
            //root trading station position - the coordinates of the first trading cell in the line
        }
        Flock's Disintegration

        //Finds first unnoccupied station - Locates first cell with 0 showing
        Muninn's Reflection //stack is villager, gate, root position, occupation list
        Gemini Decomposition
        Numerical Reflection: 0
        Locator's Distillation // stack is villager, gate, root position, occupation list, index of first empty cell
        Gemini Decomposition
        Rotation Gambit II //stack is villager, gate, root position, index, occupation list, index
        Numerical Reflection: 1
        Surgeon's Exaltation //stack is villager, gate, root position, index, updated occupation list - we say the cell we've located is now occupied
        Huginn's Gambit //save updated occupation list

        //Now we get the position of the located empty cell - They're all in a line, so we can just add index*2*x_vector to the root position
        Numerical Reflection: 2
        Vector Reflection +X//115
        Multiplicative Distillation
        Multiplicative Distillation
        Additive Distillation //118
        //Then we shift things one down - I realised my villagers were being teleported in too high - multiplied by 1 in case I needed to fine tune the height by surgeoning in new value
        Vector Reflection +Y
        Numerical Reflection: 1
        Multiplicative Distillation
        Subtractive Distillation
        //stack is villager, gate, vector
            
        Numerical Reflection: 1 //fishermans two indexes incorrectly (at least in comparisson to fishermans)
        Fisherman's Gambit II //stack is villager, gate, vector, gate
        Numerical Reflection: 4
        Fisherman's Gambit //stack is gate, vector, gate, villager
        Gate's Opening
        Gate's Closing
    }
    //Apply above to all fallen villagers Also note that this doesn't handle full cells gracefully - happily we prohibit villagers from being in cells for more than 10 seconds, and only produce a villager a second, and have fifteen cells, so overflow seems to be avoided
    Jester's Gambit
    Thoth's Gambit
    

    //This section handles trading. The below is a list of list, each sublist contains the index of a trading cell, and its position
    {
        //[[0, trading station 0], [1, trading station 1], [2, trading station 2], ..., [15, trading station 15]]
    }
    Flock's Disintegration
    Bookkeeper's Gambit: v- //?? Think it's clearing up the thoth - The stack is mega-polluted, really should have cleaned it better

    {
        //If level one AND occupation list says one - do level one trades AND write 2 to occupation list
        //if level two AND occupation list says two - do level two trades AND write 3 to occupation list
        //if level 3 - gate to flaying cell AND write 0
        
        //Stack should be [i, trading cell i position]
        Flock's Disintegration
        Entity Purification: Living
        //i, and villager or null on stack
        Gemini Decomposition
        //If null, conditional continue
        Nullary Reflection
        Equality Distillation
        {
            {
                Bookkeeper's Gambit: -
            }
        }
        Flock's Disintegration
        Bookkeeper's Gambit: v
        Augur's Exaltation
        Hermes' Gambit

        //i and villager on stack
        Dioscuri Gambit
        //i villager i villager
        Seniority Purification
        Gemini Decomposition
        //i villager i seniority seniority
        Rotation Gambit //i, villager, seniority, seniority, i
        Muninn's Reflection
        Jester's Gambit
        Selection Distillation //i villager villager_seniority villager_seniority occupation_level
        //if we've got a mismatch between actual level and supposed level, continue - we're waiting for villager to unlock next level
        Inequality Distillation
        {
            {
                Bookkeeper's Gambit: -
            }
        }
        Flock's Disintegration
        Bookkeeper's Gambit: v
        Augur's Exaltation
        Hermes' Gambit

        //stack is i villager villager_seniority
        //Below code dictates what to do for villagers of each level - 1, 2, and 3
        //We're using toolsmiths, so the trade is 10 emeralds for tools for first level, then 24 iron for emeralds for the next level
        //Sometimes these values change if they're happy or mad at you, we don't really deal with that, if they don't level they get voided by the nitwit protocol
        {
            {
                //Level 1 trades
                //split of 10 emeralds and offer them
                //merge whatever motes you get back
                {
                    //mote - emerald mainline
                }
                Flock's Disintegration
                Numerical Reflection: 10
                Splitting Gambit
                Bookkeeper's Gambit: v- //gets emerald mainline off the stack
                Trade //leaves a mote on stack or an empty list if the villager didn't trade

                //If they didn't give us anything we stop - they haven't taken a profession yet
                Gemini Decomposition 
                Vacant Reflection
                Equality Distillation
                {
                    Charon's Gambit
                    Bookkeeper's Gambit: -                    
                }
                Flock's Disintegration
                Augur's Exaltation
                Hermes' Gambit
                
                //stack should be mote the villager traded to us
                //We take the mote and merge with other mote in nexus of same type. If it's the only mote of the type in the nexus it merges with itself, which doesn't do anything
                //Makes sure the nexus doesn't fill up with motes
                Stocktake Purification
                Gemini Decomposition
                Numerical Reflection: 0
                Selection Distillation
                Jester's Gambit
                Gemini Decomposition
                Abacus Purification
                Numerical Reflection: 1
                Subtractive Distillation
                Selection Distillation
                Stacking Distillation
                Bookkeeper's Gambit: v
                
                //Update the villager contained status for this cell
                //should have just i on the stack, so we update ith element of list
                Muninn's Reflection
                Jester's Gambit
                Numerical Reflection: 2
                Surgeon's Exaltation
                Huginn's Gambit
                
                
                

            }
            {
                //Level 2 trades
                //Split off 24 iron and offer
                //Merge the 6-8 emerald you get back
                
                //See comments for level 1, it's ~the same
                {
                    //mote - iron mainline -----
                }
                Flock's Disintegration
                Numerical Reflection: 24
                Splitting Gambit
                Bookkeeper's Gambit: v-
                Trade


                Stocktake Purification
                Gemini Decomposition
                Numerical Reflection: 0
                Selection Distillation
                Jester's Gambit
                Gemini Decomposition
                Abacus Purification
                Numerical Reflection: 1
                Subtractive Distillation
                Selection Distillation
                Stacking Distillation
                Bookkeeper's Gambit: v
                
                //Update the villager contained status for this cell
                Muninn's Reflection
                Jester's Gambit
                Numerical Reflection: 3
                Surgeon's Exaltation
                Huginn's Gambit
            }

            {
                //Level 3 villagers - gate to flaying chamber and write zero to occupation list
                //stack starts i villager
                {
                    //flay gate
                }
                Flock's Disintegration
                Gemini Decomposition
                Numerical Reflection: 3
                Fisherman's Gambit
                Gate's Opening
                Gate's Closing
                
                Muninn's Reflection
                Jester's Gambit
                Numerical Reflection: 0
                Surgeon's Exaltation
                Huginn's Gambit
            }
        }

        //I made the spell list wrong, so we have to spend a metaeval to get the three options on the stack and then pack them into a list
        Hermes' Gambit
        Numerical Reflection: 3
        Flock's Gambit
        

        //stack is i villager seniority, spell list
        //This bit's neat - the 0th entry of the spell list deals with level 1 villagers, the 1th entry deals with level 2s, etc, so we subtract 1 from their seniority and select the spell
        Jester's Gambit
        Numerical Reflection: 1
        Subtractive Distillation
        Selection Distillation
        //i villager spell_from_list
        Hermes' Gambit
    }
    Jester's Gambit
    Thoth's Gambit
    Bookkeeper's Gambit: v
    

    //Save all the updates made to villager occupation list to the hand
    Scribe's Reflection
    Numerical Reflection: 2
    Muninn's Reflection
    Surgeon's Exaltation
    Scribe's Gambit


    //Next we mindflay all our levelled villagers. To do this we have to walk our sentinel over to where we're putting the budding amethyst, so we need the chamber to be right next to player, so villagers are still in range of cleric circle casts
    //Floor of chamber is 1 block higher than floor player stands from, as ambit is circle around players eye pos, but entity being in ambit determined by foot pos, so having them higher ensures they're in range
    {
        //Mindflay chamber position
    }
    Flock's Disintegration
    Numerical Reflection: 2
    Zone Distillation: Non-Player
    {
        //levelled villager on stack
        
        //This section decides where the next budding goes. I use my Prism Counter spell to place the amethyst over a cube.
        {
            //Root position
        }
        Flock's Disintegration
        //villager, root pos
        Scribe's Reflection
        Numerical Reflection: 3
        Selection Distillation
        //villager, root pos, i
        Numerical Reflection: -64
        Numerical Reflection: 64
        Numerical Reflection: -64
        Vector Exaltation
        //villager, root pos, i, vector
        //Macro: Prism Counter
        //Stack is villager, root pos, offset vector in cube
        //Then we multiply offset vector by three, so get correct amethyst spacing, and add to root position to get position for budding to go
        Numerical Reflection: 3
        Multiplicative Distillation
        Additive Distillation
        Numerical Reflection: 3
        Gemini Gambit
        Huginn's Gambit
        //stack is villager, budding pos, budding pos, with budding pos in ravenmind

        //walk greater sentinel to location
        {
            Gemini Decomposition
            //Stack should be villager, pos, pos, while code, while code
            Muninn's Reflection //villager, pos, pos, while, while, pos
            Locate Sentinel
            Subtractive Distillation //villager, pos, pos, while code, while code, Vector from sentinel to pos
            Gemini Decomposition
            Length Purification
            Division Distillation
            Numerical Reflection: 15.5
            Multiplicative Distillation //villager, pos, pos, while code, while code, length 15.5 vector pointing from sentinel to pos
            Locate Sentinel
            Additive Distillation //villager, pos, pos, while code, while code, vector stepped towards correct pos
            Summon Greater Sentinel
            
            {
                Bookkeeper's Gambit: vv
                Hermes' Gambit
            }
            Muninn's Reflection //villager, pos, pos, while code, while code, {vv, hermes}, pos
            Locate Sentinel
            Subtractive Distillation 
            Length Purification //villager, pos, pos, while, while, {vv, hermes}, distance from pos to sentinel
            Numerical Reflection: 15.5
            Minimus Distillation //true if distance is less than 15.5
            Jester's Gambit
            Flock's Disintegration
            Augur's Exaltation  //bookkeepers on stack if less than 15.5, otherwise hermes
            Hermes' Gambit //So loop ends when pos is in ambit
        }
        Gemini Decomposition
        Hermes' Gambit

        //stack should be villager pos pos
        {
            //Amethyst block mote
        }
        Flock's Disintegration //villager pos pos amethyst
        Jester's Gambit
        Gemini Decomposition //villager, pos, amethyst, pos, pos
        Break Block //For some reason sometimes the spell was breaking, with an amethyst block being placed but not converted to budding. So we break first to prevent misshaps here
        Place Block II //448
        Dioscuri Gambit //villager, pos, villager, pos
        Flay Mind
        Bookkeeper's Gambit: v //villager
        {
            //void gate
        }
        Flock's Disintegration
        Jester's Gambit //gate, villager
        Gate's Opening
    
        //Updates i, so next mindflay goes to next location on array
        Scribe's Reflection
        Gemini Decomposition
        Numerical Reflection: 3
        Selection Distillation
        Numerical Reflection: 1
        Additive Distillation
        Numerical Reflection: 3
        Jester's Gambit
        Surgeon's Exaltation
        Scribe's Gambit
        
    }
    Jester's Gambit
    Thoth's Gambit
    

    //Move sentinel back to caster
    Mind's Reflection
    Compass' Purification
    Summon Greater Sentinel
    

    //Restack emeralds - If villagers didn't accept emerald trade the emerald mote could come unstacked and fill up the nexus, so here we quickly restack it to avoid that issue
    {
        //Itemtype - emerald
    }
    Flock's Disintegration
    Stocktake Purification
    Speaker's Decomposition
    Jester's Gambit
    {
        Stacking Distillation
    }
    Jester's Gambit
    Thoth's Gambit


    //Nitwit protocol - every 10 seconds we void any villagers we remember from 10 seconds ago, to get rid of uncooperative villagers and nitwits
    {
        //voids any villagers stuck around for more than ten seconds
        //This part is thothed on the list of villagers that was saved 10 seconds ago - Most entries should have nulled due to flaying, but some will still have villagers
        {
            Gemini Decomposition //villager_or_null villager_or_null
            Nullary Reflection //villager_or_null villager_or_null null
            Equality Distillation //villager boolean_true_if_null
            //Continue if null
            {
                {
                    Bookkeeper's Gambit: -
                }
            }
            Flock's Disintegration
            Bookkeeper's Gambit: v
            Augur's Exaltation
            Hermes' Gambit

            //stack should be villager
            {
                //void gate ----
            }
            Flock's Disintegration //villager void_gate
            Jester's Gambit //void_gate villager

            //I was running into issues where I'd get a misshap attributed to running gates opening on a villager outside of ambit, and it seemed like it had to be from this one
            //So we have here to check villager is in ambit. This didn't seem to fix problem, so ¯\_(ツ)_/¯. Holding focus in mainhand did seem to stop the problem though, so it remains an unsolved mystery
            Gemini Decomposition //void_gate villager villager
            Compass' Purification II //gate villager villagerpos
            Locate Sentinel 
            Subtractive Distillation
            Length Purification //gate villager distancefromsentinel
            Numerical Reflection: 15.5
            Maximus Distillation//gate villager boolean_true_if_out_of_ambit
            //continue if out of ambit
            {
                {
                    Bookkeeper's Gambit: -
                }
            }
            Flock's Disintegration
            Bookkeeper's Gambit: v
            Augur's Exaltation
            Hermes' Gambit
            //mark the villager for void gating
            Gate's Opening
        }
        
        //Dealing with nitwits - Void any villagers we remember from 10 seconds ago
        Scribe's Reflection
        Numerical Reflection: 4
        Selection Distillation //stack is list of villagers from 10 seconds ago
        Thoth's Gambit
        Bookkeeper's Gambit: v
        //have to close here to avoid re-adding villagers to list
        {
            //void gate -----
        }
        Flock's Disintegration
        Gate's Closing
            

        //This section needs to: Add any villagers in cells to the list to remember, write zero to any empty cells
        Scribe's Reflection
        Numerical Reflection: 2
        Selection Distillation //stack is occupation list
        Numerical Reflection: -1
        Numerical Reflection: 2
        Flock's Gambit //stack is [occupation list, -1]
        Huginn's Gambit
        { //521
            //Stack is polluted af, so we ditch everything but top element - Important as we're using the output of this thoth
            Flock's Reflection
            Flock's Gambit
            Retrograde Purification
            Speaker's Decomposition
            Bookkeeper's Gambit: v-
            
            //stack is ith trading cell position
            Entity Purification: Living //stack is villager or null
            Gemini Decomposition //villagerornull, villagerornull
            Nullary Reflection //villagerornull, villagerornull, null
            Inequality Distillation //villagerornull, boolean_true_if_villager
            Muninn's Reflection //stack is villagerornull, boolean_true_if_villager, [occupation list, i-1]
            Flock's Disintegration
            Numerical Reflection: 1
            Additive Distillation
            Numerical Reflection: 2
            Flock's Gambit
            Huginn's Gambit //stack it villagerornull, trueifvillager
            //continue if villager. So, if there's a villager in the cell, this iteration stops, and the thoth will return that villager for this iteration
            //If there's null on the stack, we'll run more stuff, that'll make sure the occupation list says zero for this cell, and then empty the stack, so thoth returns nothing for this iteration
            {
                {
                    Bookkeeper's Gambit: -
                }
            }
            Flock's Disintegration
            Bookkeeper's Gambit: v
            Augur's Exaltation
            Hermes' Gambit 
            
            //If this is executing stack is null
            Muninn's Reflection
            Flock's Disintegration //stack is null, list, i
            Dioscuri Gambit
            Numerical Reflection: 0 //stack is null, list, i, list, i, 0
            Surgeon's Exaltation //stack is null, list, i, modified list
            Bookkeeper's Gambit: v--
            Jester's Gambit //stack is null, modified list, i
            Numerical Reflection: 2
            Flock's Gambit
            Huginn's Gambit //saves [modified list, i]
            Bookkeeper's Gambit: v
        }
        
        {
            //list of trading cell positions
        }
        Flock's Disintegration
        Thoth's Gambit 
        //stack is new list of villagers to remember
        Scribe's Reflection
        Numerical Reflection: 2
        Muninn's Reflection
        Flock's Disintegration
        Bookkeeper's Gambit: v
        Surgeon's Exaltation //here we edit in the updated occupation list
        Numerical Reflection: 4 //stack is list of villagers, spell, 4
        Rotation Gambit
        Surgeon's Exaltation //here we edit in the new list of villagers
        Scribe's Gambit
    }
    //Run the above every ~10 seconds - 202 ticks
    {
        Hermes' Gambit
        Bookkeeper's Gambit: v
    }
    Timekeeper's Reflection //stack is spell, do or not, time
    Numerical Reflection: 202
    Modulus Distillation
    Numerical Reflection: 0
    Equality Distillation //stack is spell, do or not, boolean time divisible by 202
    Jester's Gambit
    Flock's Disintegration
    Augur's Exaltation
    Hermes' Gambit
    //end new stuff


    //Code for walking over pad and grabbing any zombie villagers and voiding any other mobs
    {
        {
            //sentinel down pos - Don't want this spell accidentally running on mobs we've already dealt with, so we move the sentinel down towards the spawning pads before doing anything else
        }
        Flock's Disintegration
        Summon Greater Sentinel
        
        //Then we search all the saved positions
        {
            //list of sentinel positions
        }
        Flock's Disintegration
        {
            //We move sentinel, then search volume around it for monsters
            Summon Greater Sentinel
            Locate Sentinel
            Numerical Reflection: 15.5
            Zone Distillation: Monster

            //This spell is thothed on all monsters in range
            {
                //if zombie villager AND height =1.95(adult) assign zombie villager gate, else assign void gate
                //stack is mob
                Gemini Decomposition //mob mob
                Physician's Purification //stack is mob mob_type
                {
                    //Void gate 
                    //Zombie villager gate 
                }
                Jester's Gambit //stack is mob {void gate, villager gate}, mob_type
                {
                    //Type - zombie villager
                }
                Flock's Disintegration //stack is mob {void gate, villager gate}, mob_type, zombie_villager_type
                Inequality Distillation //stack is mob, {void gate, villager gate}, boolean_true_if_not_zombie_villager

                Numerical Reflection: 2
                Fisherman's Gambit II //stack is mob {void gate, vilager gate}, boolean_true_if_not_zombie_villager, mob
                Stadiometer's Purification
                Numerical Reflection: 1.95
                Inequality Distillation //stack is mob, {void gate, villager gate}, boolean_true_if_not_zombie_villager, boolean_true_if_not_adult_height
                Disjunction Distillation //stack is mob, {void gate, villager gate}, boolean_true_if_not_zombie_villager_OR_not_adult_height
                
                Jester's Gambit //stack is mob, boolean_true_if_not_zombie_villager_OR_not_adult_height, {void gate, villager gate}
                Flock's Disintegration
                Augur's Exaltation
                Jester's Gambit
                Gate's Opening            
            }
            Jester's Gambit
            Thoth's Gambit //thoth over all mobs around sentinel
            Bookkeeper's Gambit: v
        }
        Jester's Gambit
        Thoth's Gambit //thoth over all sentinel positions
    }

    //This bit determines whether we walk over the spawning pad. Presently this decision is made purely on feedback from the current zombie villager stock, I think it would be cheaper to raise the desired level of zombie villagers in holding, but introduce an additional condition that it only happens at times divisible by some number between 2 and 5
    //As it looks like mobs keep spawning a few ticks after clearing - doesn't immediately hit mobcap, so you could significant media here
    //Potentially do something clear every 5 ticks if we have 2-4 in holding, and every tick if we're down to 1 or 0 because it's more urgent
    {
        Hermes' Gambit
        Bookkeeper's Gambit: v
    }

    //Here we check the number of zombies in the holding cell, run the code if less than 3
    {
        //Zombie holding cell position
    }
    Flock's Disintegration
    Numerical Reflection: 2
    Zone Distillation: Monster
    Abacus Purification
    Numerical Reflection: 3
    Minimus Distillation
    Jester's Gambit
    Flock's Disintegration
    Augur's Exaltation
    Hermes' Gambit

    //Then we close the gates for voiding mobs, and for moving zombie villagers to the holding cell
    {
        //Void gate ---
    }
    Flock's Disintegration
    Gate's Closing
    {
        //Zombie villager gate ----
    }
    Flock's Disintegration
    Gate's Closing
}
hunterkiller
Posts: 1
Joined: Mon Jul 24, 2023 8:47 am

Re: Budding Amethyst Farm

Post by hunterkiller »

This is super cool!

I hadn't considered using villager curing for my source of villagers and I've already got a fairly efficient mob farm I could just pluck zombie villagers from, so I'm definitely going to set up something similar!
stevebutnottoomany
Posts: 12
Joined: Wed Dec 28, 2022 5:07 am

Re: Budding Amethyst Farm

Post by stevebutnottoomany »

This is an updated zombie villager farm, improves the rates to 5-10 budding per second. The rate is now lag bottlenecked on the thousands of curing zombie villagers.

Can run on a daemoncore or other large ambit looping spell circle. This large ambit for free saves a huge amount of media on sentinel walking, and makes it practical to use a large number of spawning pads in the sky rather than something at the bottom of a perimeter. This means you can take advantage of the boosted zombie villager rates in an Old Growth Pine Taiga. (So sad that zombie villager reinforcement isn't a thing till 1.21.2, that would make for a hilarious farm)

This design ditches the nether component, zombie villagers are now named to remove them from the mobcap, and stored in a single cell protected from cramming with a ladder. This cell should be out of range of the large zone distillation to avoid double handling and I imagine reduce lag.

State no longer lives in a finnicky cell occupation/levelling list, villagers are renamed as they move along the pipeline.

For setup you want the spawning pads, a curing cell, an array of trading station, a gate to high in the sky or low in the ground (>128 blocks from the player) to instantly despawn unwanted hostiles (Must ensure this is in a loaded chunk otherwise they won't despawn and you'll run out of memory), a lava cell for disposing of nitwits and flayed villagers, and a prism iterator for budding placement (I like mine (viewtopic.php?p=288#p288) as steps are guaranteed to be adjacent to each other)

Runs you around 1000 dust per second, give or take a bit

Code: Select all

// New zombie villager farm, running using a high volume looping circle to avoid sentinel walking

// THE NUMBERS - NB some of these (5, 7, 9, 10) are transient and/or may not actually be assigned, depending on the needs of the spell
//  1: Zombie villager
//  2: Curing zombie villager
//  3: Unassigned villager
//  4: Assigned, no profession
//  5: Ready for level 1 trades
//  6: Waiting to level
//  7: Ready for level 2 trades
//  8: Waiting to level
//  9: Ready to flay
// 10: In lava


// THE LOGIC - Just copying over the scaffolding comments before I write the spell so they remain readable. May not be updated if I change anything on the fly.
// Itself adapted from whiteboard notes
// ============================ THRESHING ============================
// Winnowing: Big zone distillation, ditches all the non-zombie villagers, grabs any fresh zombie villagers,
// curing and renaming them, moving them to the curing cell

// Zone dist - monster: If zvil: cure, name '2', open gate to curing cell; else: open banishment gate; close both gates


// ============================ WINNOWING ============================
// I'm changing the design slightly here: I'm going to put the curing cell out of reach of this zone distillation, so that we aren't picking up all of the curing
// zombies up every single time
// Here we just run a villager zone dist, ditch any nitwits, rename and gate to the cured villager holding cell

// Zone dist - villager, at curing cell: If nitwit: gate to lava; else: gate to holding cell, update to 3




// ============================ UTILIZING ============================
// Villager handling: Assigns to cells, handles levelling and flaying
// Make sure to include chat messages if any villagers get cut so we can debug

// Zone dist - villager, covering whole central apparatus
// If 3 and empty cells exist: gate to first empty cell, mark cell as occupied (Could we use a matrix for this?), rename to 4
// If 4 and profession is cleric: run level 1 trades, update to 6
// If 6 and level is ?2? (check indexing): run level 2 trades, update to 8
// If 8 and level is ?3?: flay, gate to lava, update to 10


// ============================  FUELING  ============================
// Not sure what to do here just yet, but for the full run need something here to handle fueling the circles
// For the first run just going to preload, then afterwards can set up the harvester circle and sort out what to do here
// Think something like: Pick randomly between dust and shards and charged, weighted by proportion of our media storage they currently are, blocking anything below some floor,
// then deposit 500 dust worth of that. NB depositing equal dust otherwise I think you'd overdraw on the dense ones 




// TO DO
// Need to expand the old villager dumping snippet to unlock their cell if they're in one


{
    // if not in place, halt
    Scribe's Reflection
    {
        // farm center
    }
    Flock's Disintegration                                                      // spell vec
    Mind's Reflection
    Compass' Purification II
    Subtractive Distillation
    Length Purification
    Numerical Reflection: 5
    Maximus Distillation                                                        // spell bool_greater_than_five_from_center
    {
        Charon's Gambit
    }
    Flock's Disintegration
    {
        Bookkeeper's Gambit: -
        Bookkeeper's Gambit: v
    }
    Augur's Exaltation
    Hermes' Gambit
    

    
    // ============================ THRESHING ============================
    // Zone dist - monster: If zvil: cure, name '2', open gate to curing cell; else: open banishment gate; close both gates
    // NB the name isn't used for this step, but is nice for clarity plus is required to prevent despawns
    {
        // - Zombie villager type
        // -- Farm center pos
    }
    Flock's Disintegration

    
    {                                                                           // zvilltype monster
        Undertaker's Gambit                                 
        Physician's Purification                                                // monster zvilltype monstertype
        Equality Distillation
        Prospector's Gambit
        Stadiometer's Purification
        Numerical Reflection: 195
        Numerical Reflection: 100
        Division Distillation
        Equality Distillation
        Conjunction Distillation
        
        {                                                                       // monster
            {
                // -2 Curing cell gate
                // -3 Golden apple mote
            }
            Flock's Disintegration                                              // monster gate gapple
            Rotation Gambit
            Undertaker's Gambit                                                 // gate monster gapple monster
            Gemini Decomposition                                                // gate monster gapple monster monster
            Numerical Reflection: 1
            Numerical Reflection: 1
            White Sun's Nadir
            Use Item On
            Gemini Decomposition                                                // gate monster monster
            Numerical Reflection: 2
            Scrivener's Purification
            Jester's Gambit
            Name
            Gate's Opening
        }
        {                                                                       // monster
            Gemini Decomposition
            Gemini Decomposition                                                // monster monster monster
            Vehicle Purification
            Nullary Reflection
            Equality Distillation
            Jester's Gambit
            Jockey Purification
            Vacant Reflection
            Equality Distillation
            Conjunction Distillation
            {
                {
                    // -4 Banishment gate
                }
                Flock's Disintegration
                Jester's Gambit
                Gate's Opening
            }
            {
                Compass' Purification II
                Numerical Reflection: 1
                Explosion
            }
            Augur's Exaltation
            Hermes' Gambit
        }
        Augur's Exaltation
        Hermes' Gambit
    }                                                                           // zvilltype vec spell
    Jester's Gambit
    Numerical Reflection: 130
    Zone Distillation: Monster                                                  // zvilltype spell list
    Thoth's Gambit
    Bookkeeper's Gambit: v
    Bookkeeper's Gambit: v
    {
        // -5 Banishment gate
        // -6 Curing gate
    }
    Flock's Disintegration
    Gate's Closing
    Gate's Closing
    
    
    


    // ============================ WINNOWING ============================
    // Zone dist - villager, at curing cell: If nitwit: gate to lava; else: gate to holding cell, update to 3

    {                                                                           // villager
        {
            // -7 Nitwit identifier
        }
        Flock's Disintegration                                                  // villager nitwit_identifier
        Prospector's Gambit
        Professional Purification
        Equality Distillation
        
        {
            {
                // - Lava gate
            }
            Flock's Disintegration
            Jester's Gambit
            Gate's Opening
        }
        {
            {
                // -8 Holding cell gate
            }
            Flock's Disintegration                                              // villager gate
            Jester's Gambit
            Gemini Decomposition                                                // gate villager villager
            Timekeeper's Reflection
            Scrivener's Purification
            Comma Reflection
            Spacing Reflection
            Numerical Reflection: 3
            Scrivener's Purification
            Additive Distillation
            Additive Distillation
            Additive Distillation                                               // gate villager villager "time, 3.00"
            Jester's Gambit
            Name
            Gate's Opening
        }
        Augur's Exaltation
        Hermes' Gambit
    }                                                                           // spell

    {
        // -9 Villager type
        // -10 Cell vec
    }
    Flock's Disintegration
    Numerical Reflection: 3                                                     // spell villagerType vec 3
    Zone Exaltation: Type
    Thoth's Gambit
    Bookkeeper's Gambit: v

    {
        //-11 Lava gate
        //-12 Holding gate
    }
    Flock's Disintegration
    Gate's Closing
    Gate's Closing
    
    


    // ============================ UTILIZING ============================
    // Zone dist - villager, covering whole central apparatus
    // Procedural steps
    // If 3 and empty cells exist: gate to first empty cell, mark cell as occupied, rename to "t, 4, cell"
    // If 4 and profession is cleric: run level 1 trades, update to 6
    // If 6 and level is ?2? (check indexing): run level 2 trades, update to 8
    // If 8 and level is ?3?: flay, gate to lava, update to 10, unmark cell
    // Error correcting steps
    // Restack motes
    // Gate any villagers who've been around for more than 15 seconds into lava
    
    // Just for locating where this block starts
    {
        // -100
    }
    Bookkeeper's Gambit: v

    {
        // -2 data vec
        // -3 center pos
    }
    Flock's Disintegration
    
    {                                                                           // datavec villager
        Gemini Decomposition
        Moniker Purification                                                    // datavec villager name
        Comma Reflection
        Spacing Reflection
        Additive Distillation
        Separation Distillation                                                 // datavec villager ["time", "state", *"cell"]
        {
            Bookkeeper's Gambit: vv-
            Input Purification
        }
        Jester's Gambit
        Thoth's Gambit                                                          // datavec villager [time, state, *cell]



        //if 3 and empty cell exists
        Gemini Decomposition
        Numerical Reflection: 1
        Selection Distillation
        Numerical Reflection: 3
        Equality Distillation                                                   // datavec villager [t, s, *c] stateIsThree
        Numerical Reflection: 3
        Fisherman's Gambit II
        Chronicler's Purification                                               // datavec villager [t, s, *c] stateIsThree cellOccupancy
        Undertaker's Gambit                                                     // datavec villager [t, s, *c] cellOccupancy stateIsThree cellOccupancy
        Numerical Reflection: 0
        Locator's Distillation                                                  // datavec villager [t, s, *c] cellOccupancy stateIsThree emptyCell
        Undertaker's Gambit
        Numerical Reflection: -1
        Inequality Distillation                                                   // datavec villager [t, s, *c] cellOccupancy emptyCell stateIsThree hasEmpty
        Conjunction Distillation
        
        // Displace to first empty cell, mark cell as occupied, rename villager
        {                                                                       // datavec villager [t, s] cellOccupancy emptyCell
            {
                // -4 root cell vec
            }
            Flock's Disintegration                                              // datavec villager [t, s] cellOccupancy emptyCell root
            // positive x has offsets of five, and has seven rows
            // positive z has offsets of two, and has fourteen columns

            Prospector's Gambit                                                 // datavec villager [t, s] cellOccupancy emptyCell root emptyCell
            Gemini Decomposition
            Numerical Reflection: 7
            Modulus Distillation
            Numerical Reflection: 5
            Multiplicative Distillation
            Vector Reflection +X
            Multiplicative Distillation                                         // datavec villager [t, s] cellOccupancy emptyCell root emptyCell xvec
            Jester's Gambit
            Numerical Reflection: 7
            Division Distillation
            Floor Purification
            Numerical Reflection: 2
            Multiplicative Distillation
            Vector Reflection +Z
            Multiplicative Distillation                                         // datavec villager [t, s] cellOccupancy emptyCell root xvec zvec
            Additive Distillation
            Additive Distillation                                               // datavec villager [t, s] cellOccupancy emptyCell vec
            Numerical Reflection: 4
            Fisherman's Gambit II
            Jester's Gambit                                                     // datavec villager [t, s] cellOccupancy emptyCell villager vec
            Displace                                                            // datavec villager [t, s] cellOccupancy emptyCell

            // Mark cell occupied
            Undertaker's Gambit                                                 // datavec villager [t, s] emptyCell cellOccupancy emptyCell
            Numerical Reflection: 1                                             // datavec villager [t, s] emptycell cellOccupancy emptyCell 1
            Bookkeeper's Gambit: -                                              // datavec villager [t, s] emptycell cellOccupancy emptyCell 1
            Surgeon's Exaltation                                                // datavec villager [t, s] emptycell cellOccupancy
            Numerical Reflection: 4                                             // datavec villager [t, s] emptycell cellOccupancy 4
            Fisherman's Gambit II                                               // datavec villager [t, s] emptyCell cellOccupancy datavec
            Jester's Gambit
            Chronicler's Gambit                                                 // datavec villager [t, s] emptyCell

            // Rename villager
            Integration Distillation                                            // datavec villager [t, s, c]
            Numerical Reflection: 1
            Numerical Reflection: 4
            Surgeon's Exaltation
            Gemini Decomposition                                                // datavec villager [t, s, c] [t, s, c]
            {                                                                   // datavec villager [t, s, c] x
                Bookkeeper's Gambit: vvv-
                Scrivener's Purification
            }
            Jester's Gambit
            Thoth's Gambit                                                      // datavec villager [t, s, c] ["t", "s", "c"]
            Flock's Disintegration
            Comma Reflection
            Spacing Reflection
            Additive Distillation
            Jester's Gambit
            Additive Distillation
            Additive Distillation                                               // datavec villager [t, s, c] "t" "s, c"
            Comma Reflection
            Spacing Reflection
            Additive Distillation
            Jester's Gambit
            Additive Distillation
            Additive Distillation                                               // datavec villager [t, s, c] "t, s, c"
            Numerical Reflection: 2
            Fisherman's Gambit II                                               // datavec villager [t, s, c] "t, s, c" villager
            Name                                                                // datavec villager [t, s, c]
        }

        {
            Bookkeeper's Gambit: vv
        }
        Augur's Exaltation
        Hermes' Gambit                                                          // datavec villager [t, s, *c]
        
        

        // If 4 and profession is cleric: run level 1 trades, update to 6
        Gemini Decomposition                                                    // datavec villager [t, s, *c] [t, s, *c]
        Numerical Reflection: 1                                                 // datavec villager [t, s, *c] [t, s, *c] 1
        Selection Distillation                                                  // datavec villager [t, s, *c] s
        Numerical Reflection: 4
        Equality Distillation                                                   // datavec villager [t, s, *c] stateIsFour
        Numerical Reflection: 2                                                 // datavec villager [t, s, *c] stateIsFour villager
        Fisherman's Gambit II
        Professional Purification
        {
            // -5 Cleric profession
        }
        Flock's Disintegration
        Equality Distillation
        Conjunction Distillation
        
        //Do the level 1 trade: 10 emeralds to 20 redstone
        {                                                                       // datavec villager [t, s, c]
            // Trade
            Prospector's Gambit                                                 // datavec villager [t, s, c] villager
            {
                //-6 Itemtype: Emeralds
            }
            Flock's Disintegration
            Stocktake Purification
            Numerical Reflection: 0             
            Selection Distillation
            Numerical Reflection: 10
            Splitting Gambit
            Bookkeeper's Gambit: v-                                             // datavec villager [t, s, c] villager emeraldMote
            Trade                                                               // datavec villager [t, s, c] redstoneMote
            Stocktake Purification
            Gemini Decomposition
            Numerical Reflection: 0
            Selection Distillation
            Jester's Gambit
            Derivation Decomposition
            Bookkeeper's Gambit: v-
            Additive Distillation
            Bookkeeper's Gambit: v                                              // datavec villager [t, s, c]

            // Update to 6
            Numerical Reflection: 1
            Numerical Reflection: 6
            Surgeon's Exaltation
            Gemini Decomposition                                                // datavec villager [t, s, c] [t, s, c]
            {
                Bookkeeper's Gambit: vvv-
                Scrivener's Purification
            }
            Jester's Gambit
            Thoth's Gambit
            Flock's Disintegration
            Comma Reflection
            Spacing Reflection
            Additive Distillation
            Jester's Gambit
            Additive Distillation
            Additive Distillation                                               // datavec villager [t, s, c] "t" "s, c"
            Comma Reflection
            Spacing Reflection
            Additive Distillation
            Jester's Gambit
            Additive Distillation
            Additive Distillation                                               // datavec villager [t, s, c] "t, s, c"
            Numerical Reflection: 2
            Fisherman's Gambit II
            Name                                                                // datavec villager [t, s, c]
        }
        Vacant Reflection
        Augur's Exaltation
        Hermes' Gambit                                                          // datavec villager [t, s, c]
        
        
        
        
        // If 6 and level is 2: run level 2 trades, update to 8
        Gemini Decomposition
        Numerical Reflection: 1
        Selection Distillation
        Numerical Reflection: 6
        Equality Distillation                                                   // datavec villager [t, s, c] stateIsSix
        Numerical Reflection: 2
        Fisherman's Gambit II
        Seniority Purification
        Numerical Reflection: 2
        Equality Distillation
        Conjunction Distillation
        
        {                                                                       // datavec villager [t, s, c]
            // Trade
            Prospector's Gambit
            {
                //-7 Itemtype: Gold Ingot
            }
            Stocktake Purification
            Numerical Reflection: 0
            Selection Distillation
            Numerical Reflection: 10
            Splitting Gambit
            Bookkeeper's Gambit: v-                                             // datavec villager [t, s, c] villager emeraldMote
            Trade                                                               // datavec villager [t, s, c] redstoneMote
            Stocktake Purification
            Gemini Decomposition
            Numerical Reflection: 0
            Selection Distillation
            Jester's Gambit
            Derivation Decomposition
            Bookkeeper's Gambit: v-
            Additive Distillation
            Bookkeeper's Gambit: v                                              // datavec villager [t, s, c]

            // Update to 8
            Numerical Reflection: 1
            Numerical Reflection: 8
            Surgeon's Exaltation
            Gemini Decomposition                                                // datavec villager [t, s, c] [t, s, c]
            {
                Bookkeeper's Gambit: vvv-
                Scrivener's Purification
            }
            Jester's Gambit
            Thoth's Gambit
            Flock's Disintegration
            Comma Reflection
            Spacing Reflection
            Additive Distillation
            Jester's Gambit
            Additive Distillation
            Additive Distillation                                               // datavec villager [t, s, c] "t" "s, c"
            Comma Reflection
            Spacing Reflection
            Additive Distillation
            Jester's Gambit
            Additive Distillation
            Additive Distillation                                               // datavec villager [t, s, c] "t, s, c"
            Numerical Reflection: 2
            Fisherman's Gambit II
            Name                                                                // datavec villager [t, s, c]
        }
        
        Vacant Reflection
        Augur's Exaltation
        Hermes' Gambit                                                          // datavec villager [t, s, c]
        
        

        //STOPPED TRANSCRIBING HERE 2026-09-27
        // If 8 and level is ?3?: flay, gate to lava, update to 10, unmark cell
        Gemini Decomposition
        Numerical Reflection: 1
        Selection Distillation
        Numerical Reflection: 8
        Equality Distillation                                                   // datavec villager [t, s, c] stateIsEight
        Numerical Reflection: 2
        Fisherman's Gambit II
        Seniority Purification
        Numerical Reflection: 3
        Equality Distillation
        Conjunction Distillation

        {                                                                       // datavec villager [t, s, c]
            // Flay mind
            {
                // -8 lava location
                // -9 amethyst root
                // -10 amethyst prism vec
                // -11 seconddatavec
            }
            Flock's Disintegration                                              // datavec villager [t, s, c] lava root prism seconddatavec
            Gemini Decomposition
            Chronicler's Purification                                           // datavec villager [t, s, c] lava root prism seconddatavec i
            Numerical Reflection: 1
            Additive Distillation
            Undertaker's Gambit                                                 // datavec villager [t, s, c] lava root prism i seconddatavec i 
            Chronicler's Gambit                                                 // datavec villager [t, s, c] lava root prism i
            Jester's Gambit
            //Macro: Prism counter                                              // datavec villager [t, s, c] lava root offset
            Numerical Reflection: 3
            Multiplicative Distillation
            Additive Distillation                                               // datavec villager [t, s, c] lava flayvec
            Numerical Reflection: 3
            Fisherman's Gambit II
            Jester's Gambit                                                     // datavec villager [t, s, c] lava villager flayvec
            Gemini Decomposition
            Summon Greater Sentinel                                             // datavec villager [t, s, c] lava villager flayvec
            Gemini Decomposition
            {
                //Amethyst block type
            }
            Flock's Disintegration
            Stocktake Purification
            Numerical Reflection: 0
            Selection Distillation
            Jester's Gambit
            Place Block II
            Flay Mind                                                           // datavec villager [t, s, c] lava

            // Displace to lava
            Numerical Reflection: 2
            Fisherman's Gambit II
            Jester's Gambit
            Displace                                                            // datavec villager [t, s, c]

            // Rename villager
            Numerical Reflection: 1
            Numerical Reflection: 10
            Surgeon's Exaltation
            Gemini Decomposition                                                // datavec villager [t, s, c] [t, s, c]
            {
                Bookkeeper's Gambit: vvv-
                Scrivener's Purification
            }
            Jester's Gambit
            Thoth's Gambit
            Flock's Disintegration
            Comma Reflection
            Spacing Reflection
            Additive Distillation
            Jester's Gambit
            Additive Distillation
            Additive Distillation                                               // datavec villager [t, s, c] "t" "s, c"
            Comma Reflection
            Spacing Reflection
            Additive Distillation
            Jester's Gambit
            Additive Distillation
            Additive Distillation                                               // datavec villager [t, s, c] "t, s, c"
            Numerical Reflection: 2
            Fisherman's Gambit II
            Name                              

            // new                                                              // datavec villager [t, s, c]
            // unlock the cell after flaying
            Gemini Decomposition
            Derivation Decomposition
            Bookkeeper's Gambit: v-                                             // datavec villager [t, s, c] c
            Numerical Reflection: 3
            Fisherman's Gambit II                                               // datavec villager [t, s, c] c datavec
            Chronicler's Purification
            Jester's Gambit
            Numerical Reflection: 0
            Surgeon's Exaltation                                                // datavec villager [t, s, c] occupancy_list
            Numerical Reflection: 3
            Fisherman's Gambit II
            Jester's Gambit
            Chronicler's Gambit
            //end new
        }        
        Vacant Reflection
        Augur's Exaltation
        Hermes' Gambit                                                          // datavec villager [t, s, c]


        // start new
        // if the villager has a 3 part name (been assigned a cell), then add state to stack, otherwise add zero to stack
        // if state is 10, stop, don't need to do any of the rest
        Gemini Decomposition
        Length Purification
        Numerical Reflection: 3
        Equality Distillation
        {
            Gemini Decomposition
            Numerical Reflection: 1
            Selection Distillation                                              // datavec villager [t, s, c] s
        }
        {
            Numerical Reflection: 0
        }
        Augur's Exaltation
        Hermes' Gambit

        Numerical Reflection: 10
        Equality Distillation
        {
            {
                -
            }
        }
        Flock's Disintegration
        Bookkeeper's Gambit: v
        Augur's Exaltation
        Hermes' Gambit
        //end new


        // If villager is older than 10 seconds, displace to lava
        // Need to expand this to unlock their cell if they're in one
        // This can sometime admit villagers that are just named 2 for some reason
        Gemini Decomposition                                                    // datavec villager [t, s, c] [t, s, c]
        Numerical Reflection: 0
        Selection Distillation
        Timekeeper's Reflection
        Subtractive Distillation
        Length Purification
        Numerical Reflection: 202
        Maximus Distillation II
        {                                                                       // datavec villager [t, s, c]
            Reveal
            {
                //-12 lava vec
            }
            Flock's Disintegration                                              // datavec villager [t, s, c] lava
            Numerical Reflection: 2
            Fisherman's Gambit II
            Jester's Gambit
            Displace                                                            // datavec villager [t, s, c]

            // new
            // if we had a cell, unlock it
            Gemini Decomposition
            Length Purification
            Numerical Reflection: 3
            Equality Distillation
            {                                                                   // datavec villager [t, s, c]
                Gemini Decomposition
                Derivation Decomposition
                Bookkeeper's Gambit: v-                                             // datavec villager [t, s, c] c
                Numerical Reflection: 3
                Fisherman's Gambit II                                               // datavec villager [t, s, c] c datavec
                Chronicler's Purification
                Jester's Gambit
                Numerical Reflection: 0
                Surgeon's Exaltation                                                // datavec villager [t, s, c] occupancy_list
                Numerical Reflection: 3
                Fisherman's Gambit II
                Jester's Gambit
                Chronicler's Gambit
            }
            Vacant Reflection
            Augur's Exaltation
            Hermes' Gambit                                                      // datavec villager [t, s, c]

            Bookkeeper's Gambit: v
            {
                // String: "0, 10, 98"
            }
            Flock's Disintegration
            Jester's Gambit
            Name
            

            //end new


            //start cut
            // Rename villager
            Numerical Reflection: 1
            Numerical Reflection: 10
            Surgeon's Exaltation
            Gemini Decomposition                                                // datavec villager [t, s, c] [t, s, c]
            {
                Bookkeeper's Gambit: vvv-
                Scrivener's Purification
            }
            Jester's Gambit
            Thoth's Gambit
            Flock's Disintegration
            Comma Reflection
            Spacing Reflection
            Additive Distillation
            Jester's Gambit
            Additive Distillation
            Additive Distillation                                               // datavec villager [t, s, c] "t" "s, c"
            Comma Reflection
            Spacing Reflection
            Additive Distillation
            Jester's Gambit
            Additive Distillation
            Additive Distillation                                               // datavec villager [t, s, c] "t, s, c"
            Numerical Reflection: 2
            Fisherman's Gambit II
            Name
            //end cut
        }
        Vacant Reflection
        Augur's Exaltation
        Hermes' Gambit
        
        //new
        Flock's Reflection
        Flock's Gambit
        Bookkeeper's Gambit: v
    }                                                                           // datavec centerpos spell
    Jester's Gambit                                                             // datavec spell centerpos
    {
        //-13 Villager type
    }
    Flock's Disintegration
    Jester's Gambit
    Numerical Reflection: 30
    Zone Exaltation: Type                                                       // datavec spell villagers
    Thoth's Gambit
    Bookkeeper's Gambit: vv                                                     //
    



    // ============================  FUELING  ============================
    
    Media Reflection
    Numerical Reflection: 100
    Gemini Decomposition
    Multiplicative Distillation
    Minimus Distillation II                                                 // bool_less_than_10k_media
    {
        //start section 1
        {
            // Charged item type
            // Shard item type
            // Dust item type
        }
        {
            Stocktake Purification
            Flock's Disintegration
        }
        Jester's Gambit
        Thoth's Gambit                                                      // mote_list
        
        Gemini Decomposition                                                // mote_list mote_list
        Flock's Disintegration                                              // mote_list charged shard dust
        Length Purification
        Rotation Gambit II                                                  // mote_list m_dust charged shard
        Length Purification
        Numerical Reflection: 5
        Multiplicative Distillation
        Rotation Gambit II
        Length Purification
        Numerical Reflection: 10
        Multiplicative Distillation
        Rotation Gambit II                                                  // mote_list m_charged m_shard m_dust
        Numerical Reflection: -2
        Fisherman's Gambit II                                               // mote_list m_dust m_charged m_shard m_dust
        Jester's Gambit
        Numerical Reflection: -3
        Fisherman's Gambit II                                               // mote_list m_shard m_dust m_charged m_dust m_shard
        Additive Distillation
        Additive Distillation                                               // mote_list m_shard m_dust m_total
        Dioscuri Gambit
        Division Distillation                                               // mote_list m_shard m_dust m_total frac_dust
        Numerical Reflection: -3
        Fisherman's Gambit
        Rotation Gambit II                                                  // mote_list frac_dust m_total m_shard m_dust
        Additive Distillation
        Jester's Gambit
        Division Distillation                                               // mote_list frac_dust frac_dust_plus_shard
        Jester's Gambit

        // Pick a number between 0 and 1
        Entropy Reflection
        Undertaker's Gambit                                                 // mote_list frac_shard r frac_dust r
        
        // if the number is less than dust / total: get dust mote, 100 on stack, else: 
        Maximus Distillation
        {                                                                   // mote_list frac_shard r
            Bookkeeper's Gambit: vv
            Numerical Reflection: 2
            Selection Distillation
            Numerical Reflection: 100                                       // dust_mote 100
        }
        {                                                                   // mote_list frac_shard r
            Maximus Distillation
            {
                Numerical Reflection: 1
                Selection Distillation
                Numerical Reflection: 20
            }
            {
                Numerical Reflection: 0
                Selection Distillation
                Numerical Reflection: 10
            }
            Augur's Exaltation
            Hermes' Gambit
        }
        Augur's Exaltation
        Hermes' Gambit                                                      // mote n_stacks
        // end section 1

        Waystone Reflection
        
        // start section 2
        Rotation Gambit II                                                  // raycast mote n_stacks

        {                                                                   // raycast mote n
            Bookkeeper's Gambit: v                                          // raycast mote
            Prospector's Gambit                                             // raycast mote raycast
            Numerical Reflection: 64
            Return Item                                                     // raycast
            Gemini Decomposition
            Entity Purification: Item                                       // raycast item
            Jester's Gambit
            Hopper
        }                                                                   // raycast mote n_stacks spell
        Jester's Gambit
        Gemini Decomposition
        Gemini Gambit
        Gemini Decomposition
        Flock's Gambit                                                      // raycast mote spell list
        Thoth's Gambit
        Bookkeeper's Gambit: vvv
        // end section 2
    }                                                                       // spell
    Vacant Reflection                                                       // spell empty_list
    Augur's Exaltation
    Hermes' Gambit

    // Get spell on stack for next circle cast
    Scribe's Reflection
}