Surveyor's Gambit (1.20.1)
Posted: Sun Apr 21, 2024 11:21 pm
A version of Archer's Distillation and Architect's Distillation using sentinel walking for arbitrary range, inspired/based on Long Steps, Scout's Exaltation, and Sentinel Snipe. It uses Hex Casting 1.20.1's Iris's Gambit to (hopefully) simplify breaking out of the loop.
Surveyor's Gambit
vector, vector, number → vector, vector | null
Arguments: position, direction, approximate range
Returns: block position, block face or null
This is my first hex using loops and my first anything using Iris's, so it can almost certainly be improved, and I'd love to hear any suggestions. And please don't mind my weird comments/stack trace, maybe they'll be useful to someone and I didn't feel like editing them out. (The *[pattern] thing just means that I didn't want to write [pattern] every line going forward, but it's still there.)
Edit: Huge thanks to Robotgiggle!
Also, there has to be a way to automatically generate those fancy pattern lists, right? I'm blind and couldn't find it and I really do not want to enter all those pattern codes by hand. If there is, I'll edit the pretty patterns in.
Surveyor's Gambit
vector, vector, number → vector, vector | null
Arguments: position, direction, approximate range
Returns: block position, block face or null
Patterns
Code: Select all
#define Surveyor's Gambit (EAST wqaawddeeddwaa) = vector, vector, number -> vector, vector | null
{ // pos, dir, acc
Huginn's Gambit // pos, dir (acc)
Jester's Gambit // dir, pos
Summon Greater Sentinel // dir
{ // *[pattern], dir, JUMP
Locate Sentinel // dir, JUMP, pos
Rotation Gambit // JUMP, pos, dir
Dioscuri Gambit // JUMP, pos, dir, pos, dir
Archer's Distillation // JUMP, pos, dir, pos?
Gemini Decomposition // JUMP, pos, dir, pos?, pos?
Augur's Purification // JUMP, pos, dir, pos?, bool
{ // JUMP, pos, dir, pos
Rotation Gambit II // JUMP, pos, pos, dir
Architect's Distillation // JUMP, pos, face
Rotation Gambit // pos, face, JUMP
Bookkeeper's Gambit: v---
Hermes' Gambit
}
Vacant Reflection
Augur's Exaltation // JUMP, pos, dir, pos?, [pattern]
Hermes' Gambit // JUMP, pos, dir, null
Bookkeeper's Gambit: v // JUMP, pos, dir
Undertaker's Gambit // JUMP, dir, pos, dir
Numerical Reflection: 15 // JUMP, dir, pos, dir, 15
Multiplicative Distillation // JUMP, dir, pos, vec
Gemini Decomposition // JUMP, dir, pos, vec, vec
Length Purification // JUMP, dir, pos, vec, len
Muninn's Reflection // JUMP, dir, pos, vec, len, acc
Jester's Gambit // JUMP, dir, pos, vec, acc, len
Subtractive Distillation // JUMP, dir, pos, vec, acc
Gemini Decomposition // JUMP, dir, pos, vec, acc, acc
Numerical Reflection: 0 // JUMP, dir, pos, vec, acc, acc, 0
Minimus Distillation // JUMP, dir, pos, vec, acc, bool
{ // JUMP, dir, pos, vec, acc
Bookkeeper's Gambit: v-vvvv // JUMP
Nullary Reflection // JUMP, null
Jester's Gambit // null, JUMP
Hermes' Gambit
}
Vacant Reflection
Augur's Exaltation // JUMP, dir, pos, vec, acc, [pattern]
Hermes' Gambit // JUMP, dir, pos, vec, acc
Huginn's Gambit // JUMP, dir, pos, vec (acc)
Additive Distillation // JUMP, dir, pos
Summon Greater Sentinel // JUMP, dir
Jester's Gambit // *[pattern], dir, JUMP
Numerical Reflection: 2 // [pattern], dir, JUMP, 2
Fisherman's Gambit II // [pattern], dir, JUMP, [pattern]
Hermes' Gambit
} // dir, [pattern]
Undertaker's Gambit // [pattern], dir, [pattern]
Iris's Gambit // vector, vector | null
}
Edit: Huge thanks to Robotgiggle!
Also, there has to be a way to automatically generate those fancy pattern lists, right? I'm blind and couldn't find it and I really do not want to enter all those pattern codes by hand. If there is, I'll edit the pretty patterns in.