Commit Graph

2752 Commits

Author SHA1 Message Date
Brady ff12832a21
whoops 2023-06-27 12:30:41 -05:00
Brady 4ccaf681c5
Somewhat functional `elytraAutoJump`, but mostly scuffed 2023-06-27 02:54:53 -05:00
Brady 02fc62f1c4
Stop simulation when goal reached 2023-06-26 18:37:06 -05:00
Brady 04a5a1a620
Replace `bool firework` with `ticksBoosted` in `solvePitch` 2023-06-26 16:58:29 -05:00
Brady 3e94cac567
clarity 2023-06-26 16:25:21 -05:00
Brady 452b2c278b
Fix `renderElytraSimulation` 2023-06-26 16:21:15 -05:00
Brady db0bfbe722
Move elytra simulation into new method 2023-06-26 16:12:56 -05:00
Brady f0148a625e
Move `steps` into `solvePitch` 2023-06-26 16:04:05 -05:00
Brady 0b5a310f18
Move firework boost calculation into `solvePitch` 2023-06-26 15:35:40 -05:00
Brady c18715b8d7
Reset `minimumBoostTicks` to 0 earlier 2023-06-26 14:00:38 -05:00
Brady d244a39040
Make `MixinEntityLivingBase` extend `MixinEntity` 2023-06-26 13:57:24 -05:00
Brady 0981114b78
Create `FireworkBoost` class for additional boost context
Also initialize `boostedEntity` in `EntityFireworkRocket` if `null` since it's lazily initialized in `onUpdate()`
2023-06-26 13:55:18 -05:00
Brady 9bd0856445
lol 2023-06-25 15:32:02 -07:00
Brady 9d1addd114
Add `smoothLook` setting 2023-06-25 15:28:06 -07:00
Brady 1902e6c1f3
Reset `minimumBoostTicks` to 0 when not boosted 2023-06-24 22:37:21 -07:00
Brady a1a3d93dc1
Add `renderElytraSimulation` setting 2023-06-24 22:27:38 -07:00
Brady 32b7c82650
Add `renderHitboxRaytraces` setting 2023-06-24 22:11:08 -07:00
Brady 615266ed96
Replace manual calculation with util method 2023-06-24 21:57:00 -07:00
Brady 15f4253b3d
Clamp pitch to normal range 2023-06-24 21:48:44 -07:00
Brady 2ccd464a49
Utilize aim processor API for correct elytra simulation 2023-06-24 21:44:08 -07:00
Brady f2374edd8b
Merge branch 'master' into elytra
# Conflicts:
#	src/launch/java/baritone/launch/mixins/MixinMinecraft.java
#	src/main/java/baritone/Baritone.java
#	src/main/java/baritone/behavior/LookBehavior.java
2023-06-23 23:31:43 -07:00
Brady f56e0569a2
Add `minimumBoostTicks` 2023-06-23 16:30:10 -07:00
Brady c10903be69
Remove `firstFireworks` from `InventoryBehavior` 2023-06-23 16:17:59 -07:00
ZacSharp e3a1ac85cc
Fix waiting for impossible rotations 2023-06-23 04:22:35 +02:00
leijurv 1ea071de09
Merge pull request #4015 from cabaletta/pr/deterministicLookTarget
API for rotations produced by LookBehavior
2023-06-22 19:21:02 -07:00
Brady c9a18caf49
Register `LookBehavior` first
Since there's no event priority system, this is necessary to ensure anything else listening to the PRE `TickEvent` can accurately simulate rotations.
2023-06-22 20:38:00 -05:00
Brady bfae100cb9
Create `ITickableAimProcessor` 2023-06-22 20:35:22 -05:00
Brady 878a32228a
Add avoidance setting 2023-06-22 18:22:40 -05:00
Brady bce2c74a8e
NO MORE CONCUSSIONS! 2023-06-22 18:07:11 -05:00
Brady 90434b3178
A bit more flexibility 2023-06-22 12:54:30 -05:00
Brady 9cf5538058
Improve stepper collision detection 2023-06-22 12:50:06 -05:00
Brady f4a99253f4
Prevent head bonks 2023-06-22 12:08:30 -05:00
Brady b366b1b1d1
Fix other null checks 2023-06-22 11:40:45 -05:00
Babbaj 535fd17a42
simplify null check 2023-06-22 08:30:25 -04:00
Brady 47dc0f9b94
Add missing exception null check to async completed callback 2023-06-21 21:30:04 -05:00
Brady 4776fa1876
Don't update `playerNear` on an empty path 2023-06-21 21:19:12 -05:00
leijurv b0ebbf4dfb
Merge pull request #4007 from ZacSharp/pr/schematics/mask/fixBinaryOperatorMaskOOB
Don't call `partOfMask` out of bounds in `BinaryOperatorMask`
2023-06-21 18:53:58 -07:00
leijurv 9d12a4ba3d
Merge pull request #4008 from ZacSharp/pr/pathing/goals/implHashCode
Implement `hashCode` for goals
2023-06-21 18:53:36 -07:00
Brady 0aff31b768
Perfect elytra simulation 2023-06-21 18:59:44 -05:00
Brady 0682e63707
Apply processor to RotationMoveEvent 2023-06-21 17:39:04 -05:00
Brady 7e426bd2e8
AimProcessor API 2023-06-21 17:35:47 -05:00
Brady 367ce5fa17
cherry pick Allow freeLook when using elytra 2023-06-21 14:55:40 -05:00
Brady 877fd25608
Distinguish unexpected exceptions in path calc 2023-06-21 00:52:43 -05:00
Brady cfd9a69052
Revert how PathManager tick works 2023-06-21 00:21:37 -05:00
Brady d42bfcfa53
Fix NPE 2023-06-20 23:15:45 -05:00
Brady defa6399e2
Tweak hitbox constraints 2023-06-20 23:01:07 -05:00
Brady 699e8bdea6
troll concurrency fix for rn 2023-06-20 22:36:27 -05:00
Brady 2eb912835a
Restore interp values 2023-06-20 21:28:30 -05:00
Brady bd7a57f7aa
We do a little trolling 2023-06-20 21:27:54 -05:00
Brady e76f79214e
Replace `pathAt` with `NetherPath` 2023-06-20 21:07:21 -05:00
Brady 141a48a15e
Some refactoring, more precise `goingTo` 2023-06-20 20:30:10 -05:00
Brady fa158c6e67
Remove unnecessary conversions to Vec3d 2023-06-20 20:18:56 -05:00
Brady 7a12ef530c
Cancel solver on behavior cancel 2023-06-20 20:11:34 -05:00
Brady 1d092a7165
Compute angles on another thread between ticks 2023-06-20 20:09:53 -05:00
Brady 57a17e907e
Add missing `CallbackInfo` 2023-06-20 17:30:38 -05:00
Brady 2a82f6048a
Implement POST TickEvent with new `onPostTick` callback 2023-06-20 17:18:30 -05:00
Brady 4076263afa
Un-scuff PRE TickEvent injector 2023-06-20 17:00:42 -05:00
Brady e3c8283158
Move solver into separate method 2023-06-20 15:15:02 -05:00
Brady 0aad3470d9
Differ between no pitch solution and no solution at all 2023-06-20 15:05:59 -05:00
Brady Hahn 553c85f0f6
Merge pull request #4011 from babbaj/elytra
fix 0.5 offset in elytra path rendering
2023-06-20 14:49:00 -05:00
Babbaj c057081f07
fix 0.5 offset in elytra path rendering 2023-06-20 15:48:12 -04:00
Brady 7d22a71507
Only count unchanged ticks when using elytra 2023-06-20 13:50:26 -05:00
Brady 0ecabdd047
Update `nether-pathfinder` to 0.18 2023-06-20 13:43:42 -05:00
Brady 6c6b44ee65
Recalculate path if stuck 2023-06-20 13:43:14 -05:00
Brady 14ff90ccf1
remaining ticks mojang incident 2023-06-19 23:12:46 -05:00
Brady 5d7655fbdf
Fix silly 0x integer wraparound trolle 2023-06-19 22:52:27 -05:00
Brady ee0a6c2523
Use new single trace `isVisible` api 2023-06-19 21:45:52 -05:00
Brady 753b1cf1c3
Interpolate path positions
- Update `nether-pathfinder` to 0.17
- Utilize new batched visibility raytracing to efficiently trace bounding box paths
2023-06-19 21:38:08 -05:00
0x22 cd1c07deef
added elytraFireworkSetbackUseDelay setting. 2023-06-19 22:22:57 -04:00
ZacSharp 41d730fb04
Forgot to include target pos 2023-06-20 03:20:44 +02:00
ZacSharp 30278a1c52
Implement `hashCode` for goals 2023-06-20 02:44:29 +02:00
ZacSharp d87d1ab9b5
Don't call `partOfMask` out of bounds 2023-06-20 02:00:08 +02:00
ZacSharp 31c9072970
Forgot to git add 2023-06-20 01:36:09 +02:00
ZacSharp f7a20a3acf
Don't swallow random exceptions, don't bother with CommandExceptions 2023-06-20 01:32:18 +02:00
Babbaj 5f709eef9c
use world raytrace 2023-06-19 18:26:00 -04:00
ZacSharp b111fd2f3e
Don't construct malformed `ResourceLocation`s
Later mc versions throw an exception when you construct a malformed `ResourceLocation`.
2023-06-20 00:02:56 +02:00
ZacSharp 84777c2437
Don't complete more than what's supported 2023-06-20 00:01:33 +02:00
ZacSharp 13742df877
Complete the last argument, not the first one 2023-06-20 00:00:52 +02:00
Babbaj e57a84ded4
use legacy raytrace with ignore liquid to get out of lava 2023-06-19 17:58:06 -04:00
ZacSharp f55f7f19b4
Tab complete the datatype which will be parsed 2023-06-19 23:50:42 +02:00
ZacSharp e43200865c
Move this to the right place 2023-06-19 23:48:07 +02:00
ZacSharp 1de2d55965
Tab complete block properties 2023-06-19 23:05:46 +02:00
Brady 959b4cddbd
Remove unneeded `while (true)` 2023-06-19 15:29:30 -05:00
Brady 90f401a067
Remove legacy raytracing methods 2023-06-19 15:19:32 -05:00
Brady c6a6624045
Reorder fields 2023-06-19 15:16:11 -05:00
Brady 7d17ace15d
Reset recalculating flag on `clear` 2023-06-19 15:15:29 -05:00
Brady 8d3b0c8f07
Always enforce `sinceFirework` 2023-06-19 14:10:41 -05:00
0x22 6741dff12b
replaced (PI / 180) constants, RotationUtils calcVec3dFromRotation->calcLookDirectionFromRotation and named local variables. 2023-06-19 14:17:54 -04:00
Brady 9e10faa4c5
Elytra inventory modifications
- Use `throwaway` to switch items
- Remove inventory settings
- Prioritizes boost fireworks, but works without
- Avoids explosion fireworks
2023-06-19 12:32:25 -05:00
rycbar0 a32ac59ec1 prevent <player> went off with a bang 2023-06-19 12:44:32 +02:00
Leijurv 2b259d6dee
cuter debug 2023-06-18 23:09:43 -07:00
Brady 67efb7a5b6
Add `experimentalRaytrace` setting for native raytrace
Update `nether-pathfinder` to 0.15
2023-06-19 00:34:22 -05:00
Brady 1da7ab2c22
Fix raytracer rendering 2023-06-18 23:58:20 -05:00
Brady 1257a0128c
Remove unnecessary `Baritone` casts 2023-06-18 21:46:56 -05:00
Brady 0886f176b3
Make elytra API changes 2023-06-18 21:46:03 -05:00
Brady 7a8f8e8d47
fix noob error from resolving merge conflicts 2023-06-18 21:42:04 -05:00
Brady Hahn d2b1398cea
Merge branch 'elytra' into elytra 2023-06-18 21:39:09 -05:00
Leijurv 6c8f2698d6
cherry pick remainWithExistingLookDirection from fork 2023-06-18 19:31:51 -07:00
Brady 9808f62fe4
Send chunks to nether-pathfinder on `BlockUpdateEvent` 2023-06-18 21:25:00 -05:00
Brady 1837b66bb5
Add `BlockChangeEvent`
Moves the cache repack on block change functionality into `GameEventHandler`
2023-06-18 21:24:13 -05:00
Leijurv efae476bc0
solved 2023-06-18 18:16:13 -07:00
Leijurv a236031435
fix raytracer 2023-06-18 18:09:45 -07:00
Leijurv 812be14375
debug 2023-06-18 18:06:32 -07:00
Brady 1dbfc9abe3
optimize block lookups and move goingTo to local 2023-06-18 19:57:29 -05:00
leijurv 411c43d90e
Merge pull request #3992 from ZacSharp/pr/blockOptionalMeta/useStackHashesInBlockOptionalMetaLookup
Actually use stack hashes
2023-06-18 17:25:53 -07:00
leijurv bac5fd7438
Merge pull request #3999 from ZacSharp/pr/setting/tabCompleteSetingsLoadPath
Tab complete the file argument for `#settings load`
2023-06-18 17:25:27 -07:00
Brady Hahn 4df31a3fbb
Merge pull request #4000 from ZacSharp/pr/selection/fixHorizontalCylinders
Fix `CylinderMask` with horizontal alignment
2023-06-18 19:02:07 -05:00
rfresh2 8dc32ae03c
firework inv management + pause/resume 2023-06-18 13:34:55 -07:00
ZacSharp 5fd915ab8a
Tab complete the file argument for `#settings load` 2023-06-18 22:27:57 +02:00
Brady 68901695ca
Add experimental takeoff feature 2023-06-18 13:23:41 -05:00
ZacSharp 6aeb73b5bd
Fix `CylinderMask` with horizontal alignment 2023-06-18 19:18:46 +02:00
0x22 aec683d80f
fast raytrace 2023-06-18 12:21:01 -04:00
Brady d4e6a84ec9
Remove usage of realms Pair class 2023-06-18 10:57:13 -05:00
Brady d66b8f1dd8
Extract `currentSpeed` into variable 2023-06-18 00:13:55 -05:00
Brady 688bbb83c8
Rename `wasteFireworks` to `conserveFireworks` and invert 2023-06-18 00:11:40 -05:00
Brady da31a643b3
unscuff 2023-06-17 23:56:08 -05:00
Babbaj 76c5c1155f
Fix ElytraCommand throwing exception for invalid goals 2023-06-18 00:51:07 -04:00
Leijurv fef7ba4701
tweaks 2023-06-17 20:03:30 -07:00
Brady fcf8cd35d2
Handle exception to ensure `recalculating` is reset 2023-06-17 19:58:19 -05:00
Brady 91609f4ebf
Use player bounding box in isClear 2023-06-17 19:36:29 -05:00
Brady 64a5ceabd8
Fix the regular pathfinder issue 2023-06-17 15:35:26 -05:00
Brady 4c2984a9a0
Consistent `path` prefix for methods 2023-06-17 14:21:32 -05:00
Brady d1a6de06e2
😼 `PathManager` 2023-06-17 14:15:57 -05:00
Brady 0290b344dc
Cancel before shutting down executor 2023-06-17 02:33:43 -05:00
Brady 395706edc9
move context wrapper to new class 2023-06-17 02:02:26 -05:00
Brady a67889ab42
refactoring 2023-06-17 01:55:07 -05:00
Brady 97e91ed680
one var 2023-06-17 01:42:49 -05:00
Brady 424f27c798
remove debug msg 2023-06-17 01:41:17 -05:00
Brady c5475498ca
so cute 2023-06-17 01:39:21 -05:00
Leijurv 157e4db7c5
fireworks hack 2023-06-16 22:39:50 -07:00
Leijurv 1f303e69b0
cut at render distance 2023-06-16 22:21:52 -07:00
Leijurv dc53c79393
gaming 2023-06-16 21:35:56 -07:00
Brady 37167746b5
Merge remote-tracking branch 'origin/master' into elytra 2023-06-16 22:52:24 -05:00
Brady f798ff26f6
fixed seed 2023-06-16 22:31:53 -05:00
leijurv a665605a5a
Merge pull request #3991 from ZacSharp/pr/guiclick/fixSelectionPreview
Fix `GuiClick` not rendering the outline of the selection being made
2023-06-16 20:29:25 -07:00
Brady 800cb2e747
Replace sublist troll in PathRenderer with `visiblePath` 2023-06-16 20:53:53 -05:00
Brady 5b39eb5041
clean up 2023-06-16 20:38:29 -05:00
Brady 53a0069704
Remove Java pathfinder in preparation for `insertChunkData` 2023-06-16 19:54:37 -05:00
Brady 8c12416348
Use new nether-pathfinder API
Doesn't stitch segments, just partially functional
2023-06-16 18:59:57 -05:00
ZacSharp e00e0032b4
Actually use stack hashes 2023-06-17 01:40:19 +02:00
ZacSharp f1bf1e8663
Use IRenderer setup methods 2023-06-17 00:36:35 +02:00
ZacSharp ef4cdfd646
Fix render bug caused by color bug fix 2023-06-16 19:22:37 +02:00
Leijurv e01093eb9a
build with pathfinder 2023-06-15 20:59:15 -07:00
Brady a9e9cd978d
cancel lol 2023-06-15 22:59:01 -05:00
Brady fe8ec19b6d
Fix `renderRaytraces` crash 2023-06-15 22:07:44 -05:00
leijurv 0e87f350b3
Merge pull request #3990 from cabaletta/elytra-freelook
Merge `elytra-freelook` into `elytra`
2023-06-15 20:00:45 -07:00
leijurv c86643874d
Merge pull request #3936 from ZacSharp/pr/builder/fixPlaceableComparison
Fix considering states unplaceable regardless of buildIgnoreProperties
2023-06-15 19:36:25 -07:00
Leijurv 8df6778641
sort of integrated nether pathfinder 2023-06-15 00:32:26 -07:00
Brady 26a2945696
remove comment 2023-06-14 19:13:07 -05:00
leijurv 04b09fbfbd
Merge pull request #3985 from cabaletta/pr/deprecateHelperMc
Deprecate `Helper.mc`
2023-06-14 16:20:38 -07:00
Brady f14caa3778
Fix cringe shift by injector 2023-06-14 17:32:47 -05:00
Brady 06d11c1874
Revert file path 2023-06-14 16:59:03 -05:00
Brady 91bf7d726b
Un-scuff and add setting 2023-06-14 16:32:56 -05:00
Brady bde0c620ad
Allow freeLook when using elytra 2023-06-14 16:11:11 -05:00
Brady 9672bd2c6d
Fix compile 2023-06-14 16:08:34 -05:00
Brady 7b6f9b3eb6
Merge remote-tracking branch 'origin/master' into elytra 2023-06-14 15:48:16 -05:00
Brady ea9245ad26
missed that 😩 2023-06-14 14:23:24 -05:00
Brady 8534e1ba55
💚 appease codacy 2023-06-14 14:04:34 -05:00
Brady ae66004b80
Custom registration of `Baritone` instances from `Minecraft` 2023-06-14 13:52:27 -05:00
Brady 5b39c0dd96
Remove `getMinecraft()` from `BlockStateInterface` 2023-06-14 12:18:50 -05:00
Brady 2db2d8be59
Steal `BaritoneList` from `bot-system` 2023-06-14 02:00:10 -05:00
Brady 75d47bb110
Fix all usages of `Helper.mc` 2023-06-14 01:53:29 -05:00
Brady dd7b492b0c
registerBehavior is called explicitly now 2023-06-13 23:21:20 -05:00
Brady c7f4e366e2
Remove `mc` references from `WorldProvider`
Also refactored a bit, should be a lot easier to merge upwards to new game versions
2023-06-13 23:07:26 -05:00
Brady 382f82b0e0
Move `Minecraft` to `IPlayerContext` 2023-06-13 21:17:42 -05:00
Brady ab3d9e9c47
I LOVE `final` 2023-06-13 21:13:34 -05:00
Brady 714ebb2c2d
Deprecate `Helper.mc` and begin to replace usages 2023-06-13 18:24:31 -05:00
leijurv 1b254a4811
Merge pull request #3979 from cabaletta/pr/feature/blockFreeLook
Allow free looking when breaking and placing blocks
2023-06-13 10:32:18 -07:00
Leijurv 92509f07e9
normal raytracer skips flowing lava (aka lavafalls) which is no good 2023-06-12 22:00:23 -07:00
Leijurv 44cd5dcd41
go around glowstone and nether fortresses 2023-06-12 21:43:10 -07:00
Brady 76fe0d14d3
Simplify some player context references 2023-06-12 21:13:10 -05:00
Brady 2022d33d03
Fix incorrect references to player and world 2023-06-12 21:12:49 -05:00
Brady c8b8deb3d6
Ensure angle delta is producible with mouse movement 2023-06-12 21:04:30 -05:00
Brady 4885d49d20
Reorganize code 2023-06-12 20:00:03 -05:00
Brady 13fc58933d
Don't bother returning `serverRotations` if no free look 2023-06-12 19:03:03 -05:00
Brady c217a34f13
🐛 fix batch render color bug by backporting 1.17+ render code 2023-06-12 17:06:11 -05:00
Brady 8a65a1cfc5
🐛 fix incorrect comparison operator 2023-06-12 16:52:20 -05:00
Brady 5bdd5b0c0d
👌 appease leijurv 2023-06-12 16:50:02 -05:00
Brady 7da802a238
Fix `censorCoordinates` recalc bug
Adds `equals` and `toString` implementations where needed
Replaces `toString` equality check with actual `equals` check in `forceRevalidate`
2023-06-12 16:21:05 -05:00
leijurv e334aae608
Merge pull request #3974 from cabaletta/pr/sel-shape-masks
Add sphere and cylinder build commands to sel
2023-06-12 12:57:01 -07:00
Brady ed34ae73c0
Fix `Mode.NONE` target invalidation 2023-06-12 13:46:10 -05:00
Brady c8a0ae9e10
Do `nudgeToLevel` and `randomLooking` when using freeLook 2023-06-12 13:44:08 -05:00
Brady 67a085c95f
Batch together GL_LINES draw calls 2023-06-12 13:16:37 -05:00
Brady 1d5ee079b4
Read `serverRotation` from packet and invalidate on world load 2023-06-12 12:11:50 -05:00
Leijurv 410cfcf21a
typo, fix crash at end of path 2023-06-11 22:40:35 -07:00
Leijurv 4148b98187
typo 2023-06-11 22:22:49 -07:00
Leijurv b9054cdfc9
use more fireworks 2023-06-11 22:22:01 -07:00
Leijurv 35a996e2b0
firework more often 2023-06-11 20:59:28 -07:00
Brady bb36ebfc0c
Use `IPlayerContext` for all `RotationUtils` methods
Deprecates all old overloads
2023-06-11 20:09:37 -05:00
Brady a7d15d1e32
Consistent naming and comments for clarification 2023-06-11 18:43:48 -05:00
Brady 4317dca024
Determine target mode (client/server) in `updateTarget` 2023-06-11 18:35:34 -05:00
Leijurv c48c2aa45c
allow even more desperate motion 2023-06-11 13:57:21 -07:00
Brady 77ca36c794
Use `playerRotations` in `reachableOffset` 2023-06-11 15:49:04 -05:00
Leijurv a602863426
better elytra 2023-06-11 12:49:31 -07:00
Brady a09e63d6aa
appease codacy 2023-06-11 13:14:52 -05:00
Brady fbe28e397e
Make setting disabled by default 2023-06-11 12:38:13 -05:00
Brady 364ae87ef8
Add `blockFreeLook` setting 2023-06-11 12:36:53 -05:00
Brady ffd00080f2
Mask binary operators 2023-06-11 11:27:51 -05:00
Brady 94d757104b
Clean ups 2023-06-11 11:24:31 -05:00
Leijurv 705a5a0712
elytra prototype mvp 2023-06-11 00:33:35 -07:00