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: 9
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!