Veinminer II

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.
User avatar
[object Object]
Posts: 73
Joined: Fri Dec 02, 2022 12:37 am

Veinminer II

Post by [object Object] »

This is Veinminer in Hex Casting. It's a redesign of another hex I made along the same vein (ha), but this one works in a single tick, doesn't use wisps, and only takes as much media as it needs to break the blocks it finds. Technically this actually would have been possible (with some modifications) with the lower recursion limit in previous versions — I just didn't think of this method.

As you'll see in the demo, it's currently pretty laggy. I'm not sure if that's from breaking so many blocks at once, from the bad list/set pattern implementations in the mod, or a combination of the two. Regardless, at least for now, I wouldn't recommend setting the block limit much higher than 64.

Trivia: this hex uses a weird pregenerated unrolling technique that I haven't seen used very often. This allowed me to bring the number of patterns a bit lower and keep the stack relatively short (this hex gets very close to the iota limit, so we need every bit of space we can get). It also saves on recursion somewhat, though that's not really necessary with the block limit at 64.

Video demo

Veinminer II
To write this hex, first draw the patterns. Note the comments with recommended places to split across screens. Then, create an offset list using Kirin's Ruler on each block in a 3x3 cube except the center (as below). Finally, use Locator's Scalpel (or Surgeon's Exaltation, if you prefer) to insert that list at the marked placeholder (Bookkeeper's Gambit: --, ie. a straight line with two segments).

If using Locator's Scalpel, make sure you put the list in another list (eg. using Single's Purification) or you'll flatten all the iotas into the hex instead of inserting the whole list iota.

Code: Select all

{
    // set up variables on stack
    // queue, target type, visited (including null so we don't try to visit a null position)
    Nullary Reflection
    Single's Purification

    Mind's Reflection
    Compass' Purification
    Mind's Reflection
    Alidade's Purification
    Archer's Distillation

    Gemini Decomposition
    Surveyor's Purification
    Jester's Gambit
    Single's Purification

    // recursive function, part 1
    {
        // remove visited blocks from queue, and remove duplicates from queue and visited
        Rotation Gambit
        Uniqueness Purification

        Undertaker's Gambit
        Combination Distillation
        Prospector's Gambit
        Exclusionary Distillation
        Uniqueness Purification

        // break current block and add to list of visited blocks
        Speaker's Decomposition
        Rotation Gambit
        Prospector's Gambit
        Integration Distillation
        
        // inner BFS loop
        Numerical Reflection: 20
        Swindler's Gambit
    }
    // recommended: split across screens here

    // pre-unroll and insert inner loop
    {
        // clean up the stack
        Flock's Reflection
        Flock's Gambit
        Retrograde Purification
        Numerical Reflection: 0
        Selection Distillation

        // inner loop to be unrolled
        {
            // get new block
            {
                Bookkeeper's Gambit: - // offset placeholder (automatic)
            }
            Flock's Disintegration
            Prospector's Gambit
            Additive Distillation
            
            // add to queue if new block is the right type
            Gemini Decomposition
            Surveyor's Purification
            Numerical Reflection: 3
            Fisherman's Gambit II
            Equality Distillation

            {
                Integration Distillation
                Bookkeeper's Gambit: v
            }
            Flock's Disintegration
            Augur's Exaltation
            
            Numerical Reflection: 5
            Fisherman's Gambit
            Rotation Gambit II
            Hermes' Gambit
            
            // reset stack for next iteration
            Rotation Gambit II
        }

        // insert current offset
        Numerical Reflection: 1 // index of placeholder
        Rotation Gambit
        Surgeon's Exaltation
        Flock's Disintegration
    }
    Consideration: Consideration
    Bookkeeper's Gambit: -- // manually insert list of offsets here
    Thoth's Gambit
    Combination Distillation
    // recommended: split across screens here
    
    // recursive function, part 2
    {
        // break target
        Break Block

        // halt if queue is empty or reached block limit, otherwise recurse
        Jester's Gambit
        Gemini Decomposition
        Augur's Purification

        Thanatos' Reflection
        Numerical Reflection: 357 // max recursion - block limit - number of offsets - 1 (512 - 64 - 26 - 1)
        Subtractive Distillation
        Augur's Purification

        Conjunction Distillation
        Muninn's Reflection
        {
            Bookkeeper's Gambit: v
        }
        Flock's Disintegration
        Augur's Exaltation
        Hermes' Gambit
    }
    Combination Distillation

    // save on stack space and iota usage by putting function in ravenmind
    Huginn's Gambit
    Muninn's Reflection
    Hermes' Gambit
}
Image
User avatar
Robotgiggle
Posts: 24
Joined: Fri Dec 02, 2022 12:38 am

Re: Veinminer II

Post by Robotgiggle »

What exactly is the point of the giant image of a sentinel in a glass box?
User avatar
[object Object]
Posts: 73
Joined: Fri Dec 02, 2022 12:37 am

Re: Veinminer II

Post by [object Object] »

Then, create an offset list using Kirin's Ruler on each block in a 3x3 cube except the center (as below).
Iocus
Posts: 1
Joined: Thu Aug 14, 2025 2:27 pm

Re: Veinminer II

Post by Iocus »

hello what's Surveyor's Purification on the spell ?
Airesin
Posts: 1
Joined: Sat Nov 22, 2025 12:30 am

Re: Veinminer II

Post by Airesin »

When I first discovered this forum I had just downloaded Hexcasting. I soon encountered an enormous piece of code posted by [object Object]; despite my best efforts and having no prior experience with this kind of thing, I was quickly overwhelmed. A few months later, when I decided to play again, I resolved to understand what was done here. I do not claim to grasp every conceptual layer of this Hex, but I can at least make it work. I am posting this as an update, since I tried to run it on 1.20.1 and to provide a clearer explanation for future visitors.

