Compare commits

...

1629 Commits

Author SHA1 Message Date
leijurv
a9f40fb0e5 Merge pull request #4885 from Skylandia/tripwire-support
Allow pathing through tripwires
2025-10-16 11:12:38 -07:00
Skylandia
521303b9e4 allow the user to ignore tripwires on the path 2025-10-08 15:35:02 +13:00
leijurv
d196c649e3 Merge pull request #4752 from Murat65536/bridging-improvements
Bridging Improvements
2025-09-11 15:30:24 -07:00
Murat65536
a56f3cfd86 Clarify yaw distance comment 2025-09-10 21:06:26 -04:00
Murat65536
714e7afce1 More minor formatting changes. 2025-08-30 17:48:19 -04:00
Murat65536
037912871c Adjust order. 2025-08-30 08:21:58 -04:00
Murat65536
ce81d36479 Convert to ternary operators. 2025-08-28 21:44:05 -04:00
Murat65536
f9ae7029c3 Formatting change. 2025-08-28 08:57:49 -04:00
Murat65536
61c0a097bb Add 45 degree intervals to yaw change. 2025-08-28 08:22:17 -04:00
ZacSharp
2a3c22424f Update SETUP.md 2025-08-27 01:28:42 +02:00
ZacSharp
bd14ede064 Update README.md 2025-08-27 01:24:15 +02:00
Murat65536
a2a6769742 Round yaw to 45 degrees when bridging. 2025-08-23 20:25:16 -04:00
leijurv
44909d3140 Merge pull request #4764 from rfresh2/precomputed-data-optimize
reduce PrecomputedData memory usage
2025-08-18 21:21:16 -07:00
rfresh2
b666c92267 use requested style 2025-08-18 14:46:09 -07:00
Murat65536
0eb0e6709a Condense more. 2025-08-17 20:12:22 -04:00
Murat65536
9714fa4fd4 Condense logic into huge lambda. 2025-08-17 20:04:55 -04:00
Murat65536
f1e5c44b85 Replace messy Vec2 with a cleaner record class. Also, remove a messy switch case. 2025-08-17 19:52:14 -04:00
leijurv
ade898d5c6 Merge pull request #4839 from AverWasTaken/patch-1
Remove Elytra from future features
2025-08-16 21:20:18 -07:00
Murat65536
7b5ba80f67 Change to Vec2. 2025-08-06 15:38:53 -04:00
aver
69d91a62be Remove Elytra from future features 2025-08-05 16:44:14 -07:00
Murat65536
102960446d Fix bug. 2025-07-31 18:17:35 -04:00
Murat65536
2ba448c30d Merge remote-tracking branch 'origin/bridging-improvements' into bridging-improvements 2025-07-25 16:41:53 -04:00
Murat65536
9d33858687 Small change. 2025-07-25 16:41:38 -04:00
Murat Bayraktar
1c4c3f3eb6 Merge branch 'cabaletta:1.19.4' into bridging-improvements 2025-07-23 22:02:24 -04:00
leijurv
c1aa2012b9 Merge pull request #4740 from Murat65536/safewalk-update
Let external safewalk handle being safe.
2025-07-24 02:01:55 +02:00
Murat Bayraktar
9c84fa54c6 Merge branch 'cabaletta:1.19.4' into bridging-improvements 2025-07-23 19:31:44 -04:00
leijurv
95212d6339 Merge pull request #4742 from Murat65536/magma-block-detection
Magma block detection
2025-07-23 20:58:03 +02:00
leijurv
e3160f50de format 2025-07-23 11:57:53 -07:00
Murat65536
1a3d302e46 Clean up. 2025-07-23 00:49:45 -04:00
Murat65536
8ee7a1e39d Small change. 2025-07-23 00:29:03 -04:00
Murat65536
c8dcbeb6f8 Format. 2025-07-22 11:34:56 -04:00
Murat65536
65d0d860dd Reformatting, appeasing leijurv, and fixing stupid mistake. 2025-07-22 01:51:42 -04:00
Murat65536
65182fa2dc Remove movement change. 2025-07-20 18:40:25 -04:00
Murat Bayraktar
8168d1f889 Merge branch 'cabaletta:1.19.4' into safewalk-update 2025-07-20 18:24:01 -04:00
Murat65536
5d8136b02e Simplify. 2025-07-13 10:09:16 -04:00
Murat65536
191155315b Keep original player movement. 2025-07-06 20:25:02 -04:00
Murat Bayraktar
a30e3ce8e3 Merge branch 'cabaletta:1.19.4' into bridging-improvements 2025-07-06 19:44:20 -04:00
Murat65536
83afa1126e Fix. 2025-07-02 16:08:14 -04:00
Murat Bayraktar
7be4d646d9 Merge branch 'cabaletta:1.19.4' into magma-block-detection 2025-06-24 16:37:12 -04:00
leijurv
4d27d56ff5 Merge pull request #4639 from babbaj/fix-packer
fix chuckpacker y bug
2025-06-04 15:15:10 -07:00
Murat65536
72fb0a0d28 Add default to switch case. 2025-05-23 22:04:13 -04:00
Murat65536
cbfb329b94 Add direction-independent movement. 2025-05-23 18:31:34 -04:00
rfresh2
8f8ce30091 reduce PrecomputedData memory usage 2025-05-21 23:54:10 -07:00
leijurv
89b0fd74dd some readme updates, yes i intentionally linked to the baritone discord server three times 2025-05-14 15:48:46 -07:00
Murat65536
053b88d7cd Make cost calculation use settings in CalculationContext. 2025-05-14 15:13:12 -04:00
Murat Bayraktar
091500b002 Merge branch 'cabaletta:1.19.4' into safewalk-update 2025-05-14 19:08:45 +00:00
Murat Bayraktar
8d790ebe74 Merge branch 'cabaletta:1.19.4' into magma-block-detection 2025-05-14 19:07:56 +00:00
Murat65536
1078270eb3 Clean up. 2025-05-13 21:46:37 -04:00
ZacSharp
de0b1f271e Update quick download links 2025-05-13 23:33:25 +02:00
ZacSharp
5ffd3fcf20 Update setup information 2025-05-13 23:29:54 +02:00
ZacSharp
773d753c60 Update quick download links 2025-05-13 21:31:56 +02:00
ZacSharp
647daf23aa v1.9.5
previous commit was mistaken v1.9.4 already exists
2025-05-13 19:35:28 +02:00
ZacSharp
01379f5474 v1.9.4 2025-05-13 19:32:29 +02:00
leijurv
fd49333db6 Merge pull request #4747 from ZacSharp/pr/1.19.4/setting/migrateAllowJumpAt256
Migrate `allowJumpAt256` to `allowJumpAtBuildLimit` in settings files
2025-05-12 13:30:24 -07:00
Murat65536
0378096340 Make Baritone not look forward while bridging. 2025-05-11 18:12:11 -04:00
ZacSharp
31b30e3a31 Migrate allowJumpAt256 to allowJumpAtBuildLimit in settings files 2025-05-10 20:24:26 +02:00
leijurv
0fe8c628c7 Merge pull request #4745 from ZacSharp/pr/1.19.4/misc/bsi/fixWrapperHeight
Fix height vs. max build height mixup
2025-05-10 11:07:24 -07:00
Murat Bayraktar
21954f74a9 Merge branch 'cabaletta:1.19.4' into magma-block-detection 2025-05-10 15:24:44 +00:00
ZacSharp
f86f0ab6cd Fix height vs. max build height mixup 2025-05-10 15:51:20 +02:00
Murat65536
6dd5d843d5 Make magma blocks disallowed if setting is turned off. 2025-05-10 08:53:26 -04:00
Murat Bayraktar
40e83423bc Update build limits (#4736)
* Update minimum build limit

* Update MovementDescend.java to work for any minimum height

* Update RenderCommand.java for dynamic build heights.

* Fix so it actually compiles.

* Small syntax change.

* Simpler formatting

* Fix more height issues.

* Remove allowJumpAt256 as redundant.

* Remove allowJumpAt256 as redundant.

* Update CalculationContext.java

* Update Settings.java

* Update Settings.java

* Deprecate allowJumpAt256.

* Re-introduce build limit jump setting.

* Update MovementParkour.java

* Update CalculationContext.java

* Update Settings.java

* Update CalculationContext.java

* Update src/api/java/baritone/api/Settings.java

Co-authored-by: ZacSharp <68165024+ZacSharp@users.noreply.github.com>

---------

Co-authored-by: Murat65536 <bob65536@proton.me>
Co-authored-by: ZacSharp <68165024+ZacSharp@users.noreply.github.com>
2025-05-09 22:36:17 -07:00
Murat65536
f4b51586e8 Add setting that controls sneaking on magma blocks. 2025-05-09 22:02:22 -04:00
Murat65536
267d677d79 Make MovementDiagonal not account sprint cost reduction on sneak. 2025-05-09 21:09:56 -04:00
Murat65536
0815697d30 Make MovementPillar literally always sneak because why not. 2025-05-09 20:41:19 -04:00
Murat65536
f504d26dfd Add magma block functionality to MovementParkour. 2025-05-09 20:15:36 -04:00
Murat65536
373757a63a Implement MovementFall magma block detection. 2025-05-09 18:53:03 -04:00
Murat65536
7317a5c9c4 Fix ascend. 2025-05-08 20:33:27 -04:00
Murat65536
8eebeb9772 Magma block detection for MovementDiagonal. 2025-05-08 18:51:37 -04:00
Murat65536
292f13d05e Small change. 2025-05-08 18:24:54 -04:00
Murat65536
974a3416d8 Integrate some magma block avoidance functionality. 2025-05-08 18:10:34 -04:00
Murat65536
7568939dfd Let external safewalk handle being safe. 2025-05-06 21:44:59 -04:00
leijurv
d74420b265 Merge pull request #4720 from ZacSharp/pr/1.19.4/commands/preventRemoteCommandExecution
Don't let servers trick users into running arbitrary Baritone commands
2025-04-21 16:23:49 -07:00
ZacSharp
7aab08ae0f Don't let servers trick users into running arbitrary Baritone commands
As of now there shouldn't be any exploitable commands, but better be safe
2025-04-22 00:50:02 +02:00
leijurv
2fc8490c72 Merge pull request #4712 from ZacSharp/pr/1.19.4/misc/moreExceptionMessages
Add messages to more exceptions and improve some existing ones
2025-04-19 00:08:40 -07:00
leijurv
ddc2820418 Merge pull request #4713 from ZacSharp/pr/1.19.4/misc/useMinecraftEyeHeight
Use minecraft method to determine sneaking eye height
2025-04-18 15:30:30 -07:00
ZacSharp
9e1e89b91f Fix ancient comment 2025-04-18 23:34:16 +02:00
ZacSharp
7c4036dfb1 Don't leak coordinates in exceptions 2025-04-18 23:28:39 +02:00
ZacSharp
bbaa602fe9 Use minecraft method to determine sneaking eye height
Co-authored-by: Matthew Herber <matthewherber@sbcglobal.net>
2025-04-18 22:49:03 +02:00
ZacSharp
921822acd7 Add messages to more exceptions and improve some existing ones 2025-04-18 00:58:16 +02:00
leijurv
f019b81bd9 Merge pull request #2527 from ZacSharp/itemFollowing
Item following
2025-03-29 20:42:14 -07:00
leijurv
50df7b2026 Merge pull request #4677 from ZacSharp/pr/1.19.4/misc/backportCurrentLayerAndMenuLinks
Backport #4634 and #4205 to 1.19.4
2025-03-20 14:42:51 -07:00
Jack
92130f1642 Add issues links and link to Discord for ModMenu 2025-03-16 11:17:18 +01:00
Ic3Tank
fd13d5cbdc Expose current layer in IBuilderProcess 2025-03-16 11:14:51 +01:00
ZacSharp
209b51b253 Fix parsing invalid ResourceLocations once again
This is to fix `ItemById` by making `filterPrefixNamespaced` not fail on invalid prefixes
2025-03-15 20:16:06 +01:00
ZacSharp
3fa0f34c1e Remove unused import 2025-03-15 20:14:50 +01:00
ZacSharp
bf0c47c85c Command to pickup items 2025-03-15 20:14:38 +01:00
leijurv
9de3074041 Merge pull request #4662 from ZacSharp/pr/1.19.4/mine/fixCanWalkThroughButAvoidBreaking
Fix `MineProcess` stalling on blocks which are `canWalkThrough` but shouldn't be broken
2025-03-14 11:49:00 -07:00
leijurv
37a95aea97 Merge pull request #4661 from ZacSharp/pr/1.19.4/schematics/betterErrorMessage
Improve error messages from `#build`
2025-03-14 11:48:27 -07:00
leijurv
3116405953 Merge pull request #4660 from ZacSharp/pr/1.19.4/elytra/keepNetherPathfinderClasses
Fix nether-pathfinder with optimized forge/neoforge builds
2025-03-14 11:48:10 -07:00
leijurv
ed4f9cee78 Merge pull request #4659 from ZacSharp/pr/1.19.4/mixin/backportForgeFix
Backport #4138 to 1.19.4
2025-03-14 11:46:35 -07:00
ZacSharp
b8ac867fb9 Break from eye level outwards
We might be standing inside passable blocks (e.g. sugar cane) so the
block at foot level is occluded by the one at eye level.
This does still break if we are standing inside a non-target with a
target above or below.
2025-03-13 19:32:35 +01:00
ZacSharp
3f6c87a8ed Better error message for unsupported formats 2025-03-08 23:35:23 +01:00
ZacSharp
bf08c4fcf4 Improve error messages from #build 2025-02-27 18:36:35 +01:00
ZacSharp
f357eb230b Remove spam 2025-02-27 15:55:09 +01:00
ZacSharp
f3086c2231 Filter blocks where avoidBreaking returns false
shaft-mining checks `avoidBreaking` so not checking it here can cause
Baritone to walk to a position and then do nothing.
2025-02-27 15:36:59 +01:00
ZacSharp
002415425a Slightly rephrase compatibility message
We cannot distinguish between unsupported systems and failures on supported systems
so strongly implying the former is potentially misleading.
2025-02-26 17:05:40 +01:00
ZacSharp
c54d878d1c Fix nether-pathfinder on forge 2025-02-26 17:05:23 +01:00
rfresh2
590f5d98ee fix forge mixin crash
cherry-picked from 7902517663
2025-02-26 16:12:21 +01:00
Babbaj
6cc5420b95 fix chuckpacker y bug 2025-02-09 02:20:47 -05:00
leijurv
849072f8ca Merge pull request #4636 from Lyzev/1.19.4
add(Settings): added settings to control block placement in fluid sources and flowing fluids
2025-02-08 10:57:21 -08:00
Lyzev
59157c1ee0 fix(CostOfPlacingAt): improve fluid placement checks in CalculationContext 2025-02-08 12:15:55 +01:00
leijurv
3c9f5b2c91 Merge pull request #4596 from cattyngmd/1.19.4-follow-target-max-distance
Added followTargetMaxDistance setting
2025-02-07 16:58:17 -08:00
Lyzev
cdfa86c977 add(Settings): added settings to control block placement in fluid sources and flowing fluids 2025-02-06 18:48:51 +01:00
cattyn
64fdad424f added maximum distance setting for FollowProcess 2024-12-28 14:29:05 +03:00
leijurv
a5668532b1 Merge pull request #4587 from ZacSharp/pr/1.19.4/documenation/updateBuildInstructions
Update build instructions
2024-12-21 23:07:03 -08:00
ZacSharp
bac24af90e Update SETUP.md 2024-12-14 16:29:49 +01:00
leijurv
497fb74829 Merge pull request #4560 from rfresh2/litematica-fix-1.19.4
fix litematica remapping error
2024-11-20 20:02:14 -08:00
leijurv
91a1f05ff2 Update README.md 2024-11-20 01:23:03 -08:00
rfresh2
1a258b2bec fix litematica remapping error 2024-11-18 11:20:52 -08:00
leijurv
93dee4fd19 Merge pull request #4532 from babbaj/fix-loops
fix loops in path
2024-10-21 14:03:42 -07:00
Babbaj
f6657846d3 fix loops in path (fixes #4528) 2024-10-21 02:09:31 -04:00
leijurv
db163867df Merge pull request #4531 from ZacSharp/pr/1.19.4/pathing/canWalkOnSoulSand
Allow walking on soul sand once again
2024-10-20 20:02:43 -07:00
leijurv
58fcf328b9 Merge pull request #4530 from ZacSharp/pr/1.19.4/builder/fixPositionOutOfBounds
Handle positions going out of bounds between ticks
2024-10-20 20:01:25 -07:00
leijurv
8e8cfdd2a6 Merge pull request #4529 from ZacSharp/pr/1.19.4/builder/fixEmptyShapeCrash
Don't call `shape.bounds()` on empty shapes
2024-10-20 20:00:53 -07:00
ZacSharp
991d822557 Make soul sand canWalkOn again 2024-10-20 21:23:38 +02:00
ZacSharp
c25b1325da Handle positions going out of bounds between ticks
They also have to be removed rather than ignored because they won't be scanned
again and would stay in `incorrectPositions` indefinitely.
2024-10-20 18:34:17 +02:00
ZacSharp
ea1de44ca8 Don't call shape.bounds() on empty shapes
`minecraft:moving_piston` is the only block I currently know which could cause this to crash.
2024-10-20 18:13:15 +02:00
leijurv
f22f4aed00 Merge pull request #4519 from babbaj/edge-fix
Fix not moving from edge of block
2024-10-15 16:04:17 -07:00
Babbaj
d644c5b754 a bit more elegant 2024-10-15 18:56:46 -04:00
Babbaj
1e2ae34dbe crucial performance optimization 2024-10-15 18:25:42 -04:00
Babbaj
a690e1eca4 prepend feet to the path if start is adjacent to feet 2024-10-14 17:25:20 -04:00
leijurv
d25d6c2611 Merge pull request #4452 from ZacSharp/pr/1.19.4/builder/rotateAndMirrorSchematics
Add settings to rotate/mirror schematics
2024-09-15 23:34:52 -07:00
leijurv
ef72c56833 Merge pull request #4453 from ZacSharp/pr/1.19.4/schematics/litematicaRework
Almost rewrite litematic handling
2024-08-22 11:01:27 -07:00
ZacSharp
7e8c852528 Setting to mirror schematics 2024-08-02 01:42:46 +02:00
ZacSharp
42032890ed Setting to rotate schematics 2024-08-02 01:41:50 +02:00
ZacSharp
6b6931c86d Remove unused stub
The class doesn't even exist in the version of Litematica I'm using so it doesn't
seem to have an effect on descriptor strings in our bytecode. Otherwise my game
would crash.
2024-07-30 19:26:05 +02:00
ZacSharp
b915151ae3 We don't expect any exceptions here anymore 2024-07-30 19:26:05 +02:00
ZacSharp
7609f3082e Keep subregions as separate boxes 2024-07-30 19:26:05 +02:00
ZacSharp
99f9dd1671 Performance 2024-07-30 19:26:05 +02:00
ZacSharp
1a0cca794c Use toString like for schematica 2024-07-30 19:26:04 +02:00
ZacSharp
e71547b9ef Take blocks from the schematic world 2024-07-30 19:26:04 +02:00
ZacSharp
246a246cb7 Less nested schematics 2024-07-30 19:26:04 +02:00
ZacSharp
b87a1fa420 Take data directly from Litematica 2024-07-30 19:25:57 +02:00
ZacSharp
b12c4e9f8c Merge loading steps 2024-07-30 19:17:13 +02:00
ZacSharp
330089f1e2 Shorten / simplify some Litematica related things 2024-07-30 19:17:08 +02:00
leijurv
f6045b7cb4 Merge pull request #4438 from ZacSharp/pr/1.19.4/build/syncMixinAndAsm
Sync mixin and asm versions between common and tweaker
2024-07-28 00:39:37 -07:00
ZacSharp
a07d7d0526 Sync mixin and asm versions between common and tweaker 2024-07-21 13:33:00 +02:00
leijurv
edb433ea6e Merge pull request #4432 from ZacSharp/pr/1.19.4/build/fixClassloaderExclusion
Move `BaritoneTweaker` to its own package
2024-07-20 11:50:23 -07:00
leijurv
a02704e097 Merge pull request #4430 from ZacSharp/pr/1.19.4/farm/addBamboo
Add bamboo to `FarmProcess` targets
2024-07-20 11:50:12 -07:00
ZacSharp
1947459acf Move tweak class to its own package
Launchwrapper automatically adds a classloader exclusion for every package containing a tweak class, forcing the whole package to load through the parent class loader.
2024-07-14 13:47:52 +02:00
ZacSharp
52aa609ac7 Add bamboo to FarmProcess targets 2024-07-14 10:37:31 +02:00
leijurv
92bc067633 Merge pull request #4395 from wagyourtail/1.19/proguard-cleanup
clean up proguard task
2024-06-19 18:20:08 -07:00
leijurv
64639b377f Merge pull request #4385 from ZacSharp/pr/1.19.4/farm/unhardcodeScanLimit
Unhardcode farm scan limit
2024-06-19 18:18:29 -07:00
Wagyourtail
42c62a0559 clean up proguard task 2024-06-16 23:46:27 -05:00
ZacSharp
b25a6305ce Don't bother testing reachability for far away blocks
This is a massive performance improvement for big farms.
2024-06-09 18:14:41 +02:00
ZacSharp
98e90e72f7 Make farm scan limit configurable 2024-06-09 18:14:41 +02:00
ZacSharp
10851ddf14 Only create scan list when needed 2024-06-09 18:14:40 +02:00
ZacSharp
402079d7db Fail if there is no target position 2024-06-09 18:14:35 +02:00
leijurv
b184141db2 Merge pull request #4374 from ZacSharp/pr/1.19.4/guiclick/removeLogspam
Remove logspam from `GuiClick`
2024-06-07 00:45:33 -07:00
ZacSharp
f9a8aa0c2b Remove logspam 2024-05-26 03:19:35 +02:00
leijurv
0c09441154 Merge pull request #4324 from ZacSharp/pr/1.19.4/setting/fixRecursiveParserType
Fix recursive setting parsers
2024-04-24 12:50:21 -07:00
leijurv
69d3bc0c2e Merge pull request #4320 from rfresh2/instabreak-fix
don't apply block break delay to insta-breaks
2024-04-24 12:50:06 -07:00
leijurv
b31e0a87cb Merge pull request #4333 from ZacSharp/pr/1.19.4/misc/toolset/fixHardnessCrash
Fix NPE in break time calculation
2024-04-24 12:49:15 -07:00
ZacSharp
4572b75db7 Fix NPE in break time calculation 2024-04-10 14:03:48 +02:00
rfresh2
15fdbb2312 revert API renaming 2024-04-07 20:30:16 -07:00
ZacSharp
848b7c6de0 Fix recursive parsers
Does not affect existing parsers since all nested parameterized setting types
are `Map<String, List<String>>` so there is no difference between the first
parameter of the inner type and the first parameter of the outer type
2024-04-02 21:32:01 +02:00
rfresh2
2b96a2e463 don't apply block break delay to insta-breaks 2024-04-01 15:21:24 -07:00
leijurv
62b2f81ba1 Merge pull request #4314 from ZacSharp/pr/1.19.4/builder/fixBuildSkipBlocksNPE
Fix NPE
2024-03-28 19:25:58 -07:00
ZacSharp
5826931eea Fix NPE 2024-03-29 03:17:00 +01:00
leijurv
a8119366a1 Merge pull request #4292 from rfresh2/place-delay-patch
align rightClickSpeed setting with actual delay
2024-03-28 16:53:33 -07:00
leijurv
b0575fbe0c Merge pull request #4291 from rfresh2/block-break-delay
Block break delay setting
2024-03-28 16:53:13 -07:00
leijurv
866cf34f50 Merge pull request #4303 from ZacSharp/pr/1.19.4/builder/placeIncorrectBlockPenaltyMultiplier
Add a `placeIncorrectBlockPenaltyMultiplier` setting
2024-03-28 16:52:31 -07:00
leijurv
23908ad14f Merge pull request #4289 from ZacSharp/pr/1.19.4/ci/updateWorkflows
Update workflows
2024-03-28 16:51:43 -07:00
rfresh2
18d3c4c2bd align rightClickSpeed setting with actual delay 2024-03-10 21:05:30 -07:00
rfresh2
faece77e8c align setting value with actual tick delay between breaks 2024-03-10 16:49:59 -07:00
rfresh2
413c11a23e block break delay setting 2024-03-09 15:26:18 -08:00
ZacSharp
4c9253fa5e Add placeIncorrectBlockPenaltyMultiplier builder setting 2024-03-08 17:49:51 +01:00
ZacSharp
d86a34a527 Fix too low bound and log spam 2024-03-08 17:49:45 +01:00
ZacSharp
92aba1b78e Update workflows 2024-03-06 02:26:58 +01:00
ZacSharp
28ba97c3de Move up and fix access modifiers 2024-02-22 14:16:52 +01:00
ZacSharp
24c23e28ec Reduce recursion limit and fix visibility 2024-02-20 21:35:59 +01:00
ZacSharp
2a2842361b Consistently use helper method
and make a safe cast unnecessary
2024-02-20 21:33:53 +01:00
ZacSharp
632e05c4c2 Make buildSkipBlocks use a wrapper schematic 2024-02-20 21:32:55 +01:00
leijurv
4144344acd Merge pull request #4251 from wagyourtail/1.19/fix/feather-crash
Fix feather crashing by catching error
2024-01-23 14:40:28 -08:00
leijurv
e962c39506 Merge pull request #4248 from ZacSharp/pr/1.19.4/mine/unhardcodeMaxOreLocations
Unhardcode `ORE_LOCATIONS_COUNT`
2024-01-23 14:40:02 -08:00
leijurv
48f309ac05 Merge pull request #4247 from ZacSharp/pr/1.19.4/elytra/removeUnsafeCast
Remove unsafe generic cast
2024-01-23 14:39:44 -08:00
leijurv
0688a57a38 Merge pull request #4252 from wagyourtail/1.19/fix/build-fail
fix 1.19 build failing
2024-01-23 11:04:14 -08:00
Wagyourtail
078b3909b3 fix build failing, by making nether pathfinder version consistent 2024-01-23 08:18:58 -07:00
Wagyourtail
d51b23bd1e Fix feather crashing by catching error 2024-01-22 10:39:12 -07:00
ZacSharp
9378f7e8a0 Unhardcode ORE_LOCATIONS_COUNT 2024-01-21 01:32:30 +01:00
ZacSharp
e7e434a95b Remove unsafe generic cast 2024-01-20 23:35:54 +01:00
leijurv
be1203fabb Merge pull request #4244 from wagyourtail/1.19/fix/null-elytra
fix 🪨🧠 preventing null elytra process from working
2024-01-20 08:50:31 -08:00
Wagyourtail
340d2a1d54 fix 🪨🧠 preventing null elytra process from working 2024-01-20 07:53:11 -07:00
leijurv
f84b749ff4 Update README.md 2024-01-06 12:21:52 -08:00
leijurv
f147519a5c Merge pull request #4195 from ZacSharp/pr/1.19.4/worldscanner/fixSingleValuePalette
Fix scanning chunks using a SingleValuePalette
2023-11-17 17:50:53 -08:00
ZacSharp
19accb0d90 Fix scanning in chunks using a SingleValuePalette 2023-11-16 23:52:12 +01:00
leijurv
44bcd4251d Merge pull request #4114 from wagyourtail/just-unimined-update
bump unimined
2023-11-14 14:48:14 -08:00
William Gray
5795baab1a Merge branch '1.19.4' into just-unimined-update 2023-11-14 07:12:23 -07:00
leijurv
e183dcba17 Merge pull request #4137 from babbaj/1.19.4
silence elytra chat spam
2023-10-31 11:27:25 -07:00
leijurv
ea964a976c Merge pull request #4168 from ZacSharp/pr/build/1.19.4/improvedVersionDetection
Improve version detection
2023-10-31 11:26:10 -07:00
leijurv
1409c92e69 Merge pull request #4153 from xiaodown/xiaodown/add_git_to_dockerfile_apt
Adds git to the Dockerfile apt install (Windows build functionality)
2023-10-31 11:25:08 -07:00
leijurv
a0914192d0 Merge pull request #4158 from ZacSharp/pr/1.19.4/builder/restoreBuildIgnoreExisting
Restore `buildIgnoreExisting`
2023-10-31 11:23:44 -07:00
leijurv
e19fd1161d Merge pull request #4157 from ZacSharp/pr/1.19.4/worldscanner/handleDuplicatePaletteEntries
Handle duplicate palette entries
2023-10-31 11:23:26 -07:00
ZacSharp
9accb2bfb0 Don't crash the build if git is not available 2023-10-26 21:19:26 +02:00
ZacSharp
20d62c68bf Slightly better version strings 2023-10-26 21:19:26 +02:00
ZacSharp
0ca81b14bf Restore buildIgnoreExisting 2023-10-18 16:39:26 +02:00
ZacSharp
1dd2a334d6 Handle duplicate palette entries 2023-10-18 12:45:31 +02:00
Xiaodown
3332ec9e1f Adds git to the Dockerfile apt install
I saw in setup.md "(if you have docker on Windows, I'd be grateful if
you could let me know if it works there too)".  So I went to build
it on Windows.

I use Windows Subsystem for Linux, which is (mostly) Ubuntu but not
really (there's no init).  But Docker Desktop has an integration for
WSL2.

For me, gradle wouldn't build the image without forcing git to install
in the container.  I'll attach screenshots to the pull request.  It just
looks like whatever ubuntu:focal my docker system grabbed doesn't have
git installed by default.

Anyway, this fixes it, and shouldn't screw anything even if git is
installed by default.  I tested it on my M1 Mac pro and it still works
fine.
2023-10-11 19:25:51 -07:00
leijurv
30f27d43e7 Merge pull request #4145 from wagyourtail/1.19.4
actually fix mine under 0 height
2023-10-06 01:40:09 -07:00
Wagyourtail
74457db125 actually fix mine under 0 height 2023-10-04 19:24:09 -06:00
leijurv
91588caf7d oh my GOD 2023-09-28 20:42:08 -07:00
Babbaj
9ad273a46c silence elytra chat spam 2023-09-23 17:03:47 -04:00
leijurv
81932069d9 remove footgun 2023-09-13 21:25:59 -07:00
Wagyourtail
a1ac87f80d bump unimined 2023-08-23 19:47:07 -06:00
Leijurv
2cd5c6b0af delete master stuff 2023-08-22 13:28:45 -07:00
Leijurv
920c3aa280 Merge branch 'master' into 1.19.4 2023-08-22 13:28:24 -07:00
Leijurv
f2679bea29 hopefully actually fix backtracking 2023-08-22 13:28:11 -07:00
leijurv
e8bcd0535d Merge pull request #4108 from babbaj/1.19.4
recover from flying into lava (and fix ignoreLava)
2023-08-21 20:44:02 -07:00
Leijurv
e492e5f830 bump nether pathfinder 2023-08-20 13:36:45 -07:00
Leijurv
c4f33b72c2 check chunk load in sepples 2023-08-20 11:54:02 -07:00
Babbaj
5f5567f283 recover from flying into lava (and fix ignoreLava) 2023-08-19 15:33:12 -04:00
leijurv
301ad40350 link to latest 2023-08-18 19:36:12 -07:00
leijurv
aee36e4d85 deprecate 1.12.2 2023-08-18 19:35:30 -07:00
leijurv
e063475ebd list 1.20 2023-08-18 19:22:40 -07:00
leijurv
58d6b80f4f baritone elytra selling 2023-08-18 19:21:50 -07:00
Leijurv
c18fa512ef 1.19 defaults 2023-08-18 17:53:44 -07:00
Leijurv
3bdd0a81a5 rm debug 2023-08-18 17:49:37 -07:00
Leijurv
b351ceef71 Merge branch 'master' into 1.19.4 2023-08-18 16:37:38 -07:00
Leijurv
4efa2b1272 fix backtracking bad behavior when render distance is tiny 2023-08-18 15:02:13 -07:00
Leijurv
c2308c650a mapping 2023-08-18 14:35:02 -07:00
Leijurv
7969988099 yay fixing the build was actually easy 2023-08-18 13:09:28 -07:00
Brady
fc474cfb49 bradyfix 2023-08-18 14:14:34 -05:00
Leijurv
bfc813a802 mostly works 2023-08-17 20:03:44 -07:00
Leijurv
fd8ca8576b Merge branch 'master' into 1.19.4 2023-08-17 17:36:22 -07:00
leijurv
75b8554a11 bump readme 2023-08-17 17:14:33 -07:00
leijurv
d9cb2d91a0 v1.2.19 2023-08-17 16:57:11 -07:00
leijurv
d4b95110f5 fml 2023-08-17 16:56:22 -07:00
leijurv
8a2a20a1b3 1.16 and 1.18 deprecated 2023-08-17 14:40:26 -07:00
leijurv
7daf1022c0 Merge pull request #4100 from babbaj/fix-proguard-lol
proguard: get java from gradle runtime before JAVA_HOME
2023-08-15 21:33:42 -07:00
Babbaj
60d6791f0c proguard: get java from gradle runtime before JAVA_HOME 2023-08-16 00:27:23 -04:00
Leijurv
ca4385da7a update readme 2023-08-14 22:34:38 -07:00
Leijurv
661b16af7e v1.2.18 2023-08-14 22:20:42 -07:00
leijurv
f36072c8d3 Merge pull request #4099 from babbaj/elytra
make raytracer collide with unknown chunks
2023-08-14 22:16:27 -07:00
Babbaj
b1be4f29ad make raytracer collide with unknown chunks 2023-08-15 01:14:53 -04:00
leijurv
050e3a570d bedrock is much lower now, although worth considering if deepslate needs similar special treatment 2023-08-14 21:56:41 -07:00
Leijurv
7b911aa0a7 clean up elytra given 2b2t status 2023-08-14 20:51:39 -07:00
Brady
9ecb416bf3 Merge branch 'elytra' 2023-08-14 14:38:44 -05:00
Leijurv
f35e55ef66 unused 2023-08-14 12:34:24 -07:00
leijurv
b0929991b1 typo 2023-08-14 01:40:47 -07:00
leijurv
bd263e1bf8 message for 2b players just in case the update actually happens 2023-08-14 01:40:15 -07:00
Leijurv
535eccfc24 no longer applies 2023-08-13 22:46:51 -07:00
Leijurv
81e004380f thanks lamp! i love lamp! 2023-08-13 22:42:51 -07:00
Leijurv
d67a3d8bbc much better safety 2023-08-13 22:37:47 -07:00
Leijurv
36534eeb2d vastly more helpful 2023-08-13 22:13:33 -07:00
Leijurv
4e3a7abac9 recompute on change 2023-08-13 19:29:19 -07:00
leijurv
f331124895 Merge pull request #4096 from babbaj/elytra
add setting that makes unknown chunks air
2023-08-13 19:08:12 -07:00
Babbaj
15a38c4871 add setting that makes unknown chunks air 2023-08-13 21:58:07 -04:00
leijurv
070523511a Merge pull request #4092 from wagyourtail/master-1
fix badges
2023-08-07 14:43:35 -07:00
William Gray
0edcf65044 fix badges 2023-08-07 21:33:42 +00:00
Brady Hahn
139fd03470 Update lines of code badge to match style 2023-08-02 17:07:03 -05:00
leijurv
3215824a9e Merge pull request #4085 from TheAlan404/patch-1
Add badge count badge
2023-08-02 15:04:24 -07:00
Dennis
f5bd737ee9 add badge count badge 2023-08-02 21:19:35 +03:00
Leijurv
70640246b6 fix infinite memory usage / crash 2023-08-01 14:11:25 -07:00
Leijurv
8c1ccd6c19 reduce dumb behavior 2023-08-01 11:45:53 -07:00
Leijurv
7813a9caba looks better 2023-08-01 11:30:30 -07:00
Brady Hahn
231d3a376b Merge pull request #4084 from babbaj/elytra
more intuitive smooth look/free look settings
2023-08-01 00:19:08 -05:00
Babbaj
3791569519 refactor so that Target.Mode is not a lie
fine

yes honey
2023-08-01 01:12:38 -04:00
Babbaj
7aa3eda3f6 fix nudgeToLevel with smoothLook 2023-07-31 19:13:53 -04:00
Babbaj
0ca173f5dc separate smooth look setting for elytra 2023-07-31 19:13:53 -04:00
Babbaj
c0a1e6540f simplify smoothLook into one setting and separate smoothLook from freeLook 2023-07-31 19:13:52 -04:00
Leijurv
46f38f2ce7 orderly shutdown 2023-07-31 15:06:25 -07:00
Leijurv
64a881f990 elytra warning 2023-07-31 01:36:01 -07:00
Leijurv
541b710ea7 too aggressive 2023-07-31 00:27:50 -07:00
Leijurv
cc8afe95c5 setting for nether fortress 2023-07-31 00:18:43 -07:00
Leijurv
83feddf6be recalc if all points out of view 2023-07-31 00:12:15 -07:00
Leijurv
7662810405 add back unsegmenting 2023-07-31 00:12:01 -07:00
Leijurv
d921d2e367 live a little 2023-07-30 23:33:49 -07:00
Leijurv
9630224e78 whatever 2023-07-30 23:26:46 -07:00
Leijurv
134bfb2a16 fix two cases where it could get stuck indefinitely 2023-07-30 23:24:04 -07:00
Leijurv
36df7b17f8 destroy async 2023-07-30 22:56:33 -07:00
Leijurv
7e9cf2e1e9 ok its based now 2023-07-30 22:47:39 -07:00
leijurv
54511f13d9 Merge pull request #4081 from babbaj/elytra
increase air bubble radius, append destination to path when landing
2023-07-30 22:30:07 -07:00
Babbaj
27e45b816d increase air bubble radius, append destination to path when landing 2023-07-30 19:45:25 -04:00
Brady
3a6e5541fb Don't deploy elytra while PathingBehavior is active 2023-07-30 17:48:53 -05:00
Leijurv
a83d275622 forgot 2023-07-30 15:47:43 -07:00
Leijurv
d6adb52718 tweaks 2023-07-30 15:46:18 -07:00
leijurv
976f3439eb Merge pull request #4077 from babbaj/elytra
safer elytra landing
2023-07-30 14:23:33 -07:00
Babbaj
2e2c0ecc0b use MutableBlockPos 2023-07-29 11:52:37 -04:00
Babbaj
31d1656c48 safer landing 2023-07-29 00:22:52 -04:00
Brady
4b5a094f30 Render fields can be private now 2023-07-28 01:41:03 -05:00
Brady
6b611cf4c7 Move more state into SolverContext 2023-07-28 01:30:54 -05:00
Brady
90f2b39fba Remove glPushAttrib/glPopAttrib usage 2023-07-26 19:52:25 -05:00
leijurv
2164857408 Merge pull request #4070 from babbaj/elytra
fixes for comments in elytra pr
2023-07-26 13:13:03 -07:00
Babbaj
601a781983 improve control flow (fixes behavior.onTick() being called twice) 2023-07-24 08:21:46 -04:00
Babbaj
f14bb282f0 add null check to resetState 2023-07-24 04:41:19 -04:00
Babbaj
1e0dce8f41 127 instead of 128 2023-07-24 03:30:38 -04:00
Babbaj
45400a9685 fix concurrency concerns 2023-07-24 03:30:06 -04:00
leijurv
6ffe31b59e Merge pull request #4068 from babbaj/elytra
add dimension checks to elytra
2023-07-23 17:47:46 -07:00
Babbaj
293b556b56 add dimension checks 2023-07-23 20:46:12 -04:00
leijurv
dbf38efd83 Merge pull request #4067 from babbaj/elytra
elytra command improvements
2023-07-23 12:11:37 -07:00
Babbaj
e63aad7825 elytra command improvements 2023-07-23 15:09:56 -04:00
Leijurv
212ef4d4cc waste fireworks smiling_imp 2023-07-23 11:44:29 -07:00
leijurv
31e082b8dc Merge pull request #4066 from babbaj/elytra
safe landing improvements
2023-07-23 11:29:40 -07:00
Babbaj
75e8035551 safe landing improvements 2023-07-23 14:26:31 -04:00
Leijurv
f7f0521093 not legacy 2023-07-22 23:29:07 -07:00
leijurv
684fda2d1b Merge pull request #4063 from babbaj/elytra
make elytra play nice with CustomGoalProcess
2023-07-22 23:12:07 -07:00
leijurv
886091df50 Merge branch 'elytra' into elytra 2023-07-22 23:08:45 -07:00
Leijurv
9707dd7ce8 redo checkedpositions given y descending iteration order 2023-07-22 23:02:29 -07:00
Babbaj
b81d712a33 higher priority is good enough lol 2023-07-23 01:57:27 -04:00
leijurv
3ffacbf375 Merge pull request #4064 from babbaj/safe-landing
find safe landing spot for elytra
2023-07-22 22:48:00 -07:00
Babbaj
eec85b20be fix bias in comparator 2023-07-23 01:45:39 -04:00
Babbaj
c0ead0147a use priority queue to bias upwards 2023-07-23 01:38:07 -04:00
leijurv
bafd41837e Merge pull request #4062 from ZacSharp/1.19.4-update
Merge 1.18.2 into 1.19.4
2023-07-22 22:15:46 -07:00
Babbaj
9bfa2025d5 memoize isSafeLandingSPot 2023-07-23 01:14:19 -04:00
Babbaj
bf63ffbc1d cringe fence hater 😭 2023-07-23 01:01:59 -04:00
Babbaj
985148b49a check for specific blocks to land on and anything non air is lava 2023-07-23 01:00:23 -04:00
Babbaj
9e78443595 resolve comment 2023-07-23 00:53:26 -04:00
Babbaj
58723a33ca hate cherry pick now 2023-07-23 00:05:11 -04:00
Babbaj
c9aa1658b2 improvements/fixes 2023-07-23 00:03:31 -04:00
Babbaj
7f9e50bbe2 initial safe landing impl 2023-07-23 00:02:46 -04:00
Babbaj
664375a678 make elytra play nice with CustomGoalProcess 2023-07-22 01:55:12 -04:00
Brady
097e30850f Move WalkOffCalculationContext into ElytraProcess 2023-07-18 23:35:09 -05:00
Brady Hahn
a63cbab013 Merge pull request #4060 from babbaj/elytra
refactor elytra into process
2023-07-18 23:23:25 -05:00
ZacSharp
37f1c30ad0 Merge branch '1.19.2' into 1.19.4 2023-07-19 04:32:08 +02:00
ZacSharp
217dca5363 Merge branch '1.18.2' into 1.19.2 2023-07-19 04:13:47 +02:00
ZacSharp
15e97268ed Fake merge branch '1.19.2' into 1.19.4 2023-07-19 04:09:37 +02:00
Brady Hahn
29301e8a39 Merge pull request #4059 from cabaletta/pr/render/vulkanCompatibility
VulkanMod Compatibility
2023-07-18 20:07:38 -05:00
Brady
dfa838a6f9 Replace Mth.fastInvSqrt with 1.0 / Math.sqrt 2023-07-18 19:19:08 -05:00
Brady
218de1cb98 Requested changes 2023-07-18 16:48:00 -05:00
Brady
6a9694b03a Manually specify some normals, fix GoalXZ rendering 2023-07-18 15:24:21 -05:00
Babbaj
0239a2cad4 notificationOnPathComplete and disconnectOnArrival 2023-07-18 15:36:29 -04:00
Babbaj
38553b3324 behavior can't be null in onTick 2023-07-18 14:52:09 -04:00
Babbaj
ba78c48a75 shutdown solverExecutor 2023-07-18 13:36:55 -04:00
Babbaj
f4996137a3 minor code improvements 2023-07-18 13:36:55 -04:00
Babbaj
ccd80dfc8f that isn't necessary 2023-07-18 13:36:55 -04:00
Babbaj
ff1b3e7c5f simplify management of elytra state 2023-07-18 13:36:55 -04:00
Babbaj
2f0497756b simplify icky code 2023-07-18 13:36:54 -04:00
Babbaj
afe9359d3e don't call onTick if we are pawsed 2023-07-18 13:36:54 -04:00
Babbaj
4b5d629df6 fix off by one error (causing the last point to be stuck in terrain) 2023-07-18 13:36:54 -04:00
Babbaj
dbc0a46b10 call elytra event handlers from ElytraProcess 2023-07-18 13:36:54 -04:00
Babbaj
9a6241af8a refactor elytra into being just a process 2023-07-18 13:36:53 -04:00
Brady
1b82bd1f33 pitch smooth look and setting for ticks 2023-07-17 17:58:08 -05:00
Brady
bf9cb76604 VulkanMod compatibility + use LINES instead of DEBUG_LINES 2023-07-17 16:34:01 -05:00
Brady Hahn
90cfd82810 Merge pull request #4056 from babbaj/elytra
consistent elytra setting naming
2023-07-16 20:30:35 -05:00
Brady
108dbdae5d partially appease codacy 2023-07-16 20:29:30 -05:00
Brady
32a4c4644e Move cull code 2023-07-16 20:21:40 -05:00
Leijurv
edc92753cf Revert "shrimple"
This reverts commit 0e567f2f90.
2023-07-16 18:17:53 -07:00
Leijurv
0e567f2f90 shrimple 2023-07-16 18:17:15 -07:00
Babbaj
41e8c69db9 consistent elytra setting naming 2023-07-16 18:58:42 -04:00
Brady Hahn
a83d1901f2 Merge pull request #4055 from babbaj/elytra
cull far away chunks from the cache
2023-07-16 17:00:42 -05:00
Babbaj
f3bb5a0cb2 make sure BlockStateOctreeInterface doesn't use freed chunk pointers 2023-07-16 13:53:02 -04:00
Babbaj
76d3a13f58 cull far away chunks from the cache 2023-07-16 01:19:51 -04:00
Brady Hahn
6f99f891dc Merge pull request #4054 from babbaj/elytra
simple way to land at the goal
2023-07-15 22:24:42 -05:00
Brady Hahn
e579bf980d Update NetherPath.java 2023-07-15 22:23:59 -05:00
Brady Hahn
716b3ae0d2 Update ElytraBehavior.java
i love github web editor
2023-07-15 22:23:35 -05:00
Babbaj
b468b8eb95 landing procedure 2023-07-15 22:17:21 -04:00
leijurv
b647c0fca0 Merge pull request #4050 from ZacSharp/1.18.2-update
Merge 1.16.5 into 1.18.2
2023-07-13 22:14:32 -07:00
Brady
1d109d4b9f crucial performance optimization 2023-07-13 14:47:19 -05:00
Brady
29bf046aa8 BlockStateOctreeInterface 2023-07-13 14:28:51 -05:00
Brady Hahn
4399b7c2fb Merge pull request #4053 from babbaj/elytra
auto swap elytra
2023-07-13 13:37:30 -05:00
Babbaj
d35571923f appease brady 2023-07-13 14:35:33 -04:00
Babbaj
461f56c4d6 countdown instead of count up 2023-07-13 14:21:15 -04:00
Babbaj
0b5d5b8176 use ticksBetweenInventoryMoves 2023-07-12 22:54:04 -04:00
Babbaj
42771686c6 auto swap elytra 2023-07-12 16:42:14 -04:00
ZacSharp
448e454cc8 Merge branch '1.17.1' into 1.18.2 2023-07-12 18:56:17 +02:00
Brady
8f5105c454 trolled pt2 2023-07-11 22:50:35 -05:00
Brady
7c696b7055 trolled 2023-07-11 22:49:51 -05:00
Brady
349c951b55 Better handling of unsupported systems 2023-07-11 22:47:09 -05:00
Leijurv
5dc403e643 crucial performance optimization 2023-07-10 00:12:10 -07:00
Brady Hahn
a8e1b16dee Merge pull request #4048 from babbaj/elytra
don't send the whole chunk for small changes
2023-07-09 22:31:42 -07:00
Babbaj
dc53a95bef don't send the whole chunk for small changes 2023-07-10 00:45:12 -04:00
Brady
eec4edea05 Remove old pack method 2023-07-09 20:00:35 -07:00
Brady Hahn
70249e5fa7 Merge pull request #4047 from babbaj/elytra
optimize uploading chunk data
2023-07-09 19:58:59 -07:00
Babbaj
96a64b454e optimize uploading chunk data 2023-07-09 22:29:31 -04:00
Brady
7a935fb2ea Fix simulation not respecting ignoreLava 2023-07-09 09:12:21 -07:00
Brady
c0cdfb7781 Add commands for pathfinder reset and chunk repack 2023-07-07 19:44:59 -07:00
Brady
487b3a759a mostRecentGoal, fixes immediate goal clear 2023-07-07 18:35:02 -07:00
Brady
fe67489419 Combine VALIDATE_PATH and LOCATE_JUMP states 2023-07-07 14:38:11 -07:00
Brady
308b9bbfea Apply minimum fall height to regular falls too 2023-07-07 13:26:43 -07:00
Brady
bfb4ffcafc Reset context on world load/unload 2023-07-07 11:19:18 -07:00
Brady
537100a5e5 Nether seed setting and automatic context reset 2023-07-07 10:44:56 -07:00
Brady
b6bf4427ef Use soft references for nether chunk packing queue 2023-07-07 00:30:07 -07:00
Brady
8de239f468 Use soft references for chunks queued for packing 2023-07-06 23:15:35 -07:00
Brady
ecfd664f30 Fix isSafeToCancel() return value 2023-07-06 20:11:50 -07:00
Brady
c4ac23837f Set safeToCancel to false while flying 2023-07-06 19:31:37 -07:00
Brady
aeeb001205 Fix some codacy issues 2023-07-06 19:02:13 -07:00
Brady
2552eb8dca Add setting documentation 2023-07-06 18:57:51 -07:00
ZacSharp
cbf0d79c9c Merge branch '1.16.5' into 1.17.1 2023-07-06 13:30:25 +02:00
leijurv
8ceb89d021 Merge pull request #4028 from ZacSharp/1.16.5-update
Merge master into 1.16.5
2023-07-05 11:47:27 -07:00
ZacSharp
8e58dd9e64 Merge branch '1.15.2' into 1.16.5 2023-07-04 16:48:41 +02:00
ZacSharp
45abbb7fa1 Merge branch '1.14.4' into 1.15.2 2023-07-04 16:48:36 +02:00
ZacSharp
1d983d5fdc Merge branch '1.13.2' into 1.14.4 2023-07-04 16:48:31 +02:00
ZacSharp
be54b8ee5b Merge branch 'master' into 1.13.2 2023-07-04 16:47:58 +02:00
Brady
4c0c263d11 trolling 2023-07-03 13:28:53 -05:00
Brady
c8259d3e90 ZOOM 2023-07-03 13:27:23 -05:00
Brady
d892ef54f0 Merge branch 'master' into elytra 2023-07-02 20:04:04 -05:00
Brady
6654476da4 Make blockFreeLook depend on freeLook 2023-07-02 19:59:26 -05:00
Brady
fc209599af Update nether-pathfinder to 0.21 2023-07-02 01:03:34 -05:00
Brady
dee7df1534 I HATE OLD MIXIN!!!!
awesome buggy 0.7.11 hates referencing shadows in mixin superclasses wooooooo
2023-07-01 19:38:38 -05:00
Brady
ccd737d0a1 Actually fix Forge by reverting Mixin change completely 2023-07-01 18:38:13 -05:00
Brady
14b5a0cec3 Fix Forge support 2023-07-01 17:28:23 -05:00
Brady
2f7dc2397e Better start position selection and validation 2023-07-01 01:32:03 -05:00
Brady
3498082f2b Better state switch and start path halfway down fall 2023-06-30 20:53:42 -05:00
Brady
83066fc57c Find jump off spot using INSANE custom CalculationContext 2023-06-30 20:42:03 -05:00
Brady
d32f1b2a16 Add hit pos raytrace method to context 2023-06-30 20:38:45 -05:00
Leijurv
8211ae4af5 memory leaks are joever 2023-06-29 21:59:31 -07:00
Brady
4590ba3ff8 Use separate executor for solver 2023-06-29 23:35:12 -05:00
Brady
b4578931d3 Reduce passing around of ignoreLava 2023-06-29 22:59:15 -05:00
Brady
b8ede0a652 Remove unnecessary IPlayerContext argument 2023-06-29 22:54:55 -05:00
Brady
3eb7610f89 Block lookup optimization 2023-06-29 20:45:59 -05:00
Brady
5a48f4119e Reduce number of raytraces when validating simulation 2023-06-29 19:15:06 -05:00
Brady
974b86aac1 Bump nether-pathfinder to 0.20 2023-06-29 18:50:29 -05:00
Brady
f30cb916bd Remove addressed TODO 2023-06-29 14:53:55 -05:00
Brady
494ebfa10d More accurate isActive return value 2023-06-29 14:53:12 -05:00
Brady
222f53b105 Use Arrays.fill 2023-06-29 14:46:42 -05:00
Brady
12898df2f1 Reduce main thread recalculations after using a firework 2023-06-29 14:46:04 -05:00
Brady
fbb66a0586 Tweaks 2023-06-29 14:14:49 -05:00
Brady
48462da473 Disable interp on relaxation 0 2023-06-28 21:47:37 -05:00
Brady
4b689bd946 Fix Supplier meme 2023-06-28 17:55:47 -05:00
Brady
5126ec9c36 interp double 2023-06-28 17:49:33 -05:00
Brady
d640ebb02d Reliability improvements 2023-06-28 17:47:01 -05:00
Brady
0bb6f1b094 Invalidate pendingSolution 2023-06-28 01:05:22 -05:00
Brady
bb39fea415 Considerations 2023-06-28 01:04:08 -05:00
Brady
7a61ab8137 We need event priorities. 2023-06-28 00:58:51 -05:00
Brady
7861860187 Clarify 2023-06-28 00:48:28 -05:00
Brady
70166f385d That should be in the other tick method 2023-06-28 00:47:20 -05:00
Brady
03ee30bca9 Call elytra tick() from the process 2023-06-28 00:46:14 -05:00
Brady
c48de32860 PitchResult 2023-06-27 16:31:08 -05:00
Brady
3b31387092 Render simulation line from player pos 2023-06-27 13:02:01 -05:00
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
leijurv
24b0bd2edf Merge pull request #4019 from ZacSharp/pr/misc/rotation/fixMouseStuck
Fix getting stuck due to impossible rotations
2023-06-23 21:59:34 -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
Brady Hahn
a90e720956 Merge pull request #4017 from babbaj/elytra
simplify null check
2023-06-22 11:40:08 -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
944405e4df Merge pull request #4014 from jdbool/1.19.2
Add useMessageTag setting
2023-06-21 18:55:06 -07:00
leijurv
0dd38ca65a Merge pull request #4012 from ZacSharp/pr/commands/usableTabCompletion
Fix tab completion with brigadier
2023-06-21 18:54:20 -07: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
leijurv
6dc953631b Merge pull request #4006 from ZacSharp/pr/blockOptionalMeta/tabCompleteProperties
Tab completion improvements
2023-06-21 18:53:06 -07:00
Mike
7ef4307ab7 Clean up useMessageTag 2023-06-21 18:25:24 -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
Mike
a5ca664a6a Add useMessageTag setting 2023-06-21 15:14:54 -07: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
Brady Hahn
9d05043fa0 Merge pull request #4005 from babbaj/elytra
use legacy raytrace with ignore liquid to get out of lava
2023-06-19 18:04:14 -05:00
Babbaj
5f709eef9c use world raytrace 2023-06-19 18:26:00 -04:00
ZacSharp
b111fd2f3e Don't construct malformed ResourceLocations
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
82156250df Update nether-pathfinder to 0.16 2023-06-19 15:20:04 -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
Brady Hahn
579e6d6e4c Merge pull request #4003 from rycbar0/elytra
prevent <player> went off with a bang
2023-06-19 12:12:15 -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
7046927394 Merge pull request #3996 from rfresh2/elytra
firework inv management + pause/resume
2023-06-18 21:41:11 -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
94027d17f2 gaming 2023-06-17 20:12:05 -07: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
a046708867 Merge remote-tracking branch 'origin/elytra-buildScriptOverhaul' into elytra 2023-06-16 22:41:14 -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
071e6164fe Fix nether-pathfinder on Windows 2023-06-16 21:55:08 -05:00
0x22
b72bbfce5e make all json deterministic 2023-06-16 22:36:58 -04:00
0x22
cb7c2d7171 1.12.2 build script overhaul.
- Updated to ForgeGradle 4.0, MixinGradle 0.7 and Gradle 6.9.4
- Added a hack to run the game on arm64 on Mac OS X natively.
2023-06-16 22:04:16 -04: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
leijurv
3662b3fdf1 nope 2023-06-13 21:33:12 -07:00
leijurv
b03d31e990 will github let me do this 2023-06-13 21:32:57 -07:00
leijurv
54f0a3c14c marginally better 2023-06-13 21:32:21 -07:00
leijurv
6a80b0d4ff forgot github markdown is stupid 2023-06-13 21:31:49 -07:00
leijurv
5e724c1e3a making these clickable was a mistake 2023-06-13 21:31:10 -07:00
leijurv
88e604426c 1.20.1 2023-06-13 21:30:31 -07: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
leijurv
15182cb151 Merge pull request #3984 from cabaletta/pr/bugfix/censorCoordinatesRecalc
Fix `censorCoordinates` recalc bug
2023-06-12 14:57:02 -07: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
leijurv
298256197b Merge pull request #3983 from John200410/1.18.2
Add proper level height to GoalXZ rendering (1.18+)
2023-06-12 14:26:05 -07: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
John200410
de80527702 Add proper level height to GoalXZ rendering 2023-06-12 17:16:07 -04: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
leijurv
c48a9d98b4 Merge pull request #3982 from cabaletta/pr/batchRender
Batch Rendering
2023-06-12 12:56:05 -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
Brady
9729e63d98 Create and utilize new Mask type
Added factory method to `MaskSchematic` for creation using a `Mask`
Sort-of mocks the schematic structure, without the block states ofc
2023-06-09 17:25:29 -05:00
Brady
f232bbdb15 Clean up formatting 2023-06-08 16:36:32 -05:00
Brady
26574b4a9b Add optional axis parameter for #sel cyl 2023-06-08 16:32:33 -05:00
Brady
a1b1ef88cf Use a Supplier to mimic a switch expression 2023-06-08 15:46:32 -05:00
Brady
b6c52cd8e1 Cache mask in a boolean[][][] 2023-06-08 11:52:13 -05:00
Brady
34abbfb5da appease codacy 2023-06-07 17:38:26 -05:00
Brady
0d14bde583 Working sphere/cylinder build commands for #sel 2023-06-07 16:31:52 -05:00
leijurv
4b0a8eb166 Merge pull request #3966 from cabaletta/pr/setting-metadata
Setting Field Metadata
2023-06-04 16:59:14 -07:00
Brady
80ec9023ce Replace JAVA_ONLY_SETTINGS array with @JavaOnly annotation 2023-06-04 12:31:34 -05:00
leijurv
5dd10b6e81 Merge pull request #3946 from ZacSharp/pr/farm/addCocoa
Make cocoa farmable
2023-05-23 17:31:06 -07:00
leijurv
415fa048ba Merge pull request #3924 from ZacSharp/pr/blockOptionalMetaProperties
Extend BlockOptionalMeta parsing to parse block properties
2023-05-23 15:57:10 -07:00
leijurv
a1661e94b5 Merge pull request #3923 from ZacSharp/pr/mine/maxYLevelWhileMining
 Add maxYLevelWhileMining setting
2023-05-23 15:56:11 -07:00
ZacSharp
c45a714b77 Fix considering states unplaceable even if buildIgnoreProperties allows it 2023-05-08 03:51:38 +02:00
ZacSharp
271c2ff636 Extend BlockOptionalMeta parsing to parse block properties 2023-04-24 23:49:23 +02:00
ZacSharp
e4cd35ac33 Add maxYLevelWhileMining setting 2023-04-24 23:11:55 +02:00
ZacSharp
e8a4a9fdac Make cocoa farmable 2023-04-24 16:23:38 +02:00
Leijurv
7bb311687b v1.9.3 2023-04-13 14:03:51 -07:00
leijurv
5f2eadbfa6 download links for 1.19.2 2023-04-11 20:36:29 -07:00
Leijurv
6eeeeb3a1b v1.9.4 2023-04-11 19:50:51 -07:00
leijurv
35ab687d5e 1.9.3 download links 2023-04-11 16:00:22 -07:00
leijurv
3ff2bd4f17 Merge pull request #3908 from wagyourtail/patch-3
Update Setup.md
2023-04-11 14:47:59 -07:00
Wagyourtail
f334b3b765 update setup.md 2023-04-10 18:40:48 -07:00
leijurv
e3c6b312ef Merge pull request #3900 from wagyourtail/1.19.2
remove 1.19.3 method in blockOptionalMeta
2023-04-02 17:57:27 -07:00
Wagyourtail
acce20c573 remove 1.19.3 method in blockOptionalMeta 2023-04-02 17:01:57 -07:00
Leijurv
e4d725d9aa Revert "loottables broke & #click not working"
This reverts commit 3e082b21d5.
2023-04-02 15:24:50 -07:00
Leijurv
0cf89e0b2a Revert "fix items and #click"
This reverts commit 4168401aa1.
2023-04-02 15:20:26 -07:00
leijurv
ff1732011e vid is outdated and doesn't get to the point fast enough, so let's move it lower down 2023-03-20 22:07:51 -07:00
leijurv
c5721fb7e3 Merge pull request #3878 from wagyourtail/1.12/fix-wp-c
make wp c not throw npe on invalid tag name
2023-03-14 18:40:41 -07:00
leijurv
3200d976d7 1.19.4 2023-03-14 18:35:15 -07:00
Leijurv
d1a55c43e1 v1.9.2 2023-03-14 18:26:48 -07:00
Leijurv
63e3dfc9b8 1.19.4 2023-03-14 18:20:27 -07:00
leijurv
6db376c02e Merge pull request #3876 from wagyourtail/1.19/1.19.4
1.19.4
2023-03-14 18:19:57 -07:00
Wagyourtail
a1e797ab53 rc3 2023-03-13 15:47:54 -07:00
Wagyourtail
6698505dd8 make wp c not throw npe on invalid tag name 2023-03-13 15:31:18 -07:00
Wagyourtail
fe64f1fd8a 1.19.4-rc1 2023-03-09 10:17:54 -07:00
Leijurv
790a4f6769 command to load settings from a specific file 2023-03-01 00:25:49 -08:00
leijurv
c9d7a5bea6 kami blue to lambda 2023-02-28 23:56:34 -08:00
Leijurv
f1ead19b6e option to only move inventory when stationary 2023-02-28 23:44:33 -08:00
ZacSharp
9efc512253 Make tab completion usable
Now behaves almost identical to vanilla tab completion
2023-02-19 19:27:39 +01:00
Leijurv
174bdd2307 overhaul readme 2023-02-18 16:42:05 -08:00
leijurv
7a5c4f1f03 Merge pull request #3843 from wagyourtail/1.19/fix/1.19.3-fixdistnames
fix dist names to match previous versions
2023-02-18 16:08:45 -08:00
Wagyourtail
787644181a fix dist names to match previous versions 2023-02-18 16:59:39 -07:00
Leijurv
24e047c12e v1.8.4 2023-02-18 15:41:19 -08:00
Leijurv
6e5fec576f v1.7.3 2023-02-18 15:38:40 -08:00
Leijurv
1e7e504650 v1.6.4 2023-02-18 15:37:37 -08:00
Leijurv
814c17522a changed it back to the old way by manually renaming the release files 2023-02-18 15:20:50 -08:00
Leijurv
b622adf300 ugh why was this changed since 1.18 2023-02-18 15:13:15 -08:00
Leijurv
c1b58f8a01 link 1.19 2023-02-18 15:12:17 -08:00
Leijurv
7b60943714 v1.9.1 2023-02-18 15:01:48 -08:00
leijurv
7879b6909a Merge pull request #3837 from ZacSharp/1.19.2-update
Merge 1.18.2 into 1.19.3
2023-02-18 15:00:01 -08:00
ZacSharp
9898e0da26 Merge branch '1.18.2' into 1.19.3 2023-02-12 23:50:54 +01:00
leijurv
5841bd4e36 Merge pull request #3825 from ZacSharp/1.18.2-update
Merge 1.17.1 into 1.18.2
2023-02-12 12:47:28 -08:00
ZacSharp
81e9865067 Merge branch '1.17.1' into 1.18.2 2023-02-04 01:05:31 +01:00
leijurv
f9d563b9e6 Merge pull request #3819 from ZacSharp/1.17.1-update
Merge 1.16.5 into 1.17.1
2023-02-03 14:58:02 -08:00
ZacSharp
3e3312f009 Use CarpetBlock rather than WoolCarpetBlock 2023-01-29 01:27:58 +01:00
ZacSharp
327fbc868e Merge branch '1.16.5' into 1.17.1 2023-01-29 01:25:17 +01:00
leijurv
c1a9621dfa Merge pull request #3768 from wagyourtail/1.12/fasterworldscanner
replace the world scanner with a 500x faster one
2023-01-28 10:18:59 -08:00
Wagyourtail
6de266a106 remove extra method call 2023-01-28 01:39:58 -07:00
Wagyourtail
334d9c119b remove the allocation of an intlist per section 2023-01-28 00:44:54 -07:00
leijurv
1a2c30b4e3 Merge pull request #3803 from Entropy5/master
Litematica x BuildOnlySelection support
2023-01-27 23:34:35 -08:00
leijurv
6d5cfe4187 Merge pull request #3801 from ZacSharp/1.16.5-update
Merge master into 1.16.5
2023-01-27 23:33:57 -08:00
ZacSharp
d3e0da7c5e Merge branch '1.15.2' into 1.16.5 2023-01-27 22:36:53 +01:00
ZacSharp
38fbc127e6 Merge branch '1.14.4' into 1.15.2 2023-01-27 22:34:12 +01:00
ZacSharp
25ef38aaf2 Merge branch '1.13.2' into 1.14.4 2023-01-27 22:30:51 +01:00
ZacSharp
d05d5fd98e Merge branch 'master' into 1.13.2 2023-01-27 22:20:20 +01:00
Entropy5
413cc1469f zac suggestion (number 2), test ongoing 2023-01-27 14:23:08 +01:00
Wagyourtail
7404414e7a less impure 2023-01-20 23:43:00 -07:00
Entropy5
49b1f3528b Merge remote-tracking branch 'origin/master' 2023-01-17 06:33:09 +01:00
Entropy5
26cceede15 litematica support for buildonlyselection, mostly rycbars 2023-01-17 06:33:01 +01:00
leijurv
698d40d797 bump 2023-01-16 20:55:43 -08:00
Leijurv
2b6c59fa8a v1.2.17 2023-01-16 12:22:52 -08:00
leijurv
21bc830143 Merge pull request #3798 from ZacSharp/patch-12
Fix canWalkThrough caching
2023-01-16 12:20:11 -08:00
ZacSharp
432d42ade8 Fix #find results not being clickable 2023-01-15 20:22:58 +01:00
ZacSharp
aa9206381d Fix canWalkThrough caching 2023-01-15 14:53:04 +01:00
Leijurv
d6d9af65fb reformat 2023-01-15 01:04:15 -08:00
Leijurv
a3f70e7977 add fullypassable to precomputeddata 2023-01-15 00:56:30 -08:00
leijurv
0057f093db Merge pull request #3771 from ZacSharp/1.16.5-update
Merge master into 1.16.5
2023-01-13 11:19:14 -08:00
Leijurv
6bbdba7a21 bump 2023-01-13 11:17:57 -08:00
Leijurv
6a175379fb v1.2.16 2023-01-13 11:10:24 -08:00
leijurv
7677ed8240 Merge pull request #3744 from wagyourtail/1.19/1.19.3
1.19/1.19.3
2023-01-13 11:08:57 -08:00
leijurv
85c21fa8e3 add comment 2023-01-12 14:52:38 -08:00
leijurv
bc8c823045 Merge pull request #3775 from ZacSharp/pr/frostwalker
Allow pathing to use frostwalker
2023-01-12 14:51:35 -08:00
ZacSharp
9935da8a6f Add explanation and add extra check 2023-01-12 22:18:54 +01:00
ZacSharp
c39b6c3fe7 Don't grab state if we don't need it 2023-01-12 21:39:55 +01:00
leijurv
c47a6f92c5 Merge pull request #3786 from Entropy5/master
bugfix for odd height schematics
2023-01-12 12:03:51 -08:00
leijurv
778628da30 Merge pull request #3789 from Argentoz/patch-1
Fix world border check
2023-01-12 12:03:00 -08:00
leijurv
ba0ca0cc65 Merge pull request #3788 from ZacSharp/pr/detectBrokenLoadHook
Make the world cache work even when mods break our world load hook
2023-01-12 11:39:41 -08:00
leijurv
fba3828479 Merge pull request #3735 from ZacSharp/pr/breakNextToLava
Allow breaking next to some liquids
2023-01-12 10:08:09 -08:00
Argentoz
c8dd4f26f7 Fix :)
WTF
2023-01-12 15:02:54 +03:00
Entropy5
16a62625b3 this seems to work as well? 2023-01-12 04:29:31 +01:00
ZacSharp
de5f6d5fce Apply suggested reordering 2023-01-11 23:56:52 +01:00
Entropy5
98a87d099b zac suggestion 2023-01-11 04:36:15 +01:00
ZacSharp
a6f3c95684 Don't spam the log when in a replay 2023-01-10 18:58:17 +01:00
ZacSharp
75e39e7ef5 Log when doing things out of the ordinary 2023-01-10 18:56:33 +01:00
ZacSharp
77b2b26a7a Add fix for 1.19.3 here already 2023-01-10 18:55:46 +01:00
ZacSharp
1680eeb80d Handle mods breaking our world loading hook 2023-01-10 17:25:32 +01:00
Entropy5
9a9b4a1874 bugfix for odd height schematics 2023-01-10 05:56:30 +01:00
ZacSharp
0e1fee352f Merge branch '1.15.2' into 1.16.5 2023-01-10 01:40:36 +01:00
ZacSharp
1136494fc6 Merge branch '1.14.4' into 1.15.2 2023-01-10 01:35:22 +01:00
ZacSharp
9b3e5cb444 Merge branch '1.13.2' into 1.14.4 2023-01-10 01:26:48 +01:00
ZacSharp
f13dc16af5 Merge branch 'master' into 1.13.2 2023-01-10 01:18:45 +01:00
leijurv
145a944860 Merge pull request #3785 from Entropy5/master
buildonlyselection optimization
2023-01-08 19:03:49 -10:00
leijurv
dd127ff3e7 Merge pull request #3782 from ZacSharp/pr/updateWorkflows
Update workflows
2023-01-08 18:32:07 -10:00
Entropy5
b0fb474e1d buildinlayers ~ buildonlyselection lag fix for big schematics (skips layers more properly) 2023-01-09 02:33:10 +01:00
ZacSharp
a1a94ec0d1 Fix step name 2023-01-06 04:26:03 +01:00
ZacSharp
678f8bc77f Use Temurin JDK 2023-01-06 04:25:03 +01:00
ZacSharp
41968546d1 Update workflows 2023-01-06 04:09:56 +01:00
ZacSharp
b51b78f4e4 Merge branch 'master' into 1.13.2 2023-01-06 01:47:30 +01:00
ZacSharp
f76283ebfe Remove unused imports 2023-01-03 00:50:56 +01:00
leijurv
7ad1a2dac7 Merge pull request #3774 from wagyourtail/patch-2
fix jitpack.yml so 1.19 builds there again
2023-01-01 23:38:51 -10:00
ZacSharp
e59bf9ab97 Grab block only once 2022-12-30 16:09:45 +01:00
ZacSharp
b2f66241d5 Merge remote-tracking branch 'upstream/master' into pr/frostwalker 2022-12-30 15:57:17 +01:00
William Gray
fd55e455a1 Update jitpack.yml 2022-12-30 00:42:53 +00:00
William Gray
e7e25abc0b Update jitpack.yml 2022-12-30 00:39:29 +00:00
Wagyourtail
b71c9e776a oops didn't mean to commit that 2022-12-28 01:09:46 -07:00
Wagyourtail
746faf6df6 faster section reorder 2022-12-28 01:05:17 -07:00
Wagyourtail
a367031fe2 Revert "sacrifice a bit of speed for better block ordering"
This reverts commit e55db05f20.
2022-12-28 00:03:58 -07:00
Wagyourtail
853dadd906 Merge remote-tracking branch 'origin/master' into 1.12/fasterworldscanner 2022-12-27 23:58:13 -07:00
Wagyourtail
e55db05f20 sacrifice a bit of speed for better block ordering 2022-12-27 23:30:35 -07:00
Wagyourtail
98a748afb3 fix stream limit. immutable's in BOML 2022-12-27 22:42:38 -07:00
William Gray
c04eb066cb Update src/main/java/baritone/cache/FasterWorldScanner.java
Co-authored-by: ZacSharp <68165024+ZacSharp@users.noreply.github.com>
2022-12-28 01:06:10 +00:00
Wagyourtail
6260c6d3d7 apply suggestions 2022-12-24 12:11:26 -07:00
Wagyourtail
ce1fb49252 spiral always pick closest chunk first now 2022-12-24 11:52:48 -07:00
Wagyourtail
ecdec87e7a fix using wrong functions in scan 2022-12-24 11:43:54 -07:00
leijurv
cfdbc851a0 Merge pull request #3600 from Imeguras/master
Added the ability to use KmM as abreviatures
2022-12-24 00:14:04 -08:00
leijurv
6ccebdc978 Merge pull request #3703 from rycbar0/master
formula error
2022-12-24 00:12:47 -08:00
leijurv
4bc9884a95 Merge pull request #3731 from EvilCodeZ/1.19.1
Removed System.out.println.
2022-12-24 00:08:46 -08:00
leijurv
df53040339 Merge pull request #3757 from Warpten/feature/paths-with-spaces-are-stupid
Improve handling spaces in paths during proguard pass
2022-12-24 00:08:04 -08:00
leijurv
42dc5b14b0 Merge pull request #3755 from wagyourtail/allowbreakanaywaymine
allowBreakAnyway should let mining happen
2022-12-24 00:07:00 -08:00
leijurv
e2538abcb1 Merge pull request #3743 from ZacSharp/patch-11
Fix Registry.unregister
2022-12-24 00:05:42 -08:00
leijurv
1697293f12 Merge pull request #3479 from scorbett123/caching_performance_upgrade
Caching performance upgrade
2022-12-23 23:57:14 -08:00
Wagyourtail
96f432d2d5 add comment 2022-12-23 17:26:46 -07:00
Wagyourtail
0ae59755e3 make limit not happen if it shouldn't 2022-12-23 17:25:23 -07:00
Wagyourtail
12b596e536 fix spiral 2022-12-23 17:10:37 -07:00
Wagyourtail
0b6088cd2d fix getting the block from the pallete, and change the chunk scan order to spiral out 2022-12-23 16:58:10 -07:00
Wagyourtail
1736f2ffc7 replace the world scanner with a 500x faster one 2022-12-23 16:34:49 -07:00
Wagyourtail
0e35a3e62b fix #3756 by allowing to recompute worldData if null 2022-12-19 07:42:23 -07:00
rycbar0
d60e1e8a05 Merge branch 'cabaletta:master' into master 2022-12-19 10:34:57 +01:00
Wagyourtail
1112feff5b cache 2022-12-12 13:24:43 -07:00
Wagyourtail
967dc6cbd6 bump unimined version 2022-12-12 13:23:36 -07:00
Wagyourtail
2ce60fbb79 fix tweaker build, don't include schematica api 2022-12-12 13:12:14 -07:00
Wagyourtail
35b7c48430 some people are getting a null worldData bug. add a debug line to see if its here 2022-12-12 12:54:06 -07:00
Warpten
d157756d94 Improve handling spaces in paths during proguard pass 2022-12-12 01:08:49 +01:00
Wagyourtail
ea1914a248 missed a spot 2022-12-10 20:12:51 -07:00
Wagyourtail
85087ce04a smarter filter filtering 2022-12-10 19:25:57 -07:00
Wagyourtail
e09127eadf allowBreakAnyway should let mining happen 2022-12-10 16:35:51 -07:00
Wagyourtail
db842445f6 forge support 2022-12-08 12:31:12 -07:00
Wagyourtail
3a8d438d7c update to release 2022-12-07 22:58:20 -07:00
Wagyourtail
386caf5d1e add parchment back 2022-12-06 18:30:43 -07:00
Wagyourtail
f7f0c84407 fix proguard not seeing unsafe 2 2022-12-02 14:39:57 -07:00
Wagyourtail
75cd4600a0 fix proguard not seeing unsafe 2022-12-02 14:31:00 -07:00
Wagyourtail
e6642a2122 fix ci 2022-12-02 14:24:29 -07:00
Wagyourtail
e7252f5b3f remove the mixin from api 2022-12-02 14:23:16 -07:00
Wagyourtail
4168401aa1 fix items and #click 2022-12-02 14:09:47 -07:00
Wagyourtail
3e082b21d5 loottables broke & #click not working 2022-12-02 01:17:25 -07:00
Wagyourtail
85790c0b2f switch to unimined 2022-12-01 23:04:40 -07:00
ZacSharp
e1095962a1 Fix Registry.unregister 2022-11-28 23:07:30 +01:00
ZacSharp
eabd1150b0 Allow breaking next to some liquids 2022-11-22 15:15:33 +01:00
EvilCodeZ
c20d40f8dd Removed System.out.println. 2022-11-18 19:39:39 +01:00
Leijurv
4fa43ce201 Merge pull request #3707 from ZacSharp/1.19.2-update
Merge 1.18.2 into 1.19.1
2022-11-07 01:39:51 -08:00
ZacSharp
f51f835b11 Merge branch '1.18.2' into 1.19.1 2022-11-01 00:11:26 +01:00
Leijurv
93501248cd Merge pull request #3698 from ZacSharp/patch-10
Reliably clear keys when paused
2022-10-31 12:29:56 -07:00
Leijurv
3a945c8c10 Merge pull request #3697 from ZacSharp/pr/buildIgnoreProperties
 Add buildIgnoreProperties setting
2022-10-31 12:28:44 -07:00
Leijurv
54f6851dd9 Merge pull request #3688 from ZacSharp/1.18.2-update
Merge 1.17.1 into 1.18.2
2022-10-31 12:25:18 -07:00
rycbar0
3cef7a7911 formula error 2022-10-26 23:09:23 +02:00
ZacSharp
1cd2fb5b18 Reliably clear keys when paused 2022-10-24 22:49:12 +02:00
ZacSharp
ba3ca47f8c Add buildIgnoreProperties setting 2022-10-23 01:42:31 +02:00
ZacSharp
98763271a4 Update litematic version check 2022-10-13 23:36:38 +02:00
ZacSharp
063842edc4 Merge branch '1.17.1' into 1.18.2 2022-10-12 18:17:34 +02:00
Leijurv
2453a4a4f1 Merge pull request #3458 from ZacSharp/1.17.1-update
Merge 1.16.5 into 1.17.1
2022-10-11 14:12:58 -07:00
ZacSharp
5a8adc5344 Merge branch '1.16.5' into 1.17.1 2022-10-06 20:43:01 +02:00
Leijurv
8b94ac8fca Merge pull request #3640 from scorbett123/fixWaterJump
Fix for infinite loop in water
2022-10-04 13:04:04 -07:00
Leijurv
c1e12b8746 Merge pull request #3678 from rycbar0/1.16.5
Merging Master in 1.16.5
2022-10-04 13:02:41 -07:00
rycbar0
44c1438541 forgot to adjust version check 2022-10-04 19:38:16 +02:00
rycbar0
c2a857f4d6 merging main into 1.16.5 2022-10-04 03:41:38 +02:00
rycbar0
9d620f8137 merging main into 1.16.5 2022-10-04 03:35:49 +02:00
rycbar0
7c2327b743 Merge remote-tracking branch 'origin/master' into 1.16.5
# Conflicts:
#	scripts/proguard.pro
#	src/launch/resources/mixins.baritone.json
#	src/main/java/baritone/command/defaults/DefaultCommands.java
#	src/main/java/baritone/command/defaults/FindCommand.java
#	src/main/java/baritone/process/BuilderProcess.java
#	src/main/java/baritone/utils/schematic/format/DefaultSchematicFormats.java
#	src/main/java/baritone/utils/schematic/format/defaults/LitematicaSchematic.java
#	src/main/java/baritone/utils/schematic/litematica/LitematicaHelper.java
#	src/schematica_api/java/fi/dy/masa/litematica/Litematica.java
#	src/schematica_api/java/fi/dy/masa/litematica/data/DataManager.java
#	src/schematica_api/java/fi/dy/masa/litematica/schematic/placement/SchematicPlacement.java
#	src/schematica_api/java/fi/dy/masa/litematica/schematic/placement/SchematicPlacementManager.java
#	src/schematica_api/java/fi/dy/masa/litematica/schematic/placement/SchematicPlacementUnloaded.java
2022-10-04 03:18:30 +02:00
rycbar0
d91abd5e45 Litematica support for 1.16.5 2022-10-04 02:09:07 +02:00
scorbett123
4699b46744 Merge branch 'master' into caching_performance_upgrade 2022-10-03 21:25:23 +01:00
scorbett123
8f514bd782 Cleaner fix for water jump issue 2022-10-03 21:22:07 +01:00
Leijurv
69ffdb7665 Merge pull request #3672 from rycbar0/master
Litematica Support for bariton
2022-10-03 12:52:18 -07:00
rycbar0
f9c5386e7a final changes 2022-10-03 21:39:53 +02:00
Leijurv
ec2941bede Merge pull request #3597 from wagyourtail/1.19/1.19.2
1.19.2
2022-10-03 12:29:07 -07:00
Leijurv
55273b5340 Merge pull request #3579 from lucasarden/master
Stop backfill from filling while paused
2022-10-03 12:23:02 -07:00
Leijurv
5b37b68363 Merge pull request #3592 from wagyourtail/1.19/1.19
fix click menus for baritone control
2022-10-03 12:22:10 -07:00
Leijurv
04f5ca2647 Merge pull request #3642 from wagyourtail/1.16.5/removeschematica
remove schematica command because it doesn't work anyway on 1.13+
2022-10-03 12:21:38 -07:00
rycbar0
5cd1c9d15d Merge pull request #1 from rycbar0/LitematicaCommand
Adding a Litematica command to build loaded schematics.
2022-10-03 20:39:24 +02:00
rycbar0
b461b2af2f made a oopsie 2022-10-03 20:32:56 +02:00
rycbar0
3a5608566e auto formatting 2022-10-03 20:13:11 +02:00
rycbar0
fc65f22feb clean up and adding javadoc 2022-10-03 19:59:07 +02:00
rycbar0
f53bfa89a9 a fucking x and z mixup 2022-10-03 17:44:15 +02:00
rycbar0
fdfeeb2ffa need stronger pesticides, bugs keep multiplying 2022-10-03 02:35:25 +02:00
rycbar0
3e75cc7408 block mirroring and rotation 2022-10-01 22:59:47 +02:00
rycbar0
d1930e03e1 getCorrectedOrigin returns the correct origin 2022-10-01 22:51:36 +02:00
rycbar0
144a534bb3 debugging mirroring and rotating as well as refactoring 2022-10-01 17:14:05 +02:00
rycbar0
de1256cc80 remove spaghetti 2022-10-01 05:27:02 +02:00
rycbar0
76404c8af6 it works but its spaghetti 2022-10-01 02:01:46 +02:00
ZacSharp
fb814e912d Don't try parkouring out of water 2022-09-30 23:59:49 +02:00
ZacSharp
43ee86b4fe Don't try backplacing against water under carpet/lilypad 2022-09-30 22:41:09 +02:00
ZacSharp
eb697b7a17 Fix costs when assumeWalkOnWater stops us from relying on frostWalker 2022-09-30 22:40:23 +02:00
ZacSharp
3da5bbd267 Don't pillar from carpet/lilypad on water 2022-09-30 22:38:21 +02:00
ZacSharp
c14be17e53 Move this to a helper method and add missing cases 2022-09-30 22:27:32 +02:00
ZacSharp
45c0b38156 Fix jumping from packplaced blocks on water
Not having frostwalker means that we must have replaced the water with a throwaway, not that we are standing on water
2022-09-30 18:04:34 +02:00
rycbar0
025f6235f9 litematica command works and added schematic selection if more than 1 schematic is loaded
bug: if schematic origin isnt minimum corner schematic is built in the wrong place
2022-09-30 17:53:31 +02:00
rycbar0
4ba3c883e6 something is fishy with the getAllSchematicPlacements() methode but i want my progress saved 2022-09-30 13:32:31 +02:00
rycbar0
3a4168a661 Merge branch 'master' into LitematicaCommand 2022-09-30 00:42:17 +02:00
rycbar0
484b3326c7 auto-format all files I touched 2022-09-29 21:52:15 +02:00
rycbar0
e99fcbbe36 Change requests part two 2022-09-29 21:47:42 +02:00
rycbar0
7ba3de57d0 credits LitematicaBitArray 2022-09-29 20:20:38 +02:00
rycbar0
5ff274f040 Change requests part one 2022-09-29 19:58:05 +02:00
schmar03
293f5db172 LitematicaCommand added to build loaded schematics 2022-09-28 14:15:48 +02:00
schmar03
d928e705b9 LitematicaCommand added to build loaded schematics 2022-09-28 12:09:38 +02:00
rycbar0
7a48824ced codacy issue #2,#3 and #4 fix 2022-09-26 22:32:25 +02:00
rycbar0
8aa8918124 codacy issue #1 and #5 fix 2022-09-26 22:23:38 +02:00
rycbar0
a091c17b83 Added mixin to properly handle Long Arrays 2022-09-26 21:04:09 +02:00
rycbar0
52aa0d9b8a more cleanup 2022-09-26 20:04:57 +02:00
rycbar0
3d8eddc4e1 cleanup 2022-09-26 19:23:09 +02:00
rycbar0
295265c261 refactoring 2022-09-26 17:43:54 +02:00
rycbar0
376d6422ec refactoring 2022-09-26 16:18:43 +02:00
rycbar0
113e340474 version check added 2022-09-26 16:09:41 +02:00
rycbar0
c89d8b69e5 ref files removed 2022-09-26 16:08:37 +02:00
rycbar0
70303634f5 ref files added 2022-09-26 15:59:55 +02:00
rycbar0
325aa7201b bug fix 2022-09-26 02:51:06 +02:00
rycbar0
75a3fc699e Code clean up 2022-09-26 01:18:56 +02:00
rycbar0
3cd8ce8323 Multiple Sub-region support 2022-09-26 00:58:32 +02:00
rycbar0
240e81a9e0 Refactoring 2022-09-25 18:22:59 +02:00
rycbar0
40449400d3 State of Emerson 2022-09-25 16:55:08 +02:00
Leijurv
bf43fd1274 Merge pull request #3601 from scorbett123/patch-6
Update legitMineYLevel for 1.18 +
2022-09-24 14:59:57 -10:00
Leijurv
cd7c504c76 Merge pull request #3664 from ZacSharp/patch-9
Fix yet another cave air bug
2022-09-18 22:54:42 -10:00
ZacSharp
96ba589d4d Fix yet another cave air bug 2022-09-17 01:56:23 +02:00
ZacSharp
9ffe4f2c25 Fix parkour with frostwalker with/without throwaways
* Placing throwaways with allowPlace disabled
* Failing without throwaways
2022-09-01 13:14:33 +02:00
ZacSharp
af95f77134 Fix OOB and check for direction and include parkour 2022-09-01 13:14:24 +02:00
wagyourtail
8803c618b1 remove schematica command because it doesn't work anyway on 1.13+ since sechematica doesn't exist past 1.12.2 2022-08-31 18:20:51 -07:00
ZacSharp
78f1c45e13 Don't overshoot descends before using frostwalker 2022-08-31 23:39:09 +02:00
scorbett123
287addb9fd Fix for infinite loop in water 2022-08-30 18:46:58 +01:00
ZacSharp
cf47573298 Merge remote-tracking branch 'upstream/master' into pr/frostwalker 2022-08-30 00:18:07 +02:00
ZacSharp
96ba96ca69 Fix some more edge cases 2022-08-29 18:47:54 +02:00
ZacSharp
da998eb469 Complete frostwalker usage 2022-08-29 16:59:01 +02:00
ZacSharp
e75a4b95cc Mostly working usage of frostwalker
* Sometimes overshoots Descend-Traverse chains onto water
* Unwanted interactions with assumeWalkOnWater
2022-08-29 12:53:02 +02:00
scorbett123
d1a0f1e3ca Update legitMineYLevel for 1.18 +
Update the legit mine default setting to work at the correct diamond level in 1.18+.
2022-08-08 15:20:41 +02:00
Imeguras
344085f4ef Added the ability to use KmM as abreviatures
for example 1m is equals to 1 million  while 1K is 1000
2022-08-08 12:00:48 +01:00
Wagyourtail
52d077de49 1.19.2 2022-08-07 14:47:18 -06:00
Wagyourtail
b1f35e93dc fix click menus for baritone control, closes #3587 2022-08-03 20:17:10 -06:00
Leijurv
076326dcc3 Merge pull request #3478 from wagyourtail/1.19/1.19
1.19/1.19
2022-08-01 12:48:03 -07:00
wagyourtail
b1b8288d05 Merge branch '1.19.1' into 1.19/1.19 2022-07-28 13:07:03 -06:00
Wagyourtail
df62427fee forge 2022-07-28 12:37:30 -06:00
Wagyourtail
61b9762a22 1.19.1 2022-07-27 19:59:44 -06:00
Lucas Arden
d37a6a0b2d Added check for placed blocks in backfill 2022-07-26 14:21:32 -07:00
Lucas Arden
d7fc916d20 Added check for pathing 2022-07-24 21:37:45 -07:00
Wagyourtail
06be5f5372 1.19.1-rc2 2022-07-21 12:16:21 -06:00
Leijurv
80a4757242 baritone complies faster if the files are less bytes 2022-07-15 01:36:01 -07:00
Leijurv
658048ff2d fix snow and tweak others 2022-07-14 22:11:13 -07:00
Leijurv
0587223da8 better constants 2022-07-14 22:02:19 -07:00
Leijurv
2d1b81dc20 vastly increase cuteness by removing the optional boolean 2022-07-14 22:00:18 -07:00
Leijurv
0bd16fb81a bit literals are meh 2022-07-14 21:56:25 -07:00
Leijurv
0c1fec5d1e crucial performance optimization 2022-07-14 21:54:32 -07:00
Leijurv
ee16eb7fde funnier this way 2022-07-14 21:47:18 -07:00
Leijurv
5c9aeab6b4 add cmt 2022-07-14 21:44:42 -07:00
Leijurv
5c7cae9ab0 fix literally wrong comment that did not match subsequent code 2022-07-14 21:43:14 -07:00
Leijurv
93fa6cf875 introduce MAYBE and fix more allocation cases 2022-07-14 21:42:38 -07:00
Leijurv
5b7bee977b also don't construct an optional for slabs 2022-07-14 21:38:38 -07:00
Leijurv
8018dac396 fix default case that instantiated an optional for non stairs 2022-07-14 21:38:02 -07:00
Leijurv
85ab317c6c simplify, remove setting changed event, always construct new precomputeddata 2022-07-14 21:35:30 -07:00
scorbett123
6b0fb1721b These should be all the suggested changes for the caching of can walk through block states 2022-07-14 17:18:02 +01:00
scorbett123
fdcdcbb85f Switch to using an int[] for storing precomputed data, and also use lazy loading 2022-07-14 12:49:47 +01:00
Leijurv
4e2095d251 almost forgot 2022-07-09 22:15:20 -07:00
Leijurv
51275b3a65 make #paws be an alias for #pause 2022-07-09 22:06:39 -07:00
scorbett123
8d480cefb9 Switch to throwable and readd check for glass / stained glass 2022-07-06 14:45:54 +01:00
scorbett123
3e7f9039c4 Don't construct new optionals in movement helper 2022-07-06 14:38:33 +01:00
Leijurv
49828baae3 Merge pull request #3296 from ZacSharp/findImprovements
Find improvements
2022-07-05 15:32:02 -07:00
Leijurv
348b02e4f8 Merge pull request #3368 from ZacSharp/patch-5
Remove false information from `#help mine`
2022-07-05 15:28:05 -07:00
Leijurv
a73e1185dc Merge pull request #3533 from Echocage/SprintFix
Fix for a sprint bug that can cause death
2022-07-05 15:27:10 -07:00
Echocage
441dceb731 Narrowed scope and we now only call canSprintFromDescendInto when our next & next_next movements are both MovementDescends 2022-06-29 17:54:28 -05:00
Echocage
57c4f9e103 Undid previous change, updated to instead check the next and the next_next block 2022-06-27 18:38:54 -05:00
Echocage
2741fc2683 Swapped the order of checks within canSprintFromDescendInto 2022-06-27 15:06:27 -05:00
Wagyourtail
fcd20b10f1 WORKING TWEAKER!!! 2022-06-11 11:54:30 +00:00
Leijurv
82f184c848 Merge pull request #3488 from ZacSharp/1.18.2-update
Merge 1.17.1 into 1.18.2
2022-06-08 19:03:00 -07:00
Wagyourtail
fd43dace70 rework this again and fix dist 2022-06-08 10:16:09 -06:00
Wagyourtail
a475f522ef artifact_standard needs project artifact name 2022-06-08 10:01:55 -06:00
Wagyourtail
e6cc9b1131 oops 2022-06-08 09:35:49 -06:00
Wagyourtail
347027a8e0 handle this differently (grab archive name from root project) 2022-06-08 09:26:47 -06:00
scorbett123
868c023dbd Fix a couple of things I missed 2022-06-08 14:20:25 +01:00
scorbett123
e7c357ab7f Make precomputed data refresh every 200 ticks (10 seconds) 2022-06-08 14:14:14 +01:00
Wagyourtail
f204fbb08e froge support 2022-06-08 02:28:22 -06:00
scorbett123
9e1a5008ed Move caching functions into MovementHelper 2022-06-07 21:52:24 +01:00
Wagyourtail
606f9c55a8 1.19! 2022-06-07 12:07:12 -06:00
Wagyourtail
f2a11df616 prepare for release day 2022-06-07 05:13:56 -06:00
Wagyourtail
5773da36bd Merge remote-tracking branch 'zacsharp/1.17.1-update' into 1.19/1.19 2022-06-07 05:11:47 -06:00
Wagyourtail
86303ed495 Merge branch '1.12/beta-versioning' into 1.19/1.19 2022-06-07 04:52:05 -06:00
Wagyourtail
2b4da2a46c deep checkout so we actually get tag names in CI 2022-06-03 14:46:39 -06:00
Wagyourtail
f699be7973 so umm, it's not using right version number in CI... 2022-06-03 14:42:23 -06:00
Wagyourtail
ed381d6b33 fix CI not having access to git when run via gradle 2022-06-03 14:29:51 -06:00
Wagyourtail
1caa99fee3 oops 2022-06-03 14:26:27 -06:00
ZacSharp
4a042510d8 Merge branch '1.17.1' into 1.18.2 2022-06-03 22:26:24 +02:00
Wagyourtail
ffbe683e86 versioning with normal build 2022-06-03 14:24:17 -06:00
Wagyourtail
4dba5a4399 use git describe instead 2022-06-03 14:09:37 -06:00
Wagyourtail
8cfdcbdc9e rc.2 2022-06-03 13:47:09 -06:00
ZacSharp
59b3fe7c3a Merge branch '1.16.5' into 1.17.1 2022-06-03 19:05:47 +02:00
Wagyourtail
6e37221b3c rc.1 2022-06-02 13:37:51 -06:00
Leijurv
b54ddeadf4 Merge pull request #3387 from ZacSharp/1.16.5-update
Merge master into 1.16.5
2022-06-02 11:39:20 -07:00
Wagyourtail
caa88c5b60 DONT on tags 2022-06-01 16:28:53 -06:00
Wagyourtail
1b3139c99a oops 2022-06-01 16:21:21 -06:00
Wagyourtail
3d95f0ad65 auto-increment version number as well 2022-06-01 16:16:41 -06:00
Wagyourtail
0df45a89be don't do the other stuff 2022-06-01 15:51:25 -06:00
Wagyourtail
b0266cd14b do beta versioning on gh action builds 2022-06-01 15:49:41 -06:00
Wagyourtail
9bf40dd60b pre.5 2022-06-01 15:17:45 -06:00
scorbett123
a6557121a0 fix github actions compiling. 2022-05-31 15:08:52 +01:00
scorbett123
2dad6262cf Remove some benchmarking and fix loading of settings. 2022-05-31 14:56:23 +01:00
scorbett123
af1eb58bb8 Implement Leijurv's precomputed data idea 2022-05-31 14:43:58 +01:00
Wagyourtail
56b44496bf verify fabric/tweaker builds are valid 2022-05-31 03:03:43 -06:00
Wagyourtail
3df451677c use loom 11 to allow building 2022-05-31 02:42:17 -06:00
Wagyourtail
9e021d2875 1.19 2022-05-31 02:38:55 -06:00
Wagyourtail
db9ee98762 Merge remote-tracking branch 'wagyourtail/1.18.2/cached-chunk-oopsie' into rework-buildscript-117 2022-05-31 01:58:12 -06:00
ZacSharp
4e0a507ba0 Merge branch '1.15.2' into 1.16.5 2022-05-24 21:45:58 +02:00
ZacSharp
7d39aacd72 Merge branch '1.14.4' into 1.15.2 2022-05-24 21:42:46 +02:00
ZacSharp
a8ae8a6171 Merge branch '1.13.2' into 1.14.4 2022-05-24 21:39:14 +02:00
ZacSharp
9c99333759 Merge branch 'master' into 1.13.2 2022-05-24 21:35:43 +02:00
Leijurv
17a2aa42e9 Merge pull request #3463 from ZacSharp/patch-8
Deal with others replacing the chat gui
2022-05-23 13:47:22 -07:00
Leijurv
231f671400 Merge pull request #3433 from ZacSharp/patch-7
Fix "missing null"
2022-05-23 13:46:27 -07:00
Leijurv
ec6ffb0f53 Merge pull request #3413 from wagyourtail/1.16.5/backport3308
backport #3308 to 1.16.5
2022-05-23 13:45:27 -07:00
ZacSharp
221eba11dd Deal with others replacing the chat gui 2022-05-20 01:31:09 +02:00
ZacSharp
ad40a9225e Fix leaking incorrect positions
It was only cleared when the previous one was canceled, not when it was directly replaced by the next one.
2022-05-03 23:25:01 +02:00
ZacSharp
1544b09c82 Merge branch '1.15.2' into 1.16.5 2022-04-23 13:12:08 +02:00
ZacSharp
1d08b3e729 Merge branch '1.14.4' into 1.15.2 2022-04-23 13:07:22 +02:00
ZacSharp
8a150568ec Merge branch '1.13.2' into 1.14.4 2022-04-23 13:02:47 +02:00
ZacSharp
00b20b2158 Merge branch 'master' into 1.13.2 2022-04-23 13:00:16 +02:00
wagyourtail
25e8e1b5fe fix 2022-04-22 19:23:39 -07:00
wagyourtail
bf7c840ea3 backport 3308 2022-04-22 19:00:43 -07:00
Leijurv
78a5838aa1 Merge pull request #3392 from ZacSharp/fixMerge
Fix mistakes made while merging upwards
2022-04-19 16:34:55 -07:00
Leijurv
cbef05838d Merge pull request #3388 from scorbett123/make_eta_show_ticks
Improve output to user in eta command
2022-04-19 16:33:37 -07:00
Wagyourtail
d0d74b1591 freeze version numbers at known working 2022-04-16 04:02:45 -07:00
Wagyourtail
056107a356 fix checksums, this'll probably confuse someone.
I couldn't figure out how to fix it the other way...
2022-04-16 03:46:41 -07:00
Wagyourtail
93a16f356d cleanup. move tweaker classes 2022-04-16 03:22:53 -07:00
Wagyourtail
070083dc9b properly remap refmap for tweaker 2022-04-16 02:57:29 -07:00
ZacSharp
4dcf260059 Fix mistakes made while merging upwards 2022-04-14 19:22:38 +02:00
scorbett123
2cf973809a eta command should default to NaN not just not showing the eta as suggested by ZacSharp 2022-04-12 12:15:42 +01:00
scorbett123
65974e15ba Improve output to user in eta command 2022-04-11 18:36:48 +01:00
ZacSharp
e885d2c221 Merge branch '1.15.2' into 1.16.5 2022-04-11 18:26:03 +02:00
ZacSharp
fe61a404d6 Merge branch '1.14.4' into 1.15.2 2022-04-11 18:03:10 +02:00
ZacSharp
97ac4bbd4f Merge branch '1.13.2' into 1.14.4 2022-04-11 18:00:00 +02:00
ZacSharp
dd29b72295 Merge branch 'master' into 1.13.2 2022-04-11 17:49:10 +02:00
Leijurv
23fa65cee0 Merge pull request #3372 from ZacSharp/patch-6
Fix dynamic mixin dependency to 0.8.3
2022-04-05 14:39:36 -07:00
Wagyourtail
af646bd313 yeet change I forgot to yeet 2 commits ago 2022-04-04 20:45:17 -07:00
Wagyourtail
c3c88c50d1 jitpack.yml 2022-04-04 20:11:15 -07:00
Wagyourtail
16f93ce769 explicitly include mixin "properly", mavenpublish should work now 2022-04-04 20:10:25 -07:00
Wagyourtail
3cee66229a proper mappings per proguard run 2022-04-04 19:15:21 -07:00
Wagyourtail
88c00f2fec java 17 is lts, so use java 17 2022-04-04 18:53:29 -07:00
Wagyourtail
394b4fd5b8 proguard builds now 2022-04-04 18:38:23 -07:00
Wagyourtail
48b34bfbb8 some jank to sourcesets to get dev launching 2022-04-04 18:11:03 -07:00
wagyourtail
4b2d1fe6b0 fix an oopsie in chunk caches with dynamic world height 2022-04-04 14:18:25 -07:00
Wagyourtail
01c75db38a rework buildscript (part 1) 2022-04-02 21:36:18 -07:00
ZacSharp
adc88d1fb9 Fix dynamic mixin dependency to 0.8.3
Newer Mixin versions use a class file format Proguard can't handle.
2022-04-02 23:44:29 +02:00
ZacSharp
2908c7499c Fix syntax
That's why you shouldn't make changes on Github
2022-04-01 00:33:27 +02:00
ZacSharp
ef4c2bbc98 Remove false information from #help mine
Baritone no longer caches ores on Minecraft 1.13+
Metadata values were removed in Minecraft 1.13
lit_redstone_ore was merged into redstone_ore in Minecraft 1.13
2022-03-31 23:53:58 +02:00
Leijurv
dc6b32a154 Merge pull request #3356 from wagyourtail/forceAllowBreak
add `allowBreakAnyway` setting
2022-03-31 14:08:13 -07:00
Leijurv
76f593e4bb Merge pull request #3342 from PhlegethonAcheron/master
Added usage syntax to the documentation for buildValidSubstitutes and buildSubstitutes
2022-03-31 14:07:42 -07:00
Leijurv
15b991a48e Merge pull request #3309 from wagyourtail/patch-2
fix inner class attribute being stripped
2022-03-31 14:01:45 -07:00
Leijurv
f3c93855bb Merge pull request #3363 from stackmagic/build-fix-1.17
Build fix 1.17
2022-03-31 14:01:26 -07:00
Leijurv
f033230548 Merge pull request #3360 from ZacSharp/1.16.5-update
Merge master into 1.16.5
2022-03-31 13:59:48 -07:00
Leijurv
702d0790bc Merge pull request #3327 from scorbett123/fix-chunk-saving-crash
If context.player() returns none we don't want to use its position for pruning.
2022-03-31 13:58:11 -07:00
Patrick Huber
599aa42cd8 Build: set rootProject.name again (already present up until 1.16 and went missing afterwards) 2022-03-26 18:59:13 +01:00
Patrick Huber
95afaf3eac Build: print more details on error 2022-03-26 18:49:06 +01:00
Wagyourtail
2953e2c522 make codacy happy 2022-03-24 18:16:19 -07:00
Wagyourtail
bf450b7d68 rename to allowBreakAnyway 2022-03-24 17:34:31 -07:00
Wagyourtail
4e6b6d97ce add forceAllowBreak setting 2022-03-24 17:33:33 -07:00
ZacSharp
17b2245033 Merge branch '1.15.2' into 1.16.5 2022-03-24 18:27:50 +01:00
ZacSharp
7b7c49d7ad Merge branch '1.14.4' into 1.15.2 2022-03-22 22:16:06 +01:00
ZacSharp
1522d11df0 Merge branch '1.13.2' into 1.14.4 2022-03-21 23:15:22 +01:00
ZacSharp
7eecf69178 Merge branch 'master' into 1.13.2 2022-03-21 17:57:39 +01:00
PhlegethonAcheron
6aadd00e72 Added usage syntax to the documentation for buildValidSubstitutes and buildSubstitutes 2022-03-20 15:41:25 -04:00
scorbett123
e036f5360c If context.player() returns none we don't want to use its position for pruning. 2022-03-16 20:12:56 +00:00
Leijurv
384dfb5f46 Merge pull request #3325 from wagyourtail/1.17.1
move death event to work with `doImmediateRespawn` gamerule
2022-03-15 19:07:11 -07:00
Leijurv
8c2aae2ddc Merge pull request #3324 from wagyourtail/master
reimplement death and bed waypoints
2022-03-15 19:06:50 -07:00
Wagyourtail
89bd2a4a07 move death event to work with doImmediateRespawn gamerule 2022-03-15 18:44:39 -07:00
Wagyourtail
511941c714 reimplement death and bed waypoints 2022-03-15 18:39:19 -07:00
wagyourtail
e58220e2c4 fix inner class attribute being stripped 2022-03-08 19:45:05 -07:00
Leijurv
477e3a706b Merge pull request #3308 from wagyourtail/1.17.1
fix `<parameter1> is null`
2022-03-08 17:01:51 -08:00
Wagyourtail
9ba8949a2e fix <parameter1> is null (and sneak in some other changes) 2022-03-08 17:28:56 -07:00
Wagyourtail
9b7d3af03d remove duplicate 2022-03-08 17:28:56 -07:00
Leijurv
02711a73ed fix codacy 2022-03-08 15:14:00 -08:00
Leijurv
25d418e96b 1.15 is deprecated 2022-03-08 15:04:34 -08:00
Leijurv
10430f8142 bump to 1.18.2 2022-03-08 15:01:48 -08:00
Leijurv
8aba97b577 update for 1.8.3 2022-03-08 15:00:14 -08:00
Leijurv
8a0771e5f4 v1.8.3 2022-03-08 14:50:04 -08:00
Leijurv
9c6c977314 Merge pull request #3292 from wagyourtail/1.18.2
1.18.2
2022-03-08 14:47:42 -08:00
Leijurv
8fe5b2369a Merge pull request #3301 from wagyourtail/toolmaterial-fix
fix modded toolmaterials (1.12.2)
2022-03-08 14:45:45 -08:00
Wagyourtail
dc6c87b58d fix modded toolmaterials 2022-03-07 15:53:13 -07:00
ZacSharp
ef4e19002b Provide more information for #find
Always log something to chat so people don't think it's broken and make sure they know about the restriction to cached blocks.
2022-03-05 22:27:27 +01:00
ZacSharp
e6ee5fc6b8 Make positions from #find clickable 2022-03-05 21:42:27 +01:00
Wagyourtail
38c5388e00 forge updated (finally) 2022-03-01 16:36:09 -07:00
Wagyourtail
519a76a171 fix for 1.18.2 2022-02-28 15:29:37 -07:00
Leijurv
eefc98a68e Merge pull request #3269 from wagyourtail/1.17.1
fix amethyst bud stuck
2022-02-14 14:38:07 -08:00
Wagyourtail
d0dc8cf726 fix amethyst bud stuck 2022-02-14 15:35:34 -07:00
Leijurv
b19c935da1 Merge pull request #3256 from ehylo/master
Update Setup and Usage guides
2022-02-09 16:35:54 -08:00
ehylo
0ade37f14f Update Setup and Usage guides
Also fix 2 settings that just don't have a description for some reason, and add some information to the find command because that also for some reason did not have anything there. The descriptions I put may not be detailed enough so please let me know if things should change
2022-02-08 21:13:51 -08:00
Leijurv
91be4c4643 Merge pull request #3093 from ZacSharp/fixBlockOptionalMetaObfuscation
Fix chat error messages being obfuscated for block type arguments
2022-02-08 10:52:25 -08:00
Leijurv
d2b62e2d21 Merge pull request #3239 from scorbett123/world_border_checks
Add some world border checks
2022-02-08 10:49:00 -08:00
Leijurv
267961434c Merge pull request #3254 from wagyourtail/1.17.1
fix an array oob with dynamic worldheight
2022-02-08 10:46:01 -08:00
Leijurv
0bfe98d306 Merge pull request #3255 from wagyourtail/replaymod-newfix
replaymod replay crash fix 1.17+
2022-02-08 10:45:39 -08:00
Wagyourtail
bfa644e7a7 oops 2022-02-08 11:41:45 -07:00
Wagyourtail
0ef1558803 fix this in a "better" way 2022-02-08 02:09:29 -07:00
Wagyourtail
9dad1af960 move up null check to fix new data-driven caused crash with replaymod 2022-02-08 01:57:56 -07:00
Wagyourtail
407f4dbbae fix an array oob with dynamic worldheight 2022-02-08 01:36:32 -07:00
Leijurv
7052fe6225 put this on its own line 2022-02-07 22:03:31 -08:00
scorbett123
49357790f1 fix world border checks
Signed-off-by: scorbett123 <50634068+scorbett123@users.noreply.github.com>
2022-02-03 08:06:01 +00:00
Leijurv
694219e497 Merge pull request #3243 from wagyourtail/master
fix getting stuck on cauldrons (fixes #3099)
2022-02-02 21:10:47 -08:00
Leijurv
af240d38e0 Merge pull request #3242 from wagyourtail/1.17.1
fix getting stuck in powdered snow
2022-02-02 21:10:14 -08:00
Wagyourtail
9b70ace180 fix getting stuck on cauldrons (fixes #3099) 2022-02-02 22:04:15 -07:00
Wagyourtail
a3dbec62dc fix getting stuck in powdered snow 2022-02-02 21:47:45 -07:00
Leijurv
e0a53144db bump most recent jars 2022-02-02 16:10:14 -08:00
Leijurv
b6cc15e9ab v1.8.2 2022-02-02 15:55:22 -08:00
Leijurv
fe26168a07 v1.7.2 2022-02-02 15:54:39 -08:00
Leijurv
25de332492 mfw this also needs to be in master 2022-02-02 15:53:43 -08:00
Leijurv
2d0f10c79f link to branches 2022-02-02 15:53:24 -08:00
Leijurv
ebb9dd1aaf Merge branch '1.17.1' into 1.18.1 2022-02-02 15:47:50 -08:00
Leijurv
d4c4441cb6 Merge pull request #3238 from wagyourtail/1.17.1
Merge master into 1.17
2022-02-02 15:47:20 -08:00
Wagyourtail
91bfab30e0 fix tabbing 2022-02-02 14:10:20 -07:00
scorbett123
74ea803651 Add world border checks to MovementHelper 2022-02-02 20:36:36 +00:00
Wagyourtail
a32811942e merge master in 2022-02-02 11:17:02 -07:00
Leijurv
0908e509a1 simplify a bit more 2022-02-02 00:51:24 -08:00
Leijurv
ad14226c5c lets not keep updating this 2022-02-02 00:50:48 -08:00
Leijurv
3fcc032547 readme updates for new release 2022-02-02 00:50:12 -08:00
Leijurv
e077995332 v1.8.1 2022-02-02 00:38:06 -08:00
Leijurv
71e17d6c29 v1.7.1 2022-02-02 00:35:37 -08:00
Leijurv
c9ebc0191d Merge branch '1.17.1' into 1.18.1 2022-02-02 00:30:29 -08:00
Leijurv
2f7f15da77 gitignore vscode file 2022-02-02 00:30:25 -08:00
Leijurv
fa3f5ae521 rm vscode stuff 2022-02-02 00:30:12 -08:00
Leijurv
db0ebeebee Merge branch '1.17.1' into 1.18.1 2022-02-02 00:29:26 -08:00
Leijurv
dc4913d98d oopsie 2 2022-02-02 00:29:15 -08:00
Leijurv
70dc2a3009 Merge branch '1.17.1' into 1.18.1 2022-02-02 00:25:13 -08:00
Leijurv
33943dc473 oopsie 2022-02-02 00:24:32 -08:00
Leijurv
21022f30b6 Merge commit 'd4ae351065889bfe37f5a51f123d5cd9a3e173e0' into 1.17.1 2022-02-02 00:20:23 -08:00
Leijurv
d4ae351065 Merge branch '1.16.4' into 1.16.5 2022-02-02 00:19:06 -08:00
Leijurv
2b75241338 Merge branch '1.16.4' into 1.17.1 2022-02-02 00:17:09 -08:00
Leijurv
b52de9b197 Merge pull request #2621 from wagyourtail/replaymodfix-master
fix replaymod crash (on newer versions)
2022-02-02 00:15:50 -08:00
Leijurv
3de7fc81fb Merge branch '1.15.2' into 1.16.4 2022-02-02 00:15:04 -08:00
Leijurv
34501f5af3 Merge branch '1.14.4' into 1.15.2 2022-02-02 00:14:38 -08:00
Leijurv
696ec6756d Merge pull request #3077 from wagyourtail/1.18
1.18 support
2022-02-02 00:00:05 -08:00
Leijurv
6e03e6859c Merge pull request #3194 from wagyourtail/1.17.1
fix dripleaf and azalea behavior
2022-02-01 23:57:54 -08:00
Leijurv
c2de6e3f3d Merge pull request #3173 from scorbett123/patch-4
Add unpause as an alias for resume
2022-02-01 23:57:21 -08:00
Leijurv
a5638bdba1 Merge pull request #3137 from scorbett123/remove_container_memory
Remove container memory
2022-02-01 23:56:49 -08:00
Leijurv
5ce006170d Merge pull request #3068 from wagyourtail/fixfabricbuilding
Fix fabric building due to dependency issue
2022-02-01 23:55:13 -08:00
Leijurv
ffd7d7a23a Merge pull request #3067 from wagyourtail/collisionShapeFix
fix Null params on getCollisionShape causing NPEs
2022-02-01 23:55:01 -08:00
Wagyourtail
697c92ae77 Merge branch '1.17.1' into 1.18 2022-01-20 15:19:49 -07:00
Wagyourtail
e37d81d3fc fix runClient to actually have the right sourceSet by default 2022-01-20 15:19:35 -07:00
Wagyourtail
7f21362a2a fix dripleaf and azalea behavior
change so rebuilds
2022-01-10 16:58:17 -07:00
Wagyourtail
c4da682e84 Merge branch '1.17.1' into 1.18
change so rebuilds
2022-01-10 16:58:03 -07:00
Wagyourtail
33ee39dcce fix dripleaf and azalea behavior 2022-01-10 11:28:37 -07:00
scorbett123
bb8e4bd737 Add unpause as an alias for resume
Some people can't seem to find out what to do to unpause baritone, so this should hopefully help them figure it out, as for some reason unpause makes more sense to people than resume.
2022-01-02 12:45:03 +00:00
Leijurv
7a96772a9b Merge pull request #3159 from Entropy5/master
Better buildignoredirection
2021-12-23 11:21:44 -10:00
Entropy5
9b07aa17e4 Merge remote-tracking branch 'origin/master' 2021-12-23 22:00:17 +01:00
Entropy5
90c59d5b8e undo 2021-12-23 21:59:20 +01:00
Entropy
fd3d5b66e9 Merge branch 'cabaletta:master' into master 2021-12-23 14:09:03 +01:00
Entropy5
d97346be6c check union of keys 2021-12-23 13:39:13 +01:00
Entropy5
9d13bcfe11 formatting 2021-12-22 00:20:21 +01:00
Leijurv
724ee62246 Merge pull request #3151 from ZacSharp/patch-4
Make rightClickContainerOnArrival click lit furnaces
2021-12-21 11:03:35 -10:00
Entropy5
26e8f02e85 merge 2021-12-21 20:30:28 +01:00
Entropy5
b3ff3d2466 universal buildignoredirection 2021-12-21 20:09:22 +01:00
Entropy5
9c3882e91f to lazy to spell 2021-12-21 12:49:44 +01:00
Entropy5
32a7657c4f Zac suggested this option to work universally, regardless of block type 2021-12-21 12:42:39 +01:00
Leijurv
54617bf634 reorder for performance 2021-12-21 01:32:47 -10:00
Leijurv
61a00b3965 Merge pull request #3148 from Entropy5/master
Option to ignore direction of certain blocks during building
2021-12-21 01:31:41 -10:00
Entropy
0214ffd158 Merge branch 'cabaletta:master' into master 2021-12-21 12:15:43 +01:00
Leijurv
1919f7b2a7 fix build again 2021-12-20 22:31:06 -10:00
ZacSharp
c2f4e00314 Make rightClickContainerOnArrival click lit furnaces 2021-12-18 00:31:21 +01:00
Entropy5
3adfa16db8 Option to ignore direction of certain blocks during building (because otherwise baritone just keeps breaking and replacing the same block) 2021-12-17 06:24:34 +01:00
scorbett123
90fcffdf2a Remove container memory
Signed-off-by: scorbett123 <50634068+scorbett123@users.noreply.github.com>
2021-12-12 19:50:27 +00:00
Leijurv
0ca84a790b Merge pull request #3119 from wagyourtail/patch-1
LEIJURV STOP BEING LAZY
2021-12-05 21:55:35 -08:00
wagyourtail
04802fbb15 LEIJURV STOP BEING LAZY 2021-12-05 22:54:37 -07:00
Wagyourtail
587c2cc8e2 forge support 2021-12-02 11:13:56 -07:00
Wagyourtail
1c8899ceae 1.18 release
pre.5


pre.6


pre.7


rc.1


1.18 release
2021-11-30 14:06:03 -07:00
ZacSharp
21534d1c0b Fix chat error messages being obfuscated for block type arguments 2021-11-18 00:21:12 +01:00
Wagyourtail
088009fe4a pre.3 2021-11-17 10:16:07 -07:00
Wagyourtail
90ac6f331e missed a spot 2021-11-16 16:47:37 -07:00
Wagyourtail
e80e4afa48 bump proguard version 2021-11-16 16:41:34 -07:00
Wagyourtail
b73295d180 bump to gradle 7.3, java 17 and 1.18-pre2 2021-11-16 16:30:37 -07:00
Wagyourtail
186a3cb6df shedainel says its fixed 2021-11-12 19:38:46 -07:00
Wagyourtail
b6fba56291 temp comment vanilla/forge 2021-11-12 19:38:46 -07:00
Wagyourtail
f52fee8254 revert this commit when shedaniel fixes arch-loom 2021-11-12 19:38:46 -07:00
Wagyourtail
f1061cfd31 fix baritone only ticking when screen open 2021-11-12 19:38:46 -07:00
Wagyourtail
9a9358bc78 WIP 2021-11-12 19:38:46 -07:00
Leijurv
749fd4fac3 Merge pull request #2850 from wagyourtail/1.17
1.17.X port, (uses changes from #2814)
2021-11-11 19:33:09 -08:00
Wagyourtail
62fe9888a2 eclipse dependency updated to java 11 on a minor version 2021-11-03 13:42:35 -06:00
Wagyourtail
08c00b8a42 surround with try/catch 2021-11-03 13:04:51 -06:00
Wagyourtail
43ecc906c7 cleanup 2021-10-28 08:03:37 -06:00
Leijurv
8579332cdf Merge pull request #3033 from wagyourtail/neverbreak
AvoidBreak means never.
2021-10-27 12:53:45 -07:00
Wagyourtail
9dc9edbbee fix tabbing 2021-10-27 13:53:13 -06:00
Wagyourtail
2980bb0320 match leij's backwards compat suggestion 2021-10-27 13:45:30 -06:00
wagyourtail
084798bd1b Update src/api/java/baritone/api/Settings.java 2021-10-26 13:41:24 -06:00
wagyourtail
1c27b9b712 Update src/api/java/baritone/api/Settings.java 2021-10-26 13:34:10 -06:00
Leijurv
129ec8472c Merge pull request #3042 from ZacSharp/waypointImprovements
Waypoint improvements
2021-10-25 15:03:33 -07:00
ZacSharp
bb91dc98de Merge branch 'master' into 1.13.2 2021-10-20 03:20:41 +02:00
ZacSharp
724162f37f Store deleted waypoints per world
Different dimensions are actually different worlds and the user might expect the wapoints to be restorable until they leave the server, so discrading them when the world changes would be too early.
2021-10-19 01:17:23 +02:00
ZacSharp
3244b102ad Add a way to restore deleted waypoints
Makes using the clickable text less dangerous when there are others writing in chat.
2021-10-18 02:42:58 +02:00
ZacSharp
c8966d22ba Don't create a new waypoint every time a bed is clicked.
Just the first time and always for the head part.
2021-10-17 23:44:21 +02:00
ZacSharp
6669d49636 Add a way to get the creation command for a waypoint 2021-10-17 15:10:14 +02:00
ZacSharp
3b480dabdb Make the tag argument optional, defaulting to USER
Listing all possible combinations in the usage as done before would have beed 8 lines just for the save command so I made it one special case, one combined line and a line explaining the defaults in the general waypoint help.

Also tab completion does not work when omitting either tag or name, because it starting to tab complete a position right from the first argument would probably only cause confusion and would be harder to implement because of the variable start position (names can even be numbers so it's impossible to do it 100% correctly)
2021-10-17 14:47:03 +02:00
ZacSharp
3e69281d61 Update usage of #waypoint
It now properly reports when either a tag or name can be specified and includes the clear subcommand
2021-10-17 14:06:07 +02:00
ZacSharp
1b04386b01 Allow saving unnamed waypoints by position 2021-10-17 13:53:55 +02:00
wagyourtail
1ca736692d more closely match the existing docs and add discourageBreaking 2021-10-15 17:58:13 -06:00
wagyourtail
4dc4795cb7 AvoidBreak means never. 2021-10-15 00:00:48 -06:00
wagyourtail
64b647ea65 oops... .idea folder contains copyright in file stuff (I thought gradle did that) 2021-10-11 04:42:26 -06:00
Leijurv
bcc33362b8 Merge pull request #3024 from wagyourtail/followerror
better follow command error handling
2021-10-10 14:07:27 -07:00
wagyourtail
6ed3a88491 continue fix mine and a* for data driven world height 2021-10-09 15:29:02 -06:00
wagyourtail
bd5ffe8f31 put timeout back 2021-10-09 14:55:26 -06:00
wagyourtail
d22a52976b fix A* and scanner for data driven world height 2021-10-09 14:54:07 -06:00
wagyourtail
e055ef36d4 add parchment mappings 2021-10-09 14:16:57 -06:00
wagyourtail
5ec6b7b72e make chunk cache/scanning work with data driven worldheight 2021-10-09 14:16:49 -06:00
wagyourtail
ba0b5f929f cleanup 2021-10-08 15:49:22 -06:00
wagyourtail
89c960c455 better follow command error handling 2021-10-08 14:58:17 -06:00
wagyourtail
de27fb2f68 fix mc jar detection for forge build with loom 0.10.x 2021-09-23 19:43:23 -06:00
wagyourtail
2e2e725eb3 fix proguard to have proper loom 0.10.x minecraft jar locations 2021-09-23 19:10:52 -06:00
wagyourtail
202618a32a add forge build script 2021-09-22 12:22:00 -06:00
wagyourtail
462dbce665 prep forge support 2021-09-22 12:14:43 -06:00
Leijurv
14178fcd14 rewrite comment since we haven't used pos.getY() in literally YEARS 2021-08-25 22:20:13 -07:00
Leijurv
5e0fe6d897 fix the comment explaining the sign flip
bug originates from august 17 2018 in f3d9ada675 (diff-b9b328a67abb41c2f842f367f83d95a2793c95cba83ab2e4542b31ed4c157819R101-R103)

absolutely wild how long this took to notice, see PR #2954
2021-08-25 22:18:23 -07:00
Leijurv
53ef26dabd Merge pull request #2954 from StylexTV/master
Fixed vertical cost calculation
2021-08-25 22:14:14 -07:00
StylexTV
3db5f2a67f Update GoalBlock.java 2021-08-22 10:28:42 +02:00
Leijurv
13d0e2a5bf Merge pull request #2879 from scorbett123/fixProguard
Fix proguard from being broken.
2021-07-18 23:29:56 -07:00
scorbett123
c3085ae34f Fix proguard
Signed-off-by: scorbett123 <50634068+scorbett123@users.noreply.github.com>
2021-07-18 18:37:20 +01:00
Leijurv
ce2ec8047e Merge pull request #2825 from Zephreo/parkour-place
ParkourPlace for shorter parkour jumps
2021-07-16 20:50:23 -07:00
Harry
335cb7016e fix verifiedMaxJump
- remove redundant assignment by changing some values
- testing Co-Authors

Co-Authored-By: Leijurv <leijurv@gmail.com>
2021-07-17 13:28:12 +10:00
Harry
7a7b050615 weird verifiedMaxJump 2021-07-17 12:34:58 +10:00
Leijurv
6ff7ae800a Merge pull request #2833 from ZacSharp/layerHeight
 Add layerHeight setting
2021-07-16 18:47:15 -07:00
wagyourtail
0944e6255e add fabric build to git 2021-07-11 22:25:32 -06:00
wagyourtail
8be821746e update dockerfile to use java 16
debian doesn't provide it
2021-07-11 22:20:06 -06:00
wagyourtail
9c05133ac7 cherry pick (and update) pr #2801 2021-07-11 22:10:13 -06:00
wagyourtail
29f5eaa35f Amethyst Crystal and Pointed Dripstone 2021-07-11 14:28:23 -06:00
wagyourtail
c06fdec287 1.17.1 2021-07-07 15:43:48 -06:00
wagyourtail
c7d210bfd6 fix proguard maybe 2021-07-07 15:43:48 -06:00
wagyourtail
683e987b1d fix bad mapping breaking pathing on item entities. 2021-07-07 15:43:48 -06:00
wagyourtail
40c323f53d fix mis-mapping from manual mixin review and put this back 2021-07-07 15:43:48 -06:00
wagyourtail
2d2354730d fix movement, mixins and color, proguard 2021-07-07 15:43:48 -06:00
wagyourtail
a7b81940b3 fix j16 debug environment (may have to set cp to baritone.launch) 2021-07-07 15:43:48 -06:00
wagyourtail
8df87eb620 bump fabric loader to support j16 2021-07-07 15:43:48 -06:00
wagyourtail
41abda37c1 fix migration for 1.17. (also proguard broke with j16...) 2021-07-07 15:43:48 -06:00
wagyourtail
e6d8b268c7 migrate to mojmap 2021-07-07 15:43:48 -06:00
wagyourtail
f0130c7199 move to j16/gradle7 2021-07-07 15:43:48 -06:00
wagyourtail
de42109771 add check 2021-07-06 15:59:06 -06:00
wagyourtail
2e98eee7e0 fix dockerfile 2021-07-06 08:26:30 -06:00
wagyourtail
f6236bdc66 launchtweaker build shouldn't require forge 2021-07-06 08:25:30 -06:00
wagyourtail
d00249bbd6 checking again, this is fixed actually (somehow...). 2021-07-05 15:15:08 -06:00
Harry
2159773723 requested changes
- tabs changed to 4 spaces
- fixed checking if block place is behind player
2021-07-01 10:09:06 +10:00
ZacSharp
ab3a015d61 Add layerHeight setting 2021-06-24 23:33:48 +02:00
Harry
3142387e45 Fix collision early return
not tested yet
- fixes early returns
2021-06-23 06:25:10 +10:00
Harry
051325e10f allow smaller parkour place jumps
allows 2 and 1 block parkour place jumps
2021-06-21 10:58:11 +10:00
Harry
199d5d57d5 Update .gitignore 2021-06-21 09:49:18 +10:00
wagyourtail
a49f4ee858 cleanup 2021-06-16 02:51:56 -06:00
wagyourtail
998b84ef87 switch to forgified-fabric-loom 2021-06-16 02:12:47 -06:00
Leijurv
b96795c517 Merge pull request #2803 from scorbett123/farmInventory
Make farm use inventory when allowInventory is enabled.
2021-06-14 12:32:53 -10:00
scorbett123
64ba96daf2 Do edit suggested by leijurv 2021-06-14 20:44:32 +01:00
Leijurv
14b17d86e5 Merge pull request #2801 from scorbett123/master
Add github actions.
2021-06-13 10:21:51 -10:00
Leijurv
90d5f27026 Merge pull request #2804 from ZacSharp/selCopyPaste
 Add a clipboard to #sel
2021-06-13 10:21:10 -10:00
Leijurv
16386b8ddc Merge pull request #2796 from mankool0/itemSaverThreshold
Added itemSaverThreshold setting
2021-06-13 10:17:28 -10:00
Leijurv
cbef21b9ad Merge pull request #2800 from scorbett123/patch-3
Remove broken hit count badge
2021-06-13 10:16:51 -10:00
ZacSharp
cec44e3668 Add a clipboard to #sel 2021-06-13 00:21:52 +02:00
scorbett123
f09f1e7f85 Make farm use inventory when allowInventory is enabled. 2021-06-12 18:18:56 +01:00
scorbett123
95910bc6cb Cleanup - travis.org is now deprecated and can no longer be used. 2021-06-12 14:13:39 +01:00
scorbett123
cc488ccff0 Make actions run tests as well. 2021-06-12 14:09:50 +01:00
scorbett123
37e129bfb9 Create run_tests.yml 2021-06-12 14:08:04 +01:00
scorbett123
6adc923bcb Revert "update mapping.txt location"
This reverts commit 065470ce

Github doesn't seem to support ../
2021-06-12 14:07:35 +01:00
scorbett123
065470cecb update mapping.txt location 2021-06-12 14:02:31 +01:00
scorbett123
260989bda6 Update build java version for github actions. 2021-06-12 13:52:56 +01:00
scorbett123
64b6e0fd56 Remove broken hit count badge 2021-06-12 13:49:59 +01:00
scorbett123
8f45718b75 Try to create github actions
An attempt at github actions.
2021-06-12 11:27:27 +01:00
scorbett123
e66bb7a14b Make proguard output the mapping. 2021-06-12 11:14:59 +01:00
mankool
8bfe32eeef Added itemSaverThreshold 2021-06-09 10:34:45 -07:00
Leijurv
e85c1bbc0d Merge pull request #2736 from ZacSharp/exploreForBlocksForMining
Make MineProcess respect exploreForBlocks
2021-05-28 13:27:13 -07:00
ZacSharp
f99bf0d000 Make legitMode always explore 2021-05-28 22:18:33 +02:00
Leijurv
db24a2251f Merge pull request #2771 from ZacSharp/notificationCallback
More log callbacks
2021-05-26 11:32:53 -07:00
Leijurv
fcb3747690 Merge pull request #2776 from thecakeisalie25/master
Add "RenderGoalAsBox" Setting
2021-05-26 11:30:51 -07:00
Tabbs
dcc27a7447 oops forgot the javadoc 2021-05-25 14:52:16 -05:00
Tabbs
bea39bc613 Merge branch 'master' of https://github.com/thecakeisalie25/baritone 2021-05-25 14:44:59 -05:00
Tabbs
546493ba45 do our best to stop beacon animating
The game seems to animate the beacons anyway, so it does shake a little bit.
2021-05-25 14:44:54 -05:00
Tabbs
dda4928693 change name to renderGoalAnimated 2021-05-25 14:43:32 -05:00
Larson
7d144dd076 fix decimal
Co-authored-by: scorbett123 <50634068+scorbett123@users.noreply.github.com>
2021-05-25 14:33:13 -05:00
Tabbs
73e0700ea3 fix weird rendering issue 2021-05-25 12:41:36 -05:00
Tabbs
3fc36cf798 fix y to 1 if animation is disabled 2021-05-25 12:34:17 -05:00
ZacSharp
dbc43b445b Replace unhandled exception with a helpful message 2021-05-24 03:38:14 +02:00
ZacSharp
638fcd393a Don't try to tab complete hidden settings 2021-05-24 03:20:31 +02:00
ZacSharp
7b5f419713 Treat the new callbacks like the old one 2021-05-24 03:14:33 +02:00
ZacSharp
253fbad3db Make MineProcess respect exploreForBlocks 2021-05-10 22:37:35 +02:00
ZacSharp
522de3d4b7 Add callback settings for toast pop-ups and desktop notifications 2021-05-10 00:31:37 +02:00
ZacSharp
dc9ae67657 Move NotificationHelper to api and give Helper some methods for notifications 2021-05-10 00:26:33 +02:00
Leijurv
fccac8ed74 Merge pull request #2664 from ZacSharp/buildSelectedSchematic
Add setting to only build selected part of schematica schematic
2021-04-20 23:27:57 -07:00
Leijurv
24c895084e Merge pull request #2647 from scorbett123/patch-2
switch from forge mods to just other mods.
2021-04-20 23:15:37 -07:00
Leijurv
16fbfdecb5 Merge pull request #2645 from millennIumAMbiguity/patch-1
Added missing information to USAGE.md
2021-04-20 23:15:25 -07:00
Leijurv
b79e281074 Merge pull request #2635 from ZacSharp/autoTool
Invert disableAutoTool to autoTool
2021-04-20 23:15:10 -07:00
Leijurv
93ac380fd6 Merge pull request #2634 from ZacSharp/patch-2
fix typo
2021-04-20 23:13:57 -07:00
ZacSharp
46066d4cac Misc
* Rename schematicaOnlyBuildSelection to buildOnlySelection
* Make it useable with #build as well
* remove debugging code I forgot
2021-04-14 23:36:16 +02:00
ZacSharp
c13cf4f29c Add setting to only build selected part of schematica schematic 2021-04-13 23:09:54 +02:00
ZacSharp
a4f06a9e1e Update javadoc as well 2021-04-10 23:56:30 +02:00
scorbett123
cbc5fc8d08 switch from forge mods to just other mods. 2021-04-08 18:36:46 +01:00
millennIumAMbiguity
0a27c0b6e4 Added missing information to USAGE.md
Added missing information about the `farm` command.
2021-04-07 18:12:47 +02:00
ZacSharp
f348a20035 invert disableAutoTool to autoTool 2021-04-04 03:34:10 +02:00
ZacSharp
bdb98b487f fix typo 2021-04-04 03:17:35 +02:00
Leijurv
2cb6402189 Update README.md 2021-04-03 16:56:26 -07:00
Leijurv
861bb7a00a v1.2.15 2021-04-03 16:50:01 -07:00
Leijurv
43d5458a25 fix weird behavior where allowBreak false broke #goto 2021-04-03 16:41:45 -07:00
Leijurv
fe491e4a7d Merge pull request #1809 from Moondarker/master
Added "install" target for instant maven-ready releases
2021-04-03 13:40:56 -07:00
wagyourtail
9d1b979318 fix replaymod crash 2021-03-28 21:32:48 -07:00
Leijurv
c1794dd0ca reduce useless links 2021-03-25 10:41:16 -10:00
Leijurv
8f7d8b1cba Merge pull request #2611 from Flurrrr/master
Center badges and other stuff
2021-03-25 09:29:08 -10:00
flurr
8ebb8a04fa Center badges and other stuff
-center the badges
-re-arrange them to be more organized
-update the Aristois/Impact badges to the correct versions and fix broken link
2021-03-25 11:51:18 -07:00
Leijurv
ef6435a02a whatever i don't care 2021-03-23 22:44:20 -10:00
Leijurv
5cbe0a8230 Update README.md 2021-03-23 22:44:03 -10:00
Leijurv
dcef6b556c Update README.md 2021-03-23 22:42:39 -10:00
Leijurv
c07a636db2 Update README.md 2021-03-23 22:41:59 -10:00
Leijurv
a6be95fe33 Merge pull request #2606 from scorbett123/patch-1
fix typo
2021-03-23 10:19:11 -10:00
scorbett123
14149aa6b1 fix typo 2021-03-23 19:35:11 +00:00
Leijurv
ae901219fb Merge pull request #2526 from ZacSharp/buildSkipBlocks
Settings to alter block treatment while builing
2021-03-23 08:09:44 -10:00
Leijurv
6d9600d132 Update README.md 2021-03-21 13:59:00 -07:00
Leijurv
ccc55562cd Update README.md 2021-03-21 13:52:27 -07:00
ZacSharp
67d9ae881f don't allocate tons of empty lists 2021-03-09 12:31:02 +01:00
ZacSharp
61e0525ee8 Don't copy block state properties every time 2021-03-09 12:26:47 +01:00
ZacSharp
363519db02 treat all airs as air 2021-03-09 11:53:43 +01:00
Leijurv
373ad3efdd soul fire 2021-02-24 13:16:03 -08:00
Leijurv
4bc179bd2a Merge pull request #2462 from scorbett123/ModifiedImprovement
Improve #modified command to include original setting value.
2021-02-19 20:14:35 -08:00
Leijurv
76debda76e Merge pull request #1978 from ZacSharp/master
 Add improved ETA and a command to access it
2021-02-19 20:13:47 -08:00
Leijurv
b4eabe19cb Merge pull request #2482 from ZacSharp/schematicCacheClearing
Clear caches of schematics when moving them
2021-02-19 16:06:28 -08:00
ZacSharp
971b75860f Call reset() on static schematics as well 2021-02-19 23:57:33 +01:00
ZacSharp
5a926bf169 formatting 2021-02-19 23:52:18 +01:00
Leijurv
d34f37c563 Merge pull request #2476 from biscuut/patch-1
Fixed incorrect block pos world coordinates
2021-02-19 10:54:47 -08:00
Leijurv
6035a01019 Merge pull request #2481 from ZacSharp/buildRepeatCrash
Don't crash by buildRepeating too often
2021-02-19 10:49:06 -08:00
ZacSharp
c880f71dc8 Clear caches of schematics when moving them 2021-02-17 01:59:23 +01:00
ZacSharp
13422ef7ce lag > crash 2021-02-17 01:19:16 +01:00
Biscuit
84e2efd42c Fixed incorrect block pos world coordinates
Fix block pos being incorrect when converting chunk coordinates to world coordinates because of order of operations.
2021-02-15 14:21:03 -05:00
ZacSharp
113d26937d remove unused imports 2021-02-11 01:08:33 +01:00
ZacSharp
34606415d7 Don't mark skipped blocks as invalid just because they are far away 2021-02-10 23:45:12 +01:00
scorbett123
6b9c1f0a22 Improve #modified command to include original setting value.
Signed-off-by: scorbett123 <50634068+scorbett123@users.noreply.github.com>
2021-02-10 16:00:44 +00:00
ZacSharp
132cc0e131 make range initialization more readable 2021-02-10 10:25:17 +01:00
ZacSharp
5926369a56 formatting and comments 2021-02-10 10:15:14 +01:00
ZacSharp
ff068d374f Don't box doubles 2021-02-10 00:29:45 +01:00
Leijurv
4132d6ff61 Merge pull request #2138 from scorbett123/swordSaver
add useSwordToMine setting.
2021-02-08 16:54:37 -08:00
scorbett123
1f10199e64 Change use sword to mine to default to true.
Signed-off-by: scorbett123 <50634068+scorbett123@users.noreply.github.com>
2021-02-08 08:34:31 +00:00
Leijurv
e97704b37f Merge pull request #2139 from scorbett123/notifyOnDeath
notify users that their death position has been saved.
2021-02-07 14:32:43 -08:00
scorbett123
4ae81a3b0b Merge branch 'master' into swordSaver 2021-02-07 12:19:18 +00:00
Moondarker
f4ec9a8ec1 Merge pull request #2 from cabaletta/master
Fetching latest updates
2021-02-07 06:39:00 +03:00
Leijurv
711037b619 rearrange for consistency 2021-02-06 13:36:24 -08:00
Leijurv
b32c9f1724 Merge pull request #2107 from scorbett123/toolsSaver
add itemSaver setting.
2021-02-06 13:33:01 -08:00
Leijurv
be132c531e Update SETUP.md 2021-02-05 22:53:44 -08:00
Leijurv
fb8826caf4 Update README.md 2021-02-05 22:42:03 -08:00
Leijurv
adff60b118 Update README.md 2021-02-05 22:41:52 -08:00
Leijurv
a48ae2a9a8 v1.6.3 2021-02-05 22:17:20 -08:00
Leijurv
a9b956c12d empty 2021-02-05 21:01:02 -08:00
Leijurv
476b724471 1.16.5 2021-02-05 20:47:46 -08:00
Leijurv
8f863bf19b empty 2021-02-05 20:08:46 -08:00
Leijurv
98da144691 Merge branch '1.15.2' into 1.16.4 2021-02-02 17:09:56 -08:00
Leijurv
7320c3fd7e Merge branch '1.14.4' into 1.15.2 2021-02-02 17:09:31 -08:00
Leijurv
c37cdf78e4 Merge branch '1.13.2' into 1.14.4 2021-02-02 17:09:18 -08:00
Leijurv
6a1f716dc8 Merge branch 'master' into 1.13.2 2021-02-02 17:09:06 -08:00
Leijurv
a9d90786ff Merge pull request #2413 from wagyourtail/sodium-fix-mcpmappings
compatibility for SodiumChunkManager
2021-02-02 17:07:38 -08:00
wagyourtail
484c606dc1 Update MixinSodiumChunkProvider.java 2021-02-02 17:56:00 -07:00
Leijurv
331a7f3842 Merge pull request #2407 from DifferentPerson/master
Fix SpongePowered Maven repo URL
2021-02-02 16:06:48 -08:00
wagyourtail
637c182114 sodium fix 2021-02-01 16:14:27 -07:00
DifferentPerson
25de16e051 Fix SpongePowered Maven repo URL
SpongePowered recently changed their Maven repo URL, so this is the right one
2021-01-31 15:55:52 -08:00
Leijurv
a732e766f4 crucial performance optimization 2021-01-30 17:22:19 -08:00
Leijurv
2377694a6b Merge branch '1.15.2' into 1.16.4 2021-01-29 21:28:21 -08:00
Leijurv
1b3799d4d7 reorder dist to alphabetical 2021-01-29 21:28:11 -08:00
Leijurv
81fadde388 Merge branch '1.15.2' into 1.16.4 2021-01-29 21:21:07 -08:00
Leijurv
a61eabd60c Merge branch '1.14.4' into 1.15.2 2021-01-29 21:14:10 -08:00
Leijurv
bb75e68b0a Merge branch '1.13.2' into 1.14.4 2021-01-29 21:13:33 -08:00
Leijurv
e9b9977674 Merge branch 'master' into 1.13.2 2021-01-29 21:13:12 -08:00
Leijurv
91854f97ad fully remove remnants of xvfb 2021-01-29 21:12:44 -08:00
Leijurv
825bad47ef add fabric build step 2021-01-29 21:06:37 -08:00
Leijurv
78acd2f945 reformatter 2021-01-29 21:02:57 -08:00
Leijurv
1183196e0d Merge pull request #2401 from wagyourtail/1.15.2-fabrictest
fabric support 1.15
2021-01-29 21:01:08 -08:00
Leijurv
e4947ec071 fake merge of 1.15.2 into 1.16.4 due to reformatting conflicts 2021-01-29 20:31:13 -08:00
Leijurv
5262f68215 a long overdue reformat of every file 2021-01-29 20:30:51 -08:00
Leijurv
4b45cc6f0b fake merge of 1.13.2 into 1.15.2 due to reformatting conflicts 2021-01-29 20:30:00 -08:00
Leijurv
a3da25ca27 a long overdue reformat of every file 2021-01-29 20:29:41 -08:00
Leijurv
eae6e4d804 fake merge of 1.13.2 into 1.14.4 due to reformatting conflicts 2021-01-29 20:28:32 -08:00
Leijurv
37cd50d435 a long overdue reformat of every file 2021-01-29 20:28:11 -08:00
Leijurv
3f65d46e12 fake merge of master into 1.13.2 due to reformatting conflicts 2021-01-29 20:26:22 -08:00
Leijurv
15fd313757 a long overdue reformat of every file 2021-01-29 20:26:06 -08:00
Leijurv
835fb3471f a long overdue reformat of every file 2021-01-29 20:17:53 -08:00
Leijurv
ca870af20e Merge branch '1.15.2' into 1.16.4 2021-01-29 20:13:56 -08:00
Leijurv
c98c54c985 Merge branch '1.14.4' into 1.15.2 2021-01-29 19:57:36 -08:00
Leijurv
4c9689fe19 Merge branch '1.13.2' into 1.14.4 2021-01-29 19:49:11 -08:00
Leijurv
f41c873852 Merge branch 'master' into 1.13.2 2021-01-29 19:31:16 -08:00
Leijurv
eb8a673165 Merge branch 'master' into 1.13.2 2021-01-29 19:30:56 -08:00
Leijurv
a9f497981f Merge pull request #2080 from millennIumAMbiguity/master
Added range argument to farm
2021-01-29 17:41:08 -08:00
Leijurv
74dd88d123 Merge pull request #2359 from stragulus/build-with-forge-instructions
Add instructions to build with forge for minecraft 1.15+
2021-01-29 17:37:43 -08:00
ZacSharp
fd61207709 Fix heuristic(no args) returning wrong values 2021-01-28 01:40:33 +01:00
wagyourtail
9a7b07befc move mappings folder to better location and have it autocreate 2021-01-27 09:20:10 -07:00
Leijurv
b94494d386 Merge pull request #2357 from ZacSharp/builderMaterialLogging
Log blocks the builder can't place (missing or obstructed by flowing liquid) when failing
2021-01-26 23:28:45 -08:00
Leijurv
974b19fcc7 Merge pull request #2378 from ZacSharp/patch-1
Correct usage for mining a specific amount
2021-01-26 23:24:07 -08:00
ZacSharp
364b7b5438 Correct usage for mining a specific amount
Found and fixed by @CesiumCs
2021-01-21 15:39:37 +01:00
wagyourtail
2c3f352d0d figure out how to revert "fix refmap location to be fabric-compliant"
I did some reading
2021-01-20 18:11:51 -07:00
wagyourtail
7fbe9c062e unique version names 2021-01-19 23:37:01 -07:00
wagyourtail
c1d7683896 fix version # 2021-01-19 23:14:37 -07:00
wagyourtail
b493c2ce89 remove debug, add ignore 2021-01-19 23:11:42 -07:00
wagyourtail
82436f30e1 cleanup 2021-01-19 23:11:08 -07:00
wagyourtail
f549e0e2d4 on the fly volderyarn mapping generation 2021-01-19 23:03:57 -07:00
wagyourtail
5494c43290 fabric task like forge 2021-01-19 23:03:40 -07:00
wagyourtail
f5d5457100 fix refmap location to be fabric-compliant 2021-01-19 23:03:35 -07:00
wagyourtail
d6cbb58e7e fabric with volder-mappings, soo close to working 2021-01-19 23:03:03 -07:00
ZacSharp
8c1a9f460d Simple blockstate preservation for buildSubstitutes 2021-01-18 12:06:50 +01:00
ZacSharp
f6d4a315c7 Remove debug log 2021-01-18 11:58:42 +01:00
Bram Avontuur
0222c47113 Typo fix 2021-01-17 11:40:52 -05:00
ZacSharp
fc1a2a6112 Add buildSubstitutes setting to builder 2021-01-17 02:45:40 +01:00
ZacSharp
13547781d2 add buildValidSubstitutes setting to builder 2021-01-17 00:53:50 +01:00
ZacSharp
d375d1abc9 Add setting parser for mappings 2021-01-17 00:16:34 +01:00
Bram Avontuur
33d007eea5 Add instructions to build with forge for minecraft 1.15+ 2021-01-16 11:34:12 -05:00
ZacSharp
5e4f31f39e proper place/break costs for skipped blocks 2021-01-16 02:05:59 +01:00
ZacSharp
79e0f4ba23 Log blocks it can't place 2021-01-15 12:52:38 +01:00
ZacSharp
dba186347c remove likely useless code breaking buildSkipBlocks 2021-01-13 22:45:59 +01:00
ZacSharp
7988274d61 add buildSkipBlocks setting 2021-01-12 23:59:11 +01:00
Leijurv
72cf9392b1 Update README.md 2020-12-24 21:34:02 -08:00
Leijurv
b6265036d4 Update README.md 2020-12-24 21:33:29 -08:00
Leijurv
dc70d810c9 Update README.md 2020-12-24 21:33:11 -08:00
Leijurv
dbb0f599fc v1.6.2 2020-12-16 13:32:11 -10:00
Brady
dcc0b82210 Update to 1.16.4 2020-12-16 16:42:35 -06:00
Leijurv
16cfcb36a3 Update USAGE.md 2020-11-29 20:04:44 -08:00
Leijurv
6bec994a57 Merge pull request #2185 from unrootexe/master
Update rootNET's supported version
2020-11-19 23:56:45 -08:00
unrootexe
a99206b6c2 Update rootNET's supported version
rootNET supports the latest version of Baritone, this change reflects that
2020-11-16 17:18:32 +00:00
Leijurv
c491d67925 add setting to just skip layers that the builder fails to construct 2020-11-11 17:53:26 -08:00
Sam Corbett
b9eeab06a1 change useSwordToMine to default to false.
Signed-off-by: Sam Corbett <sam@corbettchocolates.com>
2020-11-02 07:47:36 +00:00
millennIumAMbiguity
853b5ca771 Moved throw up into the default: 2020-11-02 01:44:12 +01:00
millennIumAMbiguity
f4706fff18 Simplified and optimised code 2020-11-02 01:25:25 +01:00
millennIumAMbiguity
7218a46211 Added defaults and javadocs 2020-11-02 00:33:31 +01:00
scorbett123
c0f7d5ab44 fix error made while copying and pasting.
Signed-off-by: scorbett123 <sam@corbettchocolates.com>
2020-11-01 17:30:53 +00:00
scorbett123
60f81fb89d notify users that their death position has been saved.
Signed-off-by: scorbett123 <sam@corbettchocolates.com>
2020-11-01 17:18:31 +00:00
scorbett123
49bc96dc7e add useSwordToMine setting.
Signed-off-by: scorbett123 <sam@corbettchocolates.com>
2020-11-01 16:12:38 +00:00
Leijurv
320a5d64a3 well i guess technically there could be an ore at bedrock level lmao 2020-10-30 22:39:30 -07:00
Leijurv
b16a8ecf21 Merge pull request #2079 from scorbett123/limitedMineDistance
add a minimum Y level during mining.
2020-10-30 22:35:26 -07:00
Leijurv
73265ef944 Merge pull request #2100 from GameCenterJerry/master
added jdk 8 instructions for macOS in SETUP.md
2020-10-30 22:28:57 -07:00
Leijurv
3bbc141e9a Merge pull request #2132 from ZacSharp/noForgeMod
don't make non-forge jars valid mods (fixes #2124)
2020-10-30 22:28:03 -07:00
ZacSharp
9ca95e8e14 don't make non-forge jars valid mods (fixes #2124) 2020-10-31 03:21:59 +01:00
Sam Corbett
9922382581 don't fall back onto the first slot if it has a low durability item in the slot.
Signed-off-by: Sam Corbett <sam@corbettchocolates.com>
2020-10-28 08:44:40 +00:00
scorbett123
4aa52d2f2e add itemSaver setting.
Signed-off-by: scorbett123 <sam@corbettchocolates.com>
2020-10-24 18:03:29 +01:00
Leijurv
6d51e10090 Merge pull request #1971 from krzys-h/fix-entity-follow-forge
Fix "#entity follow <name>" under Forge
2020-10-23 18:54:11 -07:00
GameCenterJerry
14b75973b0 Update SETUP.md 2020-10-22 15:02:17 +11:00
GameCenterJerry
0bfd0bca0c Update SETUP.md 2020-10-22 13:47:50 +11:00
GameCenterJerry
cafb810a1f Update SETUP.md 2020-10-22 13:28:18 +11:00
GameCenterJerry
07704b3ec7 Update SETUP.md 2020-10-22 13:14:53 +11:00
GameCenterJerry
7032efcc05 added jdk 8 instructions for macOS
added necessary commands and download links
2020-10-22 13:09:56 +11:00
millennIumAMbiguity
65a5677b33 Added the feature to only farm within range of a waypoint. 2020-10-22 00:36:19 +02:00
millennIumAMbiguity
5d3522ca0a Added range argument to farm 2020-10-16 23:32:53 +02:00
Sam Corbett
bfb530e02b add a minimum Y level.
Signed-off-by: Sam Corbett <sam@corbettchocolates.com>
2020-10-16 17:02:02 +01:00
ZacSharp
9393192036 Slight change to heuristic(no args) 2020-10-16 01:30:04 +02:00
ZacSharp
3cdbc4cb83 👌formatting in of comments 2020-10-15 21:48:17 +02:00
ZacSharp
0c7741120a 👌formatting 2020-10-15 00:05:54 +02:00
ZacSharp
e529438c7e Don't use Abs on Sqrt 2020-10-14 21:14:17 +02:00
Leijurv
5a5d11922f Merge pull request #1995 from scorbett123/exposedOres
add mineOnlyExposedOres setting
2020-10-14 12:01:49 -07:00
scorbett123
39cfebeb34 fix formatting
Signed-off-by: scorbett123 <sam@corbettchocolates.com>
2020-10-14 20:00:49 +01:00
Leijurv
950f47ccae Merge pull request #1958 from CDAGaming/feature/toasts
 Added Toast API Support
2020-10-14 11:18:09 -07:00
CDAGaming
d2c625e1c9 Apply Review Comments 2020-10-14 13:14:23 -05:00
Leijurv
3f207b7041 Merge pull request #2076 from CDAGaming/feature/rendering-compat-fix
🐛 Fix a Rendering Conflict with some other Mods
2020-10-14 11:09:00 -07:00
Leijurv
8deb9e5a35 Merge pull request #1959 from CDAGaming/feature/top-command
 Added a top/surface command
2020-10-14 11:02:07 -07:00
Leijurv
5eeb33a6f5 Merge pull request #1845 from mariusdkm/master
Fixing crash after clicking into the air using the #click command
2020-10-14 10:59:34 -07:00
CDAGaming
918f009e8a 🐛 Fix a Rendering Conflict with some other Mods
In testing within Fabritone, it was found that these two lines (Which were previously used for an unknown optifine workaround) are no longer needed, and had no known side effects as of writing.

This can be backported as needed, but details are unknown how far this can go down

Future me PS: This PR is a superseed of my last one, erased during repo refactors, so now it lives on master branch. Testing recommended and can be up-ported/down-ported as you wish.
2020-10-12 12:52:05 -05:00
CDAGaming
d6665f1cd5 Added Toast API Support
This adds in a logAsToast and toastTimer option, and is a minified form of Indrit's initial implementation previously used from fabritone
2020-10-12 12:46:01 -05:00
CDAGaming
af29ed7146 Added a top/surface command
Superseeds PR #594
2020-10-12 12:44:12 -05:00
Leijurv
8ddc795158 Merge pull request #2020 from ZacSharp/wpgoto
make `#wp goto` behave like `#wp goal` and `#path`
2020-09-29 16:55:50 -07:00
ZacSharp
8a572516fc Update description of WaypointsCommand 2020-09-23 22:54:41 +02:00
ZacSharp
aebfbba20e Also override heuristic(no args) when overriding isInGoal() 2020-09-20 22:39:48 +02:00
ZacSharp
85cc86346c Actually use Y and Z bounds for Y and Z 2020-09-20 22:20:24 +02:00
ZacSharp
b20e095683 add heuristic(no args) to GoalNear and GoalRunAway
not really a good solution but better than nothing
2020-09-20 00:29:31 +02:00
ZacSharp
b4d7f05165 🐛 fix two NPEs in estimatedTickToGoal
apparently `ctx.playerFeet()` and `startPosition` can be `null` before pathing the first time
2020-09-19 21:46:07 +02:00
ZacSharp
46a12754e9 🐛Reset ETA and return 0 if we are already there
not doing this caused a continuously increasing ETA when standing inside a `GoalNear` from `FollowProcess`
2020-09-19 00:30:25 +02:00
ZacSharp
411b2a0acc 🔨move ETA reset to it's own function 2020-09-18 23:58:06 +02:00
ZacSharp
508dacac63 directly start pathing after #home
just like servers directly teleport you after `/home` without waiting for something like `/teleport`
2020-09-18 22:41:33 +02:00
ZacSharp
13ca691f5d make #wp goto behave like #goto
It now is a combined `#wp goal` and `#path` just like `#goto` is `#goal` and `#path`
2020-09-16 20:19:55 +02:00
Leijurv
7e4d2c9b28 Update README.md 2020-09-15 12:43:34 -07:00
Brady
500c34c330 Merge pull request #2015 from babbaj/fix-troll-code
Don't call onLostControl on processes that haven't been fully constructed
2020-09-13 17:46:23 -05:00
Babbaj
234fd3f75e don't use getter 2020-09-13 18:45:50 -04:00
Babbaj
32ef30686b Don't call onLostControl on processes that haven't been fully constructed 2020-09-13 18:21:22 -04:00
Leijurv
175df6ce7a Update USAGE.md 2020-09-11 21:54:20 -07:00
Leijurv
96b874c099 Update README.md 2020-09-11 21:52:43 -07:00
Sam Corbett
612510550f fix javadoc.
Signed-off-by: Sam Corbett <sam@corbettchocolates.com>
2020-09-08 19:00:41 +01:00
Sam Corbett
80e4852f90 Merge https://github.com/cabaletta/baritone into exposedOres 2020-09-08 17:48:45 +01:00
Sam Corbett
071243b99a move is transparent to movement helper and circle maker 2020-09-08 17:47:46 +01:00
Sam Corbett
547db3a6b4 make the ability to turn it off.
Signed-off-by: Sam Corbett <sam@corbettchocolates.com>
2020-09-08 17:47:45 +01:00
scorbett123
063f698bd2 need to remove diagonals, however this does most of what you suggest.
Signed-off-by: scorbett123 <sam@corbettchocolates.com>
2020-09-08 17:47:45 +01:00
scorbett123
bcbfca100f add mineOnlyExposedOres setting
Signed-off-by: scorbett123 <sam@corbettchocolates.com>
2020-09-08 17:47:45 +01:00
Leijurv
a92675e125 v1.6.1 2020-09-07 16:48:44 -07:00
Leijurv
8206b1673c Merge pull request #1988 from scorbett123/patch1
fix typo in java-doc x2
2020-09-07 13:18:52 -07:00
ZacSharp
7255ccbdaa add heuristic(no args) to GoalComposite
GoalNear and GoalRunAway are still missing it
2020-09-06 16:42:05 +02:00
ZacSharp
45dc8b949d add a method to get the heuristic at the goal
this alows the ETA to work with goals not ending with a heuristic of 0

GoalComposite, GoalRunAway and GoalNear are still missing
2020-09-05 22:32:38 +02:00
ZacSharp
10e3a5afc4 negative ETAs are actually impossible now 2020-09-05 22:13:05 +02:00
ZacSharp
303aa79ffb Update ETA formula, assuming heuritic at goal is 0 2020-09-04 23:56:01 +02:00
ZacSharp
35f3be9296 get rid of negative ETAs the lazy way 2020-09-02 22:59:13 +02:00
scorbett123
d7088c8eea fix typo in java-doc x2
Signed-off-by: scorbett123 <sam@corbettchocolates.com>
2020-08-31 18:48:46 +01:00
ZacSharp
695954bdb0 no eta after 0 ticks or with division by 0 2020-08-28 23:37:23 +02:00
ZacSharp
d29b3ee893 Fix copy/paste mistake in ETACommand.getLongDesc() 2020-08-28 01:19:06 +02:00
ZacSharp
d9cecb35cb rename Eta to ETA 2020-08-28 00:56:18 +02:00
ZacSharp
71dd6c6333 👌formatting 2020-08-27 01:16:17 +02:00
ZacSharp
56f13d314a Add eta command 2020-08-26 23:53:02 +02:00
ZacSharp
b628d67961 Add ETA for full path 2020-08-26 23:52:44 +02:00
Leijurv
bf723deced Merge pull request #1964 from ZacSharp/master
Fix MovementDiagonal being safeToCancel while cornering over air 2.0
2020-08-24 16:20:01 -07:00
ZacSharp
9636e69a6b slightly better condition 2020-08-24 23:06:19 +02:00
krzys-h
ed91e2aa7b Fix "#entity follow <name>" under Forge
One of the Forge patches removes EntityList.REGISTRY and provides
the getClass method as a replacement.

The fix is based on a similar one I found in WorldDownloader

Closes #1376 (and duplicates: #1777 and #1815)
2020-08-24 22:24:18 +02:00
Leijurv
7cbe5bfd2f Merge pull request #1967 from CDAGaming/1.16.2
Added the license field that forge is forcing
2020-08-22 02:04:05 -07:00
CDAGaming
69c4c7a3b8 Added the license field that forge is forcing 2020-08-21 19:36:15 -05:00
ZacSharp
3c691bb498 But now it's working 2020-08-20 23:33:47 +02:00
ZacSharp
ea35a3478f Codacity again for the same and syntax
dab
2020-08-20 23:16:59 +02:00
ZacSharp
b7d1ba1fa5 Make Codacity happy 2020-08-20 23:11:55 +02:00
ZacSharp
5f686c1c12 improve isSafeToCancel in MovementDiagonal even more
It did not return true early enough for backfill while cornering over air
2020-08-20 22:55:42 +02:00
Leijurv
4eea8308d7 Merge pull request #1956 from RealIndrit/patch-1
🔥 Get yeeted unused code
2020-08-18 11:14:25 -07:00
kuthy
7f9704592e Made catch function wide 2020-08-18 15:40:12 +02:00
RealIndrit
523f13c430 🔥 Get yeeted unused code
Removed an unused function that can't be used anyways, because RayTraceUtils cant detect entity hit...
2020-08-18 12:36:10 +02:00
Leijurv
3b32c72d63 remove broken furry cringe 2020-08-17 17:41:13 -07:00
Leijurv
0102ce8fad Merge pull request #1946 from CDAGaming/1.16.2
✔️ 1.16.1 -> 1.16.2
2020-08-17 17:00:42 -07:00
CDAGaming
0b9bb9df2b 👌 Apply review suggestions from leijurv 2020-08-17 18:58:36 -05:00
CDAGaming
78dd64c73d Merge remote-tracking branch 'remote/master' into 1.16.2 2020-08-17 18:55:08 -05:00
CDAGaming
750cc619fb 🐛 Fix broken mixin 2020-08-17 18:51:04 -05:00
Leijurv
1c8079c051 Merge pull request #1058 from ADShenoi/patch-1
The grammar mistakes were corrected
2020-08-17 16:40:56 -07:00
Leijurv
2abd024b3c Merge branch 'master' into patch-1 2020-08-17 16:40:41 -07:00
Leijurv
7992b63aae Merge pull request #1346 from aUniqueUser/master
Make desktop notifications more useful
2020-08-17 16:38:36 -07:00
Leijurv
836ef3328c Merge pull request #1541 from babbaj/keep-annotation
Annotation for proguard -keep
2020-08-17 16:36:48 -07:00
Leijurv
c470dc1a17 Merge pull request #1158 from c0nn3r/master
Create .gitmessage
2020-08-17 16:33:48 -07:00
Leijurv
97a1029a72 Merge pull request #1554 from ByteZ1337/master
Fixed Typo
2020-08-17 16:17:47 -07:00
Leijurv
5f9602796a Merge pull request #1876 from CorruptedSeal/master
Update ExecutionControlCommands.java
2020-08-17 16:17:01 -07:00
CDAGaming
6eaa3a27f2 Merge remote-tracking branch 'remote/master' into 1.16.2 2020-08-17 18:15:59 -05:00
Leijurv
02e7886e77 properly set isSafeToCancel in MovementDiagonal, fixes #1788 2020-08-17 16:15:56 -07:00
Leijurv
9851623557 anti-indrit-cringe 2020-08-17 16:03:04 -07:00
Leijurv
f0d2bae3d1 Merge pull request #1947 from RealIndrit/master
Add auto tool setting
2020-08-17 15:57:37 -07:00
Leijurv
f3561cab47 SUPER cute code for repackOnAnyBlockChange 2020-08-17 15:54:42 -07:00
Leijurv
38d047dbd1 make the packer queue super cute and deduplicated 2020-08-17 15:19:11 -07:00
Leijurv
e6ba4ef309 we don't compile here 2020-08-17 15:00:57 -07:00
Leijurv
460833f7d6 Merge branch 'master' of github.com:cabaletta/baritone 2020-08-17 14:59:20 -07:00
RealIndrit
2eba22031a Maybe dont have ignore cost calculation override auto tool? 2020-08-14 22:47:39 +02:00
RealIndrit
ac55de63e9 Maybe dont have ignore cost calculation override auto tool? 2020-08-14 17:55:10 +02:00
RealIndrit
88e2fba447 Ok, Im actually retarded 2020-08-14 17:11:31 +02:00
RealIndrit
94ac15a8fc KEK False != True :clown: 2020-08-14 17:06:41 +02:00
RealIndrit
19355cb4f2 Added AutoToolMovement bypass setting for special usage cases, should not be used it not actually necessary 2020-08-14 10:58:15 +02:00
RealIndrit
e0ff16e2dd Nice brainfart 2020-08-14 10:34:21 +02:00
RealIndrit
49db52673a Lol 2020-08-14 10:25:51 +02:00
RealIndrit
f8872e1cd4 Everything can be traced back to getBestSlot(); 2020-08-14 10:14:02 +02:00
RealIndrit
2ed3e10833 And we try this again, because wtf?? 2020-08-13 23:20:30 +02:00
RealIndrit
2b6fe188ed Why calculate stuff that isnt needed... 2020-08-13 22:47:40 +02:00
RealIndrit
2ddc2c3660 Add auto tool settings because 2 lines of code lols 2020-08-13 22:36:34 +02:00
CDAGaming
17e16498b6 [Change] 1.16.1 -> 1.16.2 2020-08-13 13:47:50 -05:00
Leijurv
3f3358d0b1 Merge pull request #1942 from CDAGaming/live/1.16.1
[1.16.1] Live Testing Week Changes
2020-08-10 13:16:34 -07:00
CDAGaming
c006005cc7 Merge branch 'master' into live/1.16.1 2020-08-07 22:12:44 -05:00
Leijurv
b187d86074 fix orsond rock brain moment 2020-08-05 23:31:32 -07:00
Leijurv
727694fdd5 Merge pull request #1939 from orsondmc/startAtLayer
Introduce startAtLayer
2020-08-05 23:28:52 -07:00
orsondmc
7081cf7172 Introduce startAtLayer to start building at a specific layer in the schematic. To be used only with buildWithLayers true. 2020-08-06 16:23:13 +10:00
Leijurv
a25afd5c13 Merge pull request #1895 from John200410/patch-1
add rusherhack integration badge
2020-07-29 12:57:41 -07:00
Leijurv
c180eb9975 Update README.md 2020-07-29 12:52:19 -07:00
Leijurv
9e45998a65 brady shouldn't merge PRs that don't compile, thanks cdagaming 2020-07-26 13:21:51 -07:00
CDAGaming
6cd12bf84d [Fix] Attempted Fix for Forge Version Error 2020-07-26 09:47:05 -05:00
CDAGaming
a09f5d41f6 [Change] Also allow Forge Building
Also sets minimum Forge version to 32.0.72 so we don't need MixinBootstrap
2020-07-25 23:16:08 -05:00
CDAGaming
8aaa49c80d [Change] Edit CI to use Proguard Data 2020-07-25 22:59:33 -05:00
CDAGaming
4f1db04224 [Change] Updated Mappings 2020-07-25 22:53:22 -05:00
CDAGaming
dbeee33657 [Fix] Fix Proguard from Master Merge
Someone didn't verify this even built xD
2020-07-25 22:52:46 -05:00
CDAGaming
cd245f7f59 Merge remote-tracking branch 'remote/master' into live/1.16.1 2020-07-25 22:30:23 -05:00
CDAGaming
246dd2b0ad [Change] Added Auto Build Support 2020-07-25 22:28:38 -05:00
John
2acf64a0d0 add rusherhack integration badge
as of rusherhack v1.0 there is baritone API integration, similar to future's.
2020-07-20 03:12:24 -04:00
Brady
9d41367eff Merge pull request #1873 from CorruptedSeal/master
Update ProguardTask.java
2020-07-20 00:59:52 -05:00
Brady
20fa2c6f3d Merge pull request #1894 from CDAGaming/1.16.1
[Fix] Fixed BaritoneAutoTest in 1.16.1
2020-07-20 00:54:59 -05:00
CDAGaming
9cb021ffa0 Merge remote-tracking branch 'remote/1.16.1' into 1.16.1 2020-07-19 18:34:16 -05:00
CDAGaming
2acb8f2a37 [Fix] Fixed BaritoneAutoTest in 1.16.1 2020-07-19 18:33:58 -05:00
Brady
b044d244d0 Merge pull request #1892 from CDAGaming/1.16.1
[Change] Updated Mappings + Simplified Port
2020-07-19 16:53:20 -05:00
CDAGaming
807b1b5eb0 [Change] Updated Mappings + Simplified Port 2020-07-19 16:47:30 -05:00
Brady
819178b280 wildcard 2020-07-19 16:46:00 -05:00
Brady
039898c654 This null check should fix it lol 2020-07-19 16:26:18 -05:00
Brady
854985e5b5 Baritone 1.16.1 2020-07-19 15:50:56 -05:00
Leijurv
b64dd8f25f Merge pull request #1879 from elonmusksama/master
updated compatible versions to future badge
2020-07-16 21:12:13 -07:00
elongated muskrat
cbb3483456 updated compatible versions to future badge
updated the compatible versions to the future integrations badge
2020-07-16 14:35:17 -03:00
CorruptedSeal
6603e8b11e Update ExecutionControlCommands.java 2020-07-16 03:45:23 -06:00
CorruptedSeal
d522f9dfa3 Update ProguardTask.java 2020-07-15 01:34:19 -06:00
CorruptedSeal
f02476ff3a Update ProguardTask.java 2020-07-15 01:18:01 -06:00
Leijurv
eafca1e1fe yourkit 2020-07-06 17:07:59 -07:00
kuthy
0055a059f7 Formated Code 2020-07-03 16:52:03 +02:00
kuthy
8262909063 Fixing crash after clicking into the air 2020-07-03 15:36:44 +02:00
Leijurv
e42c19bfec thebes uwu 2020-06-27 22:25:47 -07:00
Moondarker
8fe05c9119 fixup! Allow multi-artifact building for Jitpack and local Maven repos 2020-06-20 23:16:20 +03:00
Moondarker
e8e6a9bc5c Allow multi-artifact building for Jitpack and local Maven repos 2020-06-20 23:11:16 +03:00
ByteZ1337
c41eb4afa0 Merge remote-tracking branch 'upstream/master' 2020-06-08 17:42:05 +02:00
Leijurv
80c8294f5f maintain obscenely obvious pro impact bias in subconscious coloring 2020-06-04 11:32:20 -07:00
Leijurv
fc58673abd Merge pull request #1709 from dominikaaaa/patch-1
Added blue badge to integrations badges
2020-06-04 11:31:28 -07:00
Dominika
ca831bc734 Added blue badge to integrations badges 2020-05-18 13:47:57 -04:00
Leijurv
a76cf0fe9a brady more like brainletdy 2020-05-17 18:35:41 -07:00
Leijurv
6e78384bcf Merge pull request #1700 from babbaj/forge-mine-fix
Fix #mine in forge
2020-05-16 16:01:16 -07:00
Babbaj
47501ab8e1 fix terrible formatting 2020-05-16 18:23:38 -04:00
Babbaj
682de71ab7 Fix #mine in forge 2020-05-16 18:21:27 -04:00
Brady
410ea059fc Update mappings to 20200515-1.15.1 2020-05-15 21:03:08 -05:00
Leijurv
688853c523 Merge pull request #1657 from babbaj/rename
bring back ExampleBaritoneControl
2020-05-03 22:24:45 -07:00
Babbaj
806dc8f017 This had to be done 2020-05-04 01:15:18 -04:00
Leijurv
89ab78a329 Update README.md 2020-05-03 18:51:21 -07:00
Leijurv
3a7cb5e020 Merge pull request #1629 from dominikaaaa/patch-1
Fix broken API Settings link in USAGE. Close #1040
2020-04-27 16:59:56 -07:00
Leijurv
d0f594065d Update README.md 2020-04-26 13:22:55 -07:00
Dominika
10677040e0 Fix broken API Settings link in USAGE. Close #1040 2020-04-26 15:22:24 -04:00
Leijurv
c2624bbaaf Update README.md 2020-04-21 13:32:47 -07:00
Leijurv
b7870d059c v1.5.3 2020-04-21 12:34:46 -07:00
Leijurv
06865f1561 Merge branch '1.14.4' into 1.15.2 2020-04-21 12:34:32 -07:00
Leijurv
fe0b54cfb4 v1.4.6 2020-04-21 12:23:47 -07:00
Leijurv
0bf7bb4b39 Merge branch '1.13.2' into 1.14.4 2020-04-21 12:17:54 -07:00
Leijurv
2a830b6b68 v1.3.8 2020-04-21 12:05:09 -07:00
Leijurv
fc620f8ba8 Merge branch 'master' into 1.13.2 2020-04-21 12:04:44 -07:00
Leijurv
33d4dd47bb v1.2.14 2020-04-21 12:02:07 -07:00
Leijurv
ec92ab8b39 Update README.md 2020-04-18 22:07:18 -07:00
ByteZ1337
ff3234fcdd Fixed Typo
Fixed Typo in the Long Description of the Goto Command
2020-04-13 20:39:56 +02:00
Babbaj
c32652394e Annotation for proguard -keep 2020-04-12 03:01:24 -04:00
Leijurv
580ba60762 Merge pull request #1344 from dominikaaaa/fix/setupmd
Change 1.14 to 1.15 in SETUP.md
2020-04-09 14:02:28 -07:00
Dominika
0e7bf25de7 fix setup.md as per leij's recommendations 2020-04-09 17:01:26 -04:00
Leijurv
315977e1f2 Merge branch '1.13.2' into 1.14.4 2020-04-07 23:45:48 -07:00
Leijurv
e7658b75ef Merge branch 'master' into 1.13.2 2020-04-07 23:45:42 -07:00
Leijurv
e218ced2c7 i hate myself 2020-03-30 22:23:43 -07:00
Leijurv
3cc4c0ea98 Revert "Update README.md"
This reverts commit ac2a88d186.
2020-03-25 21:52:42 -07:00
Leijurv
ac2a88d186 Update README.md 2020-03-25 21:50:12 -07:00
Leijurv
8c3fac977e unscuff 2020-03-25 21:19:15 -07:00
Leijurv
be2ee1a07c Merge pull request #1446 from babbaj/1.15.2
Add support for building forge jars
2020-03-25 21:07:45 -07:00
Babbaj
a4f7207089 ok 2020-03-25 21:00:25 -04:00
Babbaj
aead997b13 dont sha old jars 2020-03-25 20:53:37 -04:00
Leijurv
2d421e66dc v1.5.2 2020-03-25 17:51:56 -07:00
Leijurv
e8370f1348 Merge branch '1.14.4' into 1.15.2 2020-03-25 17:51:42 -07:00
Leijurv
16f6baf216 v1.4.5 2020-03-25 17:39:01 -07:00
Leijurv
89ab959fb4 Merge branch '1.13.2' into 1.14.4 2020-03-25 17:38:28 -07:00
Babbaj
b13b86b67a get the hash of all jars in the dist directory 2020-03-25 20:34:54 -04:00
Babbaj
6cc31a9422 update mods.toml and fix modid 2020-03-25 20:23:41 -04:00
Babbaj
592a01f3e4 cleanup 2020-03-25 19:00:26 -04:00
Babbaj
db718a1781 Add @Mod annotated class 2020-03-25 01:16:30 -04:00
Babbaj
261bf005f6 Scuffed support for forge and building a forge jar 2020-03-25 00:28:55 -04:00
Leijurv
e926ff2a16 Merge branch '1.14.4' into 1.15.2 2020-03-14 12:35:33 -07:00
Leijurv
8794bfd79a fix javadoc errors 2020-03-14 12:35:03 -07:00
Leijurv
500643aec7 Merge branch '1.14.4' into 1.15.2 2020-03-14 12:25:46 -07:00
Leijurv
58bb6c4357 Merge branch '1.13.2' into 1.14.4 2020-03-14 12:25:36 -07:00
Bella Who
d6106a44f7 Remove dropbox link as 1.15.2 is now officially released 2020-03-13 09:00:17 -04:00
Brady
369d726a96 Merge branch '1.14.4' into 1.15.2 2020-03-07 20:45:07 -06:00
Brady
e0beba38af Merge branch '1.13.2' into 1.14.4 2020-03-07 20:37:47 -06:00
Brady
e0bd82d7ff lol? 2020-03-02 17:15:01 -06:00
aUniqueUser
0434e1c5d3 Add more entries to MineProcess 2020-02-29 12:24:06 -05:00
aUniqueUser
4c79701d22 Make desktop notifications more useful 2020-02-29 11:28:18 -05:00
Bella
5f49bedc42 Change 1.14 to 1.15 in SETUP.md 2020-02-28 17:26:59 -05:00
Leijurv
5ec4b89caa Merge branch '1.14.4' into 1.15.2 2020-02-24 19:28:51 -08:00
Leijurv
5fd3e236e2 Merge branch '1.13.2' into 1.14.4 2020-02-24 19:28:42 -08:00
Leijurv
2d941f6264 Merge branch '1.14.4' into 1.15.2 2020-02-24 19:02:20 -08:00
Leijurv
1a8d93b946 Merge branch '1.13.2' into 1.14.4 2020-02-24 18:56:56 -08:00
Leijurv
606e9bf97c v1.5.1 2020-02-14 15:28:37 -08:00
Leijurv
47ae75a9d6 Merge branch '1.14.4' into 1.15.2 2020-02-14 15:26:34 -08:00
Leijurv
25587e317a fix link click crash 2020-02-14 15:26:03 -08:00
Leijurv
b3ba129fc5 honey is stupid lets just not 2020-02-13 18:59:08 -08:00
Leijurv
746b7b5c88 not unscuffed, just differently scuffed 2020-02-13 18:57:32 -08:00
Brady
db2f6ec78d Update mappings to 20200213-1.15.1 2020-02-13 14:44:29 -06:00
Leijurv
96bcabff8b v1.5.0 2020-02-13 12:04:29 -08:00
Leijurv
0a1fe857dc cant walk through honey blocks 2020-02-13 12:03:09 -08:00
Brady
49aaa55172 Fix click 2020-02-09 13:38:46 -06:00
Leijurv
e03e251541 fix crouching 2020-02-05 17:45:22 -08:00
Leijurv
f5380881f4 brady fix mixins im incompetent 2020-02-05 16:10:55 -08:00
Leijurv
a022778fb6 cursed but fixes blockoptionalmeta 2020-02-05 15:14:32 -08:00
Leijurv
8543a99fba compiles and can path 2020-02-05 14:54:03 -08:00
Brady
997888fe85 Merge branch '1.14.4' into 1.15.1 2020-01-10 20:15:43 -06:00
Brady
94a2e13561 Merge branch '1.13.2' into 1.14.4 2020-01-10 20:14:46 -06:00
Brady
2d2030ecdf Fix renderGoalXZBeacon 2020-01-10 20:07:33 -06:00
Brady
a3dec3a47e Render stuff should be fixed now.
There is likely a better solution, but I think this is fine in order to keep things in-line with the development over at Mojang.
2020-01-10 19:37:00 -06:00
Brady
eb348120d9 Fix Mixins 2020-01-10 18:59:57 -06:00
Brady
27cb708d40 Fix some render stuff but it's still broken 2020-01-09 20:09:49 -06:00
Leijurv
36bbe430d4 add fixmes 2020-01-09 17:27:28 -08:00
Leijurv
80952e091d comment out anything that isn't instantly obvious how to fix (e.g. anything involving rendering) 2020-01-09 17:15:05 -08:00
Leijurv
760ac5dd8f v1.4.4 2020-01-04 21:58:55 -08:00
Brady
92966dc57c Merge branch '1.13.2' into 1.14.4 2019-12-31 21:57:55 -06:00
Conner Vercellino
0fba32853b Create .gitmessage 2019-11-20 12:26:37 -08:00
ads123ads
9f5d9bceaa The grammar mistakes were corrected 2019-10-15 15:34:22 +05:30
Leijurv
214225c08d v1.4.3 2019-10-13 22:53:05 -07:00
Leijurv
05b5894348 a much better way to deal with this 2019-10-13 10:53:25 -07:00
Leijurv
c528dba0ea v1.4.2 2019-10-11 17:52:11 -07:00
Leijurv
2b3a302a5f Merge branch '1.13.2' into 1.14.4 2019-10-11 17:04:53 -07:00
Leijurv
84a257faf4 fix air scuff 2019-10-06 17:37:07 -07:00
Leijurv
34620a448e Merge branch '1.13.2' into 1.14.4 2019-10-06 17:36:25 -07:00
Leijurv
e54d63576f Merge branch '1.13.2' into 1.14.4 2019-10-06 17:02:41 -07:00
Leijurv
02419f8b07 v1.4.1 2019-08-20 15:25:30 -07:00
Leijurv
ddeb2a5c14 perhaps fix concurrent modification issues 2019-08-20 15:07:36 -07:00
Leijurv
8973b73bfa reduce spamminess 2019-08-20 14:58:00 -07:00
Leijurv
4557bab3c4 maybe travis fix 2019-08-20 14:49:16 -07:00
Leijurv
6e185b580c Merge branch '1.13.2' into 1.14.4 2019-08-20 14:33:18 -07:00
Leijurv
4e73880d4a Merge branch '1.14.4' of github.com:cabaletta/baritone into 1.14.4 2019-08-17 20:29:32 -07:00
Leijurv
0bb148844d Merge branch '1.13.2' into 1.14.4 2019-08-17 16:10:59 -07:00
Leijurv
e53b207148 Merge branch '1.13.2' into 1.14.4 2019-08-17 16:09:45 -07:00
Leijurv
afc639ab4b bypass 2019-08-14 22:31:46 -07:00
Leijurv
afebdce1f8 fix crash and ice behavior 2019-07-25 16:02:29 -07:00
Leijurv
2ca4c3042a fix realms 2019-07-25 15:50:58 -07:00
Leijurv
6bee5828a0 thank you brigadier very cool 2019-07-23 21:38:42 -07:00
Leijurv
8a5cc5b17d should be peaceful anyway 2019-07-23 20:54:00 -07:00
Leijurv
4e563c6130 could this be the worst possible way to copy a chunk array 2019-07-23 20:44:07 -07:00
Leijurv
01cf3c67a6 whatever this works lol 2019-07-23 19:25:48 -07:00
Leijurv
36315c5151 working for realsies 2019-07-23 15:47:18 -07:00
Leijurv
9f951f261d fixes 2019-07-23 15:39:19 -07:00
Leijurv
4c8907c629 it launches 2019-07-23 14:12:44 -07:00
Leijurv
223791cea7 Merge branch '1.13.2' into 1.14.2 2019-07-23 12:09:39 -07:00
Leijurv
8758c77ac0 most of the way there 2019-06-10 18:25:20 -07:00
Leijurv
dba496471e api sourceset done 2019-06-10 12:43:02 -07:00
345 changed files with 15176 additions and 5339 deletions

View File

@@ -11,7 +11,7 @@ Operating system:
Java version:
Minecraft version:
Baritone version:
Forge mods (if used):
Other mods (if used):
## Exception, error or logs
Please find your `latest.log` or `debug.log` in this folder and attach it to the issue

43
.github/workflows/gradle_build.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Java CI with Gradle
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build -Pmod_version="$(git describe --always --tags --first-parent | cut -c2-)"
- name: Archive Artifacts
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: dist/
- name: Archive mapping.txt
uses: actions/upload-artifact@v4
with:
name: Mappings
path: mapping/

26
.github/workflows/run_tests.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: Tests
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Executing tests
run: ./gradlew test

21
.gitignore vendored
View File

@@ -4,6 +4,7 @@
run/
autotest/
dist/
volderyarn/
# Gradle
build/
@@ -20,6 +21,26 @@ classes/
*.iws
/logs/
tweaker/logs/
common/logs/
# Eclipse Files
.classpath
.project
.settings/
baritone_Client.launch
# Copyright Files
!/.idea/copyright/Baritone.xml
!/.idea/copyright/profiles_settings.xml
.vscode/launch.json
.architectury-transformer
mapping
libs/lwjgl-platform-2.9.4-nightly-20150209-natives-osx.jar
libs/java-objc-bridge-1.1.jar
mapping

14
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,14 @@
image: java:8
before_script:
- which java
- which javac
build:
script:
- ./gradlew build
- ./gradlew build -Pbaritone.forge_build
artifacts:
paths:
- dist/*
expire_in: 1 week

31
.gitmessage Normal file
View File

@@ -0,0 +1,31 @@
<emoji> <title> (<ticket>)
# 📝 Update README.md (WD-1234)
# ✅ Add unit test for inputs (WD-1234)
# <emoji> can be:
# 🎨 :art: when improving structure of the code
# ⚡️ :zap: when improving performance
# 🔥 :fire: when removing code or files
# ✨ :sparkles: when introducing new features
# 🚧 :construction: when work in progress
# 🔨 :hammer: when refactoring code
# 📝 :memo: when writing docs
# 💄 :lipstick: when updating the UI and style files
# 📈 :chart_with_upwards_trend: when adding analytics or tracking code
# 🌐 :globe_with_meridians: when adding internationalization and localization
# ✏️ :pencil2: when fixing typos
# 🚚 :truck: when moving or renaming files
# ✅ :white_check_mark: when adding tests
# 👌 :ok_hand: when updating code due to code review changes
# 🐛 :bug: when fixing a bug
# 🚑 :ambulance: when doing a critical hotfix
# 🚨 :rotating_light: when removing linter warnings
# 🔀 :twisted_rightwards_arrows: when merging branches
# ⬆️ :arrow_up: when upgrading dependencies
# ⬇️ :arrow_down: when downgrading dependencies
# 🔧 :wrench: when changing configuration files
# 🔖 :bookmark: when releasing / version tagging
# 💚 :green_heart: when fixing the CI build

View File

@@ -1,29 +0,0 @@
language: java
sudo: required
services:
- docker
install:
- travis_retry docker build -t cabaletta/baritone .
script:
- docker run --name baritone cabaletta/baritone ./gradlew javadoc
#- docker run --name baritone cabaletta/baritone /bin/sh -c "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 128x128x24 -ac +extension GLX +render; DISPLAY=:99 BARITONE_AUTO_TEST=true ./gradlew runAutoTest; cat /code/autotest/success"
- docker cp baritone:/code/dist dist
- ls dist
- cat dist/checksums.txt
deploy:
provider: releases
api_key:
secure: YOuiXoJNpB4bW89TQoY2IGXg0tqOKls55YMXsSPU6Mx8WzRu8CjjO/A8KA9nGfNrKM+NucjiKr/h53O2Dp2uyy0i0SLvav/G0MaBMeB1NlPRwFopi6tVPNaoZsvr8NW4BIURhspckYLpOTYWnfmOkIv8q7AxrjUZWPKDlq0dte20UxEqUE6msHJ7U9XlKo/4fX40kvWMfwGI2hTyAtL0cRT1QPsd+uW3OQjAPcQj+jKaWld46V8pBK8g9Qde9mo8HC9NBv97zw1bBF1EFkynW569kElHvaS2Opl2QLGaf66guDbpnqDpGHMhQrDdxsZHJ4RksyITn+8A9UArmbkU35BxKqBeQqOWxod2+M0axdLh1pvX43Q1t9n7RiZBf7GvV8vkXL5Sjf8v6Y4LqkJGhvQkTUwpH+0knwrE761DMCtBC34AiWG70D4u7msmhurkflr9kmRHSj/3lyJ1Q2lkt8L+FOAlQBVs64vXTsfgc6Yge7N0O3UD5hCkrDNoz3BzhNBdCkbdxdKCGip71UZgUNkPy9o3ui8jATNj9ypx3+U8ovqP0XWlJqUZmyeXyNGW9NrLeCkRLTlLnZ/dv6OPONa1oAu4TwF1w5A+TGRFZcZjH/PnZKZDQ1OYQOR6drLKRYdr2unvuf5KUKUGqZ7aYtLGhP0rBvGWddRV7DSmX/s=
all_branches: true
file_glob: true
file:
- dist/*
skip_cleanup: true
on:
tags: true
repo: cabaletta/baritone

View File

@@ -1,23 +1,16 @@
FROM debian:stretch
RUN echo 'deb http://deb.debian.org/debian stretch-backports main' > /etc/apt/sources.list.d/stretch-backports.list
FROM ubuntu:focal
ENV DEBIAN_FRONTEND noninteractive
RUN apt update -y
RUN apt install \
openjdk-8-jdk \
openjdk-17-jdk \
git \
--assume-yes
RUN apt install -qq --assume-yes mesa-utils libgl1-mesa-glx libxcursor1 libxrandr2 libxxf86vm1 x11-xserver-utils xfonts-base xserver-common
COPY . /code
WORKDIR /code
# this .deb is specially patched to support lwjgl
# source: https://github.com/tectonicus/tectonicus/issues/60#issuecomment-154239173
RUN dpkg -i scripts/xvfb_1.16.4-1_amd64.deb
RUN ./gradlew build

View File

@@ -49,4 +49,3 @@ See <a href="https://github.com/cabaletta/baritone/issues">issues</a> for more.
Things it may not ever have, from most likely to least likely =(
- Boats
- Horses (2x3 path instead of 1x2)
- Elytra

134
README.md
View File

@@ -1,46 +1,92 @@
# Baritone
[![Build Status](https://travis-ci.com/cabaletta/baritone.svg?branch=master)](https://travis-ci.com/cabaletta/baritone/)
[![Release](https://img.shields.io/github/release/cabaletta/baritone.svg)](https://github.com/cabaletta/baritone/releases/)
[![License](https://img.shields.io/badge/license-LGPL--3.0%20with%20anime%20exception-green.svg)](LICENSE)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/a73d037823b64a5faf597a18d71e3400)](https://www.codacy.com/app/leijurv/baritone?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=cabaletta/baritone&amp;utm_campaign=Badge_Grade)
[![HitCount](http://hits.dwyl.com/cabaletta/baritone.svg)](http://hits.dwyl.com/cabaletta/baritone/)
[![GitHub All Releases](https://img.shields.io/github/downloads/cabaletta/baritone/total.svg)](https://github.com/cabaletta/baritone/releases/)
[![Minecraft](https://img.shields.io/badge/MC-1.12.2-brightgreen.svg)](https://github.com/cabaletta/baritone/tree/master/)
[![Minecraft](https://img.shields.io/badge/MC-1.13.2-brightgreen.svg)](https://github.com/cabaletta/baritone/tree/1.13.2/)
[![Minecraft](https://img.shields.io/badge/MC-1.14.4-brightgreen.svg)](https://github.com/cabaletta/baritone/tree/1.14.4/)
[![Minecraft](https://img.shields.io/badge/MC-1.15.2-brightgreen.svg)](https://github.com/cabaletta/baritone/tree/1.15.2/)
[![Code of Conduct](https://img.shields.io/badge/%E2%9D%A4-code%20of%20conduct-blue.svg?style=flat)](https://github.com/cabaletta/baritone/blob/master/CODE_OF_CONDUCT.md)
[![Known Vulnerabilities](https://snyk.io/test/github/cabaletta/baritone/badge.svg?targetFile=build.gradle)](https://snyk.io/test/github/cabaletta/baritone?targetFile=build.gradle)
[![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/cabaletta/baritone/issues/)
[![Issues](https://img.shields.io/github/issues/cabaletta/baritone.svg)](https://github.com/cabaletta/baritone/issues/)
[![GitHub issues-closed](https://img.shields.io/github/issues-closed/cabaletta/baritone.svg)](https://github.com/cabaletta/baritone/issues?q=is%3Aissue+is%3Aclosed)
[![Pull Requests](https://img.shields.io/github/issues-pr/cabaletta/baritone.svg)](https://github.com/cabaletta/baritone/pulls/)
![Code size](https://img.shields.io/github/languages/code-size/cabaletta/baritone.svg)
![GitHub repo size](https://img.shields.io/github/repo-size/cabaletta/baritone.svg)
![Lines of Code](https://tokei.rs/b1/github/cabaletta/baritone?category=code)
[![GitHub contributors](https://img.shields.io/github/contributors/cabaletta/baritone.svg)](https://github.com/cabaletta/baritone/graphs/contributors/)
[![GitHub commits](https://img.shields.io/github/commits-since/cabaletta/baritone/v1.0.0.svg)](https://github.com/cabaletta/baritone/commit/)
[![Impact integration](https://img.shields.io/badge/Impact%20integration-v1.2.10%20/%20v1.3.5%20/%20v1.4.3-brightgreen.svg)](https://impactclient.net/)
[![ForgeHax integration](https://img.shields.io/badge/ForgeHax%20%22integration%22-scuffed-yellow.svg)](https://github.com/fr1kin/ForgeHax/)
[![Aristois add-on integration](https://img.shields.io/badge/Aristois%20add--on%20integration-v1.3.4%20/%20v1.4.1-green.svg)](https://gitlab.com/emc-mods-indrit/baritone_api)
[![rootNET integration](https://img.shields.io/badge/rootNET%20integration-v1.2.11-green.svg)](https://rootnet.dev/)
[![WWE integration](https://img.shields.io/badge/WWE%20%22integration%22-master%3F-green.svg)](https://wweclient.com/)
[![Future integration](https://img.shields.io/badge/Future%20integration-Soon™%3F%3F%3F-red.svg)](https://futureclient.net/)
[![forthebadge](https://forthebadge.com/images/badges/built-with-swag.svg)](http://forthebadge.com/)
[![forthebadge](https://forthebadge.com/images/badges/mom-made-pizza-rolls.svg)](http://forthebadge.com/)
<p align="center">
<a href="https://github.com/cabaletta/baritone/releases/"><img src="https://img.shields.io/github/downloads/cabaletta/baritone/total.svg" alt="GitHub All Releases"/></a>
</p>
A Minecraft pathfinder bot.
<p align="center">
<a href="#Baritone"><img src="https://img.shields.io/badge/MC-1.12.2-brightgreen.svg" alt="Minecraft"/></a>
<a href="#Baritone"><img src="https://img.shields.io/badge/MC-1.13.2-yellow.svg" alt="Minecraft"/></a>
<a href="#Baritone"><img src="https://img.shields.io/badge/MC-1.14.4-yellow.svg" alt="Minecraft"/></a>
<a href="#Baritone"><img src="https://img.shields.io/badge/MC-1.15.2-yellow.svg" alt="Minecraft"/></a>
<a href="#Baritone"><img src="https://img.shields.io/badge/MC-1.16.5-yellow.svg" alt="Minecraft"/></a>
<a href="#Baritone"><img src="https://img.shields.io/badge/MC-1.17.1-yellow.svg" alt="Minecraft"/></a>
<a href="#Baritone"><img src="https://img.shields.io/badge/MC-1.18.2-yellow.svg" alt="Minecraft"/></a>
<a href="#Baritone"><img src="https://img.shields.io/badge/MC-1.19.2-brightgreen.svg" alt="Minecraft"/></a>
<a href="#Baritone"><img src="https://img.shields.io/badge/MC-1.19.4-brightgreen.svg" alt="Minecraft"/></a>
<a href="#Baritone"><img src="https://img.shields.io/badge/MC-1.20.1-brightgreen.svg" alt="Minecraft"/></a>
<a href="#Baritone"><img src="https://img.shields.io/badge/MC-1.21.3-brightgreen.svg" alt="Minecraft"/></a>
</p>
Baritone is the pathfinding system used in [Impact](https://impactclient.net/) since 4.4. There's a [showcase video](https://youtu.be/CZkLXWo4Fg4) made by @Adovin#0730 on Baritone which I recommend. [Here's](https://www.youtube.com/watch?v=StquF69-_wI) a (very old!) video I made showing off what it can do.
<p align="center">
<a href="https://travis-ci.com/cabaletta/baritone/"><img src="https://travis-ci.com/cabaletta/baritone.svg?branch=master" alt="Build Status"/></a>
<a href="https://github.com/cabaletta/baritone/releases/"><img src="https://img.shields.io/github/release/cabaletta/baritone.svg" alt="Release"/></a>
<a href="LICENSE"><img src="https://img.shields.io/badge/license-LGPL--3.0%20with%20anime%20exception-green.svg" alt="License"/></a>
<a href="https://www.codacy.com/gh/cabaletta/baritone/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=cabaletta/baritone&amp;utm_campaign=Badge_Grade"><img src="https://app.codacy.com/project/badge/Grade/cadab857dab049438b6e28b3cfc5570e" alt="Codacy Badge"/></a>
<a href="https://github.com/cabaletta/baritone/blob/master/CODE_OF_CONDUCT.md"><img src="https://img.shields.io/badge/%E2%9D%A4-code%20of%20conduct-blue.svg?style=flat" alt="Code of Conduct"/></a>
<a href="https://snyk.io/test/github/cabaletta/baritone?targetFile=build.gradle"><img src="https://snyk.io/test/github/cabaletta/baritone/badge.svg?targetFile=build.gradle" alt="Known Vulnerabilities"/></a>
<a href="https://github.com/cabaletta/baritone/issues/"><img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="Contributions welcome"/></a>
<a href="https://github.com/cabaletta/baritone/issues/"><img src="https://img.shields.io/github/issues/cabaletta/baritone.svg" alt="Issues"/></a>
<a href="https://github.com/cabaletta/baritone/issues?q=is%3Aissue+is%3Aclosed"><img src="https://img.shields.io/github/issues-closed/cabaletta/baritone.svg" alt="GitHub issues-closed"/></a>
<a href="https://github.com/cabaletta/baritone/pulls/"><img src="https://img.shields.io/github/issues-pr/cabaletta/baritone.svg" alt="Pull Requests"/></a>
<a href="https://github.com/cabaletta/baritone/graphs/contributors/"><img src="https://img.shields.io/github/contributors/cabaletta/baritone.svg" alt="GitHub contributors"/></a>
<a href="https://github.com/cabaletta/baritone/commit/"><img src="https://img.shields.io/github/commits-since/cabaletta/baritone/v1.0.0.svg" alt="GitHub commits"/></a>
<img src="https://img.shields.io/github/languages/code-size/cabaletta/baritone.svg" alt="Code size"/>
<img src="https://img.shields.io/github/repo-size/cabaletta/baritone.svg" alt="GitHub repo size"/>
<img src="https://tokei.rs/b1/github/cabaletta/baritone?category=code&style=flat" alt="Lines of Code"/>
<img src="https://img.shields.io/badge/Badges-36-blue.svg" alt="yes"/>
</p>
The easiest way to install Baritone is to install [Impact](https://impactclient.net/), which comes with Baritone. The second easiest way (for 1.12.2 only) is to install the v1.2.* forge api jar from [releases](https://github.com/cabaletta/baritone/releases). Otherwise, see [Installation & setup](SETUP.md). Once Baritone is installed, look [here](USAGE.md) for instructions on how to use it.
<p align="center">
<a href="https://impactclient.net/"><img src="https://img.shields.io/badge/Impact%20integration-v1.2.14%20/%20v1.3.8%20/%20v1.4.6%20/%20v1.5.3%20/%20v1.6.3-brightgreen.svg" alt="Impact integration"/></a>
<a href="https://github.com/lambda-client/lambda"><img src="https://img.shields.io/badge/Lambda%20integration-v1.2.17-brightgreen.svg" alt="Lambda integration"/></a>
<a href="https://github.com/fr1kin/ForgeHax/"><img src="https://img.shields.io/badge/ForgeHax%20%22integration%22-scuffed-yellow.svg" alt="ForgeHax integration"/></a>
<a href="https://aristois.net/"><img src="https://img.shields.io/badge/Aristois%20add--on%20integration-v1.6.3-green.svg" alt="Aristois add-on integration"/></a>
<a href="https://rootnet.dev/"><img src="https://img.shields.io/badge/rootNET%20integration-v1.2.14-green.svg" alt="rootNET integration"/></a>
<a href="https://futureclient.net/"><img src="https://img.shields.io/badge/Future%20integration-v1.2.12%20%2F%20v1.3.6%20%2F%20v1.4.4-red" alt="Future integration"/></a>
<a href="https://rusherhack.org/"><img src="https://img.shields.io/badge/RusherHack%20integration-v1.2.14-green" alt="RusherHack integration"/></a>
</p>
For 1.15.2, [click here](https://www.youtube.com/watch?v=j1qKtCZFURM) and see description.
<p align="center">
<a href="http://forthebadge.com/"><img src="https://web.archive.org/web/20230604002050/https://forthebadge.com/images/badges/built-with-swag.svg" alt="forthebadge"/></a>
<a href="http://forthebadge.com/"><img src="https://web.archive.org/web/20230604002050/https://forthebadge.com/images/badges/mom-made-pizza-rolls.svg" alt="forthebadge"/></a>
</p>
A Minecraft pathfinder bot.
Baritone is the pathfinding system used in [Impact](https://impactclient.net/) since 4.4. [Here's](https://www.youtube.com/watch?v=StquF69-_wI) a (very old!) video I made showing off what it can do.
[**Baritone Discord Server**](http://discord.gg/s6fRBAUpmr)
**Quick download links:**
| Forge | Fabric | NeoForge |
|---------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|
| [1.12.2 Forge](https://github.com/cabaletta/baritone/releases/download/v1.2.19/baritone-api-forge-1.2.19.jar) | | |
| [1.16.5 Forge](https://github.com/cabaletta/baritone/releases/download/v1.6.5/baritone-api-forge-1.6.5.jar) | [1.16.5 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.6.5/baritone-api-fabric-1.6.5.jar) | |
| [1.17.1 Forge](https://github.com/cabaletta/baritone/releases/download/v1.7.3/baritone-api-forge-1.7.3.jar) | [1.17.1 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.7.3/baritone-api-fabric-1.7.3.jar) | |
| [1.18.2 Forge](https://github.com/cabaletta/baritone/releases/download/v1.8.6/baritone-api-forge-1.8.6.jar) | [1.18.2 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.8.6/baritone-api-fabric-1.8.6.jar) | |
| [1.19.2 Forge](https://github.com/cabaletta/baritone/releases/download/v1.9.4/baritone-api-forge-1.9.4.jar) | [1.19.2 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.9.4/baritone-api-fabric-1.9.4.jar) | |
| [1.19.3 Forge](https://github.com/cabaletta/baritone/releases/download/v1.9.1/baritone-api-forge-1.9.1.jar) | [1.19.3 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.9.1/baritone-api-fabric-1.9.1.jar) | |
| [1.19.4 Forge](https://github.com/cabaletta/baritone/releases/download/v1.9.5/baritone-api-forge-1.9.5.jar) | [1.19.4 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.9.5/baritone-api-fabric-1.9.5.jar) | |
| [1.20.1 Forge](https://github.com/cabaletta/baritone/releases/download/v1.10.3/baritone-api-forge-1.10.3.jar) | [1.20.1 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.10.3/baritone-api-fabric-1.10.3.jar) | |
| [1.20.3 Forge](https://github.com/cabaletta/baritone/releases/download/v1.10.4/baritone-api-forge-1.10.4.jar) | [1.20.3 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.10.4/baritone-api-fabric-1.10.4.jar) | [1.20.3 NeoForge](https://github.com/cabaletta/baritone/releases/download/v1.10.4/baritone-api-neoforge-1.10.4.jar) |
| [1.20.4 Forge](https://github.com/cabaletta/baritone/releases/download/v1.10.4/baritone-api-forge-1.10.4.jar) | [1.20.4 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.10.4/baritone-api-fabric-1.10.4.jar) | [1.20.4 NeoForge](https://github.com/cabaletta/baritone/releases/download/v1.10.4/baritone-api-neoforge-1.10.4.jar) |
| [1.21.1 Forge](https://github.com/cabaletta/baritone/releases/download/v1.11.2/baritone-api-forge-1.11.2.jar) | [1.21.1 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.11.2/baritone-api-fabric-1.11.2.jar) | [1.21.1 NeoForge](https://github.com/cabaletta/baritone/releases/download/v1.11.2/baritone-api-neoforge-1.11.2.jar) |
| [1.21.3 Forge](https://github.com/cabaletta/baritone/releases/download/v1.11.1/baritone-api-forge-1.11.1.jar) | [1.21.3 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.11.1/baritone-api-fabric-1.11.1.jar) | [1.21.3 NeoForge](https://github.com/cabaletta/baritone/releases/download/v1.11.1/baritone-api-neoforge-1.11.1.jar) |
| [1.21.4 Forge](https://github.com/cabaletta/baritone/releases/download/v1.13.1/baritone-api-forge-1.13.1.jar) | [1.21.4 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.13.1/baritone-api-fabric-1.13.1.jar) | [1.21.4 NeoForge](https://github.com/cabaletta/baritone/releases/download/v1.13.1/baritone-api-neoforge-1.13.1.jar) |
| [1.21.5 Forge](https://github.com/cabaletta/baritone/releases/download/v1.14.0/baritone-api-forge-1.14.0.jar) | [1.21.5 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.14.0/baritone-api-fabric-1.14.0.jar) | [1.21.5 NeoForge](https://github.com/cabaletta/baritone/releases/download/v1.14.0/baritone-api-neoforge-1.14.0.jar) |
| [1.21.6 Forge](https://github.com/cabaletta/baritone/releases/download/v1.15.0/baritone-api-forge-1.15.0.jar) | [1.21.6 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.15.0/baritone-api-fabric-1.15.0.jar) | [1.21.6 NeoForge](https://github.com/cabaletta/baritone/releases/download/v1.15.0/baritone-api-neoforge-1.15.0.jar) |
| [1.21.7 Forge](https://github.com/cabaletta/baritone/releases/download/v1.15.0/baritone-api-forge-1.15.0.jar) | [1.21.7 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.15.0/baritone-api-fabric-1.15.0.jar) | [1.21.7 NeoForge](https://github.com/cabaletta/baritone/releases/download/v1.15.0/baritone-api-neoforge-1.15.0.jar) |
| [1.21.8 Forge](https://github.com/cabaletta/baritone/releases/download/v1.15.0/baritone-api-forge-1.15.0.jar) | [1.21.8 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.15.0/baritone-api-fabric-1.15.0.jar) | [1.21.8 NeoForge](https://github.com/cabaletta/baritone/releases/download/v1.15.0/baritone-api-neoforge-1.15.0.jar) |
**How to immediately get started:** Type `#goto 1000 500` in chat to go to x=1000 z=500. Type `#mine diamond_ore` to mine diamond ore. Type `#stop` to stop. For more, read [the usage page](USAGE.md) and/or watch this [tutorial playlist](https://www.youtube.com/playlist?list=PLnwnJ1qsS7CoQl9Si-RTluuzCo_4Oulpa). Also try `#elytra` for Elytra flying in the Nether using fireworks ([trailer](https://youtu.be/4bGGPo8yiHo), [usage](https://youtu.be/NnSlQi-68eQ)). For help, join the [Baritone Discord Server](http://discord.gg/s6fRBAUpmr).
For other versions of Minecraft or more complicated situations or for development, see [Installation & setup](SETUP.md). For 1.16.5, [click here](https://www.youtube.com/watch?v=_4eVJ9Qz2J8) and see description. Once Baritone is installed, look [here](USAGE.md) for instructions on how to use it. There's a [showcase video](https://youtu.be/CZkLXWo4Fg4) made by @Adovin#6313 on Baritone which I recommend. For help, join the [Baritone Discord Server](http://discord.gg/s6fRBAUpmr).
This project is an updated version of [MineBot](https://github.com/leijurv/MineBot/),
the original version of the bot for Minecraft 1.8.9, rebuilt for 1.12.2 through 1.15.2. Baritone focuses on reliability and particularly performance (it's over [30x faster](https://github.com/cabaletta/baritone/pull/180#issuecomment-423822928) than MineBot at calculating paths).
the original version of the bot for Minecraft 1.8.9, rebuilt for 1.12.2 onwards. Baritone focuses on reliability and particularly performance (it's over [30x faster](https://github.com/cabaletta/baritone/pull/180#issuecomment-423822928) than MineBot at calculating paths).
Have committed at least once a day from Aug 1 2018 to Aug 1 2019.
Have committed at least once a day from Aug 1, 2018, to Aug 1, 2019.
1Leijurv3DWTrGAfmmiTphjhXLvQiHg7K2
@@ -68,9 +114,9 @@ The API is heavily documented, you can find the Javadocs for the latest release
Please note that usage of anything located outside of the ``baritone.api`` package is not supported by the API release
jar.
Below is an example of basic usage for changing some settings, and then pathing to a X/Z goal.
Below is an example of basic usage for changing some settings, and then pathing to an X/Z goal.
```
```java
BaritoneAPI.getSettings().allowSprint.value = true;
BaritoneAPI.getSettings().primaryTimeoutMS.value = 2000L;
@@ -81,12 +127,22 @@ BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoalAnd
## Can I use Baritone as a library in my custom utility client?
That's what it's for, sure! (As long as usage is in compliance with the LGPL 3.0 License)
That's what it's for, sure! (As long as usage complies with the LGPL 3.0 License)
## How is it so fast?
Magic. (Hours of [leijurv](https://github.com/leijurv/) enduring excruciating pain)
### Additional Special Thanks To:
![YourKit-Logo](https://www.yourkit.com/images/yklogo.png)
YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications.
YourKit is the creator of the [YourKit Java Profiler](https://www.yourkit.com/java/profiler/), [YourKit .NET Profiler](https://www.yourkit.com/.net/profiler/), and [YourKit YouMonitor](https://www.yourkit.com/youmonitor/).
We thank them for granting Baritone an OSS license so that we can make our software the best it can be.
## Why is it called Baritone?
It's named for FitMC's deep sultry voice.
It's named for FitMC's deep sultry voice.

103
SETUP.md
View File

@@ -1,104 +1,87 @@
# Installation
The easiest way to install Baritone is to install [Impact](https://impactclient.net/), which comes with Baritone.
For 1.14.4, [click here](https://www.dropbox.com/s/rkml3hjokd3qv0m/1.14.4-Baritone.zip?dl=1).
The easiest way to install Baritone is to install it as Forge/Neoforge/Fabric mod, but if you know how you can also use it with a custom `version.json`
(Examples: [1.14.4](https://www.dropbox.com/s/rkml3hjokd3qv0m/1.14.4-Baritone.zip?dl=1), [1.15.2](https://www.dropbox.com/s/8rx6f0kts9hvd4f/1.15.2-Baritone.zip?dl=1), [1.16.5](https://www.dropbox.com/s/i6f292o2i7o9acp/1.16.5-Baritone.zip?dl=1)).
Once Baritone is installed, look [here](USAGE.md) for instructions on how to use it.
## Prebuilt official releases
These releases are not always completely up to date with latest features, and are only released from `master`. (so if you want `backfill-2` branch for example, you'll have to build it yourself)
Releases are made rarely and are not always up to date with the latest features and bug fixes.
Link to the releases page: [Releases](https://github.com/cabaletta/baritone/releases)
v1.2.* is for 1.12.2, v1.3.* is for 1.13.2
The mapping between Minecraft versions and major Baritone versions is as follows
| Minecraft version | 1.12 | 1.13 | 1.14 | 1.15 | 1.16 | 1.17 | 1.18 | 1.19 | 1.20 | 1.21 | 1.21.4 | 1.21.5 | 1.21.6 - 1.21.8 |
|-------------------|------|------|------|------|------|------|------|------|-------|-------|--------|--------|------------------|
| Baritone version | v1.2 | v1.3 | v1.4 | v1.5 | v1.6 | v1.7 | v1.8 | v1.9 | v1.10 | v1.11 | v1.13 | v1.14 | v1.15 |
Any official release will be GPG signed by leijurv (44A3EA646EADAC6A) and ZeroMemes (73A788379A197567). Please verify that the hash of the file you download is in `checksums.txt` and that `checksums_signed.asc` is a valid signature by those two public keys of `checksums.txt`.
Any official release will be GPG signed by leijurv (44A3EA646EADAC6A). Please verify that the hash of the file you download is in `checksums.txt` and that `checksums_signed.asc` is a valid signature by that public keys of `checksums.txt`.
The build is fully deterministic and reproducible, and you can verify Travis did it properly by running `docker build --no-cache -t cabaletta/baritone .` yourself and comparing the shasum. This works identically on Travis, Mac, and Linux (if you have docker on Windows, I'd be grateful if you could let me know if it works there too).
The build is fully deterministic and reproducible, and you can verify that by running `docker build --no-cache -t cabaletta/baritone .` yourself and comparing the shasum. This works identically on Travis, Mac, and Linux (if you have docker on Windows, I'd be grateful if you could let me know if it works there too).
## Artifacts
Building Baritone will result in 5 artifacts created in the ``dist`` directory. These are the same as the artifacts created in the [releases](https://github.com/cabaletta/baritone/releases).
Building Baritone will create the final artifacts in the ``dist`` directory. These are the same as the artifacts created in the [releases](https://github.com/cabaletta/baritone/releases).
**The Forge release can simply be added as a Forge mod.**
**The Forge, NeoForge and Fabric releases can simply be added as a Forge/Neoforge/Fabric mods.**
If another one of your Forge mods has a Baritone integration, you want `baritone-api-forge-VERSION.jar`. Otherwise, you want `baritone-standalone-forge-VERSION.jar`
If another one of your other mods has a Baritone integration, you want `baritone-api-*-VERSION.jar`.
If you want to report a bug and spare us some effort, you want `baritone-unoptimized-*-VERSION.jar`.
Otherwise, you want `baritone-standalone-*-VERSION.jar`
Here's what the various qualifiers mean
- **API**: Only the non-api packages are obfuscated. This should be used in environments where other mods would like to use Baritone's features.
- **Forge API**: Same as API, but packaged for Forge. This should be used where another mod has a Baritone integration.
- **Standalone**: Everything is obfuscated. This should be used in environments where there are no other mods present that would like to use Baritone's features.
- **Forge Standalone**: Same as Standalone, but packaged for Forge. This should be used when Baritone is your only Forge mod, or none of your other Forge mods integrate with Baritone.
- **Unoptimized**: Nothing is obfuscated. This shouldn't be used ever in production.
- **Standalone**: Everything is obfuscated. Other mods cannot use Baritone, but you get a bit of extra performance.
- **Unoptimized**: Nothing is obfuscated. This shouldn't be used in production, but is really helpful for crash reports.
## More Info
To replace out Impact 4.5's Baritone build with a customized one, build Baritone as above then copy & **rename** `dist/baritone-api-$VERSION$.jar` into `minecraft/libraries/cabaletta/baritone-api/1.2/baritone-api-1.2.jar`, replacing the jar that was previously there. You also need to edit `minecraft/versions/1.12.2-Impact_4.5/1.12.2-Impact_4.5.json`, find the line `"name": "cabaletta:baritone-api:1.2"`, remove the comma from the end, and **entirely remove the NEXT line** (starts with `"url"`). **Restart your launcher** then load as normal.
- **No loader**: Loadable as a launchwrapper tweaker against vanilla Minecraft using a custom `version.json`.
- **Forge/Neoforge/Fabric**: Loadable as a standard mod using the respective loader. The fabric build may or may not work on Quilt.
You can verify whether or not it worked by running `.b version` in chat (only valid in Impact). It should print out the version that you downloaded. Note: The version that comes with 4.5 is `v1.2.3`.
If you build from source you will also find mapping files in the `dist` directory. These contain the renamings done by ProGuard and are useful if you want to read obfuscated stack traces.
## Build it yourself
- Clone or download Baritone
![Image](https://i.imgur.com/kbqBtoN.png)
- If you choose to download, make sure you extract the ZIP archive.
- If you choose to download, make sure you download the correct branch and extract the ZIP archive.
- Follow one of the instruction sets below, based on your preference
## Command Line
On Mac OSX and Linux, use `./gradlew` instead of `gradlew`.
If you have errors with a package missing please make sure you have setup your environment, and are using Oracle JDK 8.
The recommended Java versions by Minecraft version are
| Minecraft version | Java version |
|-------------------------------|---------------|
| 1.12.2 - 1.16.5 | 8 |
| 1.17.1 | 16 |
| 1.18.2 - 1.20.4 | 17 |
| 1.20.5 - 1.21.8 | 21 |
Setting up the Environment:
Download java: https://adoptium.net/
```
$ gradlew setupDecompWorkspace
$ gradlew --refresh-dependencies
```
To check which java version you are using do `java -version` in a command prompt or terminal.
Building Baritone:
### Building Baritone
```
$ gradlew build
```
These tasks depend on the minecraft version, but are (for the most part) standard for building mods.
Running Baritone:
For more details, see [the build ci action](/.github/workflows/gradle_build.yml) of the branch you want to build.
```
$ gradlew runClient
```
For most branches `gradlew build` should build everything, but there are exceptions and this file might be out of date.
For information on how to build baritone, see [Building Baritone](#building-baritone)
More specifically, on older branches the setup used to be that `gradlew build` builds the tweaker jar
and `gradlew build -Pbaritone.forge_build` / `gradlew build -Pbaritone.fabric_build` are needed to build
for Forge/Fabric instead. And you might have to run `setupDecompWorkspace` first.
## IntelliJ
- Open the project in IntelliJ as a Gradle project
![Image](https://i.imgur.com/jw7Q6vY.png)
- Run the Gradle tasks `setupDecompWorkspace` then `genIntellijRuns`
![Image](https://i.imgur.com/QEfVvWP.png)
- Refresh the Gradle project (or, to be safe, just restart IntelliJ)
![Image](https://i.imgur.com/3V7EdWr.png)
- Depending on the minecraft version, you may need to run `setupDecompWorkspace` or `genIntellijRuns` in order to get everything working
- Select the "Minecraft Client" launch config
![Image](https://i.imgur.com/1qz2QGV.png)
## Github Actions
Most branches have a CI workflow at `.github/workflows/gradle_build.yml`. If you fork this repository and enable actions for your fork
you can push a dummy commit to trigger it and have GitHub build Baritone for you.
- Click on ``Edit Configurations...`` from the same dropdown and select the "Minecraft Client" config
![Image](https://i.imgur.com/s4ly0ZF.png)
- In `Edit Configurations...` you need to select `baritone_launch` for `Use classpath of module:`.
![Image](https://i.imgur.com/hrLhG9u.png)
## IntelliJ
- Navigate to the gradle tasks on the right tab as follows
![Image](https://i.imgur.com/PE6r9iN.png)
- Double click on **build** to run it
If the commit you want to build is less than 90 days old, you can also find the corresponding workflow run in
[this list](https://github.com/cabaletta/baritone/actions/workflows/gradle_build.yml) and download the artifacts from there.

View File

@@ -24,36 +24,46 @@ Watch this [showcase video](https://youtu.be/CZkLXWo4Fg4)!
# Commands
[Tutorial playlist](https://www.youtube.com/playlist?list=PLnwnJ1qsS7CoQl9Si-RTluuzCo_4Oulpa)
**All** of these commands may need a prefix before them, as above ^.
`help`
To toggle a boolean setting, just say its name in chat (for example saying `allowBreak` toggles whether Baritone will consider breaking blocks). For a numeric setting, say its name then the new value (like `primaryTimeoutMS 250`). It's case insensitive. To reset a setting to its default value, say `acceptableThrowawayItems reset`. To reset all settings, say `reset`. To see all settings that have been modified from their default values, say `modified`.
Some common examples:
Commands in Baritone:
- `thisway 1000` then `path` to go in the direction you're facing for a thousand blocks
- `goal x y z` or `goal x z` or `goal y`, then `path` to set a goal to a certain coordinate then path to it
- `goto x y z` or `goto x z` or `goto y` to go to a certain coordinate (in a single step, starts going immediately)
- `goal` to set the goal to your player's feet
- `goal clear` to clear the goal
- `cancel` or `stop` to stop everything
- `cancel` or `stop` to stop everything, `forcecancel` is also an option
- `goto portal` or `goto ender_chest` or `goto block_type` to go to a block. (in Impact, `.goto` is an alias for `.b goto` for the most part)
- `mine diamond_ore iron_ore` to mine diamond ore or iron ore (turn on the setting `legitMine` to only mine ores that it can actually see. It will explore randomly around y=11 until it finds them.) An amount of blocks can also be specified, for example, `mine diamond_ore 64`.
- `click` to click your destination on the screen. Right click path to on top of the block, left click to path into it (either at foot level or eye level), and left click and drag to clear all blocks from an area.
- `mine diamond_ore iron_ore` to mine diamond ore or iron ore (turn on the setting `legitMine` to only mine ores that it can actually see. It will explore randomly around y=11 until it finds them.) An amount of blocks can also be specified, for example, `mine 64 diamond_ore`.
- `click` to click your destination on the screen. Right click path to on top of the block, left click to path into it (either at foot level or eye level), and left click and drag to select an area (`#help sel` to see what you can do with that selection).
- `follow player playerName` to follow a player. `follow players` to follow any players in range (combine with Kill Aura for a fun time). `follow entities` to follow any entities. `follow entity pig` to follow entities of a specific type.
- `wp` for waypoints. A "tag" is like "home" (created automatically on right clicking a bed) or "death" (created automatically on death) or "user" (has to be created manually). So you might want `#wp save user coolbiome`, then to set the goal `#wp goal coolbiome` then `#path` to path to it. For death, `#wp goal death` will list waypoints under the "death" tag (remember stuff is clickable!)
- `build` to build a schematic. `build blah.schematic` will load `schematics/blah.schematic` and build it with the origin being your player feet. `build blah.schematic x y z` to set the origin. Any of those can be relative to your player (`~ 69 ~-420` would build at x=player x, y=69, z=player z-420).
- `schematica` to build the schematic that is currently open in schematica
- `tunnel` to dig and make a tunnel, 1x2. It will only deviate from the straight line if necessary such as to avoid lava. For a dumber tunnel that is really just cleararea, you can `tunnel 3 2 100`, to clear an area 3 high, 2 wide, and 100 deep.
- `farm` to automatically harvest, replant, or bone meal crops
- `farm` to automatically harvest, replant, or bone meal crops. Use `farm <range>` or `farm <range> <waypoint>` to limit the max distance from the starting point or a waypoint.
- `axis` to go to an axis or diagonal axis at y=120 (`axisHeight` is a configurable setting, defaults to 120).
- `explore x z` to explore the world from the origin of x,z. Leave out x and z to default to player feet. This will continually path towards the closest chunk to the origin that it's never seen before. `explorefilter filter.json` with optional invert can be used to load in a list of chunks to load.
- `invert` to invert the current goal and path. This gets as far away from it as possible, instead of as close as possible. For example, do `goal` then `invert` to run as far as possible from where you're standing at the start.
- `come` tells Baritone to head towards your camera, useful when freecam doesn't move your player position.
- `blacklist` will stop baritone from going to the closest block so it won't attempt to get to it.
- `eta` to get information about the estimated time until the next segment and the goal, be aware that the ETA to your goal is really unprecise.
- `proc` to view miscellaneous information about the process currently controlling Baritone.
- `repack` to re-cache the chunks around you.
- `gc` to call `System.gc()` which may free up some memory.
- `render` to fix glitched chunk rendering without having to reload all of them.
- `reloadall` to reload Baritone's world cache or `saveall` to save Baritone's world cache.
- `find` to search through Baritone's cache and attempt to find the location of the block.
- `surface` or `top` to tell Baritone to head towards the closest surface-like area, this can be the surface or highest available air space.
- `version` to get the version of Baritone you're running
- `damn` daniel
For the rest of the commands, you can take a look at the code [here](https://github.com/cabaletta/baritone/blob/master/src/api/java/baritone/api/utils/ExampleBaritoneControl.java).
All the settings and documentation are <a href="https://github.com/cabaletta/baritone/blob/master/src/api/java/baritone/api/Settings.java">here</a>. If you find HTML easier to read than Javadoc, you can look <a href="https://baritone.leijurv.com/baritone/api/Settings.html#field.detail">here</a>.
There are about a hundred settings, but here are some fun / interesting / important ones that you might want to look at changing in normal usage of Baritone. The documentation for each can be found at the above links.

View File

@@ -15,48 +15,110 @@
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
*/
group 'baritone'
version '1.3.7'
allprojects {
apply plugin: 'java'
apply plugin: "xyz.wagyourtail.unimined"
apply plugin: "maven-publish"
archivesBaseName = rootProject.archives_base_name
def vers = ""
try {
vers = 'git describe --always --tags --first-parent --dirty'.execute().text.trim()
} catch (Exception e) {
println "Version detection failed: " + e
}
if (!vers.startsWith("v")) {
println "using version number: " + rootProject.mod_version
version = rootProject.mod_version
} else {
version = vers.substring(1)
println "Detected version " + version
}
group = rootProject.maven_group
sourceCompatibility = targetCompatibility = JavaVersion.toVersion(project.java_version)
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(sourceCompatibility.majorVersion.toInteger()))
}
}
buildscript {
repositories {
maven {
name = 'forge'
url = 'http://files.minecraftforge.net/maven'
name = 'spongepowered-repo'
url = 'https://repo.spongepowered.org/repository/maven-public/'
}
maven {
name = 'fabric-maven'
url = 'https://maven.fabricmc.net/'
}
maven {
name = 'impactdevelopment-repo'
url = 'https://impactdevelopment.github.io/maven/'
}
jcenter()
maven {
name = "ldtteam"
url = "https://maven.parchmentmc.net/"
}
// for the newer version of launchwrapper
maven {
name = "multimc-maven"
url = "https://files.multimc.org/maven/"
metadataSources {
artifact()
}
}
mavenCentral()
maven {
name = 'babbaj-repo'
url = 'https://babbaj.github.io/maven/'
}
}
dependencies {
classpath group: 'com.github.ImpactDevelopment', name: 'ForgeGradle', version: '3.0.115'
classpath group: 'com.github.ImpactDevelopment', name: 'MixinGradle', version: '0.6.2'
compileOnly "org.spongepowered:mixin:${project.mixin_version}"
compileOnly "org.ow2.asm:asm:${project.asm_version}"
implementation "dev.babbaj:nether-pathfinder:${project.nether_pathfinder_version}"
}
unimined.minecraft(sourceSets.main, true) {
version rootProject.minecraft_version
mappings {
intermediary()
mojmap()
parchment("2023.06.26")
}
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
def targetVersion = project.java_version.toInteger()
if (JavaVersion.current().isJava9Compatible()) {
it.options.release = targetVersion
}
}
}
import baritone.gradle.task.CreateDistTask
import baritone.gradle.task.ProguardTask
import org.apache.tools.ant.taskdefs.condition.Os
apply plugin: 'java'
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.spongepowered.mixin'
sourceCompatibility = targetCompatibility = '1.8'
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
options.encoding = "UTF-8" // allow emoji in comments :^)
unimined.minecraft {
runs.off = true
defaultRemapJar = false
}
archivesBaseName = archivesBaseName + "-common"
sourceSets {
api {
compileClasspath += main.compileClasspath
runtimeClasspath += main.runtimeClasspath
}
main {
compileClasspath += api.output
runtimeClasspath += api.output
}
test {
compileClasspath += main.compileClasspath + main.runtimeClasspath + main.output
@@ -66,100 +128,22 @@ sourceSets {
compileClasspath += main.compileClasspath + main.runtimeClasspath + main.output
runtimeClasspath += main.compileClasspath + main.runtimeClasspath + main.output
}
schematica_api {
compileClasspath += main.compileClasspath
runtimeClasspath += main.runtimeClasspath
}
main {
compileClasspath += schematica_api.output
}
}
task sourceJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.api.allSource
}
minecraft {
mappings channel: 'snapshot', version: '20190307-1.13.1'
reobfMappings 'notch'
runs {
client {
workingDirectory project.file('run')
source sourceSets.launch
main 'baritone.launch.LaunchTesting'
environment 'assetIndex', '{asset_index}'
environment 'assetDirectory', downloadAssets.output
environment 'nativesDirectory', extractNatives.output
environment 'tweakClass', 'baritone.launch.BaritoneTweaker'
if (Os.isFamily(Os.FAMILY_MAC)) {
jvmArgs "-XstartOnFirstThread"
}
}
autoTest {
workingDirectory project.file('autotest')
source sourceSets.launch
main 'baritone.launch.LaunchTesting'
environment 'assetIndex', '{asset_index}'
environment 'assetDirectory', downloadAssets.output
environment 'nativesDirectory', extractNatives.output
environment 'tweakClass', 'baritone.launch.BaritoneTweaker'
environment 'BARITONE_AUTO_TEST', 'true'
if (Os.isFamily(Os.FAMILY_MAC)) {
jvmArgs "-XstartOnFirstThread"
}
}
}
}
repositories {
mavenCentral()
maven {
name = 'spongepowered-repo'
url = 'http://repo.spongepowered.org/maven/'
}
maven {
name = 'impactdevelopment-repo'
url = 'https://impactdevelopment.github.io/maven/'
runtimeClasspath += schematica_api.output
}
}
dependencies {
minecraft 'com.github.ImpactDevelopment:Vanilla:1.13.2'
runtime launchCompile('net.minecraft:launchwrapper:1.12') {
exclude module: 'lwjgl'
}
runtime launchCompile('org.ow2.asm:asm-debug-all:5.2')
runtime launchCompile('com.github.ImpactDevelopment:SimpleTweaker:1.2')
runtime launchCompile('org.spongepowered:mixin:0.7.11-SNAPSHOT') {
// Mixin includes a lot of dependencies that are too up-to-date
exclude module: 'launchwrapper'
exclude module: 'guava'
exclude module: 'gson'
exclude module: 'commons-io'
exclude module: 'log4j-core'
}
testImplementation 'junit:junit:4.12'
testImplementation 'junit:junit:4.13.2'
}
mixin {
defaultObfuscationEnv searge
add sourceSets.launch, 'mixins.baritone.refmap.json'
jar {
from sourceSets.main.output, sourceSets.launch.output, sourceSets.api.output
}
javadoc {
@@ -169,27 +153,3 @@ javadoc {
source = sourceSets.api.allJava
classpath += sourceSets.api.compileClasspath
}
jar {
from sourceSets.launch.output, sourceSets.api.output
preserveFileTimestamps = false
reproducibleFileOrder = true
manifest {
attributes(
'MixinConfigs': 'mixins.baritone.json',
'Implementation-Title': 'Baritone',
'Implementation-Version': version
)
}
}
task proguard(type: ProguardTask) {
url 'https://downloads.sourceforge.net/project/proguard/proguard/6.0/proguard6.0.3.zip'
extract 'proguard6.0.3/lib/proguard.jar'
}
task createDist(type: CreateDistTask, dependsOn: proguard)
build.finalizedBy(createDist)

View File

@@ -16,10 +16,29 @@
*/
repositories {
mavenLocal()
maven {
name = 'WagYourMaven'
url = 'https://maven.wagyourtail.xyz/releases'
}
maven {
name = 'ForgeMaven'
url = 'https://maven.minecraftforge.net/'
}
maven {
name = 'FabricMaven'
url = 'https://maven.fabricmc.net/'
}
maven {
name = 'NeoForgedMaven'
url = 'https://maven.neoforged.net/'
}
mavenCentral()
}
dependencies {
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
compile group: 'commons-io', name: 'commons-io', version: '2.6'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.9.0'
implementation group: 'commons-io', name: 'commons-io', version: '2.7'
implementation group: 'xyz.wagyourtail.unimined', name: 'xyz.wagyourtail.unimined.gradle.plugin', version: '1.0.5'
}

View File

@@ -18,8 +18,12 @@
package baritone.gradle.task;
import org.gradle.api.DefaultTask;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.Optional;
import org.gradle.api.tasks.TaskAction;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
@@ -32,39 +36,67 @@ import java.nio.file.Paths;
class BaritoneGradleTask extends DefaultTask {
protected static final String
PROGUARD_ZIP = "proguard.zip",
PROGUARD_JAR = "proguard.jar",
PROGUARD_ZIP = "proguard-%s.zip",
PROGUARD_JAR = "proguard-%s.jar",
PROGUARD_CONFIG_TEMPLATE = "scripts/proguard.pro",
PROGUARD_CONFIG_DEST = "template.pro",
PROGUARD_API_CONFIG = "api.pro",
PROGUARD_STANDALONE_CONFIG = "standalone.pro",
PROGUARD_EXPORT_PATH = "proguard_out.jar",
PROGUARD_MAPPING_DIR = "mapping",
ARTIFACT_STANDARD = "%s-%s.jar",
ARTIFACT_UNOPTIMIZED = "%s-unoptimized-%s.jar",
ARTIFACT_API = "%s-api-%s.jar",
ARTIFACT_STANDALONE = "%s-standalone-%s.jar";
ARTIFACT_STANDARD = "%s-%s.jar",
ARTIFACT_UNOPTIMIZED = "%s-unoptimized-%s.jar",
ARTIFACT_API = "%s-api-%s.jar",
ARTIFACT_STANDALONE = "%s-standalone-%s.jar";
protected String artifactName, artifactVersion;
protected Path artifactPath, artifactUnoptimizedPath, artifactApiPath, artifactStandalonePath, proguardOut;
protected Path
artifactPath,
artifactUnoptimizedPath, artifactApiPath, artifactStandalonePath, // these are different for forge builds
proguardOut;
protected void verifyArtifacts() throws IllegalStateException {
this.artifactName = getProject().getName();
this.artifactVersion = getProject().getVersion().toString();
this.artifactPath = this.getBuildFile(formatVersion(ARTIFACT_STANDARD));
this.artifactUnoptimizedPath = this.getBuildFile(formatVersion(ARTIFACT_UNOPTIMIZED));
this.artifactApiPath = this.getBuildFile(formatVersion(ARTIFACT_API));
this.artifactStandalonePath = this.getBuildFile(formatVersion(ARTIFACT_STANDALONE));
@Input
@Optional
protected String compType = null;
public String getCompType() {
return compType;
}
public void setCompType(String compType) {
this.compType = compType;
}
public BaritoneGradleTask() {
this.artifactName = getProject().getRootProject().getProperties().get("archives_base_name").toString();
}
public void doFirst() {
if (compType != null) {
this.artifactVersion = compType + "-" + getProject().getVersion();
} else {
this.artifactVersion = getProject().getVersion().toString();
}
this.artifactPath = this.getBuildFile(formatVersion(ARTIFACT_STANDARD));
this.artifactUnoptimizedPath = this.getBuildFile(formatVersion(ARTIFACT_UNOPTIMIZED));
this.artifactApiPath = this.getBuildFile(formatVersion(ARTIFACT_API));
this.artifactStandalonePath = this.getBuildFile(formatVersion(ARTIFACT_STANDALONE));
this.proguardOut = this.getTemporaryFile(PROGUARD_EXPORT_PATH);
}
protected void verifyArtifacts() throws IllegalStateException {
if (!Files.exists(this.artifactPath)) {
throw new IllegalStateException("Artifact not found! Run build first!");
throw new IllegalStateException("Artifact not found! Run build first! Missing file: " + this.artifactPath);
}
}
protected void write(InputStream stream, Path file) throws Exception {
protected void write(InputStream stream, Path file) throws IOException {
if (Files.exists(file)) {
Files.delete(file);
}
@@ -76,7 +108,11 @@ class BaritoneGradleTask extends DefaultTask {
}
protected Path getRelativeFile(String file) {
return Paths.get(new File(file).getAbsolutePath());
return Paths.get(new File(getProject().getBuildDir(), file).getAbsolutePath());
}
protected Path getRootRelativeFile(String file) {
return Paths.get(new File(getProject().getRootDir(), file).getAbsolutePath());
}
protected Path getTemporaryFile(String file) {
@@ -84,6 +120,10 @@ class BaritoneGradleTask extends DefaultTask {
}
protected Path getBuildFile(String file) {
return getRelativeFile("build/libs/" + file);
return getRelativeFile("libs/" + file);
}
protected String addCompTypeFirst(String string) {
return compType == null ? string : compType + "-" + string;
}
}

View File

@@ -19,13 +19,15 @@ package baritone.gradle.task;
import org.gradle.api.tasks.TaskAction;
import javax.xml.bind.DatatypeConverter;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.OpenOption;
import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
import java.security.MessageDigest;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
@@ -39,33 +41,40 @@ public class CreateDistTask extends BaritoneGradleTask {
@TaskAction
protected void exec() throws Exception {
super.doFirst();
super.verifyArtifacts();
// Define the distribution file paths
Path api = getRelativeFile("dist/" + formatVersion(ARTIFACT_API));
Path standalone = getRelativeFile("dist/" + formatVersion(ARTIFACT_STANDALONE));
Path unoptimized = getRelativeFile("dist/" + formatVersion(ARTIFACT_UNOPTIMIZED));
Path api = getRootRelativeFile("dist/" + getFileName(artifactApiPath));
Path standalone = getRootRelativeFile("dist/" + getFileName(artifactStandalonePath));
Path unoptimized = getRootRelativeFile("dist/" + getFileName(artifactUnoptimizedPath));
// NIO will not automatically create directories
Path dir = getRelativeFile("dist/");
Path dir = getRootRelativeFile("dist/");
if (!Files.exists(dir)) {
Files.createDirectory(dir);
}
// Copy build jars to dist/
Files.copy(this.artifactApiPath, api, REPLACE_EXISTING);
Files.copy(this.artifactStandalonePath, standalone, REPLACE_EXISTING);
Files.copy(this.artifactUnoptimizedPath, unoptimized, REPLACE_EXISTING);
// TODO: dont copy files that dont exist
Files.copy(this.artifactApiPath, api, REPLACE_EXISTING);
Files.copy(this.artifactStandalonePath, standalone, REPLACE_EXISTING);
Files.copy(this.artifactUnoptimizedPath, unoptimized, REPLACE_EXISTING);
// Calculate all checksums and format them like "shasum"
List<String> shasum = Stream.of(api, standalone, unoptimized)
List<String> shasum = Files.list(getRootRelativeFile("dist/"))
.filter(e -> e.getFileName().toString().endsWith(".jar"))
.map(path -> sha1(path) + " " + path.getFileName().toString())
.collect(Collectors.toList());
shasum.forEach(System.out::println);
// Write the checksums to a file
Files.write(getRelativeFile("dist/checksums.txt"), shasum);
Files.write(getRootRelativeFile("dist/checksums.txt"), shasum);
}
private static String getFileName(Path p) {
return p.getFileName().toString();
}
private static synchronized String sha1(Path path) {
@@ -73,10 +82,22 @@ public class CreateDistTask extends BaritoneGradleTask {
if (SHA1_DIGEST == null) {
SHA1_DIGEST = MessageDigest.getInstance("SHA-1");
}
return DatatypeConverter.printHexBinary(SHA1_DIGEST.digest(Files.readAllBytes(path))).toLowerCase();
return bytesToHex(SHA1_DIGEST.digest(Files.readAllBytes(path))).toLowerCase();
} catch (Exception e) {
// haha no thanks
throw new IllegalStateException(e);
}
}
private static final byte[] HEX_ARRAY = "0123456789ABCDEF".getBytes(StandardCharsets.US_ASCII);
public static String bytesToHex(byte[] bytes) {
byte[] hexChars = new byte[bytes.length * 2];
for (int j = 0; j < bytes.length; j++) {
int v = bytes[j] & 0xFF;
hexChars[j * 2] = HEX_ARRAY[v >>> 4];
hexChars[j * 2 + 1] = HEX_ARRAY[v & 0x0F];
}
return new String(hexChars, StandardCharsets.UTF_8);
}
}

View File

@@ -18,23 +18,31 @@
package baritone.gradle.task;
import baritone.gradle.util.Determinizer;
import org.apache.commons.io.IOUtils;
import org.gradle.api.plugins.JavaPluginConvention;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.SourceSetContainer;
import org.gradle.api.tasks.TaskAction;
import org.gradle.api.tasks.TaskCollection;
import org.gradle.api.tasks.compile.ForkOptions;
import org.gradle.api.tasks.compile.JavaCompile;
import org.gradle.internal.jvm.Jvm;
import org.gradle.jvm.toolchain.JavaLanguageVersion;
import org.gradle.jvm.toolchain.JavaLauncher;
import org.gradle.jvm.toolchain.JavaToolchainService;
import xyz.wagyourtail.unimined.api.UniminedExtension;
import xyz.wagyourtail.unimined.api.minecraft.MinecraftConfig;
import java.io.*;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
/**
* @author Brady
* @since 10/11/2018
@@ -42,97 +50,163 @@ import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
public class ProguardTask extends BaritoneGradleTask {
@Input
private String url;
private String proguardVersion;
@Input
private String extract;
public String getProguardVersion() {
return proguardVersion;
}
private List<String> requiredLibraries;
@TaskAction
protected void exec() throws Exception {
super.doFirst();
super.verifyArtifacts();
// "Haha brady why don't you make separate tasks"
processArtifact();
downloadProguard();
extractProguard();
generateConfigs();
processArtifact();
proguardApi();
proguardStandalone();
cleanup();
}
UniminedExtension ext = getProject().getExtensions().getByType(UniminedExtension.class);
SourceSetContainer sourceSets = getProject().getExtensions().getByType(SourceSetContainer.class);
private File getMcJar() {
MinecraftConfig mcc = ext.getMinecrafts().get(sourceSets.getByName("main"));
return mcc.getMinecraft(mcc.getMcPatcher().getProdNamespace(), mcc.getMcPatcher().getProdNamespace()).toFile();
}
private boolean isMcJar(File f) {
MinecraftConfig mcc = ext.getMinecrafts().get(sourceSets.getByName("main"));
return mcc.isMinecraftJar(f.toPath());
}
private void processArtifact() throws Exception {
if (Files.exists(this.artifactUnoptimizedPath)) {
Files.delete(this.artifactUnoptimizedPath);
}
Determinizer.determinize(this.artifactPath.toString(), this.artifactUnoptimizedPath.toString());
Determinizer.determinize(this.artifactPath.toString(), this.artifactUnoptimizedPath.toString(), List.of(), false);
}
private void downloadProguard() throws Exception {
Path proguardZip = getTemporaryFile(PROGUARD_ZIP);
Path proguardZip = getTemporaryFile(String.format(PROGUARD_ZIP, proguardVersion));
if (!Files.exists(proguardZip)) {
write(new URL(this.url).openStream(), proguardZip);
write(new URL(String.format("https://github.com/Guardsquare/proguard/releases/download/v%s/proguard-%s.zip", proguardVersion, proguardVersion)).openStream(), proguardZip);
}
}
private void extractProguard() throws Exception {
Path proguardJar = getTemporaryFile(PROGUARD_JAR);
Path proguardJar = getTemporaryFile(String.format(PROGUARD_JAR, proguardVersion));
if (!Files.exists(proguardJar)) {
ZipFile zipFile = new ZipFile(getTemporaryFile(PROGUARD_ZIP).toFile());
ZipEntry zipJarEntry = zipFile.getEntry(this.extract);
ZipFile zipFile = new ZipFile(getTemporaryFile(String.format(PROGUARD_ZIP, proguardVersion)).toFile());
ZipEntry zipJarEntry = zipFile.getEntry(String.format("proguard-%s/lib/proguard.jar", proguardVersion));
write(zipFile.getInputStream(zipJarEntry), proguardJar);
zipFile.close();
}
}
private JavaLauncher getJavaLauncherForProguard() {
var toolchains = getProject().getExtensions().getByType(JavaToolchainService.class);
var toolchain = toolchains.launcherFor((spec) -> {
spec.getLanguageVersion().set(JavaLanguageVersion.of(getProject().findProperty("java_version").toString()));
}).getOrNull();
if (toolchain == null) {
throw new IllegalStateException("Java toolchain not found");
}
return toolchain;
}
private void generateConfigs() throws Exception {
Files.copy(getRelativeFile(PROGUARD_CONFIG_TEMPLATE), getTemporaryFile(PROGUARD_CONFIG_DEST), REPLACE_EXISTING);
Files.copy(getRootRelativeFile(PROGUARD_CONFIG_TEMPLATE), getTemporaryFile(PROGUARD_CONFIG_DEST), StandardCopyOption.REPLACE_EXISTING);
// Setup the template that will be used to derive the API and Standalone configs
List<String> template = Files.readAllLines(getTemporaryFile(PROGUARD_CONFIG_DEST));
template.add(0, "-injars " + this.artifactPath.toString());
template.add(1, "-outjars " + this.getTemporaryFile(PROGUARD_EXPORT_PATH));
template.add(0, "-injars '" + this.artifactPath.toString() + "'");
template.add(1, "-outjars '" + this.getTemporaryFile(PROGUARD_EXPORT_PATH) + "'");
// Acquire the RT jar using "java -verbose". This doesn't work on Java 9+
Process p = new ProcessBuilder("java", "-verbose").start();
String out = IOUtils.toString(p.getInputStream(), "UTF-8").split("\n")[0].split("Opened ")[1].replace("]", "");
template.add(2, "-libraryjars '" + out + "'");
template.add(2, "-libraryjars <java.home>/jmods/java.base.jmod(!**.jar;!module-info.class)");
template.add(3, "-libraryjars <java.home>/jmods/java.desktop.jmod(!**.jar;!module-info.class)");
template.add(4, "-libraryjars <java.home>/jmods/jdk.unsupported.jmod(!**.jar;!module-info.class)");
// Discover all of the libraries that we will need to acquire from gradle
acquireDependencies().forEach(f -> {
if (f.toString().endsWith("-recomp.jar")) {
// remove MCP mapped jar
return;
{
final Stream<File> libraries;
File mcJar;
try {
mcJar = getMcJar();
} catch (Exception e) {
throw new RuntimeException("Failed to find Minecraft jar", e);
}
if (f.toString().endsWith("client-extra.jar")) {
// go from the extra to the original downloaded client
f = new File(f.getParentFile(), "client.jar");
{
// Discover all of the libraries that we will need to acquire from gradle
final Stream<File> dependencies = acquireDependencies()
// remove MCP mapped jar, and nashorn
.filter(f -> !f.toString().endsWith("-recomp.jar") && !f.getName().startsWith("nashorn") && !f.getName().startsWith("coremods"));
libraries = dependencies
.map(f -> isMcJar(f) ? mcJar : f);
}
template.add(2, "-libraryjars '" + f + "'");
});
libraries.forEach(f -> {
template.add(2, "-libraryjars '" + f + "'");
});
}
Files.createDirectories(this.getRootRelativeFile(PROGUARD_MAPPING_DIR));
List<String> api = new ArrayList<>(template);
api.add(2, "-printmapping " + new File(this.getRootRelativeFile(PROGUARD_MAPPING_DIR).toFile(), "mappings-" + addCompTypeFirst("api.txt")));
// API config doesn't require any changes from the changes that we made to the template
Files.write(getTemporaryFile(PROGUARD_API_CONFIG), template);
Files.write(getTemporaryFile(compType + PROGUARD_API_CONFIG), api);
// For the Standalone config, don't keep the API package
List<String> standalone = new ArrayList<>(template);
standalone.removeIf(s -> s.contains("# this is the keep api"));
Files.write(getTemporaryFile(PROGUARD_STANDALONE_CONFIG), standalone);
standalone.add(2, "-printmapping " + new File(this.getRootRelativeFile(PROGUARD_MAPPING_DIR).toFile(), "mappings-" + addCompTypeFirst("standalone.txt")));
Files.write(getTemporaryFile(compType + PROGUARD_STANDALONE_CONFIG), standalone);
}
private Stream<File> acquireDependencies() {
return getProject().getConvention().getPlugin(JavaPluginConvention.class).getSourceSets().findByName("launch").getRuntimeClasspath().getFiles().stream().filter(File::isFile);
return getProject().getConvention().getPlugin(JavaPluginConvention.class).getSourceSets().findByName("main").getCompileClasspath().getFiles()
.stream()
.filter(File::isFile);
}
private void proguardApi() throws Exception {
runProguard(getTemporaryFile(PROGUARD_API_CONFIG));
Determinizer.determinize(this.proguardOut.toString(), this.artifactApiPath.toString());
runProguard(getTemporaryFile(compType + PROGUARD_API_CONFIG));
Determinizer.determinize(this.proguardOut.toString(), this.artifactApiPath.toString(), List.of(), false);
}
private void proguardStandalone() throws Exception {
runProguard(getTemporaryFile(PROGUARD_STANDALONE_CONFIG));
Determinizer.determinize(this.proguardOut.toString(), this.artifactStandalonePath.toString());
runProguard(getTemporaryFile(compType + PROGUARD_STANDALONE_CONFIG));
Determinizer.determinize(this.proguardOut.toString(), this.artifactStandalonePath.toString(), List.of(), false);
}
private static final class Pair<A, B> {
public final A a;
public final B b;
private Pair(final A a, final B b) {
this.a = a;
this.b = b;
}
@Override
public String toString() {
return "Pair{" +
"a=" + this.a +
", " +
"b=" + this.b +
'}';
}
}
private void cleanup() {
@@ -141,12 +215,8 @@ public class ProguardTask extends BaritoneGradleTask {
} catch (IOException ignored) {}
}
public void setUrl(String url) {
this.url = url;
}
public void setExtract(String extract) {
this.extract = extract;
public void setProguardVersion(String url) {
this.proguardVersion = url;
}
private void runProguard(Path config) throws Exception {
@@ -155,32 +225,15 @@ public class ProguardTask extends BaritoneGradleTask {
Files.delete(this.proguardOut);
}
Path proguardJar = getTemporaryFile(PROGUARD_JAR);
Process p = new ProcessBuilder("java", "-jar", proguardJar.toString(), "@" + config.toString())
.directory(getTemporaryFile("").toFile()) // Set the working directory to the temporary folder]
.start();
Path workingDirectory = getTemporaryFile("");
// We can't do output inherit process I/O with gradle for some reason and have it work, so we have to do this
this.printOutputLog(p.getInputStream(), System.out);
this.printOutputLog(p.getErrorStream(), System.err);
getProject().javaexec(spec -> {
spec.workingDir(workingDirectory.toFile());
spec.args("@" + workingDirectory.relativize(config));
spec.classpath(getTemporaryFile(String.format(PROGUARD_JAR, proguardVersion)));
// Halt the current thread until the process is complete, if the exit code isn't 0, throw an exception
int exitCode = p.waitFor();
if (exitCode != 0) {
throw new IllegalStateException("Proguard exited with code " + exitCode);
}
spec.executable(getJavaLauncherForProguard().getExecutablePath().getAsFile());
}).assertNormalExitValue().rethrowFailure();
}
private void printOutputLog(InputStream stream, PrintStream outerr) {
new Thread(() -> {
try (BufferedReader reader = new BufferedReader(new InputStreamReader(stream))) {
String line;
while ((line = reader.readLine()) != null) {
outerr.println(line);
}
} catch (Exception e) {
e.printStackTrace();
}
}).start();
}
}

View File

@@ -39,10 +39,11 @@ import java.util.stream.Collectors;
*/
public class Determinizer {
public static void determinize(String inputPath, String outputPath) throws IOException {
public static void determinize(String inputPath, String outputPath, List<File> toInclude, boolean doForgeReplacementOfMetaInf) throws IOException {
System.out.println("Running Determinizer");
System.out.println(" Input path: " + inputPath);
System.out.println(" Output path: " + outputPath);
System.out.println(" Shade: " + toInclude);
try (
JarFile jarFile = new JarFile(new File(inputPath));
@@ -64,14 +65,35 @@ public class Determinizer {
clone.setTime(42069);
jos.putNextEntry(clone);
if (entry.getName().endsWith(".refmap.json")) {
JsonObject object = new JsonParser().parse(new InputStreamReader(jarFile.getInputStream(entry))).getAsJsonObject();
jos.write(writeSorted(object).getBytes());
JsonElement json = new JsonParser().parse(new InputStreamReader(jarFile.getInputStream(entry)));
jos.write(writeSorted(json).getBytes());
} else if (entry.getName().equals("META-INF/MANIFEST.MF") && doForgeReplacementOfMetaInf) { // only replace for forge jar
ByteArrayOutputStream cancer = new ByteArrayOutputStream();
copy(jarFile.getInputStream(entry), cancer);
String manifest = new String(cancer.toByteArray());
if (!manifest.contains("baritone.launch.tweaker.BaritoneTweaker")) {
throw new IllegalStateException("unable to replace");
}
manifest = manifest.replace("baritone.launch.tweaker.BaritoneTweaker", "org.spongepowered.asm.launch.MixinTweaker");
jos.write(manifest.getBytes());
} else {
copy(jarFile.getInputStream(entry), jos);
}
}
for (File file : toInclude) {
try (JarFile mixin = new JarFile(file)) {
for (JarEntry entry : mixin.stream().sorted(Comparator.comparing(JarEntry::getName)).collect(Collectors.toList())) {
if (entry.getName().startsWith("META-INF") && !entry.getName().startsWith("META-INF/services")) {
continue;
}
jos.putNextEntry(entry);
copy(mixin.getInputStream(entry), jos);
}
}
}
jos.finish();
}
System.out.println("Done with determinizer");
}
private static void copy(InputStream is, OutputStream os) throws IOException {
@@ -82,7 +104,7 @@ public class Determinizer {
}
}
private static String writeSorted(JsonObject in) throws IOException {
private static String writeSorted(JsonElement in) throws IOException {
StringWriter writer = new StringWriter();
JsonWriter jw = new JsonWriter(writer);
ORDERED_JSON_WRITER.write(jw, in);

103
fabric/build.gradle Normal file
View File

@@ -0,0 +1,103 @@
/*
* This file is part of Baritone.
*
* Baritone is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Baritone is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
*/
import baritone.gradle.task.CreateDistTask
import baritone.gradle.task.ProguardTask
plugins {
id "com.github.johnrengelman.shadow" version "8.0.0"
}
archivesBaseName = archivesBaseName + "-fabric"
unimined.minecraft {
fabric {
loader project.fabric_version
}
}
configurations {
common
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
}
dependencies {
// because of multiple sourcesets `common project(":")` doesn't work
for (sourceSet in rootProject.sourceSets) {
if (sourceSet == rootProject.sourceSets.test) continue
if (sourceSet == rootProject.sourceSets.schematica_api) continue
common sourceSet.output
shadowCommon sourceSet.output
}
include "dev.babbaj:nether-pathfinder:${project.nether_pathfinder_version}"
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
shadowJar {
configurations = [project.configurations.shadowCommon]
archiveClassifier.set "dev-shadow"
}
remapJar {
inputFile.set shadowJar.archiveFile
dependsOn shadowJar
archiveClassifier.set null
}
jar {
archiveClassifier.set "dev"
}
components.java {
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
skip()
}
}
task proguard(type: ProguardTask) {
proguardVersion "7.2.1"
compType "fabric"
}
task createDist(type: CreateDistTask, dependsOn: proguard) {
compType "fabric"
}
build.finalizedBy(createDist)
publishing {
publications {
mavenFabric(MavenPublication) {
artifactId = rootProject.archives_base_name + "-" + project.name
from components.java
}
}
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
}
}

View File

@@ -0,0 +1,39 @@
{
"schemaVersion": 1,
"id": "baritone",
"version": "${version}",
"name": "Baritone",
"description": "Google Maps for Blockgame",
"authors": [
"leijurv", "Brady"
],
"contact": {
"homepage": "https://github.com/cabaletta/baritone",
"sources": "https://github.com/cabaletta/baritone",
"issues": "https://github.com/cabaletta/baritone/issues"
},
"license": "LGPL-3.0",
"icon": "assets/baritone/icon.png",
"environment": "*",
"entrypoints": {
},
"mixins": [
"mixins.baritone.json"
],
"depends": {
"fabricloader": ">=0.11.0",
"minecraft": "1.19.4"
},
"custom": {
"modmenu": {
"links": {
"modmenu.discord": "https://discord.gg/s6fRBAUpmr"
}
}
}
}

124
forge/build.gradle Normal file
View File

@@ -0,0 +1,124 @@
/*
* This file is part of Baritone.
*
* Baritone is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Baritone is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
*/
import baritone.gradle.task.CreateDistTask
import baritone.gradle.task.ProguardTask
plugins {
id "com.github.johnrengelman.shadow" version "8.0.0"
}
archivesBaseName = archivesBaseName + "-forge"
unimined.minecraft {
mappings {
devFallbackNamespace "intermediary"
}
forge {
loader project.forge_version
mixinConfig ["mixins.baritone.json"]
}
}
//loom {
// forge {
// mixinConfig 'mixins.baritone.json'
// }
//}
configurations {
common
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
}
dependencies {
// because of multiple sourcesets `common project(":")` doesn't work
for (sourceSet in rootProject.sourceSets) {
if (sourceSet == rootProject.sourceSets.test) continue
if (sourceSet == rootProject.sourceSets.schematica_api) continue
common sourceSet.output
shadowCommon sourceSet.output
}
shadowCommon "dev.babbaj:nether-pathfinder:${project.nether_pathfinder_version}"
}
processResources {
inputs.property "version", project.version
filesMatching("META-INF/mods.toml") {
expand "version": project.version
}
}
shadowJar {
configurations = [project.configurations.shadowCommon]
archiveClassifier.set "dev-shadow"
}
remapJar {
inputFile.set shadowJar.archiveFile
dependsOn shadowJar
archiveClassifier.set null
}
jar {
archiveClassifier.set "dev"
manifest {
attributes(
'MixinConfigs': 'mixins.baritone.json',
"MixinConnector": "baritone.launch.BaritoneMixinConnector",
'Implementation-Title': 'Baritone',
'Implementation-Version': version,
)
}
}
components.java {
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
skip()
}
}
task proguard(type: ProguardTask) {
proguardVersion "7.2.1"
compType "forge"
}
task createDist(type: CreateDistTask, dependsOn: proguard) {
compType "forge"
}
build.finalizedBy(createDist)
publishing {
publications {
mavenFabric(MavenPublication) {
artifactId = rootProject.archives_base_name + "-" + project.name
from components.java
}
}
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
}
}

18
forge/gradle.properties Normal file
View File

@@ -0,0 +1,18 @@
#
# This file is part of Baritone.
#
# Baritone is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Baritone is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Baritone. If not, see <https://www.gnu.org/licenses/>.
#
loom.platform=forge

View File

@@ -0,0 +1,22 @@
/*
* This file is part of Baritone.
*
* Baritone is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Baritone is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
*/
package baritone.launch;import net.minecraftforge.fml.common.Mod;
@Mod("baritoe")
public class BaritoneForgeModXD {
}

View File

@@ -0,0 +1,40 @@
# This is an example mods.toml file. It contains the data relating to the loading mods.
# There are several mandatory fields (#mandatory), and many more that are optional (#optional).
# The overall format is standard TOML format, v0.5.0.
# Note that there are a couple of TOML lists in this file.
# Find more information on toml format here: https://github.com/toml-lang/toml
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
modLoader="javafml" #mandatory
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
loaderVersion="[33,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
license="https://raw.githubusercontent.com/cabaletta/baritone/1.16.2/LICENSE"
# A URL to refer people to when problems occur with this mod
issueTrackerURL="https://github.com/cabaletta/baritone/issues" #optional
# A list of mods - how many allowed here is determined by the individual mod loader
[[mods]] #mandatory
# The modid of the mod
modId="baritoe" #mandatory
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
version="${version}" #mandatory
# A display name for the mod
displayName="Baritone" #mandatory
# A URL for the "homepage" for this mod, displayed in the mod UI
displayURL="https://github.com/cabaletta/baritone" #optional
# A file name (in the root of the mod JAR) containing a logo for display
#logoFile="examplemod.png" #optional
# A text field displayed in the mod UI
credits="Hat Gamers" #optional
# A text field displayed in the mod UI
authors="leijurv, Brady" #optional
# The description text for the mod (multi line!) (#mandatory)
description='''
A Minecraft pathfinder bot.
'''
[[dependencies.baritoe]]
modId="minecraft"
mandatory=true
# This version range declares a minimum of the current minecraft version up to but not including the next major version
versionRange="[1.19.4]"
ordering="NONE"
side="BOTH"

View File

@@ -0,0 +1,6 @@
{
"pack": {
"description": "null",
"pack_format": 8
}
}

20
gradle.properties Normal file
View File

@@ -0,0 +1,20 @@
org.gradle.jvmargs=-Xmx4G
mod_version=1.9.5
maven_group=baritone
archives_base_name=baritone
java_version=17
minecraft_version=1.19.4
forge_version=45.0.43
fabric_version=0.14.11
nether_pathfinder_version=1.4.1
// These dependencies are used for common and tweaker
// while mod loaders usually ship their own version
mixin_version=0.8.5
asm_version=9.3

Binary file not shown.

View File

@@ -1,6 +1,5 @@
#Tue Jul 31 21:56:56 PDT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip

55
gradlew vendored
View File

@@ -1,5 +1,21 @@
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
@@ -56,7 +72,7 @@ case "`uname`" in
Darwin* )
darwin=true
;;
MINGW* )
MSYS* | MINGW* )
msys=true
;;
NONSTOP* )
@@ -66,6 +82,7 @@ esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@@ -109,10 +126,11 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
@@ -138,19 +156,19 @@ if $cygwin ; then
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
i=`expr $i + 1`
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
@@ -159,14 +177,9 @@ save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"

43
gradlew.bat vendored
View File

@@ -1,3 +1,19 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@@ -13,15 +29,18 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -35,7 +54,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -45,28 +64,14 @@ echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell

4
jitpack.yml Normal file
View File

@@ -0,0 +1,4 @@
before_install:
- curl -s "https://get.sdkman.io" | bash
- sdk install java 17.0.5-tem
- sdk use java 17.0.5-tem

22
scripts/proguard.pro vendored
View File

@@ -1,5 +1,6 @@
-keepattributes Signature
-keepattributes *Annotation*
-keepattributes InnerClasses
-optimizationpasses 5
-verbose
@@ -16,7 +17,12 @@
-dontwarn org.lwjgl.**
# also lwjgl lol
-dontwarn module-info
# we dont have forge
-dontwarn baritone.launch.BaritoneForgeModXD
# progard doesn't like signature polymorphism
-dontwarn java.lang.invoke.MethodHandle
# please do not change the comment below
-keep class baritone.api.** { *; } # this is the keep api
# service provider needs these class names
@@ -24,6 +30,14 @@
-keep class baritone.api.IBaritoneProvider
-keep class baritone.api.utils.MyChunkPos { *; } # even in standalone we need to keep this for gson reflect
-keepname class baritone.api.utils.BlockOptionalMeta # this name is exposed to the user, so we need to keep it in all builds
# Keep any class or member annotated with @KeepName so we dont have to put everything in the script
-keep,allowobfuscation @interface baritone.KeepName
-keep @baritone.KeepName class *
-keepclassmembers class * {
@baritone.KeepName *;
}
# setting names are reflected from field names, so keep field names
-keepclassmembers class baritone.api.Settings {
@@ -35,9 +49,15 @@
#try to keep usage of schematica in separate classes
-keep class baritone.utils.schematic.schematica.**
-keep class baritone.utils.schematic.litematica.**
#proguard doesnt like it when it cant find our fake schematica classes
-dontwarn baritone.utils.schematic.schematica.**
-dontwarn baritone.utils.schematic.litematica.**
# nether-pathfinder uses JNI to acess its own classes
# and some of our builds include it before running proguard
# conservatively keep all of it, even though only PathSegment.<init> is needed
-keep,allowoptimization class dev.babbaj.pathfinder.** { *; }
# Keep - Applications. Keep all application classes, along with their 'main'
# methods.
@@ -326,4 +346,4 @@
public int length();
public java.lang.String substring(int);
public java.lang.String substring(int,int);
}
}

Binary file not shown.

View File

@@ -15,5 +15,36 @@
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
*/
pluginManagement {
repositories {
mavenLocal()
maven {
name = 'WagYourMaven'
url = 'https://maven.wagyourtail.xyz/snapshots'
}
maven {
name = 'ForgeMaven'
url = 'https://maven.minecraftforge.net/'
}
maven {
name = 'FabricMaven'
url = 'https://maven.fabricmc.net/'
}
mavenCentral()
gradlePluginPortal() {
content {
excludeGroup "org.apache.logging.log4j"
}
}
}
}
rootProject.name = 'baritone'
include("tweaker")
if (System.getProperty("Baritone.enabled_platforms") == null) {
System.setProperty("Baritone.enabled_platforms", "fabric,forge")
}
for (platform in System.getProperty("Baritone.enabled_platforms").split(",")) {
include(platform)
}

View File

@@ -19,9 +19,6 @@ package baritone.api;
import baritone.api.utils.SettingsUtil;
import java.util.Iterator;
import java.util.ServiceLoader;
/**
* Exposes the {@link IBaritoneProvider} instance and the {@link Settings} instance for API usage.
*
@@ -35,11 +32,13 @@ public final class BaritoneAPI {
static {
settings = new Settings();
SettingsUtil.readAndApply(settings);
SettingsUtil.readAndApply(settings, SettingsUtil.SETTINGS_DEFAULT_NAME);
ServiceLoader<IBaritoneProvider> baritoneLoader = ServiceLoader.load(IBaritoneProvider.class);
Iterator<IBaritoneProvider> instances = baritoneLoader.iterator();
provider = instances.next();
try {
provider = (IBaritoneProvider) Class.forName("baritone.BaritoneProvider").newInstance();
} catch (ReflectiveOperationException ex) {
throw new RuntimeException(ex);
}
}
public static IBaritoneProvider getProvider() {

View File

@@ -20,13 +20,13 @@ package baritone.api;
import baritone.api.behavior.ILookBehavior;
import baritone.api.behavior.IPathingBehavior;
import baritone.api.cache.IWorldProvider;
import baritone.api.command.manager.ICommandManager;
import baritone.api.event.listener.IEventBus;
import baritone.api.pathing.calc.IPathingControlManager;
import baritone.api.process.*;
import baritone.api.selection.ISelectionManager;
import baritone.api.utils.IInputOverrideHandler;
import baritone.api.utils.IPlayerContext;
import baritone.api.command.manager.ICommandManager;
/**
* @author Brady
@@ -88,6 +88,12 @@ public interface IBaritone {
*/
IGetToBlockProcess getGetToBlockProcess();
/**
* @return The {@link IElytraProcess} instance
* @see IElytraProcess
*/
IElytraProcess getElytraProcess();
/**
* @return The {@link IWorldProvider} instance
* @see IWorldProvider

View File

@@ -21,7 +21,9 @@ import baritone.api.cache.IWorldScanner;
import baritone.api.command.ICommand;
import baritone.api.command.ICommandSystem;
import baritone.api.schematic.ISchematicSystem;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.ClientPacketListener;
import net.minecraft.client.player.LocalPlayer;
import java.util.List;
import java.util.Objects;
@@ -47,20 +49,18 @@ public interface IBaritoneProvider {
* returned by {@link #getPrimaryBaritone()}.
*
* @return All active {@link IBaritone} instances.
* @see #getBaritoneForPlayer(EntityPlayerSP)
* @see #getBaritoneForPlayer(LocalPlayer)
*/
List<IBaritone> getAllBaritones();
/**
* Provides the {@link IBaritone} instance for a given {@link EntityPlayerSP}. This will likely be
* replaced with or be overloaded in addition to {@code #getBaritoneForUser(IBaritoneUser)} when
* {@code bot-system} is merged into {@code master}.
* Provides the {@link IBaritone} instance for a given {@link LocalPlayer}.
*
* @param player The player
* @return The {@link IBaritone} instance.
*/
default IBaritone getBaritoneForPlayer(EntityPlayerSP player) {
for (IBaritone baritone : getAllBaritones()) {
default IBaritone getBaritoneForPlayer(LocalPlayer player) {
for (IBaritone baritone : this.getAllBaritones()) {
if (Objects.equals(player, baritone.getPlayerContext().player())) {
return baritone;
}
@@ -68,6 +68,55 @@ public interface IBaritoneProvider {
return null;
}
/**
* Provides the {@link IBaritone} instance for a given {@link Minecraft}.
*
* @param minecraft The minecraft
* @return The {@link IBaritone} instance.
*/
default IBaritone getBaritoneForMinecraft(Minecraft minecraft) {
for (IBaritone baritone : this.getAllBaritones()) {
if (Objects.equals(minecraft, baritone.getPlayerContext().minecraft())) {
return baritone;
}
}
return null;
}
/**
* Provides the {@link IBaritone} instance for the player with the specified connection.
*
* @param connection The connection
* @return The {@link IBaritone} instance.
*/
default IBaritone getBaritoneForConnection(ClientPacketListener connection) {
for (IBaritone baritone : this.getAllBaritones()) {
final LocalPlayer player = baritone.getPlayerContext().player();
if (player != null && player.connection == connection) {
return baritone;
}
}
return null;
}
/**
* Creates and registers a new {@link IBaritone} instance using the specified {@link Minecraft}. The existing
* instance is returned if already registered.
*
* @param minecraft The minecraft
* @return The {@link IBaritone} instance
*/
IBaritone createBaritone(Minecraft minecraft);
/**
* Destroys and removes the specified {@link IBaritone} instance. If the specified instance is the
* {@link #getPrimaryBaritone() primary baritone}, this operation has no effect and will return {@code false}.
*
* @param baritone The baritone instance to remove
* @return Whether the baritone instance was removed
*/
boolean destroyBaritone(IBaritone baritone);
/**
* Returns the {@link IWorldScanner} instance. This is not a type returned by
* {@link IBaritone} implementation, because it is not linked with {@link IBaritone}.

View File

@@ -17,21 +17,36 @@
package baritone.api;
import baritone.api.utils.Helper;
import baritone.api.utils.NotificationHelper;
import baritone.api.utils.SettingsUtil;
import baritone.api.utils.TypeUtils;
import net.minecraft.block.Block;
import baritone.api.utils.gui.BaritoneToast;
import net.minecraft.client.GuiMessageTag;
import net.minecraft.client.Minecraft;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.util.math.Vec3i;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.core.Vec3i;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.Mirror;
import net.minecraft.world.level.block.Rotation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.awt.*;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.lang.reflect.Field;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.*;
import java.util.List;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
/**
@@ -40,12 +55,18 @@ import java.util.function.Consumer;
* @author leijurv
*/
public final class Settings {
private static final Logger LOGGER = LoggerFactory.getLogger("Baritone");
/**
* Allow Baritone to break blocks
*/
public final Setting<Boolean> allowBreak = new Setting<>(true);
/**
* Blocks that baritone will be allowed to break even with allowBreak set to false
*/
public final Setting<List<Block>> allowBreakAnyway = new Setting<>(new ArrayList<>());
/**
* Allow Baritone to sprint
*/
@@ -56,11 +77,44 @@ public final class Settings {
*/
public final Setting<Boolean> allowPlace = new Setting<>(true);
/**
* Allow Baritone to place blocks in fluid source blocks
*/
public final Setting<Boolean> allowPlaceInFluidsSource = new Setting<>(true);
/**
* Allow Baritone to place blocks in flowing fluid
*/
public final Setting<Boolean> allowPlaceInFluidsFlow = new Setting<>(true);
/**
* Allow Baritone to move items in your inventory to your hotbar
*/
public final Setting<Boolean> allowInventory = new Setting<>(false);
/**
* Wait this many ticks between InventoryBehavior moving inventory items
*/
public final Setting<Integer> ticksBetweenInventoryMoves = new Setting<>(1);
/**
* Come to a halt before doing any inventory moves. Intended for anticheat such as 2b2t
*/
public final Setting<Boolean> inventoryMoveOnlyIfStationary = new Setting<>(false);
/**
* Disable baritone's auto-tool at runtime, but still assume that another mod will provide auto tool functionality
* <p>
* Specifically, path calculation will still assume that an auto tool will run at execution time, even though
* Baritone itself will not do that.
*/
public final Setting<Boolean> assumeExternalAutoTool = new Setting<>(false);
/**
* Automatically select the best available tool
*/
public final Setting<Boolean> autoTool = new Setting<>(true);
/**
* It doesn't actually take twenty ticks to place a block, this cost is so high
* because we want to generally conserve blocks which might be limited.
@@ -86,6 +140,13 @@ public final class Settings {
*/
public final Setting<Double> walkOnWaterOnePenalty = new Setting<>(3D);
/**
* Don't allow breaking blocks next to liquids.
* <p>
* Enable if you have mods adding custom fluid physics.
*/
public final Setting<Boolean> strictLiquidCheck = new Setting<>(false);
/**
* Allow Baritone to fall arbitrary distances and place a water bucket beneath it.
* Reliability: questionable.
@@ -95,6 +156,8 @@ public final class Settings {
/**
* Allow Baritone to assume it can walk on still water just like any other block.
* This functionality is assumed to be provided by a separate library that might have imported Baritone.
* <p>
* Note: This will prevent some usage of the frostwalker enchantment, like pillaring up from water.
*/
public final Setting<Boolean> assumeWalkOnWater = new Setting<>(false);
@@ -122,6 +185,13 @@ public final class Settings {
* <p>
* Defaults to false because this fails on constantiam. Please let me know if this is ever disabled. Please.
*/
public final Setting<Boolean> allowJumpAtBuildLimit = new Setting<>(false);
/**
* Just here so mods that use the API don't break. Does nothing.
*/
@Deprecated
@JavaOnly
public final Setting<Boolean> allowJumpAt256 = new Setting<>(false);
/**
@@ -167,22 +237,32 @@ public final class Settings {
/**
* Blocks that Baritone will attempt to avoid (Used in avoidance)
*/
public final Setting<List<Block>> blocksToAvoid = new Setting<>(new ArrayList<>(
public final Setting<List<Block>> blocksToAvoid = new Setting<>(new ArrayList<>(List.of(
Blocks.TRIPWIRE
)));
/**
* Blocks that Baritone is not allowed to break
*/
public final Setting<List<Block>> blocksToDisallowBreaking = new Setting<>(new ArrayList<>(
// Leave Empty by Default
));
/**
* Blocks that Baritone is not allowed to break
* blocks that baritone shouldn't break, but can if it needs to.
*/
public final Setting<List<Block>> blocksToAvoidBreaking = new Setting<>(new ArrayList<>(Arrays.asList( // TODO can this be a HashSet or ImmutableSet?
Blocks.CRAFTING_TABLE,
Blocks.FURNACE,
Blocks.CHEST,
Blocks.TRAPPED_CHEST,
Blocks.SIGN,
Blocks.WALL_SIGN
Blocks.TRAPPED_CHEST
)));
/**
* this multiplies the break speed, if set above 1 it's "encourage breaking" instead
*/
public final Setting<Double> avoidBreakingMultiplier = new Setting<>(.1);
/**
* A list of blocks to be treated as if they're air.
* <p>
@@ -192,11 +272,65 @@ public final class Settings {
)));
/**
* A list of blocks to be treated as correct.
* <p>
* If a schematic asks for any block on this list at a certain position, it will be treated as correct, regardless of what it currently is.
*/
public final Setting<List<Block>> buildSkipBlocks = new Setting<>(new ArrayList<>(Arrays.asList(
)));
/**
* A mapping of blocks to blocks treated as correct in their position
* <p>
* If a schematic asks for a block on this mapping, all blocks on the mapped list will be accepted at that location as well
* <p>
* Syntax same as <a href="https://baritone.leijurv.com/baritone/api/Settings.html#buildSubstitutes">buildSubstitutes</a>
*/
public final Setting<Map<Block, List<Block>>> buildValidSubstitutes = new Setting<>(new HashMap<>());
/**
* A mapping of blocks to blocks to be built instead
* <p>
* If a schematic asks for a block on this mapping, Baritone will place the first placeable block in the mapped list
* <p>
* Usage Syntax:
* <pre>
* sourceblockA->blockToSubstituteA1,blockToSubstituteA2,...blockToSubstituteAN,sourceBlockB->blockToSubstituteB1,blockToSubstituteB2,...blockToSubstituteBN,...sourceBlockX->blockToSubstituteX1,blockToSubstituteX2...blockToSubstituteXN
* </pre>
* Example:
* <pre>
* stone->cobblestone,andesite,oak_planks->birch_planks,acacia_planks,glass
* </pre>
*/
public final Setting<Map<Block, List<Block>>> buildSubstitutes = new Setting<>(new HashMap<>());
/**
* A list of blocks to become air
* <p>
* If a schematic asks for a block on this list, only air will be accepted at that location (and nothing on buildIgnoreBlocks)
*/
public final Setting<List<Block>> okIfAir = new Setting<>(new ArrayList<>(Arrays.asList(
)));
/**
* If this is true, the builder will treat all non-air blocks as correct. It will only place new blocks.
*/
public final Setting<Boolean> buildIgnoreExisting = new Setting<>(false);
/**
* If this is true, the builder will ignore directionality of certain blocks like glazed terracotta.
*/
public final Setting<Boolean> buildIgnoreDirection = new Setting<>(false);
/**
* A list of names of block properties the builder will ignore.
*/
public final Setting<List<String>> buildIgnoreProperties = new Setting<>(new ArrayList<>(Arrays.asList(
)));
/**
* If this setting is true, Baritone will never break a block that is adjacent to an unsupported falling block.
* <p>
@@ -271,6 +405,12 @@ public final class Settings {
*/
public final Setting<Float> blockReachDistance = new Setting<>(4.5f);
/**
* How many ticks between breaking a block and starting to break the next block. Default in game is 6 ticks.
* Values under 1 will be clamped. The delay only applies to non-instant (1-tick) breaks.
*/
public final Setting<Integer> blockBreakSpeed = new Setting<>(6);
/**
* How many degrees to randomize the pitch and yaw every tick. Set to 0 to disable
*/
@@ -324,6 +464,9 @@ public final class Settings {
*/
public final Setting<Double> mobSpawnerAvoidanceCoefficient = new Setting<>(2.0);
/**
* Distance to avoid mob spawners.
*/
public final Setting<Integer> mobSpawnerAvoidanceRadius = new Setting<>(16);
/**
@@ -333,6 +476,9 @@ public final class Settings {
*/
public final Setting<Double> mobAvoidanceCoefficient = new Setting<>(1.5);
/**
* Distance to avoid mobs.
*/
public final Setting<Integer> mobAvoidanceRadius = new Setting<>(8);
/**
@@ -434,6 +580,11 @@ public final class Settings {
*/
public final Setting<Boolean> simplifyUnloadedYCoord = new Setting<>(true);
/**
* Whenever a block changes, repack the whole chunk that it's in
*/
public final Setting<Boolean> repackOnAnyBlockChange = new Setting<>(true);
/**
* If a movement takes this many ticks more than its initial cost estimate, cancel it
*/
@@ -478,6 +629,17 @@ public final class Settings {
*/
public final Setting<Long> slowPathTimeoutMS = new Setting<>(40000L);
/**
* allows baritone to save bed waypoints when interacting with beds
*/
public final Setting<Boolean> doBedWaypoints = new Setting<>(true);
/**
* allows baritone to save death waypoints
*/
public final Setting<Boolean> doDeathWaypoints = new Setting<>(true);
/**
* The big one. Download all chunks in simplified 2-bit format and save them for better very-long-distance pathing.
*/
@@ -495,17 +657,29 @@ public final class Settings {
public final Setting<Boolean> pruneRegionsFromRAM = new Setting<>(true);
/**
* Remember the contents of containers (chests, echests, furnaces)
* The chunk packer queue can never grow to larger than this, if it does, the oldest chunks are discarded
* <p>
* Really buggy since the packet stuff is multithreaded badly thanks to brady
* The newest chunks are kept, so that if you're moving in a straight line quickly then stop, your immediate render distance is still included
*/
public final Setting<Boolean> containerMemory = new Setting<>(false);
public final Setting<Integer> chunkPackerQueueMaxSize = new Setting<>(2000);
/**
* Fill in blocks behind you
*/
public final Setting<Boolean> backfill = new Setting<>(false);
/**
* Shows popup message in the upper right corner, similarly to when you make an advancement
*/
public final Setting<Boolean> logAsToast = new Setting<>(false);
/**
* The time of how long the message in the pop-up will display
* <p>
* If below 1000L (1sec), it's better to disable this
*/
public final Setting<Long> toastTimer = new Setting<>(5000L);
/**
* Print all the debug messages to chat
*/
@@ -537,6 +711,12 @@ public final class Settings {
*/
public final Setting<Boolean> renderGoal = new Setting<>(true);
/**
* Render the goal as a sick animated thingy instead of just a box
* (also controls animation of GoalXZ if {@link #renderGoalXZBeacon} is enabled)
*/
public final Setting<Boolean> renderGoalAnimated = new Setting<>(true);
/**
* Render selection boxes
*/
@@ -584,6 +764,37 @@ public final class Settings {
*/
public final Setting<Boolean> freeLook = new Setting<>(true);
/**
* Break and place blocks without having to force the client-sided rotations. Requires {@link #freeLook}.
*/
public final Setting<Boolean> blockFreeLook = new Setting<>(false);
/**
* Automatically elytra fly without having to force the client-sided rotations.
*/
public final Setting<Boolean> elytraFreeLook = new Setting<>(true);
/**
* Forces the client-sided yaw rotation to an average of the last {@link #smoothLookTicks} of server-sided rotations.
*/
public final Setting<Boolean> smoothLook = new Setting<>(false);
/**
* Same as {@link #smoothLook} but for elytra flying.
*/
public final Setting<Boolean> elytraSmoothLook = new Setting<>(false);
/**
* The number of ticks to average across for {@link #smoothLook};
*/
public final Setting<Integer> smoothLookTicks = new Setting<>(5);
/**
* When true, the player will remain with its existing look direction as often as possible.
* Although, in some cases this can get it stuck, hence this setting to disable that behavior.
*/
public final Setting<Boolean> remainWithExistingLookDirection = new Setting<>(true);
/**
* Will cause some minor behavioral differences to ensure that Baritone works on anticheats.
* <p>
@@ -606,7 +817,7 @@ public final class Settings {
/**
* When GetToBlockProcess or MineProcess fails to calculate a path, instead of just giving up, mark the closest instance
* of that block as "unreachable" and go towards the next closest. GetToBlock expands this seaarch to the whole "vein"; MineProcess does not.
* of that block as "unreachable" and go towards the next closest. GetToBlock expands this search to the whole "vein"; MineProcess does not.
* This is because MineProcess finds individual impossible blocks (like one block in a vein that has gravel on top then lava, so it can't break)
* Whereas GetToBlock should blacklist the whole "vein" if it can't get to any of them.
*/
@@ -646,6 +857,11 @@ public final class Settings {
*/
public final Setting<Boolean> shortBaritonePrefix = new Setting<>(false);
/**
* Use a modern message tag instead of a prefix when logging to chat
*/
public final Setting<Boolean> useMessageTag = new Setting<>(false);
/**
* Echo commands to chat when they are run
*/
@@ -661,6 +877,16 @@ public final class Settings {
*/
public final Setting<Boolean> censorRanCommands = new Setting<>(false);
/**
* Stop using tools just before they are going to break.
*/
public final Setting<Boolean> itemSaver = new Setting<>(false);
/**
* Durability to leave on the tool when using itemSaver
*/
public final Setting<Integer> itemSaverThreshold = new Setting<>(10);
/**
* Always prefer silk touch tools over regular tools. This will not sacrifice speed, but it will always prefer silk
* touch tools over other tools of the same speed. This includes always choosing ANY silk touch tool over your hand.
@@ -704,7 +930,37 @@ public final class Settings {
public final Setting<Integer> maxCachedWorldScanCount = new Setting<>(10);
/**
* When GetToBlock doesn't know any locations for the desired block, explore randomly instead of giving up.
* Mine will not scan for or remember more than this many target locations.
* Note that the number of locations retrieved from cache is additionaly
* limited by {@link #maxCachedWorldScanCount}.
*/
public final Setting<Integer> mineMaxOreLocationsCount = new Setting<>(64);
/**
* Sets the minimum y level whilst mining - set to 0 to turn off.
* if world has negative y values, subtract the min world height to get the value to put here
*/
public final Setting<Integer> minYLevelWhileMining = new Setting<>(0);
/**
* Sets the maximum y level to mine ores at.
*/
public final Setting<Integer> maxYLevelWhileMining = new Setting<>(2031);
/**
* This will only allow baritone to mine exposed ores, can be used to stop ore obfuscators on servers that use them.
*/
public final Setting<Boolean> allowOnlyExposedOres = new Setting<>(false);
/**
* When allowOnlyExposedOres is enabled this is the distance around to search.
* <p>
* It is recommended to keep this value low, as it dramatically increases calculation times.
*/
public final Setting<Integer> allowOnlyExposedOresDistance = new Setting<>(1);
/**
* When GetToBlock or non-legit Mine doesn't know any locations for the desired block, explore randomly instead of giving up.
*/
public final Setting<Boolean> exploreForBlocks = new Setting<>(true);
@@ -737,6 +993,11 @@ public final class Settings {
*/
public final Setting<Boolean> replantNetherWart = new Setting<>(false);
/**
* Farming will scan for at most this many blocks.
*/
public final Setting<Integer> farmMaxScanSize = new Setting<>(256);
/**
* When the cache scan gives less blocks than the maximum threshold (but still above zero), scan the main world too.
* <p>
@@ -756,6 +1017,27 @@ public final class Settings {
*/
public final Setting<Boolean> layerOrder = new Setting<>(false);
/**
* How high should the individual layers be?
*/
public final Setting<Integer> layerHeight = new Setting<>(1);
/**
* Start building the schematic at a specific layer.
* Can help on larger builds when schematic wants to break things its already built
*/
public final Setting<Integer> startAtLayer = new Setting<>(0);
/**
* If a layer is unable to be constructed, just skip it.
*/
public final Setting<Boolean> skipFailedLayers = new Setting<>(false);
/**
* Only build the selected part of schematics
*/
public final Setting<Boolean> buildOnlySelection = new Setting<>(false);
/**
* How far to move before repeating the build. 0 to disable repeating on a certain axis, 0,0,0 to disable entirely
*/
@@ -766,6 +1048,13 @@ public final class Settings {
*/
public final Setting<Integer> buildRepeatCount = new Setting<>(-1);
/**
* Don't notify schematics that they are moved.
* e.g. replacing will replace the same spots for every repetition
* Mainly for backward compatibility.
*/
public final Setting<Boolean> buildRepeatSneaky = new Setting<>(true);
/**
* Allow standing above a block while mining it, in BuilderProcess
* <p>
@@ -800,6 +1089,11 @@ public final class Settings {
*/
public final Setting<Double> breakCorrectBlockPenaltyMultiplier = new Setting<>(10d);
/**
* Multiply the cost of placing a block that's incorrect in the builder's schematic by this coefficient
*/
public final Setting<Double> placeIncorrectBlockPenaltyMultiplier = new Setting<>(2d);
/**
* When this setting is true, build a schematic with the highest X coordinate being the origin, instead of the lowest
*/
@@ -815,6 +1109,28 @@ public final class Settings {
*/
public final Setting<Boolean> schematicOrientationZ = new Setting<>(false);
/**
* Rotates the schematic before building it.
* Possible values are
* <ul>
* <li> NONE - No rotation </li>
* <li> CLOCKWISE_90 - Rotate 90° clockwise </li>
* <li> CLOCKWISE_180 - Rotate 180° clockwise </li>
* <li> COUNTERCLOCKWISE_90 - Rotate 270° clockwise </li>
* </ul>
*/
public final Setting<Rotation> buildSchematicRotation = new Setting<>(Rotation.NONE);
/**
* Mirrors the schematic before building it.
* Possible values are
* <ul>
* <li> FRONT_BACK - mirror the schematic along its local x axis </li>
* <li> LEFT_RIGHT - mirror the schematic along its local z axis </li>
* </ul>
*/
public final Setting<Mirror> buildSchematicMirror = new Setting<>(Mirror.NONE);
/**
* The fallback used by the build command when no extension is specified. This may be useful if schematics of a
* particular format are used often, and the user does not wish to have to specify the extension with every usage.
@@ -874,13 +1190,14 @@ public final class Settings {
* Disallow MineBehavior from using X-Ray to see where the ores are. Turn this option on to force it to mine "legit"
* where it will only mine an ore once it can actually see it, so it won't do or know anything that a normal player
* couldn't. If you don't want it to look like you're X-Raying, turn this on
* This will always explore, regardless of exploreForBlocks
*/
public final Setting<Boolean> legitMine = new Setting<>(false);
/**
* What Y level to go to for legit strip mining
*/
public final Setting<Integer> legitMineYLevel = new Setting<>(11);
public final Setting<Integer> legitMineYLevel = new Setting<>(-59);
/**
* Magically see ores that are separated diagonally from existing ores. Basically like mining around the ores that it finds
@@ -925,6 +1242,11 @@ public final class Settings {
*/
public final Setting<Integer> followRadius = new Setting<>(3);
/**
* The maximum distance to the entity you're following
*/
public final Setting<Integer> followTargetMaxDistance = new Setting<>(0);
/**
* Turn this on if your exploration filter is enormous, you don't want it to check if it's done,
* and you are just fine with it just hanging on completion
@@ -958,7 +1280,36 @@ public final class Settings {
* via {@link Consumer#andThen(Consumer)} or it can completely be overriden via setting
* {@link Setting#value};
*/
public final Setting<Consumer<ITextComponent>> logger = new Setting<>(Minecraft.getInstance().ingameGUI.getChatGUI()::printChatMessage);
@JavaOnly
public final Setting<Consumer<Component>> logger = new Setting<>((msg) -> {
try {
final GuiMessageTag tag = useMessageTag.value ? Helper.MESSAGE_TAG : null;
Minecraft.getInstance().gui.getChat().addMessage(msg, null, tag);
} catch (Throwable t) {
LOGGER.warn("Failed to log message to chat: " + msg.getString(), t);
}
});
/**
* The function that is called when Baritone will send a desktop notification. This function can be added to
* via {@link Consumer#andThen(Consumer)} or it can completely be overriden via setting
* {@link Setting#value};
*/
@JavaOnly
public final Setting<BiConsumer<String, Boolean>> notifier = new Setting<>(NotificationHelper::notify);
/**
* The function that is called when Baritone will show a toast. This function can be added to
* via {@link Consumer#andThen(Consumer)} or it can completely be overriden via setting
* {@link Setting#value};
*/
@JavaOnly
public final Setting<BiConsumer<Component, Component>> toaster = new Setting<>(BaritoneToast::addOrUpdate);
/**
* Print out ALL command exceptions as a stack trace to stdout, even simple syntax errors
*/
public final Setting<Boolean> verboseCommandExceptions = new Setting<>(false);
/**
* The size of the box that is rendered when the current goal is a GoalYLevel
@@ -1051,10 +1402,159 @@ public final class Settings {
public final Setting<Boolean> renderSelectionCorners = new Setting<>(true);
/**
* Desktop Notifications
* Use sword to mine.
*/
public final Setting<Boolean> useSwordToMine = new Setting<>(true);
/**
* Desktop notifications
*/
public final Setting<Boolean> desktopNotifications = new Setting<>(false);
/**
* Desktop notification on path complete
*/
public final Setting<Boolean> notificationOnPathComplete = new Setting<>(true);
/**
* Desktop notification on farm fail
*/
public final Setting<Boolean> notificationOnFarmFail = new Setting<>(true);
/**
* Desktop notification on build finished
*/
public final Setting<Boolean> notificationOnBuildFinished = new Setting<>(true);
/**
* Desktop notification on explore finished
*/
public final Setting<Boolean> notificationOnExploreFinished = new Setting<>(true);
/**
* Desktop notification on mine fail
*/
public final Setting<Boolean> notificationOnMineFail = new Setting<>(true);
/**
* The number of ticks of elytra movement to simulate while firework boost is not active. Higher values are
* computationally more expensive.
*/
public final Setting<Integer> elytraSimulationTicks = new Setting<>(20);
/**
* The maximum allowed deviation in pitch from a direct line-of-sight to the flight target. Higher values are
* computationally more expensive.
*/
public final Setting<Integer> elytraPitchRange = new Setting<>(25);
/**
* The minimum speed that the player can drop to (in blocks/tick) before a firework is automatically deployed.
*/
public final Setting<Double> elytraFireworkSpeed = new Setting<>(1.2);
/**
* The delay after the player's position is set-back by the server that a firework may be automatically deployed.
* Value is in ticks.
*/
public final Setting<Integer> elytraFireworkSetbackUseDelay = new Setting<>(15);
/**
* The minimum padding value that is added to the player's hitbox when considering which point to fly to on the
* path. High values can result in points not being considered which are otherwise safe to fly to. Low values can
* result in flight paths which are extremely tight, and there's the possibility of crashing due to getting too low
* to the ground.
*/
public final Setting<Double> elytraMinimumAvoidance = new Setting<>(0.2);
/**
* If enabled, avoids using fireworks when descending along the flight path.
*/
public final Setting<Boolean> elytraConserveFireworks = new Setting<>(false);
/**
* Renders the raytraces that are performed by the elytra fly calculation.
*/
public final Setting<Boolean> elytraRenderRaytraces = new Setting<>(false);
/**
* Renders the raytraces that are used in the hitbox part of the elytra fly calculation.
* Requires {@link #elytraRenderRaytraces}.
*/
public final Setting<Boolean> elytraRenderHitboxRaytraces = new Setting<>(false);
/**
* Renders the best elytra flight path that was simulated each tick.
*/
public final Setting<Boolean> elytraRenderSimulation = new Setting<>(true);
/**
* Automatically path to and jump off of ledges to initiate elytra flight when grounded.
*/
public final Setting<Boolean> elytraAutoJump = new Setting<>(false);
/**
* The seed used to generate chunks for long distance elytra path-finding in the nether.
* Defaults to 2b2t's nether seed.
*/
public final Setting<Long> elytraNetherSeed = new Setting<>(146008555100680L);
/**
* Whether nether-pathfinder should generate terrain based on {@link #elytraNetherSeed}.
* If false all chunks that haven't been loaded are assumed to be air.
*/
public final Setting<Boolean> elytraPredictTerrain = new Setting<>(false);
/**
* Automatically swap the current elytra with a new one when the durability gets too low
*/
public final Setting<Boolean> elytraAutoSwap = new Setting<>(true);
/**
* The minimum durability an elytra can have before being swapped
*/
public final Setting<Integer> elytraMinimumDurability = new Setting<>(5);
/**
* The minimum fireworks before landing early for safety
*/
public final Setting<Integer> elytraMinFireworksBeforeLanding = new Setting<>(5);
/**
* Automatically land when elytra is almost out of durability, or almost out of fireworks
*/
public final Setting<Boolean> elytraAllowEmergencyLand = new Setting<>(true);
/**
* Time between culling far away chunks from the nether pathfinder chunk cache
*/
public final Setting<Long> elytraTimeBetweenCacheCullSecs = new Setting<>(TimeUnit.MINUTES.toSeconds(3));
/**
* Maximum distance chunks can be before being culled from the nether pathfinder chunk cache
*/
public final Setting<Integer> elytraCacheCullDistance = new Setting<>(5000);
/**
* Should elytra consider nether brick a valid landing block
*/
public final Setting<Boolean> elytraAllowLandOnNetherFortress = new Setting<>(false);
/**
* Has the user read and understood the elytra terms and conditions
*/
public final Setting<Boolean> elytraTermsAccepted = new Setting<>(false);
/**
* Verbose chat logging in elytra mode
*/
public final Setting<Boolean> elytraChatSpam = new Setting<>(false);
/**
* Sneak when magma blocks are under feet
*/
public final Setting<Boolean> allowWalkOnMagmaBlocks = new Setting<>(false);
/**
* A map of lowercase setting field names to their respective setting
*/
@@ -1072,6 +1572,7 @@ public final class Settings {
public T value;
public final T defaultValue;
private String name;
private boolean javaOnly;
@SuppressWarnings("unchecked")
private Setting(T value) {
@@ -1080,6 +1581,7 @@ public final class Settings {
}
this.value = value;
this.defaultValue = value;
this.javaOnly = false;
}
/**
@@ -1116,8 +1618,25 @@ public final class Settings {
public final Type getType() {
return settingTypes.get(this);
}
/**
* This should always be the same as whether the setting can be parsed from or serialized to a string; in other
* words, the only way to modify it is by writing to {@link #value} programatically.
*
* @return {@code true} if the setting can not be set or read by the user
*/
public boolean isJavaOnly() {
return javaOnly;
}
}
/**
* Marks a {@link Setting} field as being {@link Setting#isJavaOnly() Java-only}
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
private @interface JavaOnly {}
// here be dragons
Settings() {
@@ -1133,6 +1652,7 @@ public final class Settings {
Setting<?> setting = (Setting<?>) field.get(this);
String name = field.getName();
setting.name = name;
setting.javaOnly = field.isAnnotationPresent(JavaOnly.class);
name = name.toLowerCase();
if (tmpByName.containsKey(name)) {
throw new IllegalStateException("Duplicate setting name");

View File

@@ -17,6 +17,8 @@
package baritone.api.behavior;
import baritone.api.Settings;
import baritone.api.behavior.look.IAimProcessor;
import baritone.api.utils.Rotation;
/**
@@ -26,14 +28,23 @@ import baritone.api.utils.Rotation;
public interface ILookBehavior extends IBehavior {
/**
* Updates the current {@link ILookBehavior} target to target
* the specified rotations on the next tick. If force is {@code true},
* then freeLook will be overriden and angles will be set regardless.
* If any sort of block interaction is required, force should be {@code true},
* otherwise, it should be {@code false};
* Updates the current {@link ILookBehavior} target to target the specified rotations on the next tick. If any sort
* of block interaction is required, {@code blockInteract} should be {@code true}. It is not guaranteed that the
* rotations set by the caller will be the exact rotations expressed by the client (This is due to settings like
* {@link Settings#randomLooking}). If the rotations produced by this behavior are required, then the
* {@link #getAimProcessor() aim processor} should be used.
*
* @param rotation The target rotations
* @param force Whether or not to "force" the rotations
* @param rotation The target rotations
* @param blockInteract Whether the target rotations are needed for a block interaction
*/
void updateTarget(Rotation rotation, boolean force);
void updateTarget(Rotation rotation, boolean blockInteract);
/**
* The aim processor instance for this {@link ILookBehavior}, which is responsible for applying additional,
* deterministic transformations to the target rotation set by {@link #updateTarget}.
*
* @return The aim processor
* @see IAimProcessor#fork
*/
IAimProcessor getAimProcessor();
}

View File

@@ -58,6 +58,15 @@ public interface IPathingBehavior extends IBehavior {
return Optional.of(current.getPath().ticksRemainingFrom(start));
}
/**
* Returns the estimated remaining ticks to the current goal.
* Given that the return type is an optional, {@link Optional#empty()}
* will be returned in the case that there is no current goal.
*
* @return The estimated remaining ticks to the current goal.
*/
Optional<Double> estimatedTicksToGoal();
/**
* @return The current pathing goal
*/

View File

@@ -0,0 +1,45 @@
/*
* This file is part of Baritone.
*
* Baritone is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Baritone is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
*/
package baritone.api.behavior.look;
import baritone.api.utils.Rotation;
/**
* @author Brady
*/
public interface IAimProcessor {
/**
* Returns the actual rotation that will be used when the desired rotation is requested. The returned rotation
* always reflects what would happen in the upcoming tick. In other words, it is a pure function, and no internal
* state changes. If simulation of the rotation states beyond the next tick is required, then a
* {@link IAimProcessor#fork fork} should be created.
*
* @param desired The desired rotation to set
* @return The actual rotation
*/
Rotation peekRotation(Rotation desired);
/**
* Returns a copy of this {@link IAimProcessor} which has its own internal state and is manually tickable.
*
* @return The forked processor
* @see ITickableAimProcessor
*/
ITickableAimProcessor fork();
}

View File

@@ -15,30 +15,33 @@
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
*/
package baritone.api.cache;
package baritone.api.behavior.look;
import net.minecraft.util.math.BlockPos;
import java.util.Map;
import baritone.api.utils.Rotation;
/**
* @author Brady
* @since 9/23/2018
*/
public interface IContainerMemory {
public interface ITickableAimProcessor extends IAimProcessor {
/**
* Gets a remembered inventory by its block position.
*
* @param pos The position of the container block
* @return The remembered inventory
* Advances the internal state of this aim processor by a single tick.
*/
IRememberedInventory getInventoryByPos(BlockPos pos);
void tick();
/**
* Gets the map of all block positions to their remembered inventories.
* Calls {@link #tick()} the specified number of times.
*
* @return Map of block positions to their respective remembered inventories
* @param ticks The number of calls
*/
Map<BlockPos, IRememberedInventory> getRememberedInventories();
void advance(int ticks);
/**
* Returns the actual rotation as provided by {@link #peekRotation(Rotation)}, and then automatically advances the
* internal state by one {@link #tick() tick}.
*
* @param rotation The desired rotation to set
* @return The actual rotation
*/
Rotation nextRotation(Rotation rotation);
}

View File

@@ -17,8 +17,8 @@
package baritone.api.cache;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.block.state.BlockState;
/**
* @author Brady
@@ -26,9 +26,9 @@ import net.minecraft.util.math.BlockPos;
*/
public interface IBlockTypeAccess {
IBlockState getBlock(int x, int y, int z);
BlockState getBlock(int x, int y, int z);
default IBlockState getBlock(BlockPos pos) {
default BlockState getBlock(BlockPos pos) {
return getBlock(pos.getX(), pos.getY(), pos.getZ());
}
}

View File

@@ -17,10 +17,9 @@
package baritone.api.cache;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.chunk.Chunk;
import java.util.ArrayList;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.chunk.LevelChunk;
/**
* @author Brady
@@ -44,7 +43,7 @@ public interface ICachedWorld {
*
* @param chunk The chunk to pack and store
*/
void queueForPacking(Chunk chunk);
void queueForPacking(LevelChunk chunk);
/**
* Returns whether or not the block at the specified X and Z coordinates

View File

@@ -37,9 +37,4 @@ public interface IWorldData {
*/
IWaypointCollection getWaypoints();
/**
* @return The {@link IContainerMemory} instance
* @see IContainerMemory
*/
IContainerMemory getContainerMemory();
}

View File

@@ -17,6 +17,8 @@
package baritone.api.cache;
import java.util.function.Consumer;
/**
* @author Brady
* @since 9/24/2018
@@ -29,4 +31,11 @@ public interface IWorldProvider {
* @return The current world data
*/
IWorldData getCurrentWorld();
default void ifWorldLoaded(Consumer<IWorldData> callback) {
final IWorldData currentWorld = this.getCurrentWorld();
if (currentWorld != null) {
callback.accept(currentWorld);
}
}
}

View File

@@ -19,11 +19,10 @@ package baritone.api.cache;
import baritone.api.utils.BlockOptionalMetaLookup;
import baritone.api.utils.IPlayerContext;
import net.minecraft.block.Block;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.ChunkPos;
import java.util.List;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.ChunkPos;
import net.minecraft.world.level.block.Block;
/**
* @author Brady
@@ -88,7 +87,7 @@ public interface IWorldScanner {
* Queues the chunks in a square formation around the specified player, using the specified
* range, which represents 1/2 the square's dimensions, where the player is in the center.
*
* @param ctx The player, describing the origin
* @param ctx The player, describing the origin
* @param range The range to repack
* @return The amount of chunks successfully queued for repacking
*/

View File

@@ -34,9 +34,8 @@ import java.util.stream.Stream;
* So basically, you should use it because it provides a small amount of boilerplate,
* but you're not forced to use it.
*
* @see ICommand
*
* @author LoganDark
* @see ICommand
*/
public abstract class Command implements ICommand {

View File

@@ -46,8 +46,8 @@ public interface IArgParserManager {
/**
* Attempt to parse the specified argument with a stateless {@link IArgParser} that outputs the specified class.
*
* @param type The type to try and parse the argument into.
* @param arg The argument to parse.
* @param type The type to try and parse the argument into.
* @param arg The argument to parse.
* @return An instance of the specified class.
* @throws CommandInvalidTypeException If the parsing failed
*/

View File

@@ -18,8 +18,6 @@
package baritone.api.command.argument;
import baritone.api.command.ICommand;
import baritone.api.command.exception.CommandTooManyArgumentsException;
import baritone.api.utils.Helper;
import baritone.api.command.argparser.IArgParser;
import baritone.api.command.datatypes.IDatatype;
import baritone.api.command.datatypes.IDatatypeFor;
@@ -27,11 +25,12 @@ import baritone.api.command.datatypes.IDatatypePost;
import baritone.api.command.exception.CommandException;
import baritone.api.command.exception.CommandInvalidTypeException;
import baritone.api.command.exception.CommandNotEnoughArgumentsException;
import net.minecraft.util.EnumFacing;
import baritone.api.command.exception.CommandTooManyArgumentsException;
import baritone.api.utils.Helper;
import java.util.Deque;
import java.util.LinkedList;
import java.util.stream.Stream;
import net.minecraft.core.Direction;
/**
* The {@link IArgConsumer} is how {@link ICommand}s read the arguments passed to them. This class has many benefits:
@@ -223,7 +222,7 @@ public interface IArgConsumer {
* @param type The type to peek as
* @param index The index to peek
* @return An instance of the specified type
* @throws CommandInvalidTypeException If the parsing failed
* @throws CommandInvalidTypeException If the parsing failed
* @see IArgParser
* @see #peekAs(Class)
* @see #peekAsOrDefault(Class, Object, int)
@@ -240,7 +239,7 @@ public interface IArgConsumer {
*
* @param type The type to peek as
* @return An instance of the specified type
* @throws CommandInvalidTypeException If the parsing failed
* @throws CommandInvalidTypeException If the parsing failed
* @see IArgParser
* @see #peekAs(Class, int)
* @see #peekAsOrDefault(Class, Object)
@@ -404,8 +403,8 @@ public interface IArgConsumer {
/**
* Gets an enum value from the enum class with the same name as the next argument's value
* <p>
* For example if you getEnum as an {@link EnumFacing}, and the next argument's value is "up", this will return
* {@link EnumFacing#UP}
* For example if you getEnum as an {@link Direction}, and the next argument's value is "up", this will return
* {@link Direction#UP}
*
* @param enumClass The enum class to search
* @return An enum constant of that class with the same name as the next argument's value
@@ -419,8 +418,8 @@ public interface IArgConsumer {
/**
* Gets an enum value from the enum class with the same name as the next argument's value
* <p>
* For example if you getEnum as an {@link EnumFacing}, and the next argument's value is "up", this will return
* {@link EnumFacing#UP}
* For example if you getEnum as an {@link Direction}, and the next argument's value is "up", this will return
* {@link Direction#UP}
*
* @param enumClass The enum class to search
* @param def The default value
@@ -436,8 +435,8 @@ public interface IArgConsumer {
/**
* Gets an enum value from the enum class with the same name as the next argument's value
* <p>
* For example if you getEnum as an {@link EnumFacing}, and the next argument's value is "up", this will return
* {@link EnumFacing#UP}
* For example if you getEnum as an {@link Direction}, and the next argument's value is "up", this will return
* {@link Direction#UP}
*
* @param enumClass The enum class to search
* @return An enum constant of that class with the same name as the next argument's value, or {@code null} if it
@@ -458,7 +457,7 @@ public interface IArgConsumer {
*
* @param type The type to peek as
* @return An instance of the specified type
* @throws CommandInvalidTypeException If the parsing failed
* @throws CommandInvalidTypeException If the parsing failed
* @see IArgParser
* @see #get()
* @see #getAsOrDefault(Class, Object)

View File

@@ -19,7 +19,7 @@ package baritone.api.command.argument;
import baritone.api.command.argparser.IArgParser;
import baritone.api.command.exception.CommandInvalidTypeException;
import net.minecraft.util.EnumFacing;
import net.minecraft.core.Direction;
/**
* A {@link ICommandArgument} is an immutable object representing one command argument. It contains data on the index of
@@ -50,8 +50,8 @@ public interface ICommandArgument {
/**
* Gets an enum value from the enum class with the same name as this argument's value
* <p>
* For example if you getEnum as an {@link EnumFacing}, and this argument's value is "up", it will return {@link
* EnumFacing#UP}
* For example if you getEnum as an {@link Direction}, and this argument's value is "up", it will return {@link
* Direction#UP}
*
* @param enumClass The enum class to search
* @return An enum constant of that class with the same name as this argument's value
@@ -87,7 +87,7 @@ public interface ICommandArgument {
*
* @param type The class to parse this argument into
* @return An instance of the specified type
* @throws CommandInvalidTypeException If the parsing failed
* @throws CommandInvalidTypeException If the parsing failed
*/
<T, S> T getAs(Class<T> type, Class<S> stateType, S state) throws CommandInvalidTypeException;

View File

@@ -17,12 +17,11 @@
package baritone.api.command.datatypes;
import baritone.api.command.helpers.TabCompleteHelper;
import baritone.api.command.exception.CommandException;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.registry.IRegistry;
import baritone.api.command.helpers.TabCompleteHelper;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.block.Block;
import java.util.stream.Stream;
@@ -33,7 +32,7 @@ public enum BlockById implements IDatatypeFor<Block> {
public Block get(IDatatypeContext ctx) throws CommandException {
ResourceLocation id = new ResourceLocation(ctx.getConsumer().getString());
Block block;
if ((block = IRegistry.BLOCK.get(id)) == Blocks.AIR) {
if ((block = BuiltInRegistries.BLOCK.getOptional(id).orElse(null)) == null) {
throw new IllegalArgumentException("no block found by that id");
}
return block;
@@ -41,13 +40,15 @@ public enum BlockById implements IDatatypeFor<Block> {
@Override
public Stream<String> tabComplete(IDatatypeContext ctx) throws CommandException {
String arg = ctx.getConsumer().getString();
return new TabCompleteHelper()
.append(
IRegistry.BLOCK.keySet()
BuiltInRegistries.BLOCK.keySet()
.stream()
.map(Object::toString)
)
.filterPrefixNamespaced(ctx.getConsumer().getString())
.filterPrefixNamespaced(arg)
.sortAlphabetically()
.stream();
}

View File

@@ -19,9 +19,9 @@ package baritone.api.command.datatypes;
import baritone.api.command.exception.CommandException;
import baritone.api.command.helpers.TabCompleteHelper;
import net.minecraft.entity.EntityType;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.registry.IRegistry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.EntityType;
import java.util.stream.Stream;
@@ -32,7 +32,7 @@ public enum EntityClassById implements IDatatypeFor<EntityType> {
public EntityType get(IDatatypeContext ctx) throws CommandException {
ResourceLocation id = new ResourceLocation(ctx.getConsumer().getString());
EntityType entity;
if ((entity = IRegistry.ENTITY_TYPE.get(id)) == null) {
if ((entity = BuiltInRegistries.ENTITY_TYPE.getOptional(id).orElse(null)) == null) {
throw new IllegalArgumentException("no entity found by that id");
}
return entity;
@@ -41,7 +41,7 @@ public enum EntityClassById implements IDatatypeFor<EntityType> {
@Override
public Stream<String> tabComplete(IDatatypeContext ctx) throws CommandException {
return new TabCompleteHelper()
.append(IRegistry.ENTITY_TYPE.stream().map(Object::toString))
.append(BuiltInRegistries.ENTITY_TYPE.stream().map(Object::toString))
.filterPrefixNamespaced(ctx.getConsumer().getString())
.sortAlphabetically()
.stream();

View File

@@ -0,0 +1,43 @@
/*
* This file is part of Baritone.
*
* Baritone is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Baritone is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
*/
package baritone.api.command.datatypes;
import baritone.api.command.exception.CommandException;
import baritone.api.command.helpers.TabCompleteHelper;
import net.minecraft.core.Direction;
import java.util.Locale;
import java.util.stream.Stream;
public enum ForAxis implements IDatatypeFor<Direction.Axis> {
INSTANCE;
@Override
public Direction.Axis get(IDatatypeContext ctx) throws CommandException {
return Direction.Axis.valueOf(ctx.getConsumer().getString().toUpperCase(Locale.US));
}
@Override
public Stream<String> tabComplete(IDatatypeContext ctx) throws CommandException {
return new TabCompleteHelper()
.append(Stream.of(Direction.Axis.values())
.map(Direction.Axis::getName).map(String::toLowerCase))
.filterPrefix(ctx.getConsumer().getString())
.stream();
}
}

View File

@@ -17,21 +17,138 @@
package baritone.api.command.datatypes;
import baritone.api.utils.BlockOptionalMeta;
import baritone.api.command.exception.CommandException;
import baritone.api.command.helpers.TabCompleteHelper;
import baritone.api.utils.BlockOptionalMeta;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.properties.Property;
import java.util.Set;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public enum ForBlockOptionalMeta implements IDatatypeFor<BlockOptionalMeta> {
INSTANCE;
/**
* Matches (domain:)?name([(property=value)*])? but the input can be truncated at any position.
* domain and name are [a-z0-9_.-]+ and [a-z0-9/_.-]+ because that's what mc 1.13+ accepts.
* property and value use the same format as domain.
*/
// Good luck reading this.
private static Pattern PATTERN = Pattern.compile("(?:[a-z0-9_.-]+:)?(?:[a-z0-9/_.-]+(?:\\[(?:(?:[a-z0-9_.-]+=[a-z0-9_.-]+,)*(?:[a-z0-9_.-]+(?:=(?:[a-z0-9_.-]+(?:\\])?)?)?)?|\\])?)?)?");
@Override
public BlockOptionalMeta get(IDatatypeContext ctx) throws CommandException {
return new BlockOptionalMeta(ctx.getConsumer().getString());
}
@Override
public Stream<String> tabComplete(IDatatypeContext ctx) {
return ctx.getConsumer().tabCompleteDatatype(BlockById.INSTANCE);
public Stream<String> tabComplete(IDatatypeContext ctx) throws CommandException {
String arg = ctx.getConsumer().peekString();
if (!PATTERN.matcher(arg).matches()) {
// Invalid format; we can't complete this.
ctx.getConsumer().getString();
return Stream.empty();
}
if (arg.endsWith("]")) {
// We are already done.
ctx.getConsumer().getString();
return Stream.empty();
}
if (!arg.contains("[")) {
// no properties so we are completing the block id
return ctx.getConsumer().tabCompleteDatatype(BlockById.INSTANCE);
}
ctx.getConsumer().getString();
// destructuring assignment? Please?
String blockId, properties;
{
String[] parts = splitLast(arg, '[');
blockId = parts[0];
properties = parts[1];
}
Block block = BuiltInRegistries.BLOCK.getOptional(new ResourceLocation(blockId)).orElse(null);
if (block == null) {
// This block doesn't exist so there's no properties to complete.
return Stream.empty();
}
String leadingProperties, lastProperty;
{
String[] parts = splitLast(properties, ',');
leadingProperties = parts[0];
lastProperty = parts[1];
}
if (!lastProperty.contains("=")) {
// The last property-value pair doesn't have a value yet so we are completing its name
Set<String> usedProps = Stream.of(leadingProperties.split(","))
.map(pair -> pair.split("=")[0])
.collect(Collectors.toSet());
String prefix = arg.substring(0, arg.length() - lastProperty.length());
return new TabCompleteHelper()
.append(
block.getStateDefinition()
.getProperties()
.stream()
.map(Property::getName)
)
.filter(prop -> !usedProps.contains(prop))
.filterPrefix(lastProperty)
.sortAlphabetically()
.map(prop -> prefix + prop)
.stream();
}
String lastName, lastValue;
{
String[] parts = splitLast(lastProperty, '=');
lastName = parts[0];
lastValue = parts[1];
}
// We are completing the value of a property
String prefix = arg.substring(0, arg.length() - lastValue.length());
Property<?> property = block.getStateDefinition().getProperty(lastName);
if (property == null) {
// The property does not exist so there's no values to complete
return Stream.empty();
}
return new TabCompleteHelper()
.append(getValues(property))
.filterPrefix(lastValue)
.sortAlphabetically()
.map(val -> prefix + val)
.stream();
}
/**
* Always returns exactly two strings.
* If the separator is not found the FIRST returned string is empty.
*/
private static String[] splitLast(String string, char chr) {
int idx = string.lastIndexOf(chr);
if (idx == -1) {
return new String[]{"", string};
}
return new String[]{string.substring(0, idx), string.substring(idx + 1)};
}
// this shouldn't need to be a separate method?
private static <T extends Comparable<T>> Stream<String> getValues(Property<T> property) {
return property.getPossibleValues().stream().map(property::getName);
}
}

View File

@@ -17,26 +17,25 @@
package baritone.api.command.datatypes;
import baritone.api.command.helpers.TabCompleteHelper;
import baritone.api.command.exception.CommandException;
import net.minecraft.util.EnumFacing;
import baritone.api.command.helpers.TabCompleteHelper;
import java.util.Locale;
import java.util.stream.Stream;
import net.minecraft.core.Direction;
public enum ForEnumFacing implements IDatatypeFor<EnumFacing> {
public enum ForDirection implements IDatatypeFor<Direction> {
INSTANCE;
@Override
public EnumFacing get(IDatatypeContext ctx) throws CommandException {
return EnumFacing.valueOf(ctx.getConsumer().getString().toUpperCase(Locale.US));
public Direction get(IDatatypeContext ctx) throws CommandException {
return Direction.valueOf(ctx.getConsumer().getString().toUpperCase(Locale.US));
}
@Override
public Stream<String> tabComplete(IDatatypeContext ctx) throws CommandException {
return new TabCompleteHelper()
.append(Stream.of(EnumFacing.values())
.map(EnumFacing::getName).map(String::toLowerCase))
.append(Stream.of(Direction.values())
.map(Direction::getName).map(String::toLowerCase))
.filterPrefix(ctx.getConsumer().getString())
.stream();
}

View File

@@ -20,8 +20,8 @@ package baritone.api.command.datatypes;
import baritone.api.IBaritone;
import baritone.api.cache.IWaypoint;
import baritone.api.cache.IWaypointCollection;
import baritone.api.command.helpers.TabCompleteHelper;
import baritone.api.command.exception.CommandException;
import baritone.api.command.helpers.TabCompleteHelper;
import java.util.Comparator;
import java.util.stream.Stream;

View File

@@ -24,9 +24,8 @@ import baritone.api.command.argument.IArgConsumer;
* Provides an {@link IDatatype} with contextual information so
* that it can perform the desired operation on the target level.
*
* @see IDatatype
*
* @author Brady
* @see IDatatype
* @since 9/26/2019
*/
public interface IDatatypeContext {

View File

@@ -34,11 +34,10 @@ public interface IDatatypeFor<T> extends IDatatype {
* if the expected input does not conform to a parseable value. As far as a {@link CommandException} being
* thrown is concerned, see the note below for specifics.
*
* @see IDatatypeContext
*
* @param ctx The context
* @return The parsed data-type
* @throws CommandException If there was an issue parsing using another type or arguments could not be polled.
* @see IDatatypeContext
*/
T get(IDatatypeContext ctx) throws CommandException;
}

View File

@@ -0,0 +1,53 @@
/*
* This file is part of Baritone.
*
* Baritone is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Baritone is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
*/
package baritone.api.command.datatypes;
import baritone.api.command.exception.CommandException;
import baritone.api.command.helpers.TabCompleteHelper;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
import java.util.stream.Stream;
public enum ItemById implements IDatatypeFor<Item> {
INSTANCE;
@Override
public Item get(IDatatypeContext ctx) throws CommandException {
ResourceLocation id = new ResourceLocation(ctx.getConsumer().getString());
Item item;
if ((item = BuiltInRegistries.ITEM.getOptional(id).orElse(null)) == null) {
throw new IllegalArgumentException("No item found by that id");
}
return item;
}
@Override
public Stream<String> tabComplete(IDatatypeContext ctx) throws CommandException {
return new TabCompleteHelper()
.append(
BuiltInRegistries.BLOCK.keySet()
.stream()
.map(ResourceLocation::toString)
)
.filterPrefixNamespaced(ctx.getConsumer().getString())
.sortAlphabetically()
.stream();
}
}

View File

@@ -20,21 +20,20 @@ package baritone.api.command.datatypes;
import baritone.api.IBaritone;
import baritone.api.command.exception.CommandException;
import baritone.api.command.helpers.TabCompleteHelper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.text.ITextComponent;
import java.util.List;
import java.util.stream.Stream;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.player.Player;
/**
* An {@link IDatatype} used to resolve nearby players, those within
* render distance of the target {@link IBaritone} instance.
*/
public enum NearbyPlayer implements IDatatypeFor<EntityPlayer> {
public enum NearbyPlayer implements IDatatypeFor<Player> {
INSTANCE;
@Override
public EntityPlayer get(IDatatypeContext ctx) throws CommandException {
public Player get(IDatatypeContext ctx) throws CommandException {
final String username = ctx.getConsumer().getString();
return getPlayers(ctx).stream()
.filter(s -> s.getName().getString().equalsIgnoreCase(username))
@@ -44,13 +43,13 @@ public enum NearbyPlayer implements IDatatypeFor<EntityPlayer> {
@Override
public Stream<String> tabComplete(IDatatypeContext ctx) throws CommandException {
return new TabCompleteHelper()
.append(getPlayers(ctx).stream().map(EntityPlayer::getName).map(ITextComponent::getString))
.append(getPlayers(ctx).stream().map(Player::getName).map(Component::getString))
.filterPrefix(ctx.getConsumer().getString())
.sortAlphabetically()
.stream();
}
private static List<EntityPlayer> getPlayers(IDatatypeContext ctx) {
return ctx.getBaritone().getPlayerContext().world().playerEntities;
private static List<? extends Player> getPlayers(IDatatypeContext ctx) {
return ctx.getBaritone().getPlayerContext().world().players();
}
}

View File

@@ -18,8 +18,8 @@
package baritone.api.command.datatypes;
import baritone.api.command.argument.IArgConsumer;
import baritone.api.utils.BetterBlockPos;
import baritone.api.command.exception.CommandException;
import baritone.api.utils.BetterBlockPos;
import java.util.stream.Stream;

View File

@@ -26,7 +26,8 @@ import java.util.stream.Stream;
public enum RelativeCoordinate implements IDatatypePost<Double, Double> {
INSTANCE;
private static Pattern PATTERN = Pattern.compile("^(~?)([+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)([k-k]?)|)$");
private static String ScalesAliasRegex = "[kKmM]";
private static Pattern PATTERN = Pattern.compile("^(~?)([+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(" + ScalesAliasRegex + "?)|)$");
@Override
public Double apply(IDatatypeContext ctx, Double origin) throws CommandException {
@@ -41,11 +42,15 @@ public enum RelativeCoordinate implements IDatatypePost<Double, Double> {
boolean isRelative = !matcher.group(1).isEmpty();
double offset = matcher.group(2).isEmpty() ? 0 : Double.parseDouble(matcher.group(2).replaceAll("k", ""));
double offset = matcher.group(2).isEmpty() ? 0 : Double.parseDouble(matcher.group(2).replaceAll(ScalesAliasRegex, ""));
if (matcher.group(2).contains("k")) {
if (matcher.group(2).toLowerCase().contains("k")) {
offset *= 1000;
}
if (matcher.group(2).toLowerCase().contains("m")) {
offset *= 1000000;
}
if (isRelative) {
return origin + offset;

View File

@@ -19,6 +19,8 @@ package baritone.api.command.datatypes;
import baritone.api.command.argument.IArgConsumer;
import baritone.api.command.exception.CommandException;
import baritone.api.utils.Helper;
import net.minecraft.client.Minecraft;
import java.io.File;
import java.io.IOException;
@@ -30,8 +32,6 @@ import java.util.Locale;
import java.util.Objects;
import java.util.stream.Stream;
import static baritone.api.utils.Helper.HELPER;
public enum RelativeFile implements IDatatypePost<File, File> {
INSTANCE;
@@ -83,18 +83,23 @@ public enum RelativeFile implements IDatatypePost<File, File> {
boolean useParent = !currentPathStringThing.isEmpty() && !currentPathStringThing.endsWith(File.separator);
File currentFile = currentPath.isAbsolute() ? currentPath.toFile() : new File(base, currentPathStringThing);
return Stream.of(Objects.requireNonNull(getCanonicalFileUnchecked(
useParent
? currentFile.getParentFile()
: currentFile
).listFiles()))
useParent
? currentFile.getParentFile()
: currentFile
).listFiles()))
.map(f -> (currentPath.isAbsolute() ? f : basePath.relativize(f.toPath()).toString()) +
(f.isDirectory() ? File.separator : ""))
.filter(s -> s.toLowerCase(Locale.US).startsWith(currentPathStringThing.toLowerCase(Locale.US)))
.filter(s -> !s.contains(" "));
}
@Deprecated
public static File gameDir() {
File gameDir = HELPER.mc.gameDir.getAbsoluteFile();
return gameDir(Helper.mc);
}
public static File gameDir(Minecraft mc) {
File gameDir = mc.gameDirectory.getAbsoluteFile();
if (gameDir.getName().equals(".")) {
return gameDir.getParentFile();
}

View File

@@ -18,16 +18,13 @@
package baritone.api.command.datatypes;
import baritone.api.command.argument.IArgConsumer;
import baritone.api.command.exception.CommandException;
import baritone.api.pathing.goals.Goal;
import baritone.api.pathing.goals.GoalBlock;
import baritone.api.pathing.goals.GoalXZ;
import baritone.api.pathing.goals.GoalYLevel;
import baritone.api.utils.BetterBlockPos;
import baritone.api.command.exception.CommandException;
import net.minecraft.util.math.MathHelper;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;
public enum RelativeGoal implements IDatatypePost<Goal, BetterBlockPos> {

View File

@@ -18,12 +18,11 @@
package baritone.api.command.datatypes;
import baritone.api.command.argument.IArgConsumer;
import baritone.api.command.exception.CommandException;
import baritone.api.pathing.goals.GoalBlock;
import baritone.api.utils.BetterBlockPos;
import baritone.api.command.exception.CommandException;
import net.minecraft.util.math.MathHelper;
import java.util.stream.Stream;
import net.minecraft.util.Mth;
public enum RelativeGoalBlock implements IDatatypePost<GoalBlock, BetterBlockPos> {
INSTANCE;
@@ -36,9 +35,9 @@ public enum RelativeGoalBlock implements IDatatypePost<GoalBlock, BetterBlockPos
final IArgConsumer consumer = ctx.getConsumer();
return new GoalBlock(
MathHelper.floor(consumer.getDatatypePost(RelativeCoordinate.INSTANCE, (double) origin.x)),
MathHelper.floor(consumer.getDatatypePost(RelativeCoordinate.INSTANCE, (double) origin.y)),
MathHelper.floor(consumer.getDatatypePost(RelativeCoordinate.INSTANCE, (double) origin.z))
Mth.floor(consumer.getDatatypePost(RelativeCoordinate.INSTANCE, (double) origin.x)),
Mth.floor(consumer.getDatatypePost(RelativeCoordinate.INSTANCE, (double) origin.y)),
Mth.floor(consumer.getDatatypePost(RelativeCoordinate.INSTANCE, (double) origin.z))
);
}

View File

@@ -18,12 +18,11 @@
package baritone.api.command.datatypes;
import baritone.api.command.argument.IArgConsumer;
import baritone.api.command.exception.CommandException;
import baritone.api.pathing.goals.GoalXZ;
import baritone.api.utils.BetterBlockPos;
import baritone.api.command.exception.CommandException;
import net.minecraft.util.math.MathHelper;
import java.util.stream.Stream;
import net.minecraft.util.Mth;
public enum RelativeGoalXZ implements IDatatypePost<GoalXZ, BetterBlockPos> {
INSTANCE;
@@ -36,8 +35,8 @@ public enum RelativeGoalXZ implements IDatatypePost<GoalXZ, BetterBlockPos> {
final IArgConsumer consumer = ctx.getConsumer();
return new GoalXZ(
MathHelper.floor(consumer.getDatatypePost(RelativeCoordinate.INSTANCE, (double) origin.x)),
MathHelper.floor(consumer.getDatatypePost(RelativeCoordinate.INSTANCE, (double) origin.z))
Mth.floor(consumer.getDatatypePost(RelativeCoordinate.INSTANCE, (double) origin.x)),
Mth.floor(consumer.getDatatypePost(RelativeCoordinate.INSTANCE, (double) origin.z))
);
}

View File

@@ -18,12 +18,11 @@
package baritone.api.command.datatypes;
import baritone.api.command.argument.IArgConsumer;
import baritone.api.command.exception.CommandException;
import baritone.api.pathing.goals.GoalYLevel;
import baritone.api.utils.BetterBlockPos;
import baritone.api.command.exception.CommandException;
import net.minecraft.util.math.MathHelper;
import java.util.stream.Stream;
import net.minecraft.util.Mth;
public enum RelativeGoalYLevel implements IDatatypePost<GoalYLevel, BetterBlockPos> {
INSTANCE;
@@ -35,7 +34,7 @@ public enum RelativeGoalYLevel implements IDatatypePost<GoalYLevel, BetterBlockP
}
return new GoalYLevel(
MathHelper.floor(ctx.getConsumer().getDatatypePost(RelativeCoordinate.INSTANCE, (double) origin.y))
Mth.floor(ctx.getConsumer().getDatatypePost(RelativeCoordinate.INSTANCE, (double) origin.y))
);
}

View File

@@ -19,7 +19,6 @@ package baritone.api.command.exception;
import baritone.api.command.ICommand;
import baritone.api.command.argument.ICommandArgument;
import net.minecraft.util.text.TextFormatting;
import java.util.List;
@@ -37,10 +36,6 @@ public class CommandUnhandledException extends RuntimeException implements IComm
@Override
public void handle(ICommand command, List<ICommandArgument> args) {
HELPER.logDirect("An unhandled exception occurred. " +
"The error is in your game's log, please report this at https://github.com/cabaletta/baritone/issues",
TextFormatting.RED);
this.printStackTrace();
HELPER.logUnhandledException(this);
}
}

View File

@@ -19,9 +19,8 @@ package baritone.api.command.exception;
import baritone.api.command.ICommand;
import baritone.api.command.argument.ICommandArgument;
import net.minecraft.util.text.TextFormatting;
import java.util.List;
import net.minecraft.ChatFormatting;
import static baritone.api.utils.Helper.HELPER;
@@ -38,8 +37,8 @@ import static baritone.api.utils.Helper.HELPER;
public interface ICommandException {
/**
* @see Exception#getMessage()
* @return The exception details
* @see Exception#getMessage()
*/
String getMessage();
@@ -50,6 +49,6 @@ public interface ICommandException {
* @param args The arguments the command was called with.
*/
default void handle(ICommand command, List<ICommandArgument> args) {
HELPER.logDirect(this.getMessage(), TextFormatting.RED);
HELPER.logDirect(this.getMessage(), ChatFormatting.RED);
}
}

View File

@@ -17,19 +17,20 @@
package baritone.api.command.helpers;
import baritone.api.utils.Helper;
import baritone.api.command.argument.IArgConsumer;
import baritone.api.command.exception.CommandException;
import baritone.api.command.exception.CommandInvalidTypeException;
import baritone.api.command.argument.IArgConsumer;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.event.ClickEvent;
import net.minecraft.util.text.event.HoverEvent;
import baritone.api.utils.Helper;
import java.awt.*;
import java.util.Arrays;
import java.util.List;
import java.util.function.Function;
import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.ClickEvent;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.HoverEvent;
import net.minecraft.network.chat.MutableComponent;
public class Paginator<E> implements Helper {
@@ -63,59 +64,56 @@ public class Paginator<E> implements Helper {
return this;
}
public void display(Function<E, ITextComponent> transform, String commandPrefix) {
public void display(Function<E, Component> transform, String commandPrefix) {
int offset = (page - 1) * pageSize;
for (int i = offset; i < offset + pageSize; i++) {
if (i < entries.size()) {
logDirect(transform.apply(entries.get(i)));
} else {
logDirect("--", TextFormatting.DARK_GRAY);
logDirect("--", ChatFormatting.DARK_GRAY);
}
}
boolean hasPrevPage = commandPrefix != null && validPage(page - 1);
boolean hasNextPage = commandPrefix != null && validPage(page + 1);
ITextComponent prevPageComponent = new TextComponentString("<<");
MutableComponent prevPageComponent = Component.literal("<<");
if (hasPrevPage) {
prevPageComponent.getStyle()
.setClickEvent(new ClickEvent(
prevPageComponent.setStyle(prevPageComponent.getStyle()
.withClickEvent(new ClickEvent(
ClickEvent.Action.RUN_COMMAND,
String.format("%s %d", commandPrefix, page - 1)
))
.setHoverEvent(new HoverEvent(
.withHoverEvent(new HoverEvent(
HoverEvent.Action.SHOW_TEXT,
new TextComponentString("Click to view previous page")
));
Component.literal("Click to view previous page")
)));
} else {
prevPageComponent.getStyle().setColor(TextFormatting.DARK_GRAY);
prevPageComponent.setStyle(prevPageComponent.getStyle().withColor(ChatFormatting.DARK_GRAY));
}
ITextComponent nextPageComponent = new TextComponentString(">>");
MutableComponent nextPageComponent = Component.literal(">>");
if (hasNextPage) {
nextPageComponent.getStyle()
.setClickEvent(new ClickEvent(
ClickEvent.Action.RUN_COMMAND,
String.format("%s %d", commandPrefix, page + 1)
))
.setHoverEvent(new HoverEvent(
nextPageComponent.setStyle(nextPageComponent.getStyle()
.withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, String.format("%s %d", commandPrefix, page + 1)))
.withHoverEvent(new HoverEvent(
HoverEvent.Action.SHOW_TEXT,
new TextComponentString("Click to view next page")
));
Component.literal("Click to view next page")
)));
} else {
nextPageComponent.getStyle().setColor(TextFormatting.DARK_GRAY);
nextPageComponent.setStyle(nextPageComponent.getStyle().withColor(ChatFormatting.DARK_GRAY));
}
ITextComponent pagerComponent = new TextComponentString("");
pagerComponent.getStyle().setColor(TextFormatting.GRAY);
pagerComponent.appendSibling(prevPageComponent);
pagerComponent.appendText(" | ");
pagerComponent.appendSibling(nextPageComponent);
pagerComponent.appendText(String.format(" %d/%d", page, getMaxPage()));
MutableComponent pagerComponent = Component.literal("");
pagerComponent.setStyle(pagerComponent.getStyle().withColor(ChatFormatting.GRAY));
pagerComponent.append(prevPageComponent);
pagerComponent.append(" | ");
pagerComponent.append(nextPageComponent);
pagerComponent.append(String.format(" %d/%d", page, getMaxPage()));
logDirect(pagerComponent);
}
public void display(Function<E, ITextComponent> transform) {
public void display(Function<E, Component> transform) {
display(transform, null);
}
public static <T> void paginate(IArgConsumer consumer, Paginator<T> pagi, Runnable pre, Function<T, ITextComponent> transform, String commandPrefix) throws CommandException {
public static <T> void paginate(IArgConsumer consumer, Paginator<T> pagi, Runnable pre, Function<T, Component> transform, String commandPrefix) throws CommandException {
int page = 1;
consumer.requireMax(1);
if (consumer.hasAny()) {
@@ -138,47 +136,47 @@ public class Paginator<E> implements Helper {
pagi.display(transform, commandPrefix);
}
public static <T> void paginate(IArgConsumer consumer, List<T> elems, Runnable pre, Function<T, ITextComponent> transform, String commandPrefix) throws CommandException {
public static <T> void paginate(IArgConsumer consumer, List<T> elems, Runnable pre, Function<T, Component> transform, String commandPrefix) throws CommandException {
paginate(consumer, new Paginator<>(elems), pre, transform, commandPrefix);
}
public static <T> void paginate(IArgConsumer consumer, T[] elems, Runnable pre, Function<T, ITextComponent> transform, String commandPrefix) throws CommandException {
public static <T> void paginate(IArgConsumer consumer, T[] elems, Runnable pre, Function<T, Component> transform, String commandPrefix) throws CommandException {
paginate(consumer, Arrays.asList(elems), pre, transform, commandPrefix);
}
public static <T> void paginate(IArgConsumer consumer, Paginator<T> pagi, Function<T, ITextComponent> transform, String commandPrefix) throws CommandException {
public static <T> void paginate(IArgConsumer consumer, Paginator<T> pagi, Function<T, Component> transform, String commandPrefix) throws CommandException {
paginate(consumer, pagi, null, transform, commandPrefix);
}
public static <T> void paginate(IArgConsumer consumer, List<T> elems, Function<T, ITextComponent> transform, String commandPrefix) throws CommandException {
public static <T> void paginate(IArgConsumer consumer, List<T> elems, Function<T, Component> transform, String commandPrefix) throws CommandException {
paginate(consumer, new Paginator<>(elems), null, transform, commandPrefix);
}
public static <T> void paginate(IArgConsumer consumer, T[] elems, Function<T, ITextComponent> transform, String commandPrefix) throws CommandException {
public static <T> void paginate(IArgConsumer consumer, T[] elems, Function<T, Component> transform, String commandPrefix) throws CommandException {
paginate(consumer, Arrays.asList(elems), null, transform, commandPrefix);
}
public static <T> void paginate(IArgConsumer consumer, Paginator<T> pagi, Runnable pre, Function<T, ITextComponent> transform) throws CommandException {
public static <T> void paginate(IArgConsumer consumer, Paginator<T> pagi, Runnable pre, Function<T, Component> transform) throws CommandException {
paginate(consumer, pagi, pre, transform, null);
}
public static <T> void paginate(IArgConsumer consumer, List<T> elems, Runnable pre, Function<T, ITextComponent> transform) throws CommandException {
public static <T> void paginate(IArgConsumer consumer, List<T> elems, Runnable pre, Function<T, Component> transform) throws CommandException {
paginate(consumer, new Paginator<>(elems), pre, transform, null);
}
public static <T> void paginate(IArgConsumer consumer, T[] elems, Runnable pre, Function<T, ITextComponent> transform) throws CommandException {
public static <T> void paginate(IArgConsumer consumer, T[] elems, Runnable pre, Function<T, Component> transform) throws CommandException {
paginate(consumer, Arrays.asList(elems), pre, transform, null);
}
public static <T> void paginate(IArgConsumer consumer, Paginator<T> pagi, Function<T, ITextComponent> transform) throws CommandException {
public static <T> void paginate(IArgConsumer consumer, Paginator<T> pagi, Function<T, Component> transform) throws CommandException {
paginate(consumer, pagi, null, transform, null);
}
public static <T> void paginate(IArgConsumer consumer, List<T> elems, Function<T, ITextComponent> transform) throws CommandException {
public static <T> void paginate(IArgConsumer consumer, List<T> elems, Function<T, Component> transform) throws CommandException {
paginate(consumer, new Paginator<>(elems), null, transform, null);
}
public static <T> void paginate(IArgConsumer consumer, T[] elems, Function<T, ITextComponent> transform) throws CommandException {
public static <T> void paginate(IArgConsumer consumer, T[] elems, Function<T, Component> transform) throws CommandException {
paginate(consumer, Arrays.asList(elems), null, transform, null);
}
}

View File

@@ -19,18 +19,17 @@ package baritone.api.command.helpers;
import baritone.api.BaritoneAPI;
import baritone.api.Settings;
import baritone.api.event.events.TabCompleteEvent;
import baritone.api.utils.SettingsUtil;
import baritone.api.command.argument.IArgConsumer;
import baritone.api.command.manager.ICommandManager;
import net.minecraft.util.ResourceLocation;
import baritone.api.event.events.TabCompleteEvent;
import baritone.api.utils.SettingsUtil;
import java.util.Comparator;
import java.util.List;
import java.util.Locale;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Stream;
import net.minecraft.resources.ResourceLocation;
/**
* The {@link TabCompleteHelper} is a <b>single-use</b> object that helps you handle tab completion. It includes helper
@@ -213,7 +212,12 @@ public class TabCompleteHelper {
* @return This {@link TabCompleteHelper}
*/
public TabCompleteHelper filterPrefixNamespaced(String prefix) {
return filterPrefix(new ResourceLocation(prefix).toString());
ResourceLocation loc = ResourceLocation.tryParse(prefix);
if (loc == null) {
stream = Stream.empty();
return this;
}
return filterPrefix(loc.toString());
}
/**
@@ -236,7 +240,6 @@ public class TabCompleteHelper {
* Appends every command in the specified {@link ICommandManager} to this {@link TabCompleteHelper}
*
* @param manager A command manager
*
* @return This {@link TabCompleteHelper}
*/
public TabCompleteHelper addCommands(ICommandManager manager) {
@@ -254,8 +257,8 @@ public class TabCompleteHelper {
public TabCompleteHelper addSettings() {
return append(
BaritoneAPI.getSettings().allSettings.stream()
.filter(s -> !s.isJavaOnly())
.map(Settings.Setting::getName)
.filter(s -> !s.equalsIgnoreCase("logger"))
.sorted(String.CASE_INSENSITIVE_ORDER)
);
}

View File

@@ -84,7 +84,7 @@ public class Registry<V> {
* @param entry The entry to unregister.
*/
public void unregister(V entry) {
if (registered(entry)) {
if (!registered(entry)) {
return;
}
_entries.remove(entry);

View File

@@ -0,0 +1,47 @@
/*
* This file is part of Baritone.
*
* Baritone is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Baritone is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
*/
package baritone.api.event.events;
import baritone.api.utils.Pair;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.ChunkPos;
import net.minecraft.world.level.block.state.BlockState;
import java.util.List;
/**
* @author Brady
*/
public final class BlockChangeEvent {
private final ChunkPos chunk;
private final List<Pair<BlockPos, BlockState>> blocks;
public BlockChangeEvent(ChunkPos pos, List<Pair<BlockPos, BlockState>> blocks) {
this.chunk = pos;
this.blocks = blocks;
}
public ChunkPos getChunkPos() {
return this.chunk;
}
public List<Pair<BlockPos, BlockState>> getBlocks() {
return this.blocks;
}
}

View File

@@ -17,7 +17,7 @@
package baritone.api.event.events;
import net.minecraft.util.math.BlockPos;
import net.minecraft.core.BlockPos;
/**
* Called when the local player interacts with a block, can be either {@link Type#START_BREAK} or {@link Type#USE}.

View File

@@ -57,31 +57,38 @@ public final class ChunkEvent {
/**
* @return The state of the event
*/
public final EventState getState() {
public EventState getState() {
return this.state;
}
/**
* @return The type of chunk event that occurred;
*/
public final Type getType() {
public Type getType() {
return this.type;
}
/**
* @return The Chunk X position.
*/
public final int getX() {
public int getX() {
return this.x;
}
/**
* @return The Chunk Z position.
*/
public final int getZ() {
public int getZ() {
return this.z;
}
/**
* @return {@code true} if the event was fired after a chunk population
*/
public boolean isPostPopulate() {
return this.state == EventState.POST && this.type.isPopulate();
}
public enum Type {
/**
@@ -106,6 +113,10 @@ public final class ChunkEvent {
* <p>
* And it's a partial chunk
*/
POPULATE_PARTIAL
POPULATE_PARTIAL;
public final boolean isPopulate() {
return this == POPULATE_FULL || this == POPULATE_PARTIAL;
}
}
}

View File

@@ -18,8 +18,8 @@
package baritone.api.event.events;
import baritone.api.event.events.type.EventState;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.Packet;
import net.minecraft.network.Connection;
import net.minecraft.network.protocol.Packet;
/**
* @author Brady
@@ -27,19 +27,19 @@ import net.minecraft.network.Packet;
*/
public final class PacketEvent {
private final NetworkManager networkManager;
private final Connection networkManager;
private final EventState state;
private final Packet<?> packet;
public PacketEvent(NetworkManager networkManager, EventState state, Packet<?> packet) {
public PacketEvent(Connection networkManager, EventState state, Packet<?> packet) {
this.networkManager = networkManager;
this.state = state;
this.packet = packet;
}
public final NetworkManager getNetworkManager() {
public final Connection getNetworkManager() {
return this.networkManager;
}

View File

@@ -17,6 +17,9 @@
package baritone.api.event.events;
import com.mojang.blaze3d.vertex.PoseStack;
import org.joml.Matrix4f;
/**
* @author Brady
* @since 8/5/2018
@@ -28,8 +31,13 @@ public final class RenderEvent {
*/
private final float partialTicks;
public RenderEvent(float partialTicks) {
private final Matrix4f projectionMatrix;
private final PoseStack modelViewStack;
public RenderEvent(float partialTicks, PoseStack modelViewStack, Matrix4f projectionMatrix) {
this.partialTicks = partialTicks;
this.modelViewStack = modelViewStack;
this.projectionMatrix = projectionMatrix;
}
/**
@@ -38,4 +46,12 @@ public final class RenderEvent {
public final float getPartialTicks() {
return this.partialTicks;
}
public PoseStack getModelViewStack() {
return this.modelViewStack;
}
public Matrix4f getProjectionMatrix() {
return this.projectionMatrix;
}
}

View File

@@ -17,8 +17,10 @@
package baritone.api.event.events;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import baritone.api.utils.Rotation;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.phys.Vec3;
/**
* @author Brady
@@ -31,14 +33,27 @@ public final class RotationMoveEvent {
*/
private final Type type;
private final Rotation original;
/**
* The yaw rotation
*/
private float yaw;
public RotationMoveEvent(Type type, float yaw) {
/**
* The pitch rotation
*/
private float pitch;
public RotationMoveEvent(Type type, float yaw, float pitch) {
this.type = type;
this.original = new Rotation(yaw, pitch);
this.yaw = yaw;
this.pitch = pitch;
}
public Rotation getOriginal() {
return this.original;
}
/**
@@ -46,21 +61,37 @@ public final class RotationMoveEvent {
*
* @param yaw Yaw rotation
*/
public final void setYaw(float yaw) {
public void setYaw(float yaw) {
this.yaw = yaw;
}
/**
* @return The yaw rotation
*/
public final float getYaw() {
public float getYaw() {
return this.yaw;
}
/**
* Set the pitch movement rotation
*
* @param pitch Pitch rotation
*/
public void setPitch(float pitch) {
this.pitch = pitch;
}
/**
* @return The pitch rotation
*/
public float getPitch() {
return pitch;
}
/**
* @return The type of the event
*/
public final Type getType() {
public Type getType() {
return this.type;
}
@@ -69,14 +100,14 @@ public final class RotationMoveEvent {
/**
* Called when the player's motion is updated.
*
* @see Entity#moveRelative(float, float, float, float)
* @see Entity#moveRelative(float, Vec3)
*/
MOTION_UPDATE,
/**
* Called when the player jumps.
*
* @see EntityLivingBase#jump
* @see LivingEntity
*/
JUMP
}

View File

@@ -18,7 +18,6 @@
package baritone.api.event.events;
import baritone.api.event.events.type.Cancellable;
import baritone.api.event.events.type.Overrideable;
/**
* @author LoganDark

View File

@@ -18,9 +18,18 @@
package baritone.api.event.events;
import baritone.api.event.events.type.EventState;
import net.minecraft.client.Minecraft;
import java.util.function.BiFunction;
/**
* Called on and after each game tick of the primary {@link Minecraft} instance and dispatched to all Baritone
* instances.
* <p>
* When {@link #state} is {@link EventState#PRE}, the event is being called just prior to when the current in-game
* screen is ticked. When {@link #state} is {@link EventState#POST}, the event is being called at the very end
* of the {@link Minecraft#runTick()} method.
*/
public final class TickEvent {
private static int overallTickCount;

View File

@@ -18,7 +18,7 @@
package baritone.api.event.events;
import baritone.api.event.events.type.EventState;
import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.client.multiplayer.ClientLevel;
/**
* @author Brady
@@ -29,14 +29,14 @@ public final class WorldEvent {
/**
* The new world that is being loaded. {@code null} if being unloaded.
*/
private final WorldClient world;
private final ClientLevel world;
/**
* The state of the event
*/
private final EventState state;
public WorldEvent(WorldClient world, EventState state) {
public WorldEvent(ClientLevel world, EventState state) {
this.world = world;
this.state = state;
}
@@ -44,7 +44,7 @@ public final class WorldEvent {
/**
* @return The new world that is being loaded. {@code null} if being unloaded.
*/
public final WorldClient getWorld() {
public final ClientLevel getWorld() {
return this.world;
}

View File

@@ -33,6 +33,9 @@ public interface AbstractGameEventListener extends IGameEventListener {
@Override
default void onTick(TickEvent event) {}
@Override
default void onPostTick(TickEvent event) {}
@Override
default void onPlayerUpdate(PlayerUpdateEvent event) {}
@@ -45,6 +48,9 @@ public interface AbstractGameEventListener extends IGameEventListener {
@Override
default void onChunkEvent(ChunkEvent event) {}
@Override
default void onBlockChange(BlockChangeEvent event) {}
@Override
default void onRenderPass(RenderEvent event) {}

View File

@@ -19,12 +19,12 @@ package baritone.api.event.listener;
import baritone.api.event.events.*;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.gui.GuiGameOver;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.entity.Entity;
import net.minecraft.network.Packet;
import net.minecraft.client.gui.screens.DeathScreen;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.client.player.LocalPlayer;
import net.minecraft.network.protocol.Packet;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.phys.Vec3;
/**
* @author Brady
@@ -36,15 +36,23 @@ public interface IGameEventListener {
* Run once per game tick before screen input is handled.
*
* @param event The event
* @see Minecraft#runTick()
* @see Minecraft#tick()
*/
void onTick(TickEvent event);
/**
* Run once per game tick after the tick is completed
*
* @param event The event
* @see Minecraft#runTick()
*/
void onPostTick(TickEvent event);
/**
* Run once per game tick from before and after the player rotation is sent to the server.
*
* @param event The event
* @see EntityPlayerSP#tick()
* @see LocalPlayer#tick()
*/
void onPlayerUpdate(PlayerUpdateEvent event);
@@ -52,7 +60,7 @@ public interface IGameEventListener {
* Runs whenever the client player sends a message to the server.
*
* @param event The event
* @see EntityPlayerSP#sendChatMessage(String)
* @see LocalPlayer#chat(String)
*/
void onSendChatMessage(ChatEvent event);
@@ -70,6 +78,13 @@ public interface IGameEventListener {
*/
void onChunkEvent(ChunkEvent event);
/**
* Runs after a single or multi block change packet is received and processed.
*
* @param event The event
*/
void onBlockChange(BlockChangeEvent event);
/**
* Runs once per world render pass.
*
@@ -81,7 +96,7 @@ public interface IGameEventListener {
* Runs before and after whenever a new world is loaded
*
* @param event The event
* @see Minecraft#loadWorld(WorldClient, GuiScreen)
* @see Minecraft#setLevel(ClientLevel)
*/
void onWorldEvent(WorldEvent event);
@@ -106,15 +121,15 @@ public interface IGameEventListener {
* and before and after the player jumps.
*
* @param event The event
* @see Entity#moveRelative(float, float, float, float)
* @see Entity#moveRelative(float, Vec3)
*/
void onPlayerRotationMove(RotationMoveEvent event);
/**
* Called whenever the sprint keybind state is checked in {@link EntityPlayerSP#livingTick}
* Called whenever the sprint keybind state is checked in {@link LocalPlayer#aiStep}
*
* @param event The event
* @see EntityPlayerSP#livingTick()
* @see LocalPlayer#aiStep()
*/
void onPlayerSprintState(SprintStateEvent event);
@@ -126,9 +141,9 @@ public interface IGameEventListener {
void onBlockInteract(BlockInteractEvent event);
/**
* Called when the local player dies, as indicated by the creation of the {@link GuiGameOver} screen.
* Called when the local player dies, as indicated by the creation of the {@link DeathScreen} screen.
*
* @see GuiGameOver
* @see DeathScreen
*/
void onPlayerDeath();

View File

@@ -17,7 +17,7 @@
package baritone.api.pathing.goals;
import net.minecraft.util.math.BlockPos;
import net.minecraft.core.BlockPos;
/**
* An abstract Goal for pathing, can be anything from a specific block to just a Y coordinate.
@@ -54,4 +54,18 @@ public interface Goal {
default double heuristic(BlockPos pos) {
return heuristic(pos.getX(), pos.getY(), pos.getZ());
}
/**
* Returns the heuristic at the goal.
* i.e. {@code heuristic() == heuristic(x,y,z)}
* when {@code isInGoal(x,y,z) == true}
* This is needed by {@code PathingBehavior#estimatedTicksToGoal} because
* some Goals actually do not have a heuristic of 0 when that condition is met
*
* @return The estimate number of ticks to satisfy the goal when the goal
* is already satisfied
*/
default double heuristic() {
return 0;
}
}

View File

@@ -42,6 +42,16 @@ public class GoalAxis implements Goal {
return flatAxisDistance * BaritoneAPI.getSettings().costHeuristic.value + GoalYLevel.calculate(BaritoneAPI.getSettings().axisHeight.value, y);
}
@Override
public boolean equals(Object o) {
return o.getClass() == GoalAxis.class;
}
@Override
public int hashCode() {
return 201385781;
}
@Override
public String toString() {
return "GoalAxis";

View File

@@ -17,9 +17,10 @@
package baritone.api.pathing.goals;
import baritone.api.utils.BetterBlockPos;
import baritone.api.utils.SettingsUtil;
import baritone.api.utils.interfaces.IGoalRenderPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.core.BlockPos;
/**
* A specific BlockPos goal
@@ -66,6 +67,26 @@ public class GoalBlock implements Goal, IGoalRenderPos {
return calculate(xDiff, yDiff, zDiff);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GoalBlock goal = (GoalBlock) o;
return x == goal.x
&& y == goal.y
&& z == goal.z;
}
@Override
public int hashCode() {
return (int) BetterBlockPos.longHash(x, y, z) * 905165533;
}
@Override
public String toString() {
return String.format(
@@ -87,9 +108,9 @@ public class GoalBlock implements Goal, IGoalRenderPos {
public static double calculate(double xDiff, int yDiff, double zDiff) {
double heuristic = 0;
// if yDiff is 1 that means that pos.getY()-this.y==1 which means that we're 1 block below where we should be
// therefore going from 0,0,0 to a GoalYLevel of pos.getY()-this.y is accurate
heuristic += GoalYLevel.calculate(yDiff, 0);
// if yDiff is 1 that means that currentY-goalY==1 which means that we're 1 block above where we should be
// therefore going from 0,yDiff,0 to a GoalYLevel of 0 is accurate
heuristic += GoalYLevel.calculate(0, yDiff);
//use the pythagorean and manhattan mixture from GoalXZ
heuristic += GoalXZ.calculate(xDiff, zDiff);

View File

@@ -57,6 +57,34 @@ public class GoalComposite implements Goal {
return min;
}
@Override
public double heuristic() {
double min = Double.MAX_VALUE;
for (Goal g : goals) {
// just take the highest value that is guaranteed to be inside the goal
min = Math.min(min, g.heuristic());
}
return min;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GoalComposite goal = (GoalComposite) o;
return Arrays.equals(goals, goal.goals);
}
@Override
public int hashCode() {
return Arrays.hashCode(goals);
}
@Override
public String toString() {
return "GoalComposite" + Arrays.toString(goals);

View File

@@ -17,9 +17,10 @@
package baritone.api.pathing.goals;
import baritone.api.utils.BetterBlockPos;
import baritone.api.utils.SettingsUtil;
import baritone.api.utils.interfaces.IGoalRenderPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.core.BlockPos;
/**
@@ -60,6 +61,26 @@ public class GoalGetToBlock implements Goal, IGoalRenderPos {
return GoalBlock.calculate(xDiff, yDiff < 0 ? yDiff + 1 : yDiff, zDiff);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GoalGetToBlock goal = (GoalGetToBlock) o;
return x == goal.x
&& y == goal.y
&& z == goal.z;
}
@Override
public int hashCode() {
return (int) BetterBlockPos.longHash(x, y, z) * -49639096;
}
@Override
public String toString() {
return String.format(

View File

@@ -17,6 +17,8 @@
package baritone.api.pathing.goals;
import java.util.Objects;
/**
* Invert any goal.
* <p>
@@ -45,6 +47,29 @@ public class GoalInverted implements Goal {
return -origin.heuristic(x, y, z);
}
@Override
public double heuristic() {
return Double.NEGATIVE_INFINITY;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GoalInverted goal = (GoalInverted) o;
return Objects.equals(origin, goal.origin);
}
@Override
public int hashCode() {
return origin.hashCode() * 495796690;
}
@Override
public String toString() {
return String.format("GoalInverted{%s}", origin.toString());

View File

@@ -17,9 +17,12 @@
package baritone.api.pathing.goals;
import baritone.api.utils.BetterBlockPos;
import baritone.api.utils.SettingsUtil;
import baritone.api.utils.interfaces.IGoalRenderPos;
import net.minecraft.util.math.BlockPos;
import it.unimi.dsi.fastutil.doubles.DoubleIterator;
import it.unimi.dsi.fastutil.doubles.DoubleOpenHashSet;
import net.minecraft.core.BlockPos;
public class GoalNear implements Goal, IGoalRenderPos {
@@ -51,11 +54,60 @@ public class GoalNear implements Goal, IGoalRenderPos {
return GoalBlock.calculate(xDiff, yDiff, zDiff);
}
@Override
public double heuristic() {// TODO less hacky solution
int range = (int) Math.ceil(Math.sqrt(rangeSq));
DoubleOpenHashSet maybeAlwaysInside = new DoubleOpenHashSet(); // see pull request #1978
double minOutside = Double.POSITIVE_INFINITY;
for (int dx = -range; dx <= range; dx++) {
for (int dy = -range; dy <= range; dy++) {
for (int dz = -range; dz <= range; dz++) {
double h = heuristic(x + dx, y + dy, z + dz);
if (h < minOutside && isInGoal(x + dx, y + dy, z + dz)) {
maybeAlwaysInside.add(h);
} else {
minOutside = Math.min(minOutside, h);
}
}
}
}
double maxInside = Double.NEGATIVE_INFINITY;
DoubleIterator it = maybeAlwaysInside.iterator();
while (it.hasNext()) {
double inside = it.nextDouble();
if (inside < minOutside) {
maxInside = Math.max(maxInside, inside);
}
}
return maxInside;
}
@Override
public BlockPos getGoalPos() {
return new BlockPos(x, y, z);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GoalNear goal = (GoalNear) o;
return x == goal.x
&& y == goal.y
&& z == goal.z
&& rangeSq == goal.rangeSq;
}
@Override
public int hashCode() {
return (int) BetterBlockPos.longHash(x, y, z) + rangeSq;
}
@Override
public String toString() {
return String.format(

View File

@@ -18,9 +18,12 @@
package baritone.api.pathing.goals;
import baritone.api.utils.SettingsUtil;
import net.minecraft.util.math.BlockPos;
import it.unimi.dsi.fastutil.doubles.DoubleIterator;
import it.unimi.dsi.fastutil.doubles.DoubleOpenHashSet;
import net.minecraft.core.BlockPos;
import java.util.Arrays;
import java.util.Objects;
/**
* Useful for automated combat (retreating specifically)
@@ -31,7 +34,7 @@ public class GoalRunAway implements Goal {
private final BlockPos[] from;
private final double distanceSq;
private final int distanceSq;
private final Integer maintainY;
@@ -41,10 +44,10 @@ public class GoalRunAway implements Goal {
public GoalRunAway(double distance, Integer maintainY, BlockPos... from) {
if (from.length == 0) {
throw new IllegalArgumentException();
throw new IllegalArgumentException("Positions to run away from must not be empty");
}
this.from = from;
this.distanceSq = distance * distance;
this.distanceSq = (int) (distance * distance);
this.maintainY = maintainY;
}
@@ -56,7 +59,7 @@ public class GoalRunAway implements Goal {
for (BlockPos p : from) {
int diffX = x - p.getX();
int diffZ = z - p.getZ();
double distSq = diffX * diffX + diffZ * diffZ;
int distSq = diffX * diffX + diffZ * diffZ;
if (distSq < distanceSq) {
return false;
}
@@ -65,7 +68,7 @@ public class GoalRunAway implements Goal {
}
@Override
public double heuristic(int x, int y, int z) {//mostly copied from GoalBlock
public double heuristic(int x, int y, int z) {// mostly copied from GoalBlock
double min = Double.MAX_VALUE;
for (BlockPos p : from) {
double h = GoalXZ.calculate(p.getX() - x, p.getZ() - z);
@@ -80,6 +83,71 @@ public class GoalRunAway implements Goal {
return min;
}
@Override
public double heuristic() {// TODO less hacky solution
int distance = (int) Math.ceil(Math.sqrt(distanceSq));
int minX = Integer.MAX_VALUE;
int minY = Integer.MAX_VALUE;
int minZ = Integer.MAX_VALUE;
int maxX = Integer.MIN_VALUE;
int maxY = Integer.MIN_VALUE;
int maxZ = Integer.MIN_VALUE;
for (BlockPos p : from) {
minX = Math.min(minX, p.getX() - distance);
minY = Math.min(minY, p.getY() - distance);
minZ = Math.min(minZ, p.getZ() - distance);
maxX = Math.max(minX, p.getX() + distance);
maxY = Math.max(minY, p.getY() + distance);
maxZ = Math.max(minZ, p.getZ() + distance);
}
DoubleOpenHashSet maybeAlwaysInside = new DoubleOpenHashSet(); // see pull request #1978
double minOutside = Double.POSITIVE_INFINITY;
for (int x = minX; x <= maxX; x++) {
for (int y = minY; y <= maxY; y++) {
for (int z = minZ; z <= maxZ; z++) {
double h = heuristic(x, y, z);
if (h < minOutside && isInGoal(x, y, z)) {
maybeAlwaysInside.add(h);
} else {
minOutside = Math.min(minOutside, h);
}
}
}
}
double maxInside = Double.NEGATIVE_INFINITY;
DoubleIterator it = maybeAlwaysInside.iterator();
while (it.hasNext()) {
double inside = it.nextDouble();
if (inside < minOutside) {
maxInside = Math.max(maxInside, inside);
}
}
return maxInside;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GoalRunAway goal = (GoalRunAway) o;
return distanceSq == goal.distanceSq
&& Arrays.equals(from, goal.from)
&& Objects.equals(maintainY, goal.maintainY);
}
@Override
public int hashCode() {
int hash = Arrays.hashCode(from);
hash = hash * 1196803141 + distanceSq;
hash = hash * -2053788840 + maintainY;
return hash;
}
@Override
public String toString() {
if (maintainY != null) {

View File

@@ -17,9 +17,10 @@
package baritone.api.pathing.goals;
import baritone.api.utils.BetterBlockPos;
import baritone.api.utils.SettingsUtil;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
/**
* Dig a tunnel in a certain direction, but if you have to deviate from the path, go back to where you started
@@ -32,12 +33,12 @@ public class GoalStrictDirection implements Goal {
public final int dx;
public final int dz;
public GoalStrictDirection(BlockPos origin, EnumFacing direction) {
public GoalStrictDirection(BlockPos origin, Direction direction) {
x = origin.getX();
y = origin.getY();
z = origin.getZ();
dx = direction.getXOffset();
dz = direction.getZOffset();
dx = direction.getStepX();
dz = direction.getStepZ();
if (dx == 0 && dz == 0) {
throw new IllegalArgumentException(direction + "");
}
@@ -64,6 +65,36 @@ public class GoalStrictDirection implements Goal {
return heuristic;
}
@Override
public double heuristic() {
return Double.NEGATIVE_INFINITY;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GoalStrictDirection goal = (GoalStrictDirection) o;
return x == goal.x
&& y == goal.y
&& z == goal.z
&& dx == goal.dx
&& dz == goal.dz;
}
@Override
public int hashCode() {
int hash = (int) BetterBlockPos.longHash(x, y, z);
hash = hash * 630627507 + dx;
hash = hash * -283028380 + dz;
return hash;
}
@Override
public String toString() {
return String.format(

View File

@@ -17,9 +17,10 @@
package baritone.api.pathing.goals;
import baritone.api.utils.BetterBlockPos;
import baritone.api.utils.SettingsUtil;
import baritone.api.utils.interfaces.IGoalRenderPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.core.BlockPos;
/**
* Useful if the goal is just to mine a block. This goal will be satisfied if the specified
@@ -72,6 +73,26 @@ public class GoalTwoBlocks implements Goal, IGoalRenderPos {
return new BlockPos(x, y, z);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GoalTwoBlocks goal = (GoalTwoBlocks) o;
return x == goal.x
&& y == goal.y
&& z == goal.z;
}
@Override
public int hashCode() {
return (int) BetterBlockPos.longHash(x, y, z) * 516508351;
}
@Override
public String toString() {
return String.format(

View File

@@ -20,8 +20,8 @@ package baritone.api.pathing.goals;
import baritone.api.BaritoneAPI;
import baritone.api.utils.BetterBlockPos;
import baritone.api.utils.SettingsUtil;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.Mth;
import net.minecraft.world.phys.Vec3;
/**
* Useful for long-range goals that don't have a specific Y level.
@@ -64,6 +64,27 @@ public class GoalXZ implements Goal {
return calculate(xDiff, zDiff);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GoalXZ goal = (GoalXZ) o;
return x == goal.x && z == goal.z;
}
@Override
public int hashCode() {
int hash = 1791873246;
hash = hash * 222601791 + x;
hash = hash * -1331679453 + z;
return hash;
}
@Override
public String toString() {
return String.format(
@@ -94,11 +115,11 @@ public class GoalXZ implements Goal {
return (diagonal + straight) * BaritoneAPI.getSettings().costHeuristic.value; // big TODO tune
}
public static GoalXZ fromDirection(Vec3d origin, float yaw, double distance) {
public static GoalXZ fromDirection(Vec3 origin, float yaw, double distance) {
float theta = (float) Math.toRadians(yaw);
double x = origin.x - MathHelper.sin(theta) * distance;
double z = origin.z + MathHelper.cos(theta) * distance;
return new GoalXZ(MathHelper.floor(x), MathHelper.floor(z));
double x = origin.x - Mth.sin(theta) * distance;
double z = origin.z + Mth.cos(theta) * distance;
return new GoalXZ(Mth.floor(x), Mth.floor(z));
}
public int getX() {

View File

@@ -58,6 +58,24 @@ public class GoalYLevel implements Goal, ActionCosts {
return 0;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GoalYLevel goal = (GoalYLevel) o;
return level == goal.level;
}
@Override
public int hashCode() {
return level * 1271009915;
}
@Override
public String toString() {
return String.format(

View File

@@ -65,8 +65,8 @@ public interface ActionCosts {
static double[] generateFallNBlocksCost() {
double[] costs = new double[257];
for (int i = 0; i < 257; i++) {
double[] costs = new double[4097];
for (int i = 0; i < 4097; i++) {
costs[i] = distanceToTicks(i);
}
return costs;

View File

@@ -18,7 +18,7 @@
package baritone.api.pathing.movement;
import baritone.api.utils.BetterBlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.core.BlockPos;
/**
* @author Brady

View File

@@ -75,7 +75,7 @@ public interface IBaritoneProcess {
* to start eating this tick. {@code PauseForAutoEatProcess} should only actually right click once onTick is called with
* {@code isSafeToCancel} true though.
*
* @return Whethor or not if this control is temporary
* @return Whether or not if this control is temporary
*/
boolean isTemporary();

View File

@@ -18,13 +18,13 @@
package baritone.api.process;
import baritone.api.schematic.ISchematic;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3i;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Vec3i;
import net.minecraft.world.level.block.state.BlockState;
import java.io.File;
import java.util.List;
import java.util.Optional;
/**
* @author Brady
@@ -51,13 +51,16 @@ public interface IBuilderProcess extends IBaritoneProcess {
*/
boolean build(String name, File schematic, Vec3i origin);
@Deprecated
default boolean build(String schematicFile, BlockPos origin) {
File file = new File(new File(Minecraft.getInstance().gameDir, "schematics"), schematicFile);
File file = new File(new File(Minecraft.getInstance().gameDirectory, "schematics"), schematicFile);
return build(schematicFile, file, origin);
}
void buildOpenSchematic();
void buildOpenLitematic(int i);
void pause();
boolean isPaused();
@@ -71,5 +74,18 @@ public interface IBuilderProcess extends IBaritoneProcess {
* schematics, for example, to pick a state that the builder process will be happy with, because any variation will
* cause it to give up. This is updated every tick, but only while the builder process is active.
*/
List<IBlockState> getApproxPlaceable();
List<BlockState> getApproxPlaceable();
/**
* Returns the lower bound of the current mining layer if mineInLayers is true.
* If mineInLayers is false, this will return an empty optional.
* @return The lower bound of the current mining layer
*/
Optional<Integer> getMinLayer();
/**
* Returns the upper bound of the current mining layer if mineInLayers is true.
* If mineInLayers is false, this will return an empty optional.
* @return The upper bound of the current mining layer
*/
Optional<Integer> getMaxLayer();
}

Some files were not shown because too many files have changed in this diff Show More