Commit Graph

18 Commits

Author SHA1 Message Date
jay 2f88eedce9 fix(mover): lessen move duration for more precise control 2021-01-28 03:52:12 +05:00
jay a0893f2b29 feat(mover): allow riding specific entity by name 2021-01-28 02:50:08 +05:00
jay f336e3d736 feat(mover): switch between moving and riding automatically for manual movement 2021-01-28 02:18:42 +05:00
jay d953bd4cf6 fix(mover): 🎨 fix quiet not being "followed" 2021-01-28 02:10:52 +05:00
jay fc43985337 fix(mover): 🐛 fix crash when no mobs nearby while searching for rides 2021-01-28 01:28:37 +05:00
jay 6b1157147d feat(mover): implement more featureful and robust ride command
Now does the following:
- finds entities (both vehicles and animals) which are suitable for riding.
- moves to get into range.

However:
- while in a vehicle, pathfinder doesn't appear to detec coords.
- `bot.moveVehicle` doesn't work, so bot doesn't move when riding
2021-01-28 00:48:45 +05:00
jay e6d29576e7 refactor(command): 🚚 move vehicle commands near other moves
Move the following:
- vehicle commands next to other movement related commands like `go`.
- move `ride` / `mount` command functionality into mover plugin
2021-01-26 22:49:23 +05:00
jay 974d460061 feat(mover): add basic movement commands
Forward, left, etc. Uses bot.controlState.
But left and right does the opposite of expectations.
2021-01-18 15:13:53 +05:00
jay cc18ac5c2e refactor(mover): 🚚 move commands inside mover plugin itself
This reduces the code inside the command plugin.
Most of the logic was only relevant to moving anyway.
Command aliases like `come` and `follow` still remain in command plugin.
2021-01-17 23:59:39 +05:00
jay 7b2b936f81 feat(mover): implement moveY (vertical move up or down)
Doesn't appear to be working properly, bot assumes XZ is goal reached
2021-01-17 13:56:18 +05:00
jay 4d21327086 fix(mover): 🚸 better messages 2021-01-16 13:57:21 +05:00
jay 3d5ffe38cd feat(mover): inform when goal reached 2021-01-16 13:25:26 +05:00
jay b519913355 feat(mover): implement moving to X Z goal (without y) 2021-01-15 00:36:17 +05:00
jay 69d0f5830d feat(mover): add close(er) command to follow / come closer 2021-01-05 08:11:11 +05:00
jay 68e60921b1 refactor(mover): 🔥 remove unused code + comments, minor fixes
Refactoring and fixing code.
 No major functionality change.
 Probably will have less bugs.
 - carry over how mcData is loaded
 - stop bot on unload
 - fix wrong magma block name
2020-12-24 19:57:45 +05:00
jay fb066ee8a5 refactor: ♻️ use array in pathfinder movements list 2020-12-24 11:26:19 +05:00
jay 8e4eb7748f style: fix crlf to lf 2020-12-24 09:33:08 +05:00
jay b970231519 feat: add mover plugin
General purpose mover / goto plugin.
Replaces the old solver based `comehere` in miner.js.
Instead, directly based on mineflayer bot apis and pathfinder.
This makes it simpler and easier to debug.
While less general, pathfinder is sophisticated enough for most cases.

For anything that needs moving from point A to point B.
Such as:
- following
- go to a location

Not in scope: locations and places. Would be a separate plugin.
2020-12-22 15:38:45 +05:00