First, for 1.20.1 (Hexcasting 0.11) some patterns changed name and form compared to the post from almost three years ago:

Combination Distillation --> Additive Distillation
Exclusionary Distillation --> Exclusion Distillation

Additionally, I believe [object Object] did not make it clear that Surveyor's Purification is a pattern from the Hex Gloop addon. At the time of their post, its latest version targeted Minecraft 1.19.2, and I did not look for any information about a subsequent update. Needing a substitute, I resorted to Sorter's Purification from Moreiotas. Later I noticed that [object Object] released the Iotic Blocks addon, which should work with Chronicler's Purification (although I have not tested that). Therefore:

Surveyor's Purification --> Sorter's Purification

Finally, English is not my first language, so it took me a while to understand what an “offset” was in the context mentioned by [object Object]. In short, we need a list of vectors to add to the block we are targeting in order to create a 3×3×3 cube of positions. [object Object] suggests using the Kirin's Ruler, and I agree; however, I was playing in survival mode and did not yet have a focus, so I created the list by hand. Do it whichever way you prefer.

You should insert that list of vectors in place of Bookkeeper's Gambit: -- as indicated in [object Object]’s code. Also note that Consideration:Consideration is used so that a Consideration can appear in the final code; we must assemble lists of lists because it is impossible to fit the entire code on a single screen.

Here is the code with the vector list included exactly as I used it (I will not comment the code because I am not good at that and [object Object]’s work is already thorough):

Code: Select all

{
Nullary Reflection
Single's Purification
Mind's Reflection
Compass' Purification
Mind's Reflection
Alidade's Purification
Archer's Distillation
Gemini Decomposition
Sorter's Purification
Jester's Gambit
Single's Purification
	{
	Rotation Gambit
	Uniqueness Purification
	Undertaker's Gambit
	Additive Distillation
	Prospector's Gambit
	Exclusion Distillation
	Uniqueness Purification
	Speaker's Decomposition
	Rotation Gambit
	Prospector's Gambit
	Integration Distillation
	Numerical Reflection: 20
	Swindler's Gambit
	}
	{
	Flock's Reflection
	Flock's Gambit
	Retrograde Purification
	Numerical Reflection: 0
	Selection Distillation
		{
			{
			Bookkeeper's Gambit: --
			}
		Flock's Disintegration
		Prospector's Gambit
		Additive Distillation
		Gemini Decomposition
		Sorter's Purification
		Numerical Reflection: 3
		Fisherman's Gambit II
		Equality Distillation
			{
			Integration Distillation
			Bookkeeper's Gambit: v
			}
		Flock's Disintegration
		Augur's Exaltation
		Numerical Reflection: 4
		Fisherman's Gambit
		Rotation Gambit II
		Hermes' Gambit
		Rotation Gambit II
		}
	Numerical Reflection: 1
	Rotation Gambit
	Surgeon's Exaltation
	Flock's Disintegration
	}
Consideration
[(0.00, 0.00, 1.00), (0.00, 0.00, -1.00), (0.00, 1.00, 0.00), (0.00, 1.00, 1.00), (0.00, 1.00, -1.00), (0.00, -1.00, 0.00), (0.00, -1.00, 1.00), (0.00, -1.00, -1.00), (1.00, 0.00, 0.00), (1.00, 0.00, 1.00), (1.00, 0.00, -1.00), (1.00, 1.00, 0.00), (1.00, 1.00, 1.00), (1.00, 1.00, -1.00), (1.00, -1.00, 0.00), (1.00, -1.00, 1.00), (1.00, -1.00, -1.00), (-1.00, 0.00, 0.00), (-1.00, 0.00, 1.00), (-1.00, 0.00, -1.00), (-1.00, 1.00, 0.00), (-1.00, 1.00, 1.00), (-1.00, 1.00, -1.00), (-1.00, -1.00, 0.00), (-1.00, -1.00, 1.00), (-1.00, -1.00, -1.00)]
Thoth's Gambit
Additive Distillation
	{
	Break Block
	Jester's Gambit
	Gemini Decomposition
	Augur's Purification
	Thanatos' Reflection
	Numerical Reflection: 357
	Subtractive Distillation
	Augur's Purification
	Conjunction Distillation
	Muninn's Reflection
		{
		Bookkeeper's Gambit: v
		}
	Flock's Disintegration
	Augur's Exaltation
	Hermes' Gambit
	}
Additive Distillation
Huginn's Gambit
Muninn's Reflection
Hermes' Gambit
}
One last note: in [object Object]’s original code there is a Numerical Reflection: 5; this does not work in the current version, and it should be Numerical Reflection: 4 instead. I do not know whether this change happened across versions or whether it was a strategy by [object Object] to make us use their HexDebug addon (just kidding).


I’d love to include the fully drawn and colored version, but it’s a lot of work and kinda buggy…
JoanDaro
Posts: 1
Joined: Sat Nov 22, 2025 2:22 pm

Re: Veinminer II

Post by JoanDaro »

Phew
thanks Airesin! works perfectly in 1.20.1
at some point my hand did jester when my head was thinking rotating and it resulted in some real headache
I just didn't want vscode in my game time and paid my toll for it :cry:

this starts lagging at ~100 blocks broken (and you'll soon get a "recursive evaluated too deep" if you go further)
If you want to break a large amount of the same block (eg. actually mining stones or getting rid of large patch of leafs etc) It's way less laggy to just scan a, say, 9x9x9 area and break whatever block that matches your target