feat(AutoSpiral): Add AutoSpiral module#234
feat(AutoSpiral): Add AutoSpiral module#234IceTank wants to merge 7 commits intolambda-client:1.21.11from
Conversation
src/main/kotlin/com/lambda/module/modules/movement/autospiral/SpiralIterator2d.kt
Outdated
Show resolved
Hide resolved
…tructure in SpiralIterator2d
|
You shouldn't add folders inside the modules folder unless it's a new category |
| } | ||
| } | ||
|
|
||
| fun button( |
There was a problem hiding this comment.
I don't think this is the best way to go about adding non-setting elements in the module gui. They seem to be hard coded to appear after non-grouped settings and before grouped settings and dont store any data in the config.
It would be nice to add arbitrary imgui elements in modules for more unique functionality, but this would likely rely on some sort of switch up in how configurables store data in the config jsons
| var setBaritoneGoal by setting("Set Baritone Goal", true, description = "Whether to set Baritone's goal to the current waypoint. Mostly so you can see where the next waypoint is.") | ||
|
|
||
| init { | ||
| button("Reset Center") { |
There was a problem hiding this comment.
for now i'd remove these and replace them with block pos settings
| fun yaw(yaw: Float) { yawBuilder = { yaw.toDouble() } } | ||
|
|
||
| @RotationRequestDsl | ||
| fun yaw(rotation: Rotation) { yawBuilder = { rotation.yaw } } |
There was a problem hiding this comment.
I dont think theres any need for this and the other pitch function. Best just to call yaw() with rotation.yaw
| * Sets the current Baritone goal without starting pathing | ||
| */ | ||
| fun setGoal(goal: Goal) { | ||
| if (!isBaritoneLoaded || primary?.elytraProcess?.isLoaded == false) return |
There was a problem hiding this comment.
would it be better to do primary?.elytraProcess?.isLoaed != true? That way it would account for if its null too
| } | ||
|
|
||
| fun setGoalAndElytraPath(goal: Goal) { | ||
| if (!isBaritoneLoaded || primary?.elytraProcess?.isLoaded == false) return |
| import kotlin.math.pow | ||
|
|
||
| /** | ||
| * A collection of Block position iterator implementations for various purposes. |
There was a problem hiding this comment.
small nitpick but theres only one implementation, not a collection 🤓
| description = "Automatically flies in a spiral pattern. Uses Baritone elytra pathing in the Nether.", | ||
| tag = ModuleTag.Companion.MOVEMENT, | ||
| ) { | ||
| var iterator: BlockPosIterators.SpiralIterator2d? = null |
There was a problem hiding this comment.
might as well make all these settings private
Add AutoSpiral module that works in the overworld like worlds and nether