Compare commits

...

1718 Commits

Author SHA1 Message Date
Leijurv
24e047c12e v1.8.4 2023-02-18 15:41:19 -08: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
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
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
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
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
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
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
rycbar0
d60e1e8a05 Merge branch 'cabaletta:master' into master 2022-12-19 10:34:57 +01: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
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
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
55273b5340 Merge pull request #3579 from lucasarden/master
Stop backfill from filling while paused
2022-10-03 12:23:02 -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
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
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
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
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
scorbett123
9e1a5008ed Move caching functions into MovementHelper 2022-06-07 21:52:24 +01:00
ZacSharp
4a042510d8 Merge branch '1.17.1' into 1.18.2 2022-06-03 22:26:24 +02:00
ZacSharp
59b3fe7c3a Merge branch '1.16.5' into 1.17.1 2022-06-03 19:05:47 +02: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
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
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
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
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
Leijurv
b9a7efc25b v1.3.7 2020-03-25 17:26:18 -07:00
Leijurv
3b7f13babd Merge branch 'master' into 1.13.2 2020-03-25 17:25:25 -07:00
Babbaj
6cc31a9422 update mods.toml and fix modid 2020-03-25 20:23:41 -04:00
Leijurv
dff92beea1 v1.2.13 2020-03-25 17:17:10 -07: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
62b808ad48 nickhasbugs 2020-03-18 19:15:47 -07: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
Leijurv
520142427d Merge branch 'master' into 1.13.2 2020-03-14 12:25:22 -07:00
Leijurv
69e871eaad we can copy from this image sure 2020-03-14 12:19:39 -07:00
Leijurv
d759c676f7 disable broken code 2020-03-14 12:13:45 -07:00
Leijurv
12481cc491 v1.2.12 2020-03-14 12:09:35 -07:00
Leijurv
43f11aaf0c finally update usage to furry code 2020-03-14 12:09:19 -07:00
Leijurv
f4842aa512 fix actual underlying sneak issue 2020-03-14 11:51:26 -07:00
Leijurv
bcd3fd3266 Merge pull request #1401 from S-B99/patch-1
Add modified settings to bug template
2020-03-14 10:59:39 -07:00
Bella Who
67256c17cf Add modified settings to bug template 2020-03-14 12:10:26 -04: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
ebe3f457c6 Fix additional injection points in 1.13.2 2020-03-07 20:27:29 -06:00
Brady
6289e540b8 Merge branch 'master' into 1.13.2 2020-03-07 20:23:09 -06:00
Brady
eda1820773 Fix Cubecraft Crash (Affects 1.13.2+) 2020-03-07 20:17:53 -06:00
Brady
c8856cfea4 Fix #1250 2020-03-07 17:34:27 -06:00
Brady
e0bd82d7ff lol? 2020-03-02 17:15:01 -06:00
Leijurv
217e0da4a6 Merge pull request #1340 from fw4hre0xxq/issue-1339-trapchest-pathing
fix #1339
2020-03-02 12:50:35 -08:00
Brady
96a8bb90c9 Fix tunnel usage in USAGE.md 2020-03-02 13:41:21 -06:00
Brady
0ca3c496de Fix tunnel command usage 2020-03-02 13:40:43 -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
d9fc825b0f Merge pull request #1336 from S-B99/patch-1
Update USAGE.md as per #1332
2020-02-27 18:07:16 -08:00
Leijurv
17c691b1cf the whole point is its better to do something nonsensical than to crash, so lets continue in that direction 2020-02-27 18:06:11 -08:00
Leijurv
9fb46946b5 fix sprint while paused bug, fixes #1331 2020-02-27 18:05:48 -08:00
fw4hre0xxq
220fa79057 fix #1339 2020-02-27 17:14:41 -08:00
Bella Who
f1f4adf8a6 Update USAGE.md as per #1332 2020-02-27 17:42:12 -05:00
Leijurv
448dd979a2 Merge pull request #1332 from aUniqueUser/master
#740 (Custom tunneling) Updated for new command system
2020-02-27 14:29:18 -08:00
Leijurv
3386947522 Merge pull request #1020 from Xephorix/patch-1
Update USAGE.md
2020-02-27 09:25:25 -08:00
aUniqueUser
628ec0f2b5 updated longDesc 2020-02-26 13:04:10 -05:00
aUniqueUser
e3b91c884a More logical argument order 2020-02-26 12:30:07 -05:00
aUniqueUser
10bb935a42 Merge pull request #1 from CDAGaming/CDAGaming-patch-1
[Change] Adjustments
2020-02-26 11:14:45 -05:00
CDAGaming
6f136a90a2 [Change] Adjustments 2020-02-26 07:55:21 -06:00
aUniqueUser
acd9bcceeb Codacy 2020-02-25 21:47:35 -05:00
aUniqueUser
3c2838df9e lol 2020-02-25 21:22:35 -05:00
aUniqueUser
4b526f7242 Custom Tunneling 2020-02-25 21:13:20 -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
399037b866 Merge branch 'master' into 1.13.2 2020-02-24 19:28:05 -08:00
Leijurv
61563c9359 builderprocess should use hypothetical sneaking 2020-02-24 19:27:11 -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
50783e65a9 Merge branch 'master' into 1.13.2 2020-02-24 18:39:36 -08:00
Leijurv
e854bf59f8 fix sneaking based issues 2020-02-24 18:31:42 -08:00
Leijurv
393a3a87b6 Update USAGE.md 2020-02-24 12:20:13 -08:00
Brady
888b2723e0 Fix critical prefix tag bug 2020-02-23 21:13:51 -06:00
Leijurv
6ed03d0858 Merge pull request #1328 from babbaj/baritoe
toe
2020-02-23 18:55:22 -08:00
Babbaj
ee33666b38 3 days 2020-02-23 21:54:18 -05:00
Babbaj
07c406aa16 baritoe 2020-02-23 21:48:15 -05:00
Brady
c578d5c1a3 Fix additional TrayIcon creation and support Mac notifs 2020-02-23 12:51:14 -06:00
Leijurv
2ea66ea8fc Merge pull request #1324 from aUniqueUser/master
Desktop Notification System
2020-02-23 10:05:30 -08:00
Leijurv
27440fc147 Update README.md 2020-02-22 22:42:22 -08:00
Leijurv
b1f5429db9 Update README.md 2020-02-22 18:37:29 -08:00
Leijurv
042b1ed6d7 Update README.md 2020-02-22 18:37:10 -08:00
aUniqueUser
a8645afbdb Revert "mfw"
This reverts commit 25b85f17a3.
2020-02-22 21:09:36 -05:00
aUniqueUser
25b85f17a3 mfw 2020-02-22 20:41:06 -05:00
aUniqueUser
cf691118b9 comment fixed 2020-02-22 20:19:25 -05:00
aUniqueUser
0dcb9d4b69 Formatting 2020-02-22 20:12:43 -05:00
aUniqueUser
2d2571cff5 Desktop Notification System 2020-02-22 18:31:41 -05:00
Leijurv
ec8d5c0f4d Merge pull request #1314 from babbaj/proguard-patch
Remove string parsing functions from -assumenosideeffects
2020-02-20 17:35:21 -08:00
Babbaj
85d63c9d7f Exceptions are side effects 2020-02-20 20:29:36 -05:00
Leijurv
19f70f5a79 Merge pull request #1306 from S-B99/patch-1
Make setup instructions more clear
2020-02-17 14:43:05 -08:00
Bella Who
80955cad8b Make setup instructions more clear 2020-02-17 17:42:05 -05: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
01ba712d33 Update README.md 2020-02-14 13:49:53 -08:00
Leijurv
e0985d3b68 Update README.md 2020-02-14 13:49:15 -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
Leijurv
7181d2c91a Merge pull request #1287 from S-B99/master
Add Linux support to issue templates
2020-02-09 17:15:52 -08:00
Bella Who
e66d8616ce fixed space 2020-02-09 19:28:19 -05:00
Bella Who
656dd91004 Update bug.md 2020-02-09 19:12:40 -05:00
Leijurv
d88b3a7799 Merge pull request #1286 from S-B99/master
Make how to use checkboxes more clear in issue templates
2020-02-09 14:54:35 -08:00
Bella Who
7cdbc4acca Update suggestion.md 2020-02-09 17:45:28 -05:00
Bella Who
de68e6630e Update question.md 2020-02-09 17:45:09 -05:00
Bella Who
de89da20b2 Update bug.md 2020-02-09 17:44:50 -05: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
Leijurv
17a06621f5 rootnet shill 2020-02-01 16:42:14 -08:00
Leijurv
b3de840e04 no reason for this now that impact is 1.14.4 for all 2020-01-26 12:41:15 -08:00
Leijurv
539b8ef973 fix oversight in coordinate censorship 2020-01-25 22:35:01 -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
f7041022d0 Merge branch 'master' into 1.13.2 2020-01-10 20:13:57 -06:00
Brady
710170ef2d Fix RelativeGoalXZ coordinate mix-up
Basically for many months now RelativeGoalXZ produced (~X, ~Y), not (~X, ~Z).
2020-01-10 20:10:16 -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
Leijurv
dd76d2eabc v1.3.6 2020-01-04 21:58:21 -08:00
Leijurv
fb22cf05eb v1.2.11 2020-01-04 21:57:16 -08:00
Brady
92966dc57c Merge branch '1.13.2' into 1.14.4 2019-12-31 21:57:55 -06:00
Brady
e3d3407de5 Remove normalizations from BlockOptionalMeta 2019-12-31 19:44:44 -06:00
Brady
f3d860e8fa Merge branch 'master' into 1.13.2 2019-12-31 19:40:14 -06:00
Brady
adff391e45 Merge branch 'schematic-formats' 2019-12-31 18:25:21 -06:00
Brady
4a05837b01 Requested changes 2019-12-31 17:44:20 -06:00
Leijurv
1edd7126fd Merge branch 'master' into 1.13.2 2019-12-31 15:44:03 -08:00
Leijurv
a0014fda12 Merge pull request #1216 from FTC55/master
Fixed a rather obnoxious bug that would require a full restart of the client.
2019-12-31 15:35:01 -08:00
FTC55
04190af340 ...more than I thought. Autoreformatted file x2 2019-12-31 19:45:08 +01:00
FTC55
4b10904b97 Git missed some changes. Autoreformatted files. 2019-12-31 19:43:54 +01:00
FTC55
bbb25acff3 Fixed the bug, merged CancelCommand into ExecutionControlCommands 2019-12-31 19:31:30 +01:00
Brady
fcfa022232 Clean up BlockOptionalMeta comment and add behavioral clarification 2019-12-30 02:27:20 -06:00
Brady
220ee30d35 Appease Codacy 2019-12-27 21:28:05 -06:00
Brady
812bc0d8c4 Remove redundant parser layer 2019-12-27 01:14:31 -06:00
Brady
d712839c25 Make Schematica respect mapArtMode setting 2019-12-25 01:35:10 -06:00
Brady
eee705b371 Schematic Format API support 2019-12-24 17:20:00 -06:00
Brady
77bdf6e444 Fix MapSchematic 2019-12-23 18:05:50 -06:00
Brady
0a858c040c Working 2019-12-19 22:15:14 -06:00
Brady
eea5b69b6c Utilize new FillSchematic 2019-12-19 12:03:02 -06:00
Brady
6759917a2f Additional clean up 2019-12-19 11:58:47 -06:00
Brady
aa3bd80ab2 Clean ups 2019-12-19 11:40:38 -06:00
Brady
ea8d7fb3b9 Improve file extension fallback mechanism 2019-12-18 15:19:58 -06:00
Brady
b4ddf38116 Check if state is null 2019-12-18 10:27:34 -06:00
Brady
5c9f028103 Initial sponge support 2019-12-18 10:24:43 -06:00
Leijurv
937d4cc884 whoops 2019-12-13 20:46:12 -08:00
Leijurv
2c3e1f4232 builder stuff, fixes #1059 2019-12-13 20:09:04 -08:00
Leijurv
ddc681fe77 build repeat count 2019-11-24 11:11:28 -08:00
Conner Vercellino
0fba32853b Create .gitmessage 2019-11-20 12:26:37 -08:00
Leijurv
2b71b31cfa Merge pull request #1087 from cabaletta/ispassable-crash-fix
Fix isPassable crash
2019-11-10 22:52:29 -08:00
Leijurv
ed144e995b apparently this usage of > was an invalid javadoc command lol 2019-11-10 14:04:27 -08:00
Brady
7e3a2d3c0a Create a BlockStateInterface specialized IBlockAccess wrapper 2019-11-05 18:17:10 -06:00
Leijurv
152285043d Update USAGE.md 2019-11-05 11:50:27 -08:00
Leijurv
ce52201e45 Merge pull request #1097 from greg904/fix-goto-errmsg
Remove error message when running goto with less than 3 args
2019-10-29 21:33:27 -07:00
Leijurv
45ea776090 Update README.md 2019-10-28 10:47:20 -07:00
Leijurv
2ae16d8bb1 configurable block reach distance 2019-10-26 16:01:08 -07:00
Greg Depoire--Ferrer
23fc6c8b49 Add a space between sentences in error message 2019-10-25 14:49:57 +02:00
Greg Depoire--Ferrer
0db4b193e1 Remove hack, add comment, don't use default when arg is required 2019-10-25 14:49:08 +02:00
Greg Depoire--Ferrer
82d520d808 Don't print invalid type error to stderr 2019-10-25 14:42:36 +02:00
Brady
5201d39adf Retain old method signature 2019-10-24 15:20:23 -05:00
Brady
f02c33d95a Fix improper tick count incrementation 2019-10-23 17:47:20 -05:00
Brady
43ab4f7d3b Fix isPassable crash 2019-10-22 15:58:10 -05:00
Leijurv
a57668bd15 Merge pull request #1073 from 0-x-2-2/1.13.2
Merged master into 1.13.2 branch. 😎
2019-10-17 13:54:06 -07:00
0x22
a324b58f55 Merged master into 1.13.2 branch. 😎 2019-10-17 16:01:35 -04:00
Leijurv
6341f9fcb4 Merge pull request #1072 from 0-x-2-2/disable-autotest-mob-spawning
Disable harmful mob spawning in Travis auto test.
2019-10-17 12:05:24 -07:00
0x22
66ffd1e0d9 Disable harmful mob spawning in Travis auto test. 2019-10-17 14:35:28 -04:00
Leijurv
e65c854e6a Update USAGE.md 2019-10-15 11:25:35 -07:00
ads123ads
9f5d9bceaa The grammar mistakes were corrected 2019-10-15 15:34:22 +05:30
Brady
4eca960a4c Specify range in IWorldScanner#repack 2019-10-14 15:45:41 -05:00
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
69bceb43f8 Update USAGE.md 2019-10-12 13:07:12 -07:00
Leijurv
6a8807b0fa documentation stuff 2019-10-12 10:43:01 -07:00
Leijurv
c528dba0ea v1.4.2 2019-10-11 17:52:11 -07:00
Leijurv
105c7d438a v1.3.5 2019-10-11 17:29:27 -07:00
Leijurv
e49549117b v1.2.10 2019-10-11 17:08:28 -07:00
Leijurv
2b3a302a5f Merge branch '1.13.2' into 1.14.4 2019-10-11 17:04:53 -07:00
Leijurv
1c00e167ca Merge branch 'master' into 1.13.2 2019-10-11 16:56:04 -07:00
Leijurv
861ee5049a unscuff 2019-10-11 16:15:38 -07:00
Brady
2f9efae457 Refactors to improve consistency 2019-10-11 18:15:14 -05:00
Brady
c1fe588de4 Leijurv is crying and shaking right now 2019-10-11 18:08:39 -05:00
Brady
8fa2dac261 This should fix tab complete scuff 2019-10-11 17:59:36 -05:00
Leijurv
5e9b439591 avery byte scuff btfo 2019-10-10 17:47:26 -07:00
Leijurv
f0ae31f455 fake merge of master into 1.13.2 2019-10-09 20:45:55 -07:00
Leijurv
dc7d64fb88 Merge commit 'ce2fc6f2514245987659b378687f795ab641cf1e' into 1.13.2 2019-10-09 20:44:22 -07:00
Brady
42306055ee Backport anti-poz from 1.13.2 branch to 1.12.2/master 2019-10-09 21:29:48 -05:00
Brady
62df244db7 Initial Brigadier overriden tab completion 2019-10-09 21:19:58 -05:00
Leijurv
ce2fc6f251 no more allowVines crash 2019-10-09 10:50:12 -07:00
Brady
0b2bab6549 Clean up performance Mixins 2019-10-07 17:25:09 -05:00
Brady
eb619adf4a Whoops! 2019-10-07 16:50:43 -05:00
Brady
4d05b152f0 Create ICommand to go alongside Command default implementation 2019-10-07 16:46:21 -05:00
Xennex
bd345ae041 Update USAGE.md
added a few commands to the list of "fun / interesting / important ones that you might want to look at"
2019-10-07 09:50:10 -06:00
Brady
c908552174 Clarify the default arg parsers 2019-10-07 10:08:52 -05:00
Brady
f1bbdc177f Collapse the sub-packages under helpers 2019-10-07 10:06:05 -05:00
Brady
9591b6fdef Move IArgConsumer from *.helpers.arguments to *.argument 2019-10-07 10:00:04 -05: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
2b4d6f4aa0 Merge branch 'master' into 1.13.2 2019-10-06 17:32:35 -07:00
Leijurv
8f0a8b6f56 fix inefficient schematic block lookups 2019-10-06 17:32:25 -07:00
Leijurv
e54d63576f Merge branch '1.13.2' into 1.14.4 2019-10-06 17:02:41 -07:00
Leijurv
7e505fc68f fix dropped items scanning 2019-10-06 16:00:26 -07:00
Leijurv
9c323aba91 Merge branch 'master' into 1.13.2 2019-10-06 15:51:27 -07:00
Leijurv
d1c2a0491c only one goto target 2019-10-06 13:49:24 -07:00
Leijurv
d19039e3e5 goto is back 2019-10-06 13:44:37 -07:00
Leijurv
22d5cb8068 loiter around ores to anticipate a possible drop 2019-10-06 13:26:29 -07:00
Leijurv
5f0d3a4018 resume builder too 2019-10-06 13:24:50 -07:00
Brady
889e288524 Refactor *.util.command to *.command 2019-10-06 15:21:21 -05:00
Leijurv
06805057d4 unscuff js code 2019-10-05 19:49:38 -07:00
Leijurv
6e1e355a61 Merge pull request #1016 from joerez/feature/1015/goal-revamps
#1015 Feature/1015/goal revamps
2019-10-05 19:42:02 -07:00
Joerez
9843e8048d issue-1015 better handling
Delete org.eclipse.buildship.core.prefs

Delete .project

issue-1015 removed unessesary conversion

issue-1015 users can use k in their #todo arguments to multiply the goal by 1000
2019-10-05 19:31:32 -07:00
Brady
29d8ab43f2 un-poz some Command stuff 2019-10-04 19:22:15 -05:00
Brady
1440e81ea4 IArgParser API 2019-10-04 18:12:36 -05:00
Brady
bfd8773efa Make getBaritoneForPlayer null-safe 2019-10-04 09:20:26 -05:00
Brady
3a3d880d81 ArgConsumer API separation 2019-10-04 08:55:02 -05:00
Leijurv
089c5fb095 fix buildinlayers crash 2019-10-01 14:29:19 -07:00
Brady
f1fb109d40 Remove ICommandExecution due to redundancy 2019-09-30 21:41:30 -05:00
Leijurv
ae9671bff0 meme fix, things work now 2019-09-30 17:57:09 -07:00
Leijurv
d256f05787 Merge branch 'master' into 1.13.2 2019-09-30 17:52:47 -07:00
Leijurv
47e6a039ef delet 2019-09-30 17:04:33 -07:00
Brady
b8c8b1eb69 Merge pull request #952 from cabaletta/commands
Commands
2019-09-30 18:45:22 -05:00
Leijurv
8a396db80e fix brainlet block breaking issue 2019-09-28 16:28:58 -07:00
Brady
6a90b57ced Some basic API/Main separation 2019-09-28 10:21:07 -05:00
Brady
a75b90fcef crucial performance optimization 2019-09-27 17:07:40 -05:00
Brady
9981af67d5 Remove debug code 2019-09-27 11:10:57 -05:00
Brady
cf60a5f3bd Clean up some things with DefaultCommands 2019-09-27 10:18:46 -05:00
Brady
a04742085e Add documentation to datatypes 2019-09-27 09:54:55 -05:00
Brady
b75a78f3d3 Fix the scuff 2019-09-26 23:33:37 -05:00
Brady
45bea50c91 Fix remaining usages to be in-line with previous commit 2019-09-26 23:20:45 -05:00
Brady
5ba1e67ea0 Don't print stack-traces to chat, just inform the user of the error 2019-09-26 23:18:05 -05:00
Brady
1064a79e1d Fix javadoc errors 2019-09-26 22:59:15 -05:00
Brady
3803bc631b Basically game on the imports 2019-09-26 19:02:21 -05:00
Brady
0b39b3e7b4 FORCE_COMMAND_PREFIX should be exposed to the API 2019-09-26 18:59:29 -05:00
Brady
2f480fcec2 BaritoneChatControl -> main 2019-09-26 18:57:08 -05:00
Brady
a8b1badd8a Remove the special command system exclusions from proguard config 2019-09-26 18:55:15 -05:00
Brady
f8f214ca90 Fix some null substitutions 2019-09-26 18:52:29 -05:00
Brady
595f5a35e0 Datatype Singletons 2019-09-26 18:49:26 -05:00
Brady
9f271b1f44 Future-compatibility for multiple Baritone instances 2019-09-25 18:27:47 -05:00
Brady
7292245b55 Rename PlayerByUsername to NearbyPlayer 2019-09-22 14:41:30 -05:00
Brady
9ffca6ad66 Minor javadoc tidy up 2019-09-21 17:45:53 -05:00
Brady
376c93bd3b Consistent Stream.of usage over Arrays.stream 2019-09-21 17:37:13 -05:00
Brady
204f9d2e31 Fix redundant Stream.of usage 2019-09-21 17:25:20 -05:00
Brady
e4353e489f Get rid of default implementation of IArgParser 2019-09-21 17:11:15 -05:00
Brady
b88af1d682 CommandManager is now Baritone instance dependent 2019-09-21 02:40:03 -05:00
Brady
9d2f83d8d6 Fix unused imports 2019-09-21 02:11:46 -05:00
Brady
ea4f34cb0f No more passing Settings to execute and tabComplete 2019-09-21 02:07:10 -05:00
Brady
b7eaae88a8 Checked Command Exceptions 2019-09-20 18:32:43 -05:00
Leijurv
e70d18f046 Merge pull request #963 from 0-x-2-2/commands
Merge master into commands.
2019-09-20 13:34:09 -07:00
0x22
5a83b791bb Merge remote-tracking branch 'upstream/master' into commands 2019-09-20 16:29:54 -04:00
Brady
eaa426dd66 Fix poor usage of Cloneable
Because super.clone() isn't being called, the idea of "Cloneable" isn't upheld.
2019-09-20 09:51:57 -05:00
Leijurv
fc43ef9308 Merge pull request #956 from LoganDark/commands
Pulling in logandark's uncommitted changes to commands staging
2019-09-19 21:49:27 -07:00
Logan Darklock
8b4ac3893e Tweaks and \n fix 2019-09-19 21:40:55 -07:00
Brady
a0f412f255 Some ArgParser cleanups 2019-09-19 21:24:44 -05:00
Leijurv
0a2e3f98f9 freecam meme 2019-09-19 18:23:05 -07:00
Leijurv
6cc29712e2 fix mine ordering 2019-09-19 17:53:50 -07:00
Leijurv
fae24beaed Merge pull request #954 from 0-x-2-2/commands
Attempt to "fix" travis.
2019-09-19 17:10:26 -07:00
0x22
394775fb9a Attempt to "fix" travis. 2019-09-19 20:06:18 -04:00
Leijurv
5d9209ce80 Merge pull request #953 from 0-x-2-2/commands
Removed very angry code. Started feeding Codacy.
2019-09-19 16:30:42 -07:00
Leijurv
aff3103f36 Merge pull request #941 from BlueBlazeTech/patch-1
Updated Standards section of CODE_OF_CONDUCT.md
2019-09-19 16:07:05 -07:00
0x22
6f2529c243 Removed very angry code. Started feeding Codacy. 2019-09-19 18:54:24 -04:00
Leijurv
e976224258 a moderate amount of gamer 2019-09-19 15:31:21 -07:00
Leijurv
050b6046d7 small tweaks 2019-09-19 14:43:18 -07:00
Leijurv
f0c78751bf no more asList static 2019-09-19 14:40:58 -07:00
Leijurv
2870d2d69e Merge pull request #951 from 0-x-2-2/commands
Fix a MAJOR bug caused by the JetBrains™ AutoFormatter™
2019-09-19 14:38:00 -07:00
0x22
fbabbe69c0 Fix a MAJOR bug caused by the JetBrains™ AutoFormatter™ 2019-09-19 17:36:06 -04:00
Leijurv
b63c54b657 remove isNull and nonNull 2019-09-19 14:34:45 -07:00
Leijurv
3c914de690 Merge pull request #950 from 0-x-2-2/commands
Remove retarded MC field.
2019-09-19 14:07:59 -07:00
0x22
307d6a0628 Remove retarded MC field 2019-09-19 17:05:15 -04:00
Leijurv
61d4f102ba its too many blank lines 2019-09-19 13:43:40 -07:00
Leijurv
0a38e6f690 standardize on this 2019-09-19 13:40:46 -07:00
Leijurv
23a592ec01 it launches 2019-09-19 13:30:40 -07:00
Leijurv
396a96d604 reformat 2019-09-19 12:53:15 -07:00
Leijurv
0504a1d4bf Merge pull request #949 from LoganDark/commands
Commands
2019-09-19 12:51:21 -07:00
Leijurv
fa905b8844 fix breaking blocks 2019-09-19 12:29:33 -07:00
BlueBlazeTech
7f58847f88 Updated Standards section of CODE_OF_CONDUCT.md
added additional details to standards
-line 20
-line 17
-line 32
2019-09-18 09:37:40 -06:00
Leijurv
5f674b86f8 add a setting to scan a larger radius every tick 2019-09-16 23:17:20 -07:00
Leijurv
cccd61e050 add ability to build from opposite corner 2019-09-15 11:37:09 -07:00
Leijurv
bf03a000d1 diagonal ascend 2019-09-09 23:06:36 -07:00
Logan Darklock
fc63c16ee0 initialize chat control only once ever 2019-09-07 00:21:54 -07:00
Logan Darklock
1bb4e44b71 bom import * 2019-09-06 17:50:55 -07:00
Logan Darklock
147884f76d mineprocess reformat too 2019-09-06 17:46:26 -07:00
Logan Darklock
240af75ff7 that specific continuation indent 2019-09-06 17:45:34 -07:00
Logan Darklock
c54dcdba24 "stAnDaRd" ConTinuATion InDEnT 2019-09-06 17:41:27 -07:00
Logan Darklock
9db07faf49 import * 2019-09-06 17:31:41 -07:00
Logan Darklock
aefc82e47c Review 2 2019-09-06 17:22:55 -07:00
Logan Darklock
957f62ffbb Merge branch 'upstream' into commands 2019-09-06 04:01:16 -07:00
Logan Darklock
8a001a2438 Review 2019-09-06 03:59:10 -07:00
Leijurv
f8d4e22b13 Update SETUP.md 2019-09-04 17:15:46 -07:00
Leijurv
243e6e3b99 Update README.md 2019-09-04 17:15:27 -07:00
Logan Darklock
69e3481a32 move default commands to main module 2019-09-04 11:17:36 -07:00
Logan Darklock
daa0d0c859 copyright notices 2019-09-04 09:16:36 -07:00
Logan Darklock
72402052ae Merge branch 'master' into commands 2019-09-04 09:06:43 -07:00
Logan Darklock
5ee1e738f4 Fix RelativePath and build command 2019-09-04 02:30:24 -07:00
Logan Darklock
382ad0079c DrawAABB changes, set command bugfix, sel rendering change, selection setting name changes 2019-09-03 23:46:20 -07:00
Logan Darklock
8dc4ff26d6 Persistent renderManager, selection transparency setting, drawAABB fixes 2019-09-03 22:55:56 -07:00
Logan Darklock
755a3f0154 Fix #sel selectors 2019-09-03 21:58:20 -07:00
Logan Darklock
b51dccc737 DON'T THROW EXCEPTIONS IN SCHEMATICS AA 2019-09-03 21:57:20 -07:00
Logan Darklock
620fc9af64 Sliiightly more efficient AbstractSchematic#approxPlaceable() 2019-09-03 21:44:45 -07:00
Logan Darklock
991283182c Fix some bugs with schematics 2019-09-03 08:35:16 -07:00
Logan Darklock
1413bd2f05 LOL CONTACT 2019-09-03 06:27:36 -07:00
Logan Darklock
faa8c727c3 correct sel help 2019-09-03 06:14:22 -07:00
Logan Darklock
65d2bdaf2b Selection shifting and such 2019-09-03 06:09:02 -07:00
Leijurv
17ca9ec43d Update USAGE.md 2019-09-02 23:13:14 -07:00
Logan Darklock
289971557a Fix bug with a few old commands that causes pagination to not work 2019-09-02 19:50:14 -07:00
Logan Darklock
d1a0b735d9 First working version of WorldEdit-like commands(!!!) 2019-09-02 16:18:07 -07:00
Logan Darklock
bc0f2b59da First version of selection stuff; nothing supports it yet 2019-09-02 11:29:48 -07:00
Logan Darklock
98bb3fba9c Pass current blockstate to schematics 2019-09-02 03:00:21 -07:00
Logan Darklock
b405a610bb ground work for more build commands 2019-09-01 15:53:13 -07:00
Leijurv
3e3df0b493 Merge pull request #894 from LoganDark/prefer-silk-touch
Setting to prefer silk touch, fixes #883
2019-09-01 15:33:14 -07:00
Logan Darklock
c1749057d9 Merge branch 'prefer-silk-touch' into commands 2019-09-01 15:19:17 -07:00
Logan Darklock
150f7a9fd9 extra parenthesis 2019-09-01 15:18:59 -07:00
Logan Darklock
6411fd80aa Merge prefer-silk-touch 2019-09-01 15:02:09 -07:00
Logan Darklock
0b953a237d Fix logic error 2019-09-01 15:01:02 -07:00
Logan Darklock
48f6d338a6 Merge upstream master 2019-09-01 14:48:42 -07:00
Logan Darklock
afc575d080 Setting to prefer silk touch, fixes #883 2019-09-01 14:47:01 -07:00
Logan Darklock
384b9b4704 Prefer silk touch setting 2019-09-01 14:45:31 -07:00
Logan Darklock
ce329d7fb3 Waypoints command 2019-09-01 14:18:59 -07:00
Logan Darklock
287615b0a1 Merge branch 'master' of https://github.com/cabaletta/baritone into commands 2019-09-01 13:22:03 -07:00
Logan Darklock
b96692f2d9 Save settings... 2019-09-01 13:12:06 -07:00
Leijurv
1b8aea2e6d Merge pull request #890 from LoganDark/censoring
Coordinate censoring
2019-09-01 10:30:24 -07:00
Logan Darklock
97ce377b9c Merge branch 'censoring' into commands 2019-09-01 10:16:14 -07:00
Logan Darklock
f1973b14c7 Remove MixinBlockPos since we now only log BetterBlockPos 2019-09-01 10:15:41 -07:00
Logan Darklock
73bd2cdcc3 Merge branch 'censoring' into commands 2019-09-01 10:09:12 -07:00
Logan Darklock
9038310150 Rename SettingsUtil.possiblyCensorCoordinate to maybeCensor 2019-09-01 10:06:50 -07:00
Logan Darklock
07fb09b4cc Merge branch 'censoring' into commands 2019-09-01 10:01:46 -07:00
Logan Darklock
ef38051826 Coordinate censoring 2019-09-01 09:50:47 -07:00
Logan Darklock
445037b614 Coordinate censoring 2019-09-01 09:47:27 -07:00
Logan Darklock
44ec969203 yeah 2019-09-01 00:17:42 -07:00
Logan Darklock
444cde1ee9 Improve blockstate filter in BlockOptionalMeta 2019-08-31 23:08:51 -07:00
Logan Darklock
cf12cbbcf4 Don't care about meta in bom if we have none 2019-08-31 20:58:22 -07:00
Logan Darklock
bb2f4da6b6 Fix baritoneHash calculation 2019-08-31 20:53:58 -07:00
Logan Darklock
4bca6cc1a5 Scan ItemStacks correctly 2019-08-31 20:43:03 -07:00
Logan Darklock
544ae24b64 YES I DID IT 2019-08-31 19:08:43 -07:00
Logan Darklock
8fc80a285c Waypoint hashcode + removed one unused line from followcommand 2019-08-31 18:52:24 -07:00
Logan Darklock
6ed86cb3c7 Hopefully speed up BlockOptionalMeta 2019-08-31 10:28:01 -07:00
Logan Darklock
84f45ebb48 Fix file tab completion in production environments 2019-08-31 07:55:24 -07:00
Logan Darklock
90fb17b89f Told Proguard not to touch things it doesn't understand 2019-08-31 07:36:23 -07:00
Logan Darklock
d54e846f91 Proguard likes to fuck up my command framework in the build. This error makes it more clear when that happens 2019-08-31 07:16:02 -07:00
Logan Darklock
ee71819bb2 remove unnecessary import 2019-08-31 06:42:16 -07:00
Logan Darklock
2ee313a795 Don't break Forge world loading 2019-08-31 06:38:36 -07:00
Logan Darklock
b924e8511b fix imports 2019-08-31 02:14:38 -07:00
Logan Darklock
15e9d756b7 Remove unused toArrayBad function... 2019-08-31 01:59:45 -07:00
Logan Darklock
8be879465a Merge branch 'master' of https://github.com/cabaletta/baritone into commands 2019-08-31 01:05:24 -07:00
Logan Darklock
5e0b333cfd fix comment & make final int final 2019-08-31 01:04:22 -07:00
Logan Darklock
efa243386c Make scanChunkInto even faster 2019-08-31 01:00:37 -07:00
Logan Darklock
ae6ee5688c add toArray, scanChunkInto usage coming soon 2019-08-31 00:51:42 -07:00
Logan Darklock
9f3eaac3df increase efficiency of scanChunkInto by ~25% 2019-08-30 22:52:20 -07:00
Logan Darklock
c938983ff5 thisway command + fixed fromDirection for you + fixed double/float argparsers 2019-08-30 22:27:30 -07:00
Logan Darklock
172ce3a054 click 2019-08-30 18:00:34 -07:00
Logan Darklock
69ca48287e prune before checking size 2019-08-30 17:20:20 -07:00
Logan Darklock
a6726f4e96 extend cache on threshold 2019-08-30 17:19:44 -07:00
Logan Darklock
b6c91b5062 speed up cache stuff 2019-08-30 17:13:09 -07:00
Logan Darklock
fe47245b73 Fix searchWorld cache and also speed and stuff 2019-08-30 17:12:05 -07:00
Logan Darklock
d687e1203a BlockOptionalMeta 2019-08-30 15:38:15 -07:00
Leijurv
0280fcb2da Merge pull request #879 from Orinion/fix-waypoint-bug
Check if waypoint name is Tag
2019-08-30 13:39:55 -07:00
Logan Darklock
4354d09c20 some efficiency fixes to filters + qol for leijurv 2019-08-30 12:25:59 -07:00
Logan Darklock
e3c4d06b2b Initial commit of commands 2019-08-30 11:55:25 -07:00
Orinion
6327c8492f fix codestyle 2019-08-30 11:54:04 +02:00
Leijurv
e7412d0d46 Merge pull request #867 from Orinion/master
Add replantCrops setting
2019-08-29 17:46:41 -07:00
Orinion
6a181abdcb Check if waypoint name is Tag
before, saving a waypint with a tag name would not result in an error, but you would not be able to run "goto" on it. see #869
2019-08-30 02:43:59 +02:00
Orinion
65a9b1a78a Make replantCrops override replantNetherWart
When replantCrops is false, baritone will not replant nether wart.
Also fixed spacing.
2019-08-29 10:36:31 +02:00
Leijurv
5ce644718e Merge pull request #871 from babbaj/cla$$
Replace klass with cla$$
2019-08-28 17:51:50 -07:00
Babbaj
a7add6bc13 Replace klass with cla$$ 2019-08-28 20:37:05 -04:00
Orinion
d2a046c8b4 Add replantCrops setting
add replantCrops setting, simmilar to replantNetherWart for the other crops.
2019-08-28 20:15:41 +02:00
Leijurv
33080a4e1c v1.2.9 2019-08-23 15:23:54 -07:00
Leijurv
dae6cc8e20 maintain current behavior 2019-08-23 15:23:36 -07:00
Leijurv
a2159d62e5 quite annoying 2019-08-23 15:23:00 -07:00
Leijurv
a092a0ba94 update badges 2019-08-23 15:22:59 -07:00
Leijurv
33faf5c9b0 Merge pull request #835 from IronException/master
added things to avoid
2019-08-23 15:22:42 -07:00
IronException
d927207b67 added things to avoid
Signs should also be avoided. A lot of history can get lost
2019-08-22 17:44:27 +02: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
a9ba05bf5e Merge branch 'master' into 1.13.2 2019-08-20 14:28:59 -07:00
Leijurv
b9f0da7d27 major unscuff of builder 2019-08-20 11:23:23 -07:00
Leijurv
1c36bf3300 repack on mine cmd 2019-08-17 22:01:53 -07:00
Leijurv
cca137d526 Merge pull request #808 from reb0rt/patch-2
Stop parseGoal from removing the last argument (when it shouldn't)
2019-08-17 21:13:59 -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
reb0rt
24da012903 Stop parseGoal from removing the last argument
isNumeric returns false if the input is anything other than a positive integer. This meant that baritone wouldn't properly set goals if they ended in anything other than a positive integer.
2019-08-18 13:04:39 +10: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
7c9b812a5b Merge branch 'master' into 1.13.2 2019-08-17 16:07:26 -07:00
Leijurv
0eb7a5aed6 Merge pull request #805 from Graicc/master
Added amount of block mining to documentation
2019-08-17 09:37:03 -07:00
Graicc
5cbf1eef5f Grammer fix 2019-08-17 12:02:26 -04:00
Graicc
ed4fba330d Added mining certain amount of blocks to USAGE.md 2019-08-17 11:59:30 -04:00
Leijurv
9046eb500b crucial performance optimization 2019-08-16 21:16:41 -07:00
Leijurv
011b7427e2 fine lmao 2019-08-15 23:03:16 -07:00
Leijurv
13caaf6fa7 ok fine optifine 2019-08-15 19:27:46 -07:00
Brady
a98677dbda crucial performance optimization 2019-08-15 03:19:19 -05:00
Leijurv
afc639ab4b bypass 2019-08-14 22:31:46 -07:00
Leijurv
6c1f0d3711 Merge pull request #764 from Scribblefoxx/master
Just a little fix, you know was coding away and thought, "hey! here is something cool!"
2019-08-10 08:20:50 -10:00
Scribblefoxx
e1e6a08eb2 Update Settings.java 2019-08-11 03:39:29 +10:00
Leijurv
7b21b0401d Merge pull request #712 from IronException/master
dimensional coords extension
2019-08-08 21:47:28 -10:00
Leijurv
4c935fc447 epicer cached bedrock level pathing 2019-08-08 18:09:25 -10:00
Leijurv
3d221dcda4 antiquated and does more harm than good 2019-08-08 18:04:49 -10:00
Friedolin2000
ac6c413fb8 dimensional coords extension 2019-08-08 22:45:18 +02:00
Leijurv
17a07ba85e better render 2019-08-08 09:56:06 -10:00
Leijurv
ca6f7003a5 Merge pull request #752 from cabaletta/raytrace-shaders
Disable lighting on path renderer
2019-08-08 09:55:16 -10:00
Howard Stark
d402ba61cc Disable lighting on path render 2019-08-08 09:36:55 -10:00
Leijurv
081fae98c4 1 year later 2019-08-01 23:47:32 -07:00
Leijurv
014d3b3a99 goal can never be null 2019-08-01 23:47:12 -07:00
Leijurv
19fe29ad1e i am stupid 2019-07-31 22:17:44 -07:00
Leijurv
8bcbd0231e bye 2019-07-31 21:45:57 -07:00
Leijurv
01c0e321b5 what was i THINKING 2019-07-31 20:58:45 -07:00
Leijurv
5f721b544e smh conner, imagine getting the same block position 2x without caching 2019-07-31 20:47:46 -07:00
Leijurv
57d4a79496 Merge pull request #701 from c0nn3r/master
Add parkour ascend
2019-07-30 21:55:37 -07:00
Conner
9541a45451 Resolve comments 2019-07-30 21:37:50 -07:00
Conner
bba4c09195 Add parkour ascend 2019-07-30 21:07:26 -07:00
Leijurv
06c62029c5 not iffy 2019-07-30 20:04:50 -07:00
Leijurv
6f251b64f1 i am very stupid 2019-07-29 17:35:06 -07:00
Leijurv
551b6b88d2 EXTREMELY old comment that is no longer true 2019-07-28 00:19:14 -07:00
Leijurv
07cbc47fb2 extra line 2019-07-27 23:51:23 -07:00
Leijurv
fe6ca97f21 whoops 2019-07-26 15:14:35 -07:00
Leijurv
1b481c6765 aristois badge 2019-07-26 15:14:04 -07:00
Leijurv
1c5e0b4d68 bump impact badge 2019-07-25 23:02:44 -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
a8226ba4c8 v1.3.4 2019-07-24 15:43:37 -07:00
Leijurv
bc849daccb v1.2.8 2019-07-24 15:38:14 -07:00
Leijurv
e34b2d1392 Merge branch 'master' into 1.13.2 2019-07-24 15:36:20 -07:00
Leijurv
f5b4de023f update usage stuff 2019-07-24 15:33:39 -07:00
Leijurv
6dc7a7788e install for 1.14.4 2019-07-23 22:30:04 -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
de6e96b952 Merge branch 'master' into 1.13.2 2019-07-23 11:58:45 -07:00
Leijurv
0e51a73149 instanceof BlockLiquid checks this 2019-07-23 11:53:21 -07:00
Leijurv
44a092cd94 Merge pull request #622 from babbaj/schematica
fix crash
2019-07-22 23:57:54 -07:00
Babbaj
7000b6cda2 fix crash 2019-07-23 02:56:24 -04:00
Leijurv
7a17f7d253 Merge pull request #607 from babbaj/schematica
build the schematic schematica has open
2019-07-22 23:53:09 -07:00
Babbaj
821e73c1d3 fix usage.md 2019-07-23 02:48:40 -04:00
Babbaj
784bc52d6d add to usage.md 2019-07-23 02:46:53 -04:00
Leijurv
4338e34734 while this is cool, nothing will ever conceivably use it 2019-07-22 23:37:43 -07:00
Babbaj
61147536e5 ok 2019-07-22 16:51:09 -04:00
Leijurv
6b9737eb3f fix double jump on paused overshot sprint ascend 2019-07-21 22:04:15 -07:00
Babbaj
fe54372a53 resolve the issue 2019-07-21 22:33:22 -04:00
Babbaj
21e9c0b7c1 add get functions 2019-07-21 22:17:21 -04:00
Babbaj
8bf977060e dont need the fields 2019-07-21 22:06:36 -04:00
Babbaj
074ec333cf clean up a bit 2019-07-21 21:57:59 -04:00
Babbaj
d505ec4f9f build the schematic schematica has open 2019-07-21 21:05:43 -04:00
Leijurv
9dd6856872 get called out 2019-07-21 14:36:02 -07:00
Leijurv
4d127acb9a reformat 2019-07-20 23:47:51 -07:00
Leijurv
ed4753e968 now that impact locks to specific baritone versions this hack can finally be removed yay 2019-07-19 22:33:08 -07:00
Leijurv
df900c9e64 use origin 2019-07-19 18:55:32 -07:00
Leijurv
93a090c56e Merge pull request #588 from StijnSimons/master
I forgot players and items were entities too
2019-07-19 17:06:48 -07:00
StijnSimons
8b43d93259 i forgot players and items were entities too 2019-07-20 01:37:43 +02:00
Leijurv
053662d0af Merge pull request #554 from StijnSimons/master
FollowEntity and FollowEntities
2019-07-19 16:31:04 -07:00
Brady
af943a8253 Fix issue opening fence gates in some scenarios
If there are 2 fence gates at the player height, and they are approached
diagonally, there is a slight chance that Baritone will be caught in an
infinite loop of opening and closing the upper fence gate, being unable
to interact with the bottom one.
2019-07-18 21:18:02 -05:00
Leijurv
8151444671 privatize this too 2019-07-18 14:15:53 -07:00
Leijurv
f32147d9d5 privatize 2019-07-17 22:41:09 -07:00
Leijurv
515e0364f7 Merge pull request #564 from ZakME/patch-1
PICKUP_DROPPED - Remove 2nd Items.WHEAT
2019-07-16 23:01:09 -07:00
ZakME
09239f8180 PICKUP_DROPPED - Remove 2nd Items.WHEAT
PICKUP_DROPPED:
Remove 2nd Items.WHEAT
Re-order a few items for neatness
2019-07-16 23:50:03 -06:00
Brady
0d9f233e33 Add question template 2019-07-15 18:00:51 -05:00
Brady
e034437c63 Separate templates 2019-07-15 17:55:15 -05:00
Leijurv
72be046f34 Update ISSUE_TEMPLATE.md 2019-07-15 15:26:58 -07:00
StijnSimons
3ba8824eb0 More copy paste 2019-07-15 22:34:52 +02:00
StijnSimons
b51a261bd1 Added entityfollow
Hey look i can cntrl + c v
2019-07-15 22:31:55 +02:00
Leijurv
38602dd141 verify top side of block, fixes #541 2019-07-14 11:13:51 -07:00
Leijurv
cdbec60da0 Merge pull request #531 from StijnSimons/master
Added Spider, PigZombie and Enderman conditions
2019-07-13 09:15:53 -07:00
StijnSimons
2b41012c5b Enderman angry condition 2019-07-13 17:17:10 +02:00
Leijurv
6bb87d0a64 address an absolutely critical gap in documentation 2019-07-12 23:27:02 -07:00
Baddeveloper
b16f9edd2c Added EntitySpider and EntityPigZombie conditions 2019-07-12 19:12:00 +02:00
Leijurv
ce4b1e09ed fix parkour and multithread farm 2019-07-11 14:39:10 -07:00
Leijurv
1a4635df16 v1.3.3 2019-07-11 12:47:44 -07:00
Leijurv
1390af20b6 fix parkour and multithread farm 2019-07-11 12:46:24 -07:00
Leijurv
1427cf57a8 randomlooking 2019-07-11 11:56:44 -07:00
Leijurv
d70243b4c0 leijurv would never do this 2019-07-11 11:08:45 -07:00
Leijurv
8f63dd4ba6 Merge branch 'master' into 1.13.2 2019-07-11 10:51:29 -07:00
Leijurv
01658286af detect allowbreak false 2019-07-11 10:41:24 -07:00
Leijurv
aa90c8b7cd address encapsulation conccerns 2019-07-10 22:18:11 -07:00
Leijurv
eba1011fd6 remove scuff 2019-07-09 23:47:42 -07:00
Brady
96a424c25a Merge pull request #445 from SylveonBottle/patch-1
Speed up production
2019-07-09 14:23:37 -05:00
Leijurv
f4dd100345 fix indexof 2019-07-08 23:16:26 -07:00
Brady
c7e1c917c3 Fix Baritone thinking it can walk through wall-placed skulls
Fixes #485
2019-07-08 19:21:09 -05:00
Leijurv
cd4205c361 v1.2.7 2019-07-07 12:07:00 -07:00
Leijurv
b81bcf8c6d fix path start in diagonal and downward 2019-07-07 11:44:56 -07:00
Leijurv
4259764b70 thank you off by one errors very cool 2019-07-07 11:12:32 -07:00
Leijurv
8f761f7dff better skip ahead 2019-07-07 11:03:43 -07:00
Leijurv
cbbaf2aa2f unscuff 2019-07-06 20:38:59 -07:00
Leijurv
dd9b84646a disgraceful 2019-07-06 17:07:16 -07:00
Leijurv
94131fd705 too many newlines 2019-07-05 21:19:18 -07:00
Leijurv
6d8914e6c9 spell it out even more 2019-07-04 15:52:09 -07:00
Leijurv
63ee687cee shill EVEN harder 2019-07-03 23:47:47 -07:00
Leijurv
ab779dc850 increase shilling 2019-07-02 22:13:17 -07:00
Leijurv
c2f35ae46f dawn of the final month 2019-07-01 10:21:58 -07:00
Leijurv
199e0e5ed3 better comparison 2019-06-30 21:55:32 -07:00
Leijurv
a8155b4b0b privatize 2019-06-29 11:56:02 -07:00
Leijurv
fdd78cf110 codcacy wants these to be combined 2019-06-28 22:17:31 -07:00
Leijurv
afff6395d1 codcacy wants a default 2019-06-27 21:02:44 -07:00
Leijurv
4d3d48e962 crucial documentation oversight 2019-06-26 23:58:22 -07:00
Leijurv
36290e4e53 crucial encapsulation improvement 2019-06-25 22:54:24 -07:00
Leijurv
fd6923dd28 ok i forgot falling into water 2019-06-24 20:38:17 -07:00
Leijurv
9c64067d49 vastly improve resilience to lagbacks, fixes #446 2019-06-24 17:53:25 -07:00
Leijurv
f4d2ea7923 fix path canceling at edge of loaded chunks hopefully 2019-06-24 10:43:49 -07:00
Leijurv
ce3d3bb244 literally no reason to have this 2019-06-23 22:49:33 -07:00
Leijurv
fa71e7d84f reduce stupidity 2019-06-22 21:11:09 -07:00
Leijurv
b0115b8b4c Merge pull request #447 from babbaj/master
daily commit
2019-06-21 23:59:32 -07:00
Babbaj
3902b2db3b increase line count and improve readability 2019-06-21 23:01:37 -04:00
SylveonBottle
4ff61f96df wow times infinity 2019-06-21 03:59:10 -05:00
Leijurv
f998dce614 wow wow 2019-06-20 23:48:02 -07:00
Leijurv
2b9084d2f3 wow 2019-06-19 20:41:21 -07:00
Leijurv
b3605546ac golly another missing slash wow 2019-06-18 23:15:47 -07:00
Leijurv
96097ab726 this counts as a commit 2019-06-17 22:44:38 -07:00
Leijurv
be142d79bc link to the code 2019-06-16 23:06:57 -07:00
Leijurv
0fd241a9ba crucial performance optimization 2019-06-15 11:04:05 -07:00
Leijurv
7b192f17e8 privatize 2019-06-14 21:42:11 -07:00
Leijurv
cc015846d2 explain 2019-06-13 23:13:40 -07:00
Leijurv
e785bd13f5 sanity check 2019-06-12 16:41:05 -07:00
Leijurv
eb6c0a39ea codacy wants this 2019-06-11 23:46:04 -07:00
Leijurv
86525f98ec fix scuffed jumping, fixes #426 2019-06-10 23:12:37 -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
Leijurv
125facfbb6 Merge branch 'master' into 1.13.2 2019-06-10 11:50:14 -07:00
Leijurv
94bf703dde this counts as a commit 2019-06-09 23:56:54 -07:00
Leijurv
14bb0a0a80 alt text 2019-06-08 23:13:27 -07:00
Leijurv
1ee6e04f00 this counts as a commit 2019-06-07 21:29:31 -07:00
Brady
ee6796d5e2 crucial performance optimization (pt. 2) 2019-06-07 03:52:46 -05:00
Brady
81d7f3c319 crucial performance optimization 2019-06-07 03:19:23 -05:00
Leijurv
9822962d98 it is tbh 2019-06-06 23:55:12 -07:00
Brady
ce606f826b consistency 2019-06-06 19:05:13 -05:00
Brady
4c4bc8058b Some clean ups 2019-06-06 04:15:43 -05:00
Leijurv
f0210f7c5f add an additional underscore 2019-06-05 22:12:28 -07:00
Leijurv
aef84eceb8 fix a rare crash when the view is occluded by falling sand, fixes #443 2019-06-05 14:26:26 -07:00
Leijurv
a6ea9ed3a6 👶 2019-06-05 12:47:18 -07:00
Leijurv
0815e3c195 thank u intellij very cool suggestion 2019-06-05 12:08:19 -07:00
Leijurv
a1c03eb601 another tool selection fix 2019-06-05 12:04:09 -07:00
Leijurv
1e43563cc3 fix weird backfill behavior 2019-06-04 20:55:31 -07:00
Leijurv
63f3f9123a Merge pull request #409 from babbaj/master
use ImmutableSet
2019-06-03 22:17:14 -07:00
Leijurv
4860d3bd18 Merge pull request #439 from ImpcatDevelopment/delete-user-defined-waypoints
Added the command delete. Allows you to remove a user defined waypoint.
2019-06-03 22:09:08 -07:00
0x22
7fa6593bdc Added the command delete. Allows you to remove a user defined waypoint. Fixes #334 2019-06-04 01:04:13 -04:00
Leijurv
e1dd580df8 fix improper singleplayer check after quitting singleplayer 2019-06-03 15:27:24 -07:00
Leijurv
f19e63d6e9 mc version support is important 2019-06-03 13:43:32 -07:00
Leijurv
130873d91d 1.13.2 2019-06-02 21:33:10 -07:00
Leijurv
9611cb9057 1.13.2 is supported 2019-06-01 17:54:16 -07:00
Leijurv
023aa78d8b yay 2019-06-01 15:36:52 -07:00
Leijurv
39a231eae0 crucial performance optimization 2019-06-01 10:56:24 -07:00
Leijurv
aca6922be0 there is no actual integration 2019-05-31 23:01:16 -07:00
Leijurv
1a52537d0c badges 2019-05-30 20:49:04 -08:00
Leijurv
479b4e3349 releases download count 2019-05-29 10:45:59 -07:00
Leijurv
a1e2b018a2 very good suggestion 2019-05-28 14:17:54 -07:00
Leijurv
aa0f664cda just for debugging purposes 😉 2019-05-27 22:48:06 -07:00
Brady
2e2f4aee1b critical performance enhancement 2019-05-27 02:31:28 -05:00
Leijurv
18474d872c unused 2019-05-26 12:14:08 -07:00
Leijurv
44327c009a Merge pull request #427 from babbaj/master
yet another meaningless commit
2019-05-25 14:30:10 -07:00
Babbaj
de554655a5 yet another meaningless commit 2019-05-25 17:27:06 -04:00
Babbaj
bd0c7b9391 yet another meaningless commit 2019-05-25 17:25:23 -04:00
Babbaj
8d32db5206 Merge branch 'master' of https://github.com/cabaletta/baritone 2019-05-25 17:23:47 -04:00
Leijurv
a6954aa719 bye 2 2019-05-24 10:36:01 -07:00
Leijurv
b4d203ab99 bye 2019-05-23 20:47:22 -08:00
Leijurv
bb924ad83f thank you intellij very cool 2019-05-22 23:41:02 -07:00
Leijurv
79da32cc60 unused 2019-05-21 15:07:05 -07:00
Leijurv
c7fe9c3171 finalize 2019-05-20 22:37:51 -07:00
Leijurv
d70da4f37d finalize these 2019-05-19 21:53:09 -08:00
Leijurv
ccc1b04e81 crucial spacing 2019-05-18 17:11:16 -07:00
Leijurv
352e428890 explicitly set serialized name post obf 2019-05-17 22:21:40 -08:00
Leijurv
4679e12588 better usage 2019-05-16 15:20:52 -07:00
Leijurv
16b74ff53c v1.3.2 2019-05-16 14:57:26 -07:00
Leijurv
9297e98ac3 Merge branch 'master' into 1.13.2 2019-05-16 14:55:37 -07:00
Leijurv
6861bfd4e6 relative goals 2019-05-16 11:50:48 -07:00
Leijurv
0dd4834e18 add explanation 2019-05-15 21:55:01 -08:00
Leijurv
da58988f01 build in layers order 2019-05-14 16:03:11 -07:00
Leijurv
b2f3880722 add todo 2019-05-13 20:13:22 -08:00
Leijurv
0293a76702 less yikes 2019-05-12 23:25:50 -07:00
Leijurv
6a13e94c4f warning 2019-05-11 21:13:46 -07:00
Leijurv
79d448e5f4 add crucial explanation 2019-05-10 23:55:50 -07:00
Leijurv
264b3db63c this counts as a commit 2019-05-09 15:20:37 -07:00
Brady
c8cd4b5f28 Merge pull request #410 from SuperOP535/patch-2
Automatic CRLF -> LF normalization
2019-05-09 11:49:05 -05:00
Leijurv
c9e81897a5 im blind lol thanks babj 2019-05-08 11:51:48 -07:00
Leijurv
c738007538 epic label 2019-05-07 21:40:03 -08:00
Leijurv
da8bf6b1b3 fix a potential concurrency issue 2019-05-06 14:07:46 -07:00
Leijurv
1501d721e7 build repeat vector 2019-05-06 14:01:01 -07:00
Leijurv
482d874af2 this counts as a commit 2019-05-05 23:57:56 -07:00
Leijurv
7dcd7384f1 allow overshooting traverse 2019-05-04 15:01:11 -07:00
Leijurv
2a5ef35794 move this down to the other render settings 2019-05-03 11:44:37 -07:00
Leijurv
0f09a46540 javadoc 2019-05-02 23:03:15 -07:00
Leijurv
a6d4708ccf Merge pull request #412 from EvilSourcerer/master
render dank lit boxes for goalYLevel
2019-05-02 23:02:25 -07:00
evilsourcerer
77303b4a62 render boxes for goalYLevel 2019-05-03 01:48:37 -04:00
Leijurv
0ffbb0c151 quiet 2019-05-02 11:47:35 -07:00
Leijurv
b521d7bee1 fix dummy merge typo 2019-05-02 11:42:49 -07:00
Leijurv
4e96c5e5ee Merge branch 'master' into 1.13.2 2019-05-01 23:12:19 -07:00
Leijurv
e05010c9d2 fix weird oscillation when mining large veins 2019-05-01 23:07:20 -07:00
Leijurv
d0a1c241a4 replace liquid source blocks in builder 2019-05-01 14:03:36 -07:00
Leijurv
4ea8f23fc7 fix typo crash, fixes #406 2019-05-01 12:22:47 -07:00
Leijurv
ec819220b7 Merge branch 'master' into 1.13.2 2019-05-01 12:15:31 -07:00
Leijurv
54da0d24a3 dont mine blocks that update falling blocks, fixes #395 2019-05-01 11:16:24 -07:00
Leijurv
58ebd5f9a6 split this out into its own function 2019-05-01 11:01:00 -07:00
Leijurv
d60a0bee9e move this behind the toolset cache for performance 2019-05-01 10:48:17 -07:00
Leijurv
e9e26c981a fine babj 2019-05-01 10:37:23 -07:00
SuperOP535
5f12f04e87 Automatic CRLF -> LF normalization 2019-05-01 14:05:47 +02:00
Leijurv
7b7be32ca7 also break passable blocks at foot level like mushrooms, fixes #407 2019-04-30 23:24:08 -07:00
Leijurv
a14166b1e2 overhaul to usage 2019-04-30 16:56:29 -07:00
Leijurv
166eb97c3f make right click on arrival time out after 1 second 2019-04-30 16:52:27 -07:00
Leijurv
920ce745c2 fix some scuff from minebot 2019-04-29 23:08:17 -07:00
Leijurv
c931cde3ae fix error stacktrace on startup 2019-04-29 16:43:47 -07:00
Leijurv
f7a577e163 break from above 2019-04-29 16:02:44 -07:00
Leijurv
9bf3a041d4 might as well privatize 2019-04-29 14:59:25 -07:00
Leijurv
85eb7d8043 remember beyond render distance what is completed 2019-04-29 14:55:14 -07:00
Leijurv
b338dcc9de add path splice option 2019-04-29 11:46:21 -07:00
Leijurv
7d9b8ee4f3 that was too high tbh lol 2019-04-28 21:38:10 -07:00
Babbaj
0f61aaafb8 use ImmutableSet 2019-04-28 21:27:11 -04:00
Leijurv
0927e0e017 fix performance issues with explore 2019-04-27 16:16:36 -07:00
Leijurv
783a7cedc3 can combine distances 2019-04-27 16:03:58 -07:00
Leijurv
b1ee23ad50 taxicab only 2019-04-27 16:01:58 -07:00
Leijurv
9118e0b368 one byte savings means faster load times 2019-04-26 23:17:18 -07:00
Leijurv
5a0ccac0a1 maintain y while exploring 2019-04-25 13:40:33 -07:00
Leijurv
c8419dc362 i am rarted 2019-04-25 12:45:53 -07:00
Leijurv
9127ba2fce make explore a little less dummy 2019-04-25 12:18:25 -07:00
Leijurv
36858ca219 small cleanup 2019-04-25 11:22:11 -07:00
Leijurv
30469e2de2 pause mining for falling blocks, fixes #157 2019-04-25 11:10:18 -07:00
Leijurv
79c433b14d reduce suffocation from falling blocks above ore 2019-04-25 10:49:54 -07:00
Leijurv
bc419cfd1a fix loophole with falling blocks above ore 2019-04-24 22:10:41 -08:00
Leijurv
09fbf675ec fix build repeat 2019-04-23 17:42:13 -07:00
Leijurv
2ee119fc64 v1.2.6 2019-04-22 20:41:27 -07:00
Leijurv
83265fcb54 add blocks to avoid breaking, fixes #368 2019-04-22 19:52:04 -07:00
Leijurv
e8b4f4d2b6 make the completion check a setting 2019-04-22 15:33:40 -07:00
Leijurv
714c6773c3 explain what invert means 2019-04-22 14:51:07 -07:00
Leijurv
2fac594315 say if its inverted 2019-04-22 14:36:12 -07:00
Leijurv
4bec49de5b filter explored chunks with json 2019-04-22 14:34:31 -07:00
Leijurv
4eaa6e20c3 thanks for the tip cda 2019-04-22 09:46:26 -07:00
Leijurv
315cc26525 Merge branch 'backfill-2' 2019-04-21 21:42:11 -08:00
Brady
794a761243 Remove redundant Arrays.asList call 2019-04-21 17:05:33 -05:00
Leijurv
5da14fcb3f fix 2019-04-20 15:35:11 -07:00
Brady
1047d4ade9 Babbaj doesn't know how to convert imperative shitcode into a regex
and leijurv doesn't know how to verify that the regex reflects the original behavior
im literally raging
2019-04-20 17:26:41 -05:00
Brady
0b8fa3ffe3 Fix the scuffed usage of LinkedList and ArrayList for list setting types 2019-04-20 17:10:35 -05:00
Leijurv
498e4e2d6c replant nether wart setting 2019-04-20 11:03:59 -07:00
Leijurv
850c414e8f Merge pull request #393 from CDAGaming/pr_changes
[Change] Add Block Avoidance Settings
2019-04-20 11:03:39 -07:00
cdagaming
d5a8ed5cb1 [Change] More Suggested changes 2019-04-20 12:32:35 -05:00
cdagaming
dd8406c39a [Fix] Remove unused Settings 2019-04-20 12:13:28 -05:00
cdagaming
13469053b9 [Change] Suggested Changes 2019-04-20 12:11:46 -05:00
cdagaming
c4c85b4f49 [Change] Add Block Avoidance Settings
Fixes #392
2019-04-20 12:04:07 -05:00
Leijurv
af0c3bbd5c just one is not good enough tbh 2019-04-19 21:02:58 -07:00
Leijurv
2fcf9ace64 exploration chunk offset 2019-04-19 15:10:16 -07:00
Leijurv
47e1c67bd8 fix that null exception 2019-04-19 14:20:00 -07:00
Leijurv
7e3aa6efdd Merge branch 'master' into backfill-2 2019-04-19 10:59:21 -07:00
Leijurv
7a2f26ef62 replace scuffed ternary with commented if 2019-04-18 10:36:20 -07:00
Leijurv
b64154e3b3 meme for cached blocks that arent packed yet 2019-04-17 23:25:55 -07:00
Leijurv
26256e7155 mine is now MUCH more epic 2019-04-17 22:17:09 -07:00
Leijurv
6599736e00 fix that reference 2019-04-17 20:23:36 -07:00
Leijurv
343bb20bd8 fix weird cache behavior at chunk edge 2019-04-17 20:02:02 -07:00
Leijurv
518fa1c74d reformat all files 2019-04-17 19:49:04 -07:00
Leijurv
0b72a8b4b3 fix overshoot 2019-04-17 19:46:25 -07:00
Leijurv
c013d1e0d9 fix various toxic clouds 2019-04-17 18:10:47 -07:00
Leijurv
fe51220e3c this might help 2019-04-16 23:19:55 -07:00
Leijurv
44d757347b fix unable to move while paused 2019-04-16 22:43:33 -07:00
Brady
3d3a5f420e Fix unsafe creation of potentially invalid ResourceLocation 2019-04-16 20:15:51 -05:00
Leijurv
c136182e17 add option to manually blacklist closest 2019-04-16 18:04:43 -07:00
Leijurv
a1a9b4e6b9 allow spaces 2019-04-16 10:25:32 -07:00
Leijurv
f49df63183 that can never be null 2019-04-16 10:20:23 -07:00
Leijurv
96414b37f3 whoops this was fixed monthhs ago 2019-04-15 18:14:20 -07:00
Leijurv
544168ff45 Merge branch 'farm' 2019-04-15 17:28:13 -07:00
Leijurv
e0a618a791 epic farm 2019-04-15 17:12:20 -07:00
Leijurv
3333797144 fix region pruning 2019-04-14 10:06:50 -07:00
Leijurv
9c9c9d4387 fix region pruning 2019-04-14 10:06:37 -07:00
Leijurv
82d09a536d v1.3.1 2019-04-13 19:21:44 -07:00
Leijurv
6e49adea33 i WUV impact 2019-04-13 19:10:13 -07:00
Leijurv
f7f003c0f9 farm 2019-04-13 19:05:54 -07:00
Leijurv
236d02cb47 add a way to pause builder 2019-04-13 08:36:14 -07:00
Leijurv
f85afdbc70 Merge branch 'master' into 1.13.2 2019-04-12 21:57:01 -07:00
Leijurv
6e97fe2210 dont crash when exiting a world 2019-04-12 21:48:02 -07:00
Leijurv
6741666c24 Merge branch 'master' into backfill-2 2019-04-12 17:43:01 -07:00
Leijurv
fcadf68c90 cool tunnel feature and various fixes 2019-04-12 17:42:50 -07:00
Leijurv
65cd6a92d3 allow saving enumfacing value 2019-04-11 16:42:04 -07:00
Leijurv
a09bb0d538 build repeat option 2019-04-11 16:36:20 -07:00
Leijurv
2bf475d840 build in layers test 2019-04-11 15:17:26 -07:00
Leijurv
76cdaaace6 add todo 2019-04-10 23:45:52 -07:00
Leijurv
ce59ef559f backport important world scanner fixes 2019-04-09 19:35:43 -07:00
Leijurv
563028a5b3 fix invalid player move packet, and a bunch of things in world scanner 2019-04-09 19:30:48 -07:00
Leijurv
d5c317b88b Merge branch 'master' into 1.13.2 2019-04-09 18:17:53 -07:00
Leijurv
fc3f183dce actually don't render the boxes if renderpath is false 2019-04-09 08:45:30 -07:00
Leijurv
6b6eea2d8c add renderSelectionBoxes, fixes #378 2019-04-08 20:32:47 -08:00
Leijurv
e54652941b codacy 2019-04-07 17:44:23 -07:00
Leijurv
867c01ff86 crucial performance optimization 2019-04-06 21:50:22 -08:00
Leijurv
87a9e67ba8 dont reassign arg 2019-04-05 11:59:28 -07:00
Leijurv
bf076f6246 privatize 2019-04-04 20:51:02 -08:00
Leijurv
75b54dfaec nullpointer is confusing 2019-04-03 23:19:32 -07:00
Leijurv
71a2219b07 move fields to the top 2019-04-02 21:40:33 -08:00
Leijurv
ccc3de2d7c dawn of the 8th month 2019-04-01 23:30:33 -07:00
Leijurv
af11e64cec combine nested 2019-03-31 20:22:17 -08:00
Leijurv
2c3dc5d6b1 add plea 2019-03-30 23:23:12 -07:00
Leijurv
71482cc984 explain for brainlets 2019-03-29 23:10:19 -07:00
Leijurv
3329db1dae these show the exact same info; remove one 2019-03-28 23:01:14 -07:00
Leijurv
926e2d5620 add resuming to builder, fixes #371 2019-03-27 17:32:02 -07:00
Leijurv
d2de8828e7 did this 2019-03-26 23:01:07 -07:00
Leijurv
9fcae6560e better feature branch example 2019-03-25 21:03:19 -08:00
Leijurv
2e8fdd43ee no flowing 2019-03-24 13:53:19 -07:00
Leijurv
27e39c8083 update badges 2019-03-24 13:50:50 -07:00
Leijurv
a8f373d568 fine; assumewalkonlava 2019-03-24 13:07:08 -07:00
Leijurv
c59ec9da10 blank space 2019-03-23 22:17:40 -08:00
Leijurv
71491a7922 blank space 2019-03-23 22:17:40 -08:00
Leijurv
3a675836da Merge pull request #370 from babbaj/patch-1
use runAutoTest
2019-03-23 13:03:19 -07:00
babbaj
7e0fc81246 use runAutoTest 2019-03-23 15:55:16 -04:00
Leijurv
f970f932c7 great 2019-03-23 10:52:03 -07:00
Leijurv
52d2741f52 and lets try making it fail delibrately 2019-03-23 10:31:36 -07:00
Leijurv
7bc6765cac rart 2019-03-23 10:13:14 -07:00
Leijurv
85b2aea6e9 where is this writing??? 2019-03-23 09:52:49 -07:00
Leijurv
c6ba5481d9 one final attempt 2019-03-22 22:33:40 -07:00
Leijurv
81f47d5632 forgot file name lollll 2019-03-22 22:19:13 -07:00
Leijurv
9b1440ed2c that needs to be allowed 2019-03-22 22:07:12 -07:00
Leijurv
2a8dcee028 write to a file to indicate success 2019-03-22 22:05:27 -07:00
Leijurv
277ba3643c Merge branch 'master' into 1.13.2 2019-03-22 21:24:43 -07:00
Leijurv
170c2d35c2 perhaps updating debian will help 2019-03-22 21:17:20 -07:00
Leijurv
e5fbaf60f3 shutdownminecraftapplet 2019-03-22 21:04:35 -07:00
Leijurv
bc49b2d5ba add allowDownward, fixes #369 2019-03-22 15:50:23 -07:00
Leijurv
f58b6b41cb second attempt at backfill 2019-03-22 15:45:34 -07:00
Leijurv
ac1ac50158 add some builder commands to usage 2019-03-22 14:36:21 -07:00
Leijurv
d4103a924d add two new awesome badges 2019-03-21 16:58:31 -07:00
Leijurv
0deb854e1b v1.3.0 2019-03-21 16:40:18 -07:00
Leijurv
8268e3ec1b Merge branch 'master' into 1.13.2 2019-03-21 15:51:36 -07:00
Leijurv
bd64f73842 fix disconnect on arrival not firing for custom goal process 2019-03-21 15:44:20 -07:00
Leijurv
cac653ddd9 little cleanup 2019-03-20 23:06:14 -07:00
Leijurv
04ff365890 what about if i delete two (2) empty lines 2019-03-20 23:03:06 -07:00
Leijurv
54ed6ce5a5 crucial code formatting 2019-03-20 22:55:40 -07:00
Brady
32ac46c8a9 Update PULL_REQUEST_TEMPLATE.md 2019-03-19 21:26:58 -05:00
Brady
7ab2cd2a45 Update ISSUE_TEMPLATE.md 2019-03-19 21:26:47 -05:00
Brady
a07fae6cdd Update Code of Conduct to include templates 2019-03-19 21:25:58 -05:00
babbaj
3f6af51713 Create PULL_REQUEST_TEMPLATE.md 2019-03-19 21:23:05 -05:00
babbaj
8c4e778506 Create ISSUE_TEMPLATE.md 2019-03-19 21:23:05 -05:00
Leijurv
65902d556e v1.2.5 2019-03-19 18:22:22 -07:00
Leijurv
af91da6a28 Merge branch 'master' into 1.13.2 2019-03-19 18:12:26 -07:00
Leijurv
aada9731a6 more resiliency to invalid cache files 2019-03-19 18:10:53 -07:00
Leijurv
9a15a65ad5 not needed anymore 2019-03-19 13:59:56 -07:00
Leijurv
49658078b9 trapdoors cant be passed vertically in either state, thanks plutie 2019-03-18 22:38:06 -07:00
Leijurv
bcd097c6cb we can cancel calc even if not safe to cancel pathing 2019-03-17 22:40:11 -08:00
Leijurv
cfec67f1f9 wording 2019-03-16 23:23:20 -07:00
Leijurv
0cbe9f81c8 Merge branch 'master' into 1.13.2 2019-03-15 16:58:23 -07:00
Leijurv
42afd2dd54 maybe proper exit code 2019-03-15 16:49:36 -07:00
Leijurv
aaaf0f8839 hey so what if we didnt do that 2019-03-15 16:40:15 -07:00
Leijurv
315929f31c hey so what if we didnt do that 2019-03-15 16:39:59 -07:00
Leijurv
358aa80280 docker time 2019-03-15 16:22:51 -07:00
Leijurv
1dd9e11994 documentation resigned 2019-03-15 16:19:07 -07:00
Leijurv
5a8f02c944 unscuff everything 2019-03-15 16:11:14 -07:00
Leijurv
f248a5b677 make runClient work 2019-03-15 15:32:51 -07:00
Leijurv
ee83471bf6 fix being unable to place or pick up water buckets 2019-03-15 14:26:38 -07:00
Leijurv
610fe6439f fix getting permanently stuck on vines 2019-03-15 14:25:43 -07:00
Leijurv
e4a49c5529 fix launchtesting not found on runClient 2019-03-15 14:00:11 -07:00
Leijurv
449b44ba50 line 2019-03-14 16:32:14 -07:00
Leijurv
a00eec402e i love retina wtf 2019-03-14 16:32:04 -07:00
Leijurv
717779f742 air is stupid 2019-03-14 16:06:32 -07:00
Leijurv
bd1dcff385 allow ties for closest to explore to 2019-03-14 14:52:51 -07:00
Leijurv
6f843bd24d Merge branch 'master' into 1.13.2 2019-03-13 20:09:08 -07:00
Leijurv
226ede7ba2 crucial 2019-03-13 19:23:28 -07:00
Leijurv
89fb5cecd5 v1.2.4 2019-03-13 18:15:21 -07:00
Leijurv
d79fbea433 scuffed air 2019-03-13 18:08:15 -07:00
Leijurv
a75317cc2c workaround some scuff 2019-03-13 09:17:25 -07:00
Leijurv
ee6df270ce relative coordinates 2019-03-13 08:50:04 -07:00
Leijurv
e09541151f update clients 2019-03-12 23:29:08 -07:00
Leijurv
74e0552be0 unscuff water, thanks wwe 2019-03-12 23:10:06 -07:00
Leijurv
4d22c10ddb unscuff water, thanks wwe 2019-03-12 23:08:06 -07:00
Leijurv
1ea92a6092 😎 2019-03-12 22:49:23 -07:00
Leijurv
909ab553eb small cleanup 2019-03-12 22:08:17 -07:00
Leijurv
866408aece rename 2019-03-12 19:17:50 -07:00
Leijurv
2215f170df Merge branch 'builder' 2019-03-12 19:16:40 -07:00
Leijurv
a5601fd89a nutty 2019-03-12 18:59:20 -07:00
Leijurv
fa8f2632f5 dont jump while breaking 2019-03-12 18:58:35 -07:00
Leijurv
66eba84d06 consistent spacing 2019-03-12 18:54:36 -07:00
Leijurv
92e39b5d1d its over its done 2019-03-12 18:45:54 -07:00
Leijurv
0ddc47f473 i am rarted 2019-03-12 18:21:29 -07:00
Leijurv
ddfeca6947 unproject click cursed 2019-03-12 18:00:30 -07:00
Leijurv
6bd2e90cfd crash when pathing near shulker boxes 2019-03-12 17:18:58 -07:00
Leijurv
82505ddb01 online mode via env 2019-03-12 17:18:52 -07:00
Leijurv
2790d1d308 Merge branch 'master' into 1.13.2 2019-03-12 16:19:06 -07:00
Leijurv
52d8d271f1 fix a meme with a path ending in water 2019-03-12 16:18:48 -07:00
Leijurv
11e503a022 many fixes 2019-03-12 16:17:43 -07:00
Leijurv
b240e8420a whoops 2019-03-12 15:53:00 -07:00
Leijurv
25024b58de fix a bunch of scuff 2019-03-12 15:52:40 -07:00
Leijurv
6fe49380ba pwned 2019-03-12 15:42:25 -07:00
Leijurv
1f2e267e3d fix a bunch of scuff 2019-03-12 15:41:58 -07:00
Leijurv
4cf6783622 fix the tests 2019-03-12 09:38:05 -07:00
Brady
82d77a7bac Update MixinGradle to 0.6.2
Includes fix ensuring that the SRGs are generated prior to Mixin annotation processing
2019-03-12 01:43:03 -05:00
Leijurv
ba31d209c9 except what if it compiled 2019-03-11 23:29:39 -07:00
Leijurv
7974d9135b Merge branch 'master' into builder 2019-03-11 23:26:05 -07:00
Brady
841a927033 Merge remote-tracking branch 'origin/master' into 1.13.2 2019-03-12 01:09:11 -05:00
Brady
5a16561954 Working 1.13.2 development environment
Including a couple bugfixes to bad 1.13.2 code!!!
2019-03-12 01:05:39 -05:00
Leijurv
a5a795a22c lower case ok 2019-03-11 22:21:35 -07:00
Leijurv
416b5b66d2 break fewer beds 2019-03-11 20:57:46 -07:00
Leijurv
88e41f37b1 explain whats happening 2019-03-11 20:08:52 -07:00
Leijurv
7cfa837604 blacklistClosestOnFailure 2019-03-11 20:06:19 -07:00
Leijurv
6b7aca3081 force revalidate on control change 2019-03-11 19:23:41 -07:00
Leijurv
580af2ab06 processes tied in priority 2019-03-11 18:24:31 -07:00
Leijurv
d144d30890 crucial clarification 2019-03-10 23:43:00 -07:00
Leijurv
ecac546c6d actually trolling is fine 2019-03-09 23:15:03 -08:00
Brady
e2cc51908b Notch builds 2019-03-08 23:18:00 -06:00
Brady
1390e04435 Add versions in parenthesis for todos to fix stuff 2019-03-08 15:14:52 -06:00
Brady
84d961cbab Fix usages of Setting#get() 2019-03-08 15:12:55 -06:00
Brady
87b9d3915c Fix compiler errors
unproject needs to be resolved
2019-03-08 15:03:58 -06:00
Brady
c38d17563d Resolve merge conflicts
oh my god I should've updated my local branch before doing this
2019-03-08 14:44:49 -06:00
Brady
0c2af85ac0 Update to 1.13.2
Still need to setup method of launching, and Mixin support for ModLauncher
2019-03-08 14:30:43 -06:00
Leijurv
76297e8176 add click to usage 2019-03-08 08:43:28 -08:00
Leijurv
d90f391b5e 7 lmao 2019-03-07 18:18:31 -08:00
Leijurv
d80ae57964 disconnect on arrival 2019-03-06 22:44:57 -08:00
Leijurv
74d7483b3c explore 2019-03-05 12:26:52 -08:00
Leijurv
b3c580e657 teensy javadoc 2019-03-04 21:49:21 -08:00
Leijurv
8050b69f2f no more .get 😎 2019-03-04 21:30:04 -08:00
Leijurv
459720c348 eh actually lets do the whole render distance! 2019-03-04 21:21:02 -08:00
Leijurv
a73f5c1359 crapton of performance improvements 2019-03-04 21:20:13 -08:00
Leijurv
71cb0f6d36 fix a weird way of getting stuck on a ladder 2019-03-04 21:00:41 -08:00
Leijurv
0d15225b1d dont construct one unlesss we need to 2019-03-04 21:00:30 -08:00
Leijurv
826f3788d0 performance improvement and no allocation promise 2019-03-04 20:39:22 -08:00
Leijurv
2133ab39b7 better cache, needs more testing 2019-03-04 19:44:36 -08:00
Leijurv
558c14a375 little cleanup 2019-03-04 13:11:36 -08:00
Leijurv
882ac41291 player coords 2019-03-04 11:28:41 -08:00
Leijurv
66c7a3f513 this is really bad 2019-03-03 21:29:31 -08:00
Leijurv
5904441a7e ❤️ code of conduct 2019-03-02 22:40:42 -08:00
Leijurv
c465228531 consistency with the previously existing anime policy 2019-03-02 21:44:20 -08:00
Leijurv
81b22019dd Create CODE_OF_CONDUCT.md 2019-03-02 21:43:18 -08:00
Leijurv
3e47d485f9 emphasize and clarify lol 2019-03-01 12:11:47 -08:00
Leijurv
701bc772a8 update impcat badge 2019-03-01 11:22:21 -08:00
Leijurv
3ae05b7348 worldedit 2019-02-28 15:26:09 -08:00
Leijurv
2e186019f5 Merge branch 'master' into builder 2019-02-28 12:32:29 -08:00
Leijurv
4c6f321cff clarify 2019-02-28 12:12:16 -08:00
Leijurv
c72eb3e195 v1.2.3 2019-02-28 09:47:47 -08:00
Leijurv
a4237bf1f9 tentative fix to descend, needs testing 2019-02-27 23:04:43 -08:00
Leijurv
e767e34b92 well that was stupid, thanks thesmarttheorist 2019-02-27 22:15:54 -08:00
Leijurv
8ac82ebe2a v1.2.2 2019-02-27 17:48:57 -08:00
Leijurv
0ed6ccab71 update some documentation 2019-02-27 15:46:28 -08:00
Leijurv
bf25d7328e revalidate on goal update too 2019-02-27 12:23:05 -08:00
Leijurv
a47b0c0581 rendering cleanup, fixes #317 2019-02-27 12:00:39 -08:00
Leijurv
596849c7e6 i am rarted 2019-02-26 19:51:20 -08:00
Leijurv
76914b7859 awesome 2019-02-26 19:50:35 -08:00
Leijurv
3dbbe053d7 teensy change 2019-02-26 19:45:20 -08:00
Brady
c474cdb1f8 Working clicking goals 2019-02-26 21:41:08 -06:00
Leijurv
3de02cbf21 brady save me idk how to gl 2019-02-26 18:34:11 -08:00
Brady
26fefc70f0 Better update the badges 2019-02-26 17:29:50 -06:00
Brady
4086c9f4b5 Implement secondary license conditioning
Sorry fellas, no anime in this town.
2019-02-26 17:25:30 -06:00
Leijurv
c947c77853 goodbye mc.objectMouseOver 2019-02-26 15:07:01 -08:00
Leijurv
9be44c0371 placement without unepic right click 2019-02-26 14:57:44 -08:00
Leijurv
5412fa6cfd cursed flowing 2019-02-25 20:35:06 -08:00
Leijurv
6e7320b954 v1.2.1 2019-02-25 18:07:55 -08:00
Leijurv
fbb2d37634 allow placing against replacable blocks 2019-02-25 18:01:11 -08:00
Leijurv
7afe16fc10 dont reset every tick 2019-02-25 16:26:17 -08:00
Leijurv
b19f241d81 override for the first tick 2019-02-25 15:06:55 -08:00
Leijurv
583ce80003 not reliable enough with jesus to jump from water over a gap 2019-02-24 13:57:33 -08:00
Leijurv
195c33407e cant walk through heads 2019-02-24 13:43:53 -08:00
Leijurv
600c5b77ad v1.2.0 2019-02-23 20:43:29 -08:00
Leijurv
f1084fab76 come 2019-02-23 20:33:00 -08:00
Brady
bd65e32407 Fix the failing build 2019-02-23 17:04:14 -06:00
Leijurv
e4416f424a interesting 2019-02-23 14:13:27 -08:00
Leijurv
73ec110b22 not every player is a baritone 2019-02-23 14:03:47 -08:00
Brady
0bce801a3f Minor javadoc changes 2019-02-23 14:32:10 -06:00
Brady
e8e00e8dfb CRLF -> LF
It was inconsistent across the board
2019-02-23 12:27:24 -06:00
Leijurv
cc4335e48e better links 2019-02-22 23:32:23 -08:00
Leijurv
5427911da3 only api in javadoc i guess 2019-02-22 23:29:08 -08:00
Brady
c808d5a42d Small build.gradle cleanup and README update 2019-02-22 18:12:04 -06:00
Leijurv
3b46dbd6a1 appease codacy 2019-02-22 14:05:29 -08:00
Leijurv
e63b2f1bf1 unused arg 2019-02-22 13:58:03 -08:00
Leijurv
d32e822057 settings overhaul 2019-02-22 12:13:19 -08:00
Leijurv
2b672998e1 fix two weird ways of getting stuck 2019-02-21 14:24:23 -08:00
Leijurv
e18dc7c7e7 Merge branch 'master' into builder 2019-02-21 11:28:13 -08:00
Leijurv
16dcd2f44d blocks on top of chests, fixes #299 2019-02-21 11:25:03 -08:00
Leijurv
eb9f755b54 disable rendercachedchunks in singleplayer, fixes #331 2019-02-21 10:03:03 -08:00
Leijurv
29a9e6e1d1 fine, forward alias to thisway 2019-02-21 09:45:01 -08:00
Leijurv
1f52f706ed should fix anticheatcompat off on forge 2019-02-20 23:41:29 -08:00
Leijurv
bf12763a10 fix a bunch of bugs with placement 2019-02-20 08:08:52 -08:00
Leijurv
963641a818 trim big schematics 2019-02-19 22:50:03 -08:00
Leijurv
3e94d92fbd Merge branch 'master' into builder 2019-02-19 22:33:19 -08:00
Leijurv
a72040f83d imagine breaking the build 2019-02-19 19:52:11 -08:00
Leijurv
84d8f826ff fine lol, fixes #340 2019-02-19 19:41:26 -08:00
Brady
70d216b29f Fix renderGoalXZBeacon path rendering incorrect color 2019-02-19 21:00:14 -06:00
Leijurv
66356d5334 hmm 2019-02-19 18:27:05 -08:00
Leijurv
d9625dfe78 no longer needed crab rave 2019-02-19 18:24:12 -08:00
Leijurv
6d847577d8 somehow missed those 2019-02-19 18:22:59 -08:00
Leijurv
8fd687f9d7 more usage help 2019-02-19 15:04:18 -08:00
Leijurv
f7a9380b9d v1.1.6 2019-02-19 14:53:43 -08:00
Leijurv
5617c595b2 public init 2019-02-19 14:43:48 -08:00
Leijurv
8770524679 fix weird angle forcing behavior, fixes #341 2019-02-19 14:29:08 -08:00
Leijurv
a8ddb2fcf1 also disallow while breaking 2019-02-19 13:28:58 -08:00
Leijurv
76c4ca9ba6 fix path reliability after lateral movement 2019-02-19 12:55:58 -08:00
Leijurv
ed2b0f0bb9 fix jump before place ascend 2019-02-19 12:44:29 -08:00
Leijurv
6702b44b3e reformatted and fixed stuck on break fall 2019-02-19 12:43:44 -08:00
Leijurv
c486d8241e continue 2019-02-19 07:53:36 -08:00
Leijurv
d2bb8c374e explain 2019-02-18 21:18:37 -08:00
Leijurv
530cecea5b it flows better this way 2019-02-17 21:41:54 -08:00
Leijurv
266e2dada9 cleanup 2019-02-16 20:49:38 -08:00
Leijurv
ce73d34627 Merge branch 'master' into builder 2019-02-16 20:49:07 -08:00
Leijurv
11af0a7aac v1.1.5 2019-02-15 21:36:34 -08:00
Leijurv
46c2d8f7c7 unneeded 2019-02-15 21:35:52 -08:00
Leijurv
38127011fb Merge pull request #336 from babbaj/master
Fix potential problems
2019-02-14 14:48:48 -08:00
Leijurv
89b5ce4b63 properly detect failure 2019-02-14 14:47:38 -08:00
babbaj
4fe9c180d5 Fix potential problems 2019-02-14 07:03:22 -05:00
Leijurv
f094e83e4d codacy 2019-02-13 22:41:18 -08:00
Leijurv
5b6c9fc348 blacklist unreachable gettoblocks 2019-02-13 22:39:43 -08:00
Leijurv
3f1ee100bf only sprint ascends that are followed in the same direction 2019-02-13 22:39:34 -08:00
Leijurv
41b1106c72 sprint in water for real 2019-02-13 21:20:06 -08:00
Leijurv
b27d95a615 proper fall overshooting 2019-02-13 21:11:13 -08:00
Leijurv
5b8a83853d add setting to sprint in water 2019-02-13 19:23:16 -08:00
Leijurv
d0548b2715 add a warning 2019-02-13 18:39:26 -08:00
Leijurv
bffeb9c862 forgot one extra check 2019-02-13 18:38:46 -08:00
Leijurv
dbd760fbcb some polish on ascend sprinting 2019-02-13 18:26:30 -08:00
Leijurv
a84b3bfc7a sprint through ascends whenever possible, fixes #149 2019-02-13 16:55:08 -08:00
Leijurv
e8d3bf509c clarify 2019-02-13 16:33:27 -08:00
Leijurv
b2583773d5 discard next segment properly 2019-02-13 16:30:53 -08:00
Leijurv
9ecd24c755 remove toxic cloud 2019-02-13 16:30:41 -08:00
Leijurv
f1bacd6210 fix cancellation of unusable segments 2019-02-13 16:22:49 -08:00
Leijurv
a21ec54d4f stop breaking block when you let go of left click lol 2019-02-13 14:05:14 -08:00
Leijurv
0b4efb24ae momentous occasion: turning that crap off 2019-02-13 13:57:33 -08:00
Leijurv
c473914d05 fix flashing backwards, fixes #265 2019-02-13 13:54:50 -08:00
Leijurv
90a1fa8337 lol 2019-02-12 22:06:13 -08:00
Leijurv
99cb7f5142 crucial performance optimization 2019-02-12 21:36:53 -08:00
Leijurv
4026b850f8 dont spam debug chat 2019-02-12 18:34:58 -08:00
Leijurv
aac7ebf6dd avoid creating callbackinfo at all costs 2019-02-12 18:32:03 -08:00
Leijurv
8d481ba394 lol 2019-02-12 09:58:44 -08:00
Leijurv
24fa75c24e did someone say more badges 2019-02-11 22:26:49 -08:00
Leijurv
cf38d593b8 thanks leafeon 2019-02-11 22:20:59 -08:00
Leijurv
36f608c63c add epic gamer address 2019-02-11 19:21:08 -08:00
Leijurv
1d88564a72 clarify this setting since its got a similar name 2019-02-10 16:50:54 -08:00
Leijurv
503f2fb197 direct link to the top of the detail section since its not sorted alphabetically 2019-02-10 16:46:37 -08:00
Leijurv
bb000c4e3f include diagonals, and better settings 2019-02-10 16:44:09 -08:00
Leijurv
4868ed7560 explain whats going on 2019-02-10 15:12:52 -08:00
Leijurv
7017e9e2ea crucial performance optimization 2019-02-10 15:10:44 -08:00
Leijurv
a18eb90702 address glaring inconsistency 2019-02-10 13:49:28 -08:00
Leijurv
9d1d4fe0d9 typo 2019-02-10 10:44:04 -08:00
Leijurv
1a430dc2cf explain 2019-02-09 17:38:42 -08:00
Leijurv
e37a09a1c8 makes mining faster, fixes #330 2019-02-08 12:08:34 -08:00
Leijurv
d0d8b12fb8 add clickCancel, fixes #326 2019-02-07 17:18:14 -08:00
Leijurv
9a29f9ce57 better behavior on arrival and failure 2019-02-07 16:39:15 -08:00
Leijurv
42513e4b56 better check 2019-02-07 16:12:34 -08:00
Leijurv
67fa91abe8 fixes to descend, and goto coords 2019-02-07 15:55:39 -08:00
Leijurv
d8348ad292 Merge branch 'master' into builder 2019-02-07 14:11:26 -08:00
Leijurv
6faa7344aa properly discard orphan path segments 2019-02-07 14:11:18 -08:00
Leijurv
299540725e a start on inventory movement 2019-02-07 13:59:37 -08:00
Leijurv
0ef08142fd trim spaces from schematic name 2019-02-07 13:12:44 -08:00
Leijurv
c0761c0eef be more tolerant of alternate movement inputs 2019-02-07 10:46:32 -08:00
Leijurv
8694d926c4 remove unneeded printouts 2019-02-07 10:45:51 -08:00
Leijurv
4c4bce3561 define origin 2019-02-06 22:10:52 -08:00
Leijurv
68e8717b5c Merge branch 'master' into builder 2019-02-06 21:05:14 -08:00
Leijurv
a822d3ef05 horrifying placement 2019-02-06 16:22:40 -08:00
Leijurv
311cf81e8a Merge branch 'master' into builder 2019-02-06 12:54:03 -08:00
Leijurv
5fb8a1d3d1 Merge branch 'master' into builder 2019-01-29 19:58:51 -08:00
Leijurv
306bd18a40 Merge branch 'master' into builder 2019-01-29 19:47:36 -08:00
Leijurv
847181ada4 Merge branch 'master' into builder 2019-01-24 21:00:52 -08:00
Leijurv
1c1fbe83ec idk lol 2019-01-19 22:12:54 -08:00
Leijurv
ccd56e0368 Merge branch 'master' into builder 2019-01-19 16:36:42 -08:00
Leijurv
cef88cde20 epic super 2019-01-17 12:25:48 -08:00
Brady
aa3833915b Repackage schematic implementations 2019-01-16 13:45:32 -06:00
Brady
0c0bbeff27 Minor AirSchematic access modifier change 2019-01-16 12:39:15 -06:00
Brady
ceda14096c Builder Process API exposure
Professional style 💪
2019-01-15 22:07:06 -06:00
Leijurv
d5b393d6bd area clear 2019-01-14 21:41:40 -08:00
Leijurv
e2cdd6a7f9 builder with multiple materials 2019-01-14 19:49:26 -08:00
Leijurv
261d02e67b Merge branch 'master' into builder 2019-01-14 13:01:25 -08:00
Leijurv
a6ce4694fc hotbar selection uwu 2019-01-12 19:51:21 -08:00
Leijurv
14bc65468a tweaks 2019-01-11 10:02:21 -08:00
Leijurv
56d109bf0a Merge pull request #310 from babbaj/builder
make code easy to understand
2019-01-11 10:00:54 -08:00
babbaj
a965859095 make code easy to understand 2019-01-11 01:13:14 -05:00
Leijurv
863ae447b9 except we actually make it work 2019-01-10 18:15:05 -08:00
Leijurv
4dd922f1b5 Merge branch 'master' into builder 2019-01-10 17:27:23 -08:00
Leijurv
f95dc40f4c consolidate triple duplicated placement code 2019-01-10 17:23:20 -08:00
Leijurv
81786f7a7c reuse calculationcontext for planning ahead next segment 2019-01-10 13:51:26 -08:00
Leijurv
1381d8d94c two small tweaks 2019-01-10 13:50:53 -08:00
Leijurv
1dca02517e disable backtrack cost favoring while building 2019-01-09 15:42:49 -08:00
Leijurv
b109fc7420 fun =) 2019-01-09 15:07:06 -08:00
Leijurv
c74c01271d better strategy 2019-01-09 14:36:44 -08:00
Leijurv
702b916948 preliminary schematic stuff 2019-01-08 20:45:02 -08:00
Leijurv
8ed2431f37 Merge branch 'master' into builder 2019-01-08 14:56:48 -08:00
Leijurv
c45cbebcce fixed 2018-12-27 08:06:10 -10:00
Leijurv
251110c4f8 the start of something big 2018-12-25 21:07:17 -08:00
340 changed files with 22711 additions and 5819 deletions

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* text=auto

35
.github/ISSUE_TEMPLATE/bug.md vendored Normal file
View File

@@ -0,0 +1,35 @@
---
name: Bug report
about: Please file a separate report for each issue
title: Please add a brief but descriptive title
labels: bug
assignees: ''
---
## Some information
Operating system:
Java version:
Minecraft version:
Baritone version:
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
Linux: `~/.minecraft/logs/`
Windows: `%appdata%/.minecraft/logs/`
Mac: `/Library/Application\ Support/minecraft/logs/`
## How to reproduce
Add your steps to reproduce the issue/bug experienced here.
## Modified settings
To get the modified settings run `#modified` in game
## Final checklist
- [x] I know how to properly use check boxes
- [ ] I have included the version of Minecraft I'm running, baritone's version and forge mods (if used).
- [ ] I have included logs, exceptions and / or steps to reproduce the issue.
- [ ] I have not used any OwO's or UwU's in this issue.

14
.github/ISSUE_TEMPLATE/question.md vendored Normal file
View File

@@ -0,0 +1,14 @@
---
name: Question
about: Please file a separate report for each question
title: Please add a brief but descriptive title
labels: question
assignees: ''
---
## What do you need help with?
With as much detail as possible, describe your question and what you may need help with.
## Final checklist
- [x] I know how to properly use check boxes
- [ ] I have not used any OwO's or UwU's in this issue.

20
.github/ISSUE_TEMPLATE/suggestion.md vendored Normal file
View File

@@ -0,0 +1,20 @@
---
name: Suggestion
about: Please file a separate report for each suggestion
title: Please add a brief but descriptive title
labels: enhancement
assignees: ''
---
## Describe your suggestion
With as much detail as possible, describe what your suggestion would do for Baritone.
## Settings
If applicable, what settings/customizability should be offered to tweak the functionality of your suggestion.
## Context
Describe how your suggestion would improve Baritone, or the reason behind it being added.
## Final checklist
- [x] I know how to properly use check boxes
- [ ] I have not used any OwO's or UwU's in this issue.

1
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1 @@
<!-- No UwU's or OwO's allowed -->

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

@@ -0,0 +1,45 @@
# 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@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Build (fabric) with Gradle
run: ./gradlew build -Pbaritone.fabric_build
- name: Build (forge) with Gradle
run: ./gradlew build -Pbaritone.forge_build -Ploom.platform=forge
- name: Archive Artifacts
uses: actions/upload-artifact@v3
with:
name: Artifacts
path: dist/
- name: Archive mapping.txt
uses: actions/upload-artifact@v3
with:
name: Mappings
path: build/tmp/proguard/mapping.txt

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@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Executing tests
run: ./gradlew test

15
.gitignore vendored
View File

@@ -4,6 +4,7 @@
run/
autotest/
dist/
volderyarn/
# Gradle
build/
@@ -11,11 +12,23 @@ build/
classes/
*.class
/out
# IntelliJ Files
.idea/
*.iml
*.ipr
*.iws
/logs/
# Eclipse Files
.classpath
.project
.settings/
baritone_Client.launch
# Copyright Files
!/.idea/copyright/Baritone.xml
!/.idea/copyright/profiles_settings.xml
!/.idea/copyright/profiles_settings.xml
.vscode/launch.json

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 --rm cabaletta/baritone ./gradlew javadoc
- docker run --name baritone cabaletta/baritone /bin/sh -c "set -e; /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 runClient"
- 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

83
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,83 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* No Anime (including uwu's or owo's)
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Giving and gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* Anime
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* ~~Trolling, insulting/derogatory comments, and personal or political attacks~~
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission or consent
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
Project maintainers have the right and responsibility to immediately remove
without any sort of dispute any issues or pull requests that do not align
with their corresponding templates. Absolutely no leniancy shall be accepted
with these terms.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at complaints@leijurv.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

View File

@@ -1,24 +1,17 @@
FROM debian:jessie
RUN echo 'deb http://deb.debian.org/debian jessie-backports main' > /etc/apt/sources.list.d/jessie-backports.list
FROM ubuntu:focal
ENV DEBIAN_FRONTEND noninteractive
RUN apt update -y
RUN apt install --target-release jessie-backports \
openjdk-8-jdk \
ca-certificates-java \
RUN apt install \
openjdk-17-jdk \
--assume-yes
RUN apt install -qq --force-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
RUN ./gradlew build
RUN ./gradlew build -Pbaritone.forge_build -Ploom.platform=forge
RUN ./gradlew build -Pbaritone.fabric_build

View File

@@ -4,7 +4,7 @@
- **Block breaking** Baritone considers breaking blocks as part of its path. It also takes into account your current tool set and hot bar. For example, if you have a Eff V diamond pick, it may choose to mine through a stone barrier, while if you only had a wood pick it might be faster to climb over it.
- **Block placing** Baritone considers placing blocks as part of its path. This includes sneak-back-placing, pillaring, etc. It has a configurable penalty of placing a block (set to 1 second by default), to conserve its resources. The list of acceptable throwaway blocks is also configurable, and is cobble, dirt, or netherrack by default. <a href="https://www.youtube.com/watch?v=F6FbI1L9UmU">Example</a>
- **Falling** Baritone will fall up to 3 blocks onto solid ground (configurable, if you have Feather Falling and/or don't mind taking a little damage). If you have a water bucket on your hotbar, it will fall up to 23 blocks and place the bucket beneath it. It will fall an unlimited distance into existing still water.
- **Vines and ladders** Baritone understands how to climb and descend vines and ladders. There is experimental support for more advanced maneuvers, like strafing to a different ladder / vine column in midair (off by default, setting named `allowVines`).
- **Vines and ladders** Baritone understands how to climb and descend vines and ladders. There is experimental support for more advanced maneuvers, like strafing to a different ladder / vine column in midair (off by default, setting named `allowVines`). Baritone can break its fall by grabbing ladders / vines midair, and understands when that is and isn't possible.
- **Opening fence gates and doors**
- **Slabs and stairs**
- **Falling blocks** Baritone understands the costs of breaking blocks with falling blocks on top, and includes all of their break costs. Additionally, since it avoids breaking any blocks touching a liquid, it won't break the bottom of a gravel stack below a lava lake (anymore).

View File

@@ -1,90 +0,0 @@
# Integration between Baritone and Impact
Impact 4.4 has Baritone included.
These instructions apply to Impact 4.3.
For Forge follow the instructions in [Setup](SETUP.md).
To run Baritone on Vanilla, just follow the instructions in the README (it's `./gradlew runClient`).
## An Introduction
There are some basic steps to getting Baritone setup with Impact.
- Acquiring a build of Baritone
- Placing Baritone in the libraries directory
- Modifying the Impact Profile JSON to run baritone
- How to use Baritone
## Acquiring a build of Baritone
There are two methods of acquiring a build of Baritone
### Official Release (Not always up to date)
https://github.com/cabaletta/baritone/releases
For Impact 4.3, there is no Baritone integration yet, so you will want `baritone-standalone-X.Y.Z.jar`. **For the rest of this guide, replace `X.Y.Z` with the actual numeric version you are using.**
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`.
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).
### Building Baritone yourself
You can either build Baritone through a command line or through IntelliJ's UI, information on that can be found [here](SETUP.md#building).
## Placing Baritone in the libraries directory
``/libraries`` is a neat directory in your <a href="https://minecraft.gamepedia.com/.minecraft">Minecraft Installation Directory</a>
that contains all of the dependencies that are required from the game and some mods. This is where we will be
putting baritone.
- Locate the ``libraries`` folder, it should be in the Minecraft Installation Directory
- Create 3 new subdirectories starting from ``libraries``
- ``cabaletta``
- ``baritone``
- ``X.Y.Z``
- Copy the build of Baritone that was acquired earlier, and place it into the ``X.Y.Z`` folder, renamed like so:
- The full path should look like ``<Minecraft>/libraries/cabaletta/baritone/X.Y.Z/baritone-X.Y.Z.jar``
## Modifying the Impact Profile JSON to run baritone
The final step is "registering" the Baritone library with Impact, so that it loads on launch.
- Ensure your Minecraft launcher is closed
- Navigate back to the Minecraft Installation Directory
- Find the ``versions`` directory, and open in
- In here there should be a ``1.12.2-Impact_4.3`` folder.
- If you don't have any Impact folder or have a version older than 4.3, you can download Impact <a href="https://impactdevelopment.github.io">here</a>.
- Open the folder and inside there should be a file called ``1.12.2-Impact_4.3.json``
- Open the JSON file with a text editor that supports your system's line endings
- For example, Notepad on Windows likely will NOT work for this. You should instead use a Text Editor like
<a href="https://notepad-plus-plus.org/">Notepad++</a> if you're on Windows. (For other systems, I'm not sure
what would work the best so you may have to do some research.)
- Find the ``libraries`` array in the JSON. It should look something like this.
```
"libraries": [
{
"name": "net.minecraft:launchwrapper:1.12"
},
{
"name": "com.github.ImpactDevelopment:Impact:4.3-1.12.2",
"url": "https://impactdevelopment.github.io/maven/"
},
{
"name": "com.github.ImpactDeveloment:ClientAPI:3.0.2",
"url": "https://impactdevelopment.github.io/maven/"
},
...
```
- Create two new objects in the array, between the ``Impact`` and ``ClientAPI`` dependencies preferably.
```
{
"name": "cabaletta:baritone:X.Y.Z"
},
{
"name": "com.github.ImpactDevelopment:SimpleTweaker:1.2",
"url": "https://impactdevelopment.github.io/maven/"
},
```
- Now find the ``"minecraftArguments": "..."`` text near the top.
- At the very end of the quotes where it says ``--tweakClass clientapi.load.ClientTweaker"``, add on the following so it looks like:
- ``--tweakClass clientapi.load.ClientTweaker --tweakClass baritone.launch.BaritoneTweaker"``
- If you didn't close your launcher for this step, restart it now.
- You can now launch Impact 4.3 as normal, and Baritone should start up
## How to use Baritone
- [Baritone chat control usage](USAGE.md)

BIN
LICENSE-Part-2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

131
README.md
View File

@@ -1,52 +1,103 @@
# 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-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)
[![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)
[![Minecraft](https://img.shields.io/badge/MC-1.12.2-green.svg)](https://minecraft.gamepedia.com/1.12.2)
[![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/)
[![Asuna integration](https://img.shields.io/badge/Asuna%20integration-builder%20branch-brightgreen.svg)](https://github.com/EmotionalLove/Asuna/)
[![Impact integration](https://img.shields.io/badge/Impact%20integration-v1.0.0--hotfix--4-green.svg)](https://impactdevelopment.github.io/)
[![KAMI integration](https://img.shields.io/badge/KAMI%20integration-v1.0.0-orange.svg)](https://github.com/zeroeightysix/KAMI/)
[![WWE integration](https://img.shields.io/badge/WWE%20%22integration%22-v1.0.0%3F%3F%20smh%20license%20violations-orange.svg)](https://wweclient.com/)
[![Future integration](https://img.shields.io/badge/Future%20integration-Soon™%3F%3F%3F-red.svg)](https://futureclient.net/)
[![ForgeHax integration](https://img.shields.io/badge/ForgeHax%20integration-Soon™-red.svg)](https://github.com/fr1kin/ForgeHax)
<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="https://github.com/cabaletta/baritone/tree/master"><img src="https://img.shields.io/badge/MC-1.12.2-brightgreen.svg" alt="Minecraft"/></a>
<a href="https://github.com/cabaletta/baritone/tree/1.13.2"><img src="https://img.shields.io/badge/MC-1.13.2-yellow.svg" alt="Minecraft"/></a>
<a href="https://github.com/cabaletta/baritone/tree/1.14.4"><img src="https://img.shields.io/badge/MC-1.14.4-yellow.svg" alt="Minecraft"/></a>
<a href="https://github.com/cabaletta/baritone/tree/1.15.2"><img src="https://img.shields.io/badge/MC-1.15.2-yellow.svg" alt="Minecraft"/></a>
<a href="https://github.com/cabaletta/baritone/tree/1.16.5"><img src="https://img.shields.io/badge/MC-1.16.5-brightgreen.svg" alt="Minecraft"/></a>
<a href="https://github.com/cabaletta/baritone/tree/1.17.1"><img src="https://img.shields.io/badge/MC-1.17.1-brightgreen.svg" alt="Minecraft"/></a>
<a href="https://github.com/cabaletta/baritone/tree/1.18.2"><img src="https://img.shields.io/badge/MC-1.18.2-brightgreen.svg" alt="Minecraft"/></a>
</p>
Baritone is the pathfinding system used in [Impact](https://impactdevelopment.github.io/) since 4.4. There's a [showcase video](https://www.youtube.com/watch?v=yI8hgW_m6dQ) made by @Adovin#3153 on Baritone's integration into Impact. [Here's](https://www.youtube.com/watch?v=StquF69-_wI) a 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" alt="Lines of Code"/>
</p>
<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/kami-blue/client"><img src="https://img.shields.io/badge/KAMI%20Blue%20integration-v1.2.14--master-green" alt="KAMI Blue 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>
<p align="center">
<a href="http://forthebadge.com/"><img src="https://forthebadge.com/images/badges/built-with-swag.svg" alt="forthebadge"/></a>
<a href="http://forthebadge.com/"><img src="https://forthebadge.com/images/badges/mom-made-pizza-rolls.svg" alt="forthebadge"/></a>
</p>
A Minecraft pathfinder bot.
[**Baritone Discord Server**](http://discord.gg/s6fRBAUpmr)
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.
[Tutorial playlist](https://www.youtube.com/playlist?list=PLnwnJ1qsS7CoQl9Si-RTluuzCo_4Oulpa)
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.* `api-forge` jar from [releases](https://github.com/cabaletta/baritone/releases). **For 1.12.2 Forge, just click
[here](https://github.com/cabaletta/baritone/releases/download/v1.2.17/baritone-api-forge-1.2.17.jar)**. Otherwise, see [Installation & setup](SETUP.md). Once Baritone is installed, look [here](USAGE.md) for instructions on how to use it.
For 1.16.5, [click here](https://www.youtube.com/watch?v=_4eVJ9Qz2J8) and see description. If you need Forge or Fabric 1.16.5, look [here](https://github.com/cabaletta/baritone/releases/tag/v1.6.3) and get the `api-forge` or `api-fabric` jar. **For 1.16.5 Fabric, just click [here](https://github.com/cabaletta/baritone/releases/download/v1.6.3/baritone-api-fabric-1.6.3.jar)**.
If you need Forge or Fabric 1.17.1, look [here](https://github.com/cabaletta/baritone/releases/tag/v1.7.2) and get the `api-forge` or `api-fabric` jar. **For 1.17.1 Fabric, just click [here](https://github.com/cabaletta/baritone/releases/download/v1.7.2/baritone-api-fabric-1.7.2.jar)**.
If you need Forge or Fabric 1.18.2, look [here](https://github.com/cabaletta/baritone/releases/tag/v1.8.3) and get the `api-forge` or `api-fabric` jar. **For 1.18.2 Fabric, just click [here](https://github.com/cabaletta/baritone/releases/download/v1.8.3/baritone-api-fabric-1.8.3.jar)**. **For 1.18.2 Forge, just click [here](https://github.com/cabaletta/baritone/releases/download/v1.8.3/baritone-api-forge-1.8.3.jar)**.
This project is an updated version of [MineBot](https://github.com/leijurv/MineBot/),
the original version of the bot for Minecraft 1.8, rebuilt for 1.12.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 for the last 6 months =D 🦀
Have committed at least once a day from Aug 1, 2018, to Aug 1, 2019.
1Leijurv3DWTrGAfmmiTphjhXLvQiHg7K2
# Getting Started
Here are some links to help to get started:
- [Features](FEATURES.md)
- [Setup](SETUP.md)
- [Installation & setup](SETUP.md)
- [Installation](INSTALL.md)
- [API Javadocs](https://baritone.leijurv.com/)
- [Javadocs](https://baritone.leijurv.com/)
- [Settings](https://baritone.leijurv.com/baritone/api/Settings.html#field.detail)
# Chat control
- [Usage (chat control)](USAGE.md)
- [Baritone chat control usage](USAGE.md)
## Stars over time
# API example
[![Stargazers over time](https://starchart.cc/cabaletta/baritone.svg)](https://starchart.cc/cabaletta/baritone)
```
# API
The API is heavily documented, you can find the Javadocs for the latest release [here](https://baritone.leijurv.com/).
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 an X/Z goal.
```java
BaritoneAPI.getSettings().allowSprint.value = true;
BaritoneAPI.getSettings().primaryTimeoutMS.value = 2000L;
@@ -57,12 +108,22 @@ BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoalAnd
## Can I use Baritone as a library in my custom utility client?
Sure! (As long as usage is in compliance with the LGPL 3 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)
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.

View File

@@ -1,30 +1,37 @@
# Setup
# Installation
## Prebuilt
(not always completely up to date with latest features)
The easiest way to install Baritone is to install [Impact](https://impactclient.net/), which comes with Baritone.
Download from the [Releases](https://github.com/cabaletta/baritone/releases)
You can also use a custom version json for Minecraft, with the [1.14.4](https://www.dropbox.com/s/rkml3hjokd3qv0m/1.14.4-Baritone.zip?dl=1) version or the [1.15.2](https://www.dropbox.com/s/8rx6f0kts9hvd4f/1.15.2-Baritone.zip?dl=1) version or the [1.16.5](https://www.dropbox.com/s/i6f292o2i7o9acp/1.16.5-Baritone.zip?dl=1) version.
The Forge releases can simply be added as a Forge mod.
Once Baritone is installed, look [here](USAGE.md) for instructions on how to use it.
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`
## 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)
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, v1.4.* is for 1.14.4, v1.5.* is for 1.15.2, v1.6.* is for 1.16.5, v1.7.* is for 1.17.1, v1.8.* is for 1.18.1
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).
Previously (Baritone v1.1.2 and below), it was not fully compatible with the latest version of Forge. `freeLook` was broken in Forge 14.23.4.2744. Forge 14.23.4.2743 or **older** worked with Baritone v1.1.2 and lower. Newer versions of Forge "worked", sort of, but Baritone's movement became unreliable and `freeLook` must be off.
## 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).
**The Forge and Fabric releases can simply be added as a Forge/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`
- **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.
- **Forge/Fabric API**: Same as API, but packaged for Forge/Fabric. 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.
- **Forge/Fabric Standalone**: Same as Standalone, but packaged for Forge/Fabric. This should be used when Baritone is your only Forge/Fabric mod, or none of your other Forge/Fabric mods integrate with Baritone.
- **Unoptimized**: Nothing is obfuscated. This shouldn't be used ever in production.
## More Info
To replace out Impact 4.4's Baritone build with a customized one, switch to the `impact4.4-compat` branch, build Baritone as above then copy `dist/baritone-api-$VERSION$.jar` into `minecraft/libraries/cabaletta/baritone-api/1.0.0/baritone-api-1.0.0.jar`, replacing the jar that was previously there. You also need to edit `minecraft/versions/1.12.2-Impact_4.4/1.12.2-Impact_4.4.json`, find the line `"name": "cabaletta:baritone-api:1.0.0"`, remove the comma from the end, and entirely remove the line that's immediately after (starts with `"url"`).
Impact 4.4 **only** works with builds from the quite outdated `impact4.4-compat` branch. If you must have the latest Baritone features with Impact, and can't wait for 4.5, consider creating a standalone (non forge) build then adding it to Impact 4.**3** via the instructions in [Install](INSTALL.md).
- **Forge/Fabric Unoptimized**: Same as Unoptimized, but packaged for Forge/Fabric.
## Build it yourself
- Clone or download Baritone
@@ -36,6 +43,29 @@ Impact 4.4 **only** works with builds from the quite outdated `impact4.4-compat`
## 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 for 1.12.2-1.16.5, JDK 16 for 1.17.1, and JDK 17 for 1.18.1.
To check which java you are using do
`java -version` in a command prompt or terminal.
If you are using anything above OpenJDK 8 for 1.12.2-1.16.5, it might not work because the Java distributions above JDK 8 using may not have the needed javax classes.
Open JDK download: https://openjdk.java.net/install/
#### macOS guide
In order to get JDK 8, Try running the following command:
`% /usr/libexec/java_home -V`
If it doesn't work try this guide: https://stackoverflow.com/questions/46513639/how-to-downgrade-java-from-9-to-8-on-a-macos-eclipse-is-not-running-with-java-9
If you see something like
`% 1.8.0_VERSION, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_VERSION.jdk/Contents/Home`
in the list then you've got JDK 8 installed.
In order to get JDK 8 running in the **current terminal window** you will have to run this command:
`% export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)`
To add OpenJDK 8 to your PATH add the export line to the end of your `.zshrc / .bashrc` if you want it to apply to each new terminal. If you're using bash change the .bachrc and if you're using zsh change the .zshrc
Setting up the Environment:
```
@@ -43,6 +73,24 @@ $ gradlew setupDecompWorkspace
$ gradlew --refresh-dependencies
```
Building Baritone:
```
$ gradlew build
```
For minecraft 1.15.2+, run the following instead to include the Forge jars:
```
$ gradlew build -Pbaritone.forge_build
```
Do this instead for Fabric jars:
```
$ gradlew build -Pbaritone.fabric_build
```
Running Baritone:
```
@@ -76,20 +124,10 @@ For information on how to build baritone, see [Building Baritone](#building-bari
![Image](https://i.imgur.com/hrLhG9u.png)
# Building
Make sure that you have properly [setup](#setup) the environment before trying to build it.
## Command Line
```
$ gradlew build
```
## 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
- Double click on **build** to run it

View File

@@ -2,48 +2,69 @@
# Prefix
Baritone commands can by default be typed in the chatbox. However if you make a typo, like typing "gola 10000 10000" instead of goal it goes into public chat, which is bad.
Baritone's chat control prefix is `#` by default. In Impact, you can also use `.b` as a prefix. (for example, `.b click` instead of `#click`)
Therefore you can use a prefix before your messages.
Baritone commands can also by default be typed in the chatbox. However if you make a typo, like typing "gola 10000 10000" instead of "goal" it goes into public chat, which is bad, so using `#` is suggested.
On Baritone v1.1.0 and newer: The prefix is `#` by default. Anything beginning with `#` isn't sent, and is only interpreted by Baritone.
For older than v1.1.0, `#` must be enabled by toggling on the `prefix` setting.
To disable direct chat control (with no prefix), turn off the `chatControl` setting. To disable chat control with the `#` prefix, turn off the `prefixControl` setting. In Impact, `.b` cannot be disabled. Be careful that you don't leave yourself with all control methods disabled (if you do, reset your settings by deleting the file `minecraft/baritone/settings.txt` and relaunching).
**Only** in Impact 4.4 is `.b` also a valid prefix. In 4.4, `#` does **not** work, neither does saying the commands directly in chat.
# For Baritone 1.2.10+, 1.3.5+, 1.4.2+
Other clients like Kami and Asuna have their own custom things (like `-path`), and can disable direct chat control entirely.
Lots of the commands have changed, BUT `#help` is improved vastly (its clickable! commands have tab completion! oh my!).
Try `#help` I promise it won't just send you back here =)
"wtf where is cleararea" -> look at `#help sel`
"wtf where is goto death, goto waypoint" -> look at `#help wp`
just look at `#help` lmao
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` for (rudimentary) help. You can see what it says [here](https://github.com/cabaletta/baritone/blob/master/src/main/java/baritone/utils/ExampleBaritoneControl.java#L53).
`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 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 go to a certain coordinate
- `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` to mine diamond 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.)
- `follow playerName` to follow a player. `follow` to follow the entity you're looking at (only works if it hitting range). `followplayers` to follow any players in range (combine with Kill Aura for a fun time).
- `save waypointName` to save a waypoint. `goto waypointName` to go to it.
- `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. 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.
- `render` to rerender the world in case `renderCachedChunks` is being glitchy
- `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/main/java/baritone/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/">here</a> and navigate to Settings in the left sidebar.
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.
- `allowBreak`
@@ -51,18 +72,25 @@ There are about a hundred settings, but here are some fun / interesting / import
- `allowPlace`
- `allowParkour`
- `allowParkourPlace`
- `blockPlacementPenalty`
- `renderCachedChunks` (and `cachedChunksOpacity`) <-- very fun but you need a beefy computer
- `avoidance`
- `avoidance` (avoidance of mobs / mob spawners)
- `legitMine`
- `followRadius`
- `backfill` (fill in tunnels behind you)
- `buildInLayers`
- `buildRepeatDistance` and `buildRepeatDirection`
- `worldExploringChunkOffset`
- `acceptableThrowawayItems`
- `blocksToAvoidBreaking`
- `mineScanDroppedItems`
- `allowDiagonalAscend`
# Troubleshooting / common issues
## Baritone highlights a block in green but gets completely stuck? Also I'm using Baritone with Future?
Baritone is trying to right click to place a block there, but it can't since there's a conflicting mixin. Baritone can't force click right click when Future is also installed. Left click **does work** on recent Baritone even with Future, however. For now, turn off `allowPlace` and Baritone will only search for paths that don't require placing blocks to complete. `allowBreak` can remain on.
## Why doesn't Baritone respond to any of my chat commands?
This could be one of many things.
@@ -76,4 +104,4 @@ So you'll need to use the `#` prefix or edit `baritone/settings.txt` in your Min
## Why can I do `.goto x z` in Impact but nowhere else? Why can I do `-path to x z` in KAMI but nowhere else?
These are custom commands that they added; those aren't from Baritone.
The equivalent you're looking for is `goal x z` then `path`.
The equivalent you're looking for is `goto x z`.

View File

@@ -1,134 +1,190 @@
/*
* 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/>.
*/
group 'baritone'
version '1.1.4'
buildscript {
repositories {
maven {
name = 'forge'
url = 'http://files.minecraftforge.net/maven'
}
maven {
name = 'SpongePowered'
url = 'http://repo.spongepowered.org/maven'
}
jcenter()
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
}
}
import baritone.gradle.task.CreateDistTask
import baritone.gradle.task.ProguardTask
apply plugin: 'java'
apply plugin: 'net.minecraftforge.gradle.tweaker-client'
apply plugin: 'org.spongepowered.mixin'
sourceCompatibility = targetCompatibility = '1.8'
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
options.encoding = "UTF-8" // allow emoji in comments :^)
}
sourceSets {
launch {
compileClasspath += main.compileClasspath + main.runtimeClasspath + main.output
}
}
minecraft {
version = '1.12.2'
mappings = 'stable_39'
tweakClass = 'baritone.launch.BaritoneTweaker'
runDir = 'run'
// The sources jar should use SRG names not MCP to ensure compatibility with all mappings
makeObfSourceJar = true
}
repositories {
mavenCentral()
maven {
name = 'spongepowered-repo'
url = 'http://repo.spongepowered.org/maven/'
}
maven {
name = 'impactdevelopment-repo'
url = 'https://impactdevelopment.github.io/maven/'
}
}
dependencies {
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'
}
mixin {
defaultObfuscationEnv searge
add sourceSets.launch, 'mixins.baritone.refmap.json'
}
javadoc {
options.addStringOption('Xwerror', '-quiet') // makes the build fail on travis when there is a javadoc error
options.linkSource true
options.encoding "UTF-8" // allow emoji in comments :^)
source += sourceSets.api.allJava
classpath += sourceSets.api.compileClasspath
}
jar {
from sourceSets.launch.output, sourceSets.api.output
preserveFileTimestamps = false
reproducibleFileOrder = true
}
jar {
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)
/*
* 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/>.
*/
plugins {
id 'java'
id 'dev.architectury.loom' version '0.10.0-SNAPSHOT'
id 'maven-publish'
}
archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
import baritone.gradle.task.CreateDistTask
import baritone.gradle.task.ProguardTask
def compileType = project.hasProperty("baritone.fabric_build") ? "FABRIC" : project.hasProperty("baritone.forge_build") ? "FORGE" : "OFFICIAL"
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17
compileJava {
options.encoding = "UTF-8" // allow emoji in comments :^)
}
sourceSets {
api {
compileClasspath += main.compileClasspath
}
main {
compileClasspath += api.output
}
test {
compileClasspath += main.compileClasspath + main.runtimeClasspath + main.output
runtimeClasspath += main.compileClasspath + main.runtimeClasspath + main.output
}
launch {
compileClasspath += main.compileClasspath + main.runtimeClasspath + main.output
runtimeClasspath += main.compileClasspath + main.runtimeClasspath + main.output
}
schematica_api {
compileClasspath += main.compileClasspath
}
main {
compileClasspath += schematica_api.output
}
}
loom {
if (compileType.equals("FORGE")) {
forge {
mixinConfig 'mixins.baritone.json'
}
}
mixin.defaultRefmapName = "mixins.baritone.refmap.json"
runs {
client {
source = sourceSets.launch
}
}
}
repositories {
maven {
name = 'impactdevelopment-repo'
url = 'https://impactdevelopment.github.io/maven/'
}
maven {
name = "ldtteam"
url = "https://maven.parchmentmc.net/"
}
mavenCentral()
}
dependencies {
if (compileType.equals("FORGE")) {
forge "net.minecraftforge:forge:${project.forge_version}"
}
mappings loom.layered() {
officialMojangMappings()
//technically optional, but really helpful in dev:
// parchment("org.parchmentmc.data:parchment-1.17.1:2021.10.24@zip" as String)
}
minecraft "com.mojang:minecraft:${project.minecraft_version}"
if (!compileType.equals("FORGE")) {
modImplementation "net.fabricmc:fabric-loader:${project.fabric_version}"
}
// this makes it compile with the forge tweak stuff
implementation 'com.github.ImpactDevelopment:SimpleTweaker:1.2'
implementation('net.minecraft:launchwrapper:1.12') {
exclude module: 'lwjgl'
exclude module: 'asm-debug-all'
}
implementation 'com.google.code.findbugs:jsr305:3.0.2'
testImplementation 'junit:junit:4.12'
}
javadoc {
options.addStringOption('Xwerror', '-quiet') // makes the build fail on travis when there is a javadoc error
options.linkSource true
options.encoding "UTF-8" // allow emoji in comments :^)
source = sourceSets.api.allJava
classpath += sourceSets.api.compileClasspath
}
// skidded from fabric-example-mod (comments and all)
tasks.withType(JavaCompile).configureEach {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
// If Javadoc is generated, this must be specified in that task too.
it.options.encoding = "UTF-8"
// The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too
// JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used.
// We'll use that if it's available, but otherwise we'll use the older option.
def targetVersion = 16
if (JavaVersion.current().isJava9Compatible()) {
it.options.release = targetVersion
}
}
jar {
from sourceSets.launch.output, sourceSets.api.output
if (!getProject().hasProperty("baritone.forge_build")) {
exclude "**/BaritoneForgeModXD.class"
exclude "**/mods.toml"
}
preserveFileTimestamps = false
reproducibleFileOrder = true
if (getProject().hasProperty("baritone.fabric_build")) {
filesMatching("fabric.mod.json") {
expand "version": version
}
} else {
exclude("fabric.mod.json")
}
manifest {
attributes(
'MixinConfigs': 'mixins.baritone.json',
"MixinConnector": "baritone.launch.BaritoneMixinConnector",
'Implementation-Title': 'Baritone',
'Implementation-Version': version,
)
}
}
if (compileType.equals("OFFICIAL")) {
remapJar {
toM.set "official"
}
}
task proguard(type: ProguardTask) {
url 'https://github.com/Guardsquare/proguard/releases/download/v7.2.0-beta2/proguard-7.2.0-beta2.zip'
extract 'proguard-7.2.0-beta2/lib/proguard.jar'
compType compileType
}
task createDist(type: CreateDistTask, dependsOn: proguard)
build.finalizedBy(createDist)

View File

@@ -20,6 +20,6 @@ repositories {
}
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.8.5'
implementation group: 'commons-io', name: 'commons-io', version: '2.6'
}

View File

@@ -17,16 +17,14 @@
package baritone.gradle.task;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import org.gradle.api.DefaultTask;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
/**
* @author Brady
@@ -43,37 +41,53 @@ class BaritoneGradleTask extends DefaultTask {
PROGUARD_STANDALONE_CONFIG = "standalone.pro",
PROGUARD_EXPORT_PATH = "proguard_out.jar",
TEMP_LIBRARY_DIR = "tempLibraries/",
ARTIFACT_STANDARD = "%s-%s.jar",
ARTIFACT_UNOPTIMIZED = "%s-unoptimized-%s.jar",
ARTIFACT_API = "%s-api-%s.jar",
ARTIFACT_STANDALONE = "%s-standalone-%s.jar",
ARTIFACT_FORGE_API = "%s-api-forge-%s.jar",
ARTIFACT_FORGE_STANDALONE = "%s-standalone-forge-%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",
ARTIFACT_FORGE_UNOPTIMIZED = "%s-unoptimized-forge-%s.jar",
ARTIFACT_FORGE_API = "%s-api-forge-%s.jar",
ARTIFACT_FORGE_STANDALONE = "%s-standalone-forge-%s.jar",
ARTIFACT_FABRIC_UNOPTIMIZED = "%s-unoptimized-fabric-%s.jar",
ARTIFACT_FABRIC_API = "%s-api-fabric-%s.jar",
ARTIFACT_FABRIC_STANDALONE = "%s-standalone-fabric-%s.jar";
protected String artifactName, artifactVersion;
protected Path artifactPath, artifactUnoptimizedPath, artifactApiPath, artifactStandalonePath, artifactForgeApiPath, artifactForgeStandalonePath, proguardOut;
protected final Path
artifactPath,
artifactUnoptimizedPath, artifactApiPath, artifactStandalonePath, // these are different for forge builds
proguardOut;
protected void verifyArtifacts() throws IllegalStateException {
public BaritoneGradleTask() {
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));
this.artifactForgeApiPath = this.getBuildFile(formatVersion(ARTIFACT_FORGE_API));
this.artifactForgeStandalonePath = this.getBuildFile(formatVersion(ARTIFACT_FORGE_STANDALONE));
this.artifactPath = this.getBuildFile(formatVersion(ARTIFACT_STANDARD));
if (getProject().hasProperty("baritone.forge_build")) {
this.artifactUnoptimizedPath = this.getBuildFile(formatVersion(ARTIFACT_FORGE_UNOPTIMIZED));
this.artifactApiPath = this.getBuildFile(formatVersion(ARTIFACT_FORGE_API));
this.artifactStandalonePath = this.getBuildFile(formatVersion(ARTIFACT_FORGE_STANDALONE));
} else if (getProject().hasProperty("baritone.fabric_build")) {
this.artifactUnoptimizedPath = this.getBuildFile(formatVersion(ARTIFACT_FABRIC_UNOPTIMIZED));
this.artifactApiPath = this.getBuildFile(formatVersion(ARTIFACT_FABRIC_API));
this.artifactStandalonePath = this.getBuildFile(formatVersion(ARTIFACT_FABRIC_STANDALONE));
} else {
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);
}
@@ -85,7 +99,7 @@ class BaritoneGradleTask extends DefaultTask {
}
protected Path getRelativeFile(String file) {
return Paths.get(new File(file).getAbsolutePath());
return Paths.get(new File(new File(getProject().getBuildDir(), "../"), file).getAbsolutePath());
}
protected Path getTemporaryFile(String file) {

View File

@@ -19,13 +19,13 @@ 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.Path;
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;
@@ -42,11 +42,9 @@ public class CreateDistTask extends BaritoneGradleTask {
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 forgeApi = getRelativeFile("dist/" + formatVersion(ARTIFACT_FORGE_API));
Path forgeStandalone = getRelativeFile("dist/" + formatVersion(ARTIFACT_FORGE_STANDALONE));
Path api = getRelativeFile("dist/" + getFileName(artifactApiPath));
Path standalone = getRelativeFile("dist/" + getFileName(artifactStandalonePath));
Path unoptimized = getRelativeFile("dist/" + getFileName(artifactUnoptimizedPath));
// NIO will not automatically create directories
Path dir = getRelativeFile("dist/");
@@ -55,14 +53,14 @@ public class CreateDistTask extends BaritoneGradleTask {
}
// 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);
Files.copy(this.artifactForgeApiPath, forgeApi, REPLACE_EXISTING);
Files.copy(this.artifactForgeStandalonePath, forgeStandalone, 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, forgeApi, standalone, forgeStandalone, unoptimized)
List<String> shasum = getAllDistJars().stream()
.filter(Files::exists)
.map(path -> sha1(path) + " " + path.getFileName().toString())
.collect(Collectors.toList());
@@ -72,15 +70,45 @@ public class CreateDistTask extends BaritoneGradleTask {
Files.write(getRelativeFile("dist/checksums.txt"), shasum);
}
private static String getFileName(Path p) {
return p.getFileName().toString();
}
private List<Path> getAllDistJars() {
return Arrays.asList(
getRelativeFile("dist/" + formatVersion(ARTIFACT_API)),
getRelativeFile("dist/" + formatVersion(ARTIFACT_FABRIC_API)),
getRelativeFile("dist/" + formatVersion(ARTIFACT_FORGE_API)),
getRelativeFile("dist/" + formatVersion(ARTIFACT_STANDALONE)),
getRelativeFile("dist/" + formatVersion(ARTIFACT_FABRIC_STANDALONE)),
getRelativeFile("dist/" + formatVersion(ARTIFACT_FORGE_STANDALONE)),
getRelativeFile("dist/" + formatVersion(ARTIFACT_UNOPTIMIZED)),
getRelativeFile("dist/" + formatVersion(ARTIFACT_FABRIC_UNOPTIMIZED)),
getRelativeFile("dist/" + formatVersion(ARTIFACT_FORGE_UNOPTIMIZED))
);
}
private static synchronized String sha1(Path path) {
try {
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,26 +18,22 @@
package baritone.gradle.task;
import baritone.gradle.util.Determinizer;
import baritone.gradle.util.MappingType;
import baritone.gradle.util.ReobfWrapper;
import org.apache.commons.io.IOUtils;
import org.gradle.api.NamedDomainObjectContainer;
import org.gradle.api.artifacts.Configuration;
import org.gradle.api.artifacts.Dependency;
import org.gradle.api.internal.plugins.DefaultConvention;
import org.gradle.api.plugins.JavaPluginConvention;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.TaskAction;
import org.gradle.internal.Pair;
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 java.io.*;
import java.lang.reflect.Field;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
@@ -49,39 +45,78 @@ import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
*/
public class ProguardTask extends BaritoneGradleTask {
private static final Pattern TEMP_LIBRARY_PATTERN = Pattern.compile("-libraryjars 'tempLibraries\\/([a-zA-Z0-9/_\\-\\.]+)\\.jar'");
@Input
private String url;
public String getUrl() {
return url;
}
@Input
private String extract;
private List<String> requiredLibraries;
public String getExtract() {
return extract;
}
private File mixin;
@Input
private String compType;
public String getCompType() {
return compType;
}
private final File copyMcTargetDir = new File("./build/createMcIntermediaryJar").getAbsoluteFile();
private final File copyMcTargetJar = new File(copyMcTargetDir, "client.jar");
@TaskAction
protected void exec() throws Exception {
super.verifyArtifacts();
copyMcJar();
// "Haha brady why don't you make separate tasks"
processArtifact();
downloadProguard();
extractProguard();
generateConfigs();
acquireDependencies();
proguardApi();
proguardStandalone();
cleanup();
}
private boolean isMcJar(File f) {
return f.getName().startsWith(compType.equals("FORGE") ? "forge-" : "minecraft-") && f.getName().contains("minecraft-mapped");
}
private void copyMcJar() throws IOException {
File mcClientJar = this.getProject().getConvention().getPlugin(JavaPluginConvention.class).getSourceSets().findByName("launch").getRuntimeClasspath().getFiles()
.stream()
.filter(this::isMcJar)
.map(f -> {
switch (compType) {
case "OFFICIAL":
return new File(f.getParentFile().getParentFile(), "minecraft-merged.jar");
case "FABRIC":
return new File(f.getParentFile(), "minecraft-intermediary.jar");
case "FORGE":
return new File(f.getParentFile(), "minecraft-srg.jar");
}
return null;
})
.findFirst()
.get();
if (!mcClientJar.exists()) throw new IOException("Failed to find minecraft! " + mcClientJar.getAbsolutePath());
if (!copyMcTargetDir.exists() && !copyMcTargetDir.mkdirs()) throw new IOException("Failed to create target for copyMcJar");
Files.copy(mcClientJar.toPath(), copyMcTargetJar.toPath(), REPLACE_EXISTING);
}
private void processArtifact() throws Exception {
if (Files.exists(this.artifactUnoptimizedPath)) {
Files.delete(this.artifactUnoptimizedPath);
}
Determinizer.determinize(this.artifactPath.toString(), this.artifactUnoptimizedPath.toString(), Optional.empty());
Determinizer.determinize(this.artifactPath.toString(), this.artifactUnoptimizedPath.toString());
}
private void downloadProguard() throws Exception {
@@ -101,18 +136,128 @@ public class ProguardTask extends BaritoneGradleTask {
}
}
private String getJavaBinPathForProguard() throws Exception {
String path;
try {
path = findJavaPathByGradleConfig();
if (path != null) return path;
}
catch (Exception ex) {
System.err.println("Unable to find java by javaCompile options");
ex.printStackTrace();
}
try {
path = findJavaByJavaHome();
if (path != null) return path;
}
catch(Exception ex) {
System.err.println("Unable to find java by JAVA_HOME");
ex.printStackTrace();
}
path = findJavaByGradleCurrentRuntime();
if (path != null) return path;
throw new Exception("Unable to find java to determine ProGuard libraryjars. Please specify forkOptions.executable in javaCompile," +
" JAVA_HOME environment variable, or make sure to run Gradle with the correct JDK (a v1.8 only)");
}
private String findJavaByGradleCurrentRuntime() {
String path = Jvm.current().getJavaExecutable().getAbsolutePath();
if (this.validateJavaVersion(path)) {
System.out.println("Using Gradle's runtime Java for ProGuard");
return path;
}
return null;
}
private String findJavaByJavaHome() {
final String javaHomeEnv = System.getenv("JAVA_HOME");
if (javaHomeEnv != null) {
String path = Jvm.forHome(new File(javaHomeEnv)).getJavaExecutable().getAbsolutePath();
if (this.validateJavaVersion(path)) {
System.out.println("Detected Java path by JAVA_HOME");
return path;
}
}
return null;
}
private String findJavaPathByGradleConfig() {
final TaskCollection<JavaCompile> javaCompiles = super.getProject().getTasks().withType(JavaCompile.class);
final JavaCompile compileTask = javaCompiles.iterator().next();
final ForkOptions forkOptions = compileTask.getOptions().getForkOptions();
if (forkOptions != null) {
String javacPath = forkOptions.getExecutable();
if (javacPath != null) {
File javacFile = new File(javacPath);
if (javacFile.exists()) {
File[] maybeJava = javacFile.getParentFile().listFiles(new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
return name.equals("java");
}
});
if (maybeJava != null && maybeJava.length > 0) {
String path = maybeJava[0].getAbsolutePath();
if (this.validateJavaVersion(path)) {
System.out.println("Detected Java path by forkOptions");
return path;
}
}
}
}
}
return null;
}
private boolean validateJavaVersion(String java) {
//TODO: fix for j16
// final JavaVersion javaVersion = new DefaultJvmVersionDetector(new DefaultExecActionFactory(new IdentityFileResolver())).getJavaVersion(java);
//
// if (!javaVersion.getMajorVersion().equals("8")) {
// System.out.println("Failed to validate Java version " + javaVersion.toString() + " [" + java + "] for ProGuard libraryjars");
// // throw new RuntimeException("Java version incorrect: " + javaVersion.getMajorVersion() + " for " + java);
// return false;
// }
//
// System.out.println("Validated Java version " + javaVersion.toString() + " [" + java + "] for ProGuard libraryjars");
return true;
}
private void generateConfigs() throws Exception {
Files.copy(getRelativeFile(PROGUARD_CONFIG_TEMPLATE), getTemporaryFile(PROGUARD_CONFIG_DEST), 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)");
{
final Stream<File> libraries;
{
// 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) ? copyMcTargetJar : f);
}
libraries.forEach(f -> {
template.add(2, "-libraryjars '" + f + "'");
});
}
// API config doesn't require any changes from the changes that we made to the template
Files.write(getTemporaryFile(PROGUARD_API_CONFIG), template);
@@ -121,165 +266,26 @@ public class ProguardTask extends BaritoneGradleTask {
List<String> standalone = new ArrayList<>(template);
standalone.removeIf(s -> s.contains("# this is the keep api"));
Files.write(getTemporaryFile(PROGUARD_STANDALONE_CONFIG), standalone);
// Discover all of the libraries that we will need to acquire from gradle
this.requiredLibraries = new ArrayList<>();
template.forEach(line -> {
if (!line.startsWith("#")) {
Matcher m = TEMP_LIBRARY_PATTERN.matcher(line);
if (m.find()) {
this.requiredLibraries.add(m.group(1));
}
}
});
}
private void acquireDependencies() throws Exception {
// Create a map of all of the dependencies that we are able to access in this project
// Likely a better way to do this, I just pair the dependency with the first valid configuration
Map<String, Pair<Configuration, Dependency>> dependencyLookupMap = new HashMap<>();
getProject().getConfigurations().stream().filter(Configuration::isCanBeResolved).forEach(config ->
config.getAllDependencies().forEach(dependency ->
dependencyLookupMap.putIfAbsent(dependency.getName() + "-" + dependency.getVersion(), Pair.of(config, dependency))));
// Create the directory if it doesn't already exist
Path tempLibraries = getTemporaryFile(TEMP_LIBRARY_DIR);
if (!Files.exists(tempLibraries)) {
Files.createDirectory(tempLibraries);
}
// Iterate the required libraries to copy them to tempLibraries
for (String lib : this.requiredLibraries) {
// copy from the forgegradle cache
if (lib.equals("minecraft")) {
Path cachedJar = getMinecraftJar();
Path inTempDir = getTemporaryFile("tempLibraries/minecraft.jar");
// TODO: maybe try not to copy every time
Files.copy(cachedJar, inTempDir, REPLACE_EXISTING);
continue;
}
// Find a configuration/dependency pair that matches the desired library
Pair<Configuration, Dependency> pair = null;
for (Map.Entry<String, Pair<Configuration, Dependency>> entry : dependencyLookupMap.entrySet()) {
if (entry.getKey().startsWith(lib)) {
pair = entry.getValue();
}
}
// The pair must be non-null
Objects.requireNonNull(pair);
// Find the library jar file, and copy it to tempLibraries
for (File file : pair.getLeft().files(pair.getRight())) {
if (file.getName().startsWith(lib)) {
if (lib.contains("mixin")) {
mixin = file;
}
Files.copy(file.toPath(), getTemporaryFile("tempLibraries/" + lib + ".jar"), REPLACE_EXISTING);
}
}
}
if (mixin == null) {
throw new IllegalStateException("Unable to find mixin jar");
}
private File getSrgMcJar() {
return getProject().getTasks().findByName("copyMcJar").getOutputs().getFiles().getSingleFile();
}
// a bunch of epic stuff to get the path to the cached jar
private Path getMinecraftJar() throws Exception {
MappingType mappingType;
try {
mappingType = getMappingType();
} catch (Exception e) {
System.err.println("Failed to get mapping type, assuming NOTCH.");
mappingType = MappingType.NOTCH;
}
String suffix;
switch (mappingType) {
case NOTCH:
suffix = "";
break;
case SEARGE:
suffix = "-srgBin";
break;
case CUSTOM:
throw new IllegalStateException("Custom mappings not supported!");
default:
throw new IllegalStateException("Unknown mapping type: " + mappingType);
}
DefaultConvention convention = (DefaultConvention) this.getProject().getConvention();
Object extension = convention.getAsMap().get("minecraft");
Objects.requireNonNull(extension);
// for some reason cant use Class.forName
Class<?> class_baseExtension = extension.getClass().getSuperclass().getSuperclass().getSuperclass(); // <-- cursed
Field f_replacer = class_baseExtension.getDeclaredField("replacer");
f_replacer.setAccessible(true);
Object replacer = f_replacer.get(extension);
Class<?> class_replacementProvider = replacer.getClass();
Field replacement_replaceMap = class_replacementProvider.getDeclaredField("replaceMap");
replacement_replaceMap.setAccessible(true);
Map<String, Object> replacements = (Map) replacement_replaceMap.get(replacer);
String cacheDir = replacements.get("CACHE_DIR").toString() + "/net/minecraft";
String mcVersion = replacements.get("MC_VERSION").toString();
String mcpInsert = replacements.get("MAPPING_CHANNEL").toString() + "/" + replacements.get("MAPPING_VERSION").toString();
String fullJarName = "minecraft-" + mcVersion + suffix + ".jar";
String baseDir = String.format("%s/minecraft/%s/", cacheDir, mcVersion);
String jarPath;
if (mappingType == MappingType.SEARGE) {
jarPath = String.format("%s/%s/%s", baseDir, mcpInsert, fullJarName);
} else {
jarPath = baseDir + fullJarName;
}
jarPath = jarPath
.replace("/", File.separator)
.replace("\\", File.separator); // hecking regex
return new File(jarPath).toPath();
}
// throws IllegalStateException if mapping type is ambiguous or it fails to find it
private MappingType getMappingType() {
// if it fails to find this then its probably a forgegradle version problem
Set<Object> reobf = (NamedDomainObjectContainer<Object>) this.getProject().getExtensions().getByName("reobf");
List<MappingType> mappingTypes = getUsedMappingTypes(reobf);
long mappingTypesUsed = mappingTypes.size();
if (mappingTypesUsed == 0) {
throw new IllegalStateException("Failed to find mapping type (no jar task?)");
}
if (mappingTypesUsed > 1) {
throw new IllegalStateException("Ambiguous mapping type (multiple jars with different mapping types?)");
}
return mappingTypes.get(0);
}
private List<MappingType> getUsedMappingTypes(Set<Object> reobf) {
return reobf.stream()
.map(ReobfWrapper::new)
.map(ReobfWrapper::getMappingType)
.distinct()
.collect(Collectors.toList());
private Stream<File> acquireDependencies() {
return getProject().getConvention().getPlugin(JavaPluginConvention.class).getSourceSets().findByName("launch").getRuntimeClasspath().getFiles()
.stream()
.filter(File::isFile);
}
private void proguardApi() throws Exception {
runProguard(getTemporaryFile(PROGUARD_API_CONFIG));
Determinizer.determinize(this.proguardOut.toString(), this.artifactApiPath.toString(), Optional.empty());
Determinizer.determinize(this.proguardOut.toString(), this.artifactForgeApiPath.toString(), Optional.of(mixin));
Determinizer.determinize(this.proguardOut.toString(), this.artifactApiPath.toString());
}
private void proguardStandalone() throws Exception {
runProguard(getTemporaryFile(PROGUARD_STANDALONE_CONFIG));
Determinizer.determinize(this.proguardOut.toString(), this.artifactStandalonePath.toString(), Optional.empty());
Determinizer.determinize(this.proguardOut.toString(), this.artifactForgeStandalonePath.toString(), Optional.of(mixin));
Determinizer.determinize(this.proguardOut.toString(), this.artifactStandalonePath.toString());
}
private void cleanup() {
@@ -296,15 +302,25 @@ public class ProguardTask extends BaritoneGradleTask {
this.extract = extract;
}
public void setCompType(String compType) {
this.compType = compType;
}
private void runProguard(Path config) throws Exception {
// Delete the existing proguard output file. Proguard probably handles this already, but why not do it ourselves
if (Files.exists(this.proguardOut)) {
Files.delete(this.proguardOut);
}
Path proguardJar = getTemporaryFile(PROGUARD_JAR);
// Make paths relative to work directory; fixes spaces in path to config, @"" doesn't work
Path workingDirectory = getTemporaryFile("");
Path proguardJar = workingDirectory.relativize(getTemporaryFile(PROGUARD_JAR));
config = workingDirectory.relativize(config);
// Honestly, if you still have spaces in your path at this point, you're SOL.
Process p = new ProcessBuilder("java", "-jar", proguardJar.toString(), "@" + config.toString())
.directory(getTemporaryFile("").toFile()) // Set the working directory to the temporary folder]
.directory(workingDirectory.toFile()) // Set the working directory to the temporary folder]
.start();
// We can't do output inherit process I/O with gradle for some reason and have it work, so we have to do this

View File

@@ -22,7 +22,10 @@ import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.jar.JarOutputStream;
@@ -36,7 +39,7 @@ import java.util.stream.Collectors;
*/
public class Determinizer {
public static void determinize(String inputPath, String outputPath, Optional<File> toInclude) throws IOException {
public static void determinize(String inputPath, String outputPath) throws IOException {
System.out.println("Running Determinizer");
System.out.println(" Input path: " + inputPath);
System.out.println(" Output path: " + outputPath);
@@ -63,30 +66,10 @@ public class Determinizer {
if (entry.getName().endsWith(".refmap.json")) {
JsonObject object = new JsonParser().parse(new InputStreamReader(jarFile.getInputStream(entry))).getAsJsonObject();
jos.write(writeSorted(object).getBytes());
} else if (entry.getName().equals("META-INF/MANIFEST.MF") && toInclude.isPresent()) { // 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.BaritoneTweaker")) {
throw new IllegalStateException("unable to replace");
}
manifest = manifest.replace("baritone.launch.BaritoneTweaker", "org.spongepowered.asm.launch.MixinTweaker");
jos.write(manifest.getBytes());
} else {
copy(jarFile.getInputStream(entry), jos);
}
}
if (toInclude.isPresent()) {
try (JarFile mixin = new JarFile(toInclude.get())) {
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();
}
}

View File

@@ -1,63 +0,0 @@
/*
* 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.gradle.util;
import java.lang.reflect.Field;
import java.util.Objects;
/**
* All credits go to AsmLibGradle and its contributors.
*
* @see <a href="https://github.com/pozzed/AsmLibGradle/blob/8f917dbc3939eab7a3d9daf54d9d285fdf34f4b2/src/main/java/net/futureclient/asmlib/forgegradle/ReobfWrapper.java">Original Source</a>
*/
public class ReobfWrapper {
private final Object instance;
private final Class<?> type;
public ReobfWrapper(Object instance) {
this.instance = instance;
Objects.requireNonNull(instance);
this.type = instance.getClass();
}
public String getName() {
try {
Field nameField = type.getDeclaredField("name");
nameField.setAccessible(true);
return (String) nameField.get(this.instance);
} catch (ReflectiveOperationException ex) {
throw new IllegalStateException(ex);
}
}
public MappingType getMappingType() {
try {
Field enumField = type.getDeclaredField("mappingType");
enumField.setAccessible(true);
Enum<?> aEnum = (Enum<?>) enumField.get(this.instance);
MappingType mappingType = MappingType.values()[aEnum.ordinal()];
if (!aEnum.name().equals(mappingType.name())) {
throw new IllegalStateException("ForgeGradle ReobfMappingType is not equivalent to MappingType (version error?)");
}
return mappingType;
} catch (ReflectiveOperationException ex) {
throw new IllegalStateException(ex);
}
}
}

13
gradle.properties Normal file
View File

@@ -0,0 +1,13 @@
org.gradle.jvmargs=-Xmx2048M
mod_version=1.8.4
maven_group=baritone
archives_base_name=baritone
minecraft_version=1.18.2
forge_version=1.18.2-40.0.0
fabric_version=0.13.1
# # un comment for forge debugging default (as opposed to fabric)
# baritone.forge_build=true
# loom.platform=forge

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
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

53
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"
@@ -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" "$@"

173
gradlew.bat vendored
View File

@@ -1,84 +1,89 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@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=
@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
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
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%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
@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
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
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="-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 execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
: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 %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

124
scripts/proguard.pro vendored
View File

@@ -1,5 +1,6 @@
-keepattributes Signature
-keepattributes *Annotation*
-keepattributes InnerClasses
-optimizationpasses 5
-verbose
@@ -13,16 +14,28 @@
-repackageclasses 'baritone'
# lwjgl is weird
-dontwarn org.lwjgl.opengl.GL14
-dontwarn org.lwjgl.**
# also lwjgl lol
-dontwarn module-info
# we dont have forge
-dontwarn baritone.launch.BaritoneForgeModXD
# please do not change the comment below
-keep class baritone.api.** { *; } # this is the keep api
# service provider needs these class names
-keep class baritone.BaritoneProvider
-keep class baritone.api.IBaritoneProvider
# hack
-keep class baritone.utils.ExampleBaritoneControl { *; } # have to include this string to remove this keep in the standalone build: # this is the keep api
-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 {
@@ -32,55 +45,12 @@
# need to keep mixin names
-keep class baritone.launch.** { *; }
# copy all necessary libraries into tempLibraries to build
# The correct jar will be copied from the forgegradle cache based on the mapping type being compiled with
-libraryjars 'tempLibraries/minecraft.jar'
-libraryjars 'tempLibraries/SimpleTweaker-1.2.jar'
-libraryjars 'tempLibraries/authlib-1.5.25.jar'
-libraryjars 'tempLibraries/codecjorbis-20101023.jar'
-libraryjars 'tempLibraries/codecwav-20101023.jar'
-libraryjars 'tempLibraries/commons-codec-1.10.jar'
-libraryjars 'tempLibraries/commons-compress-1.8.1.jar'
-libraryjars 'tempLibraries/commons-io-2.5.jar'
-libraryjars 'tempLibraries/commons-lang3-3.5.jar'
-libraryjars 'tempLibraries/commons-logging-1.1.3.jar'
-libraryjars 'tempLibraries/fastutil-7.1.0.jar'
-libraryjars 'tempLibraries/gson-2.8.0.jar'
-libraryjars 'tempLibraries/guava-21.0.jar'
-libraryjars 'tempLibraries/httpclient-4.3.3.jar'
-libraryjars 'tempLibraries/httpcore-4.3.2.jar'
-libraryjars 'tempLibraries/icu4j-core-mojang-51.2.jar'
-libraryjars 'tempLibraries/jinput-2.0.5.jar'
-libraryjars 'tempLibraries/jna-4.4.0.jar'
-libraryjars 'tempLibraries/jopt-simple-5.0.3.jar'
-libraryjars 'tempLibraries/jsr305-3.0.1.jar'
-libraryjars 'tempLibraries/jutils-1.0.0.jar'
-libraryjars 'tempLibraries/libraryjavasound-20101123.jar'
-libraryjars 'tempLibraries/librarylwjglopenal-20100824.jar'
-libraryjars 'tempLibraries/log4j-api-2.8.1.jar'
-libraryjars 'tempLibraries/log4j-core-2.8.1.jar'
# startsWith is used to check the library, and mac/linux differ in which version they use
# this is FINE
-libraryjars 'tempLibraries/lwjgl-.jar'
-libraryjars 'tempLibraries/lwjgl_util-.jar'
-libraryjars 'tempLibraries/netty-all-4.1.9.Final.jar'
-libraryjars 'tempLibraries/oshi-core-1.1.jar'
-libraryjars 'tempLibraries/patchy-1.1.jar'
-libraryjars 'tempLibraries/platform-3.4.0.jar'
-libraryjars 'tempLibraries/realms-1.10.22.jar'
-libraryjars 'tempLibraries/soundsystem-20120107.jar'
-libraryjars 'tempLibraries/text2speech-1.10.3.jar'
-libraryjars 'tempLibraries/mixin-0.7.11-SNAPSHOT.jar'
-libraryjars 'tempLibraries/launchwrapper-1.11.jar' # TODO why does only 1.11.jar exist?
#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.**
# Keep - Applications. Keep all application classes, along with their 'main'
# methods.
@@ -177,19 +147,19 @@
-assumenosideeffects public class java.lang.* extends java.lang.Number {
public static java.lang.String toString(byte);
public static java.lang.Byte valueOf(byte);
public static byte parseByte(java.lang.String);
public static byte parseByte(java.lang.String,int);
public static java.lang.Byte valueOf(java.lang.String,int);
public static java.lang.Byte valueOf(java.lang.String);
public static java.lang.Byte decode(java.lang.String);
# public static byte parseByte(java.lang.String);
# public static byte parseByte(java.lang.String,int);
# public static java.lang.Byte valueOf(java.lang.String,int);
# public static java.lang.Byte valueOf(java.lang.String);
# public static java.lang.Byte decode(java.lang.String);
public int compareTo(java.lang.Byte);
public static java.lang.String toString(short);
public static short parseShort(java.lang.String);
public static short parseShort(java.lang.String,int);
public static java.lang.Short valueOf(java.lang.String,int);
public static java.lang.Short valueOf(java.lang.String);
# public static short parseShort(java.lang.String);
# public static short parseShort(java.lang.String,int);
# public static java.lang.Short valueOf(java.lang.String,int);
# public static java.lang.Short valueOf(java.lang.String);
public static java.lang.Short valueOf(short);
public static java.lang.Short decode(java.lang.String);
# public static java.lang.Short decode(java.lang.String);
public static short reverseBytes(short);
public int compareTo(java.lang.Short);
public static java.lang.String toString(int,int);
@@ -197,10 +167,10 @@
public static java.lang.String toOctalString(int);
public static java.lang.String toBinaryString(int);
public static java.lang.String toString(int);
public static int parseInt(java.lang.String,int);
public static int parseInt(java.lang.String);
public static java.lang.Integer valueOf(java.lang.String,int);
public static java.lang.Integer valueOf(java.lang.String);
# public static int parseInt(java.lang.String,int);
# public static int parseInt(java.lang.String);
# public static java.lang.Integer valueOf(java.lang.String,int);
# public static java.lang.Integer valueOf(java.lang.String);
public static java.lang.Integer valueOf(int);
public static java.lang.Integer getInteger(java.lang.String);
public static java.lang.Integer getInteger(java.lang.String,int);
@@ -222,12 +192,12 @@
public static java.lang.String toOctalString(long);
public static java.lang.String toBinaryString(long);
public static java.lang.String toString(long);
public static long parseLong(java.lang.String,int);
public static long parseLong(java.lang.String);
public static java.lang.Long valueOf(java.lang.String,int);
public static java.lang.Long valueOf(java.lang.String);
# public static long parseLong(java.lang.String,int);
# public static long parseLong(java.lang.String);
# public static java.lang.Long valueOf(java.lang.String,int);
# public static java.lang.Long valueOf(java.lang.String);
public static java.lang.Long valueOf(long);
public static java.lang.Long decode(java.lang.String);
# public static java.lang.Long decode(java.lang.String);
public static java.lang.Long getLong(java.lang.String);
public static java.lang.Long getLong(java.lang.String,long);
public static java.lang.Long getLong(java.lang.String,java.lang.Long);
@@ -244,9 +214,9 @@
public int compareTo(java.lang.Long);
public static java.lang.String toString(float);
public static java.lang.String toHexString(float);
public static java.lang.Float valueOf(java.lang.String);
# public static java.lang.Float valueOf(java.lang.String);
public static java.lang.Float valueOf(float);
public static float parseFloat(java.lang.String);
# public static float parseFloat(java.lang.String);
public static boolean isNaN(float);
public static boolean isInfinite(float);
public static int floatToIntBits(float);
@@ -258,9 +228,9 @@
public int compareTo(java.lang.Float);
public static java.lang.String toString(double);
public static java.lang.String toHexString(double);
public static java.lang.Double valueOf(java.lang.String);
public static java.lang.Double valueOf(double);
public static double parseDouble(java.lang.String);
# public static java.lang.Double valueOf(java.lang.String);
# public static java.lang.Double valueOf(double);
# public static double parseDouble(java.lang.String);
public static boolean isNaN(double);
public static boolean isInfinite(double);
public static long doubleToLongBits(double);
@@ -370,3 +340,5 @@
public java.lang.String substring(int);
public java.lang.String substring(int,int);
}
-printmapping mapping.txt

Binary file not shown.

View File

@@ -1,19 +1,42 @@
/*
* 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/>.
*/
rootProject.name = 'baritone'
/*
* 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/>.
*/
pluginManagement {
repositories {
maven { url "https://maven.architectury.dev/" }
maven {
url = 'https://maven.fabricmc.net/'
}
maven {
name = 'forge'
url = 'https://files.minecraftforge.net/maven'
}
maven {
name = 'impactdevelopment-repo'
url = 'https://impactdevelopment.github.io/maven/'
}
maven {
url = 'https://www.dogforce-games.com/maven/'
}
maven {
url = 'https://libraries.minecraft.net/'
}
mavenCentral()
}
}
rootProject.name = 'baritone'

View File

@@ -19,13 +19,8 @@ package baritone.api;
import baritone.api.utils.SettingsUtil;
import java.util.Iterator;
import java.util.ServiceLoader;
/**
* API exposure for various things implemented in Baritone.
* <p>
* W.I.P
* Exposes the {@link IBaritoneProvider} instance and the {@link Settings} instance for API usage.
*
* @author Brady
* @since 9/23/2018
@@ -36,12 +31,14 @@ public final class BaritoneAPI {
private static final Settings settings;
static {
ServiceLoader<IBaritoneProvider> baritoneLoader = ServiceLoader.load(IBaritoneProvider.class);
Iterator<IBaritoneProvider> instances = baritoneLoader.iterator();
provider = instances.next();
settings = new Settings();
SettingsUtil.readAndApply(settings);
try {
provider = (IBaritoneProvider) Class.forName("baritone.BaritoneProvider").newInstance();
} catch (ReflectiveOperationException ex) {
throw new RuntimeException(ex);
}
}
public static IBaritoneProvider getProvider() {

View File

@@ -20,12 +20,11 @@ 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.ICustomGoalProcess;
import baritone.api.process.IFollowProcess;
import baritone.api.process.IGetToBlockProcess;
import baritone.api.process.IMineProcess;
import baritone.api.process.*;
import baritone.api.selection.ISelectionManager;
import baritone.api.utils.IInputOverrideHandler;
import baritone.api.utils.IPlayerContext;
@@ -36,10 +35,10 @@ import baritone.api.utils.IPlayerContext;
public interface IBaritone {
/**
* @return The {@link IFollowProcess} instance
* @see IFollowProcess
* @return The {@link IPathingBehavior} instance
* @see IPathingBehavior
*/
IFollowProcess getFollowProcess();
IPathingBehavior getPathingBehavior();
/**
* @return The {@link ILookBehavior} instance
@@ -47,6 +46,12 @@ public interface IBaritone {
*/
ILookBehavior getLookBehavior();
/**
* @return The {@link IFollowProcess} instance
* @see IFollowProcess
*/
IFollowProcess getFollowProcess();
/**
* @return The {@link IMineProcess} instance
* @see IMineProcess
@@ -54,10 +59,34 @@ public interface IBaritone {
IMineProcess getMineProcess();
/**
* @return The {@link IPathingBehavior} instance
* @see IPathingBehavior
* @return The {@link IBuilderProcess} instance
* @see IBuilderProcess
*/
IPathingBehavior getPathingBehavior();
IBuilderProcess getBuilderProcess();
/**
* @return The {@link IExploreProcess} instance
* @see IExploreProcess
*/
IExploreProcess getExploreProcess();
/**
* @return The {@link IFarmProcess} instance
* @see IFarmProcess
*/
IFarmProcess getFarmProcess();
/**
* @return The {@link ICustomGoalProcess} instance
* @see ICustomGoalProcess
*/
ICustomGoalProcess getCustomGoalProcess();
/**
* @return The {@link IGetToBlockProcess} instance
* @see IGetToBlockProcess
*/
IGetToBlockProcess getGetToBlockProcess();
/**
* @return The {@link IWorldProvider} instance
@@ -65,15 +94,47 @@ public interface IBaritone {
*/
IWorldProvider getWorldProvider();
/**
* Returns the {@link IPathingControlManager} for this {@link IBaritone} instance, which is responsible
* for managing the {@link IBaritoneProcess}es which control the {@link IPathingBehavior} state.
*
* @return The {@link IPathingControlManager} instance
* @see IPathingControlManager
*/
IPathingControlManager getPathingControlManager();
/**
* @return The {@link IInputOverrideHandler} instance
* @see IInputOverrideHandler
*/
IInputOverrideHandler getInputOverrideHandler();
ICustomGoalProcess getCustomGoalProcess();
IGetToBlockProcess getGetToBlockProcess();
/**
* @return The {@link IPlayerContext} instance
* @see IPlayerContext
*/
IPlayerContext getPlayerContext();
/**
* @return The {@link IEventBus} instance
* @see IEventBus
*/
IEventBus getGameEventHandler();
/**
* @return The {@link ISelectionManager} instance
* @see ISelectionManager
*/
ISelectionManager getSelectionManager();
/**
* @return The {@link ICommandManager} instance
* @see ICommandManager
*/
ICommandManager getCommandManager();
/**
* Open click
*/
void openClick();
}

View File

@@ -18,12 +18,17 @@
package baritone.api;
import baritone.api.cache.IWorldScanner;
import net.minecraft.client.entity.EntityPlayerSP;
import baritone.api.command.ICommand;
import baritone.api.command.ICommandSystem;
import baritone.api.schematic.ISchematicSystem;
import java.util.List;
import java.util.Objects;
import net.minecraft.client.player.LocalPlayer;
/**
* @author Leijurv
* Provides the present {@link IBaritone} instances, as well as non-baritone instance related APIs.
*
* @author leijurv
*/
public interface IBaritoneProvider {
@@ -41,24 +46,25 @@ 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 {@code #getBaritoneForUser(IBaritoneUser)} when {@code bot-system} is merged.
* Provides the {@link IBaritone} instance for a given {@link LocalPlayer}. This will likely be
* replaced with or be overloaded in addition to {@code #getBaritoneForUser(IBaritoneUser)} when
* {@code bot-system} is merged into {@code master}.
*
* @param player The player
* @return The {@link IBaritone} instance.
*/
default IBaritone getBaritoneForPlayer(EntityPlayerSP player) {
default IBaritone getBaritoneForPlayer(LocalPlayer player) {
for (IBaritone baritone : getAllBaritones()) {
if (player.equals(baritone.getPlayerContext().player())) {
if (Objects.equals(player, baritone.getPlayerContext().player())) {
return baritone;
}
}
throw new IllegalStateException("No baritone for player " + player);
return null;
}
/**
@@ -68,4 +74,17 @@ public interface IBaritoneProvider {
* @return The {@link IWorldScanner} instance.
*/
IWorldScanner getWorldScanner();
/**
* Returns the {@link ICommandSystem} instance. This is not bound to a specific {@link IBaritone}
* instance because {@link ICommandSystem} itself controls global behavior for {@link ICommand}s.
*
* @return The {@link ICommandSystem} instance.
*/
ICommandSystem getCommandSystem();
/**
* @return The {@link ISchematicSystem} instance.
*/
ISchematicSystem getSchematicSystem();
}

File diff suppressed because it is too large Load Diff

View File

@@ -18,9 +18,13 @@
package baritone.api.behavior;
import baritone.api.event.listener.AbstractGameEventListener;
import baritone.api.event.listener.IGameEventListener;
/**
* A behavior is simply a type that is able to listen to events.
*
* @author Brady
* @see IGameEventListener
* @since 9/23/2018
*/
public interface IBehavior extends AbstractGameEventListener {}

View File

@@ -58,15 +58,32 @@ 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
*/
Goal getGoal();
/**
* @return Whether or not a path is currently being executed.
* @return Whether or not a path is currently being executed. This will be false if there's currently a pause.
* @see #hasPath()
*/
default boolean isPathing() {
boolean isPathing();
/**
* @return If there is a current path. Note that the path is not necessarily being executed, for example when there
* is a pause in effect.
* @see #isPathing()
*/
default boolean hasPath() {
return getCurrent() != null;
}
@@ -80,6 +97,13 @@ public interface IPathingBehavior extends IBehavior {
*/
boolean cancelEverything();
/**
* PLEASE never call this
* <p>
* If cancelEverything was like "kill" this is "sudo kill -9". Or shutting off your computer.
*/
void forceCancel();
/**
* Returns the current path, from the current path executor, if there is one.
*

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.LinkedList;
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
@@ -68,7 +67,7 @@ public interface ICachedWorld {
* @param maxRegionDistanceSq The maximum region distance, squared
* @return The locations found that match the special block
*/
LinkedList<BlockPos> getLocationsOf(String block, int maximum, int centerX, int centerZ, int maxRegionDistanceSq);
ArrayList<BlockPos> getLocationsOf(String block, int maximum, int centerX, int centerZ, int maxRegionDistanceSq);
/**
* Reloads all of the cached regions in this world from disk. Anything that is not saved

View File

@@ -17,12 +17,9 @@
package baritone.api.cache;
import net.minecraft.util.math.BlockPos;
import org.apache.commons.lang3.ArrayUtils;
import baritone.api.utils.BetterBlockPos;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.*;
/**
* A marker for a position in the world.
@@ -60,7 +57,7 @@ public interface IWaypoint {
*
* @return The block position of this waypoint
*/
BlockPos getLocation();
BetterBlockPos getLocation();
enum Tag {
@@ -92,20 +89,48 @@ public interface IWaypoint {
/**
* The names for the tag, anything that the tag can be referred to as.
*/
private final String[] names;
public final String[] names;
Tag(String... names) {
this.names = names;
}
/**
* Finds a tag from one of the names that could be used to identify said tag.
*
* @param name The name of the tag
* @return The tag, if one is found, otherwise, {@code null}
* @return A name that can be passed to {@link #getByName(String)} to retrieve this tag
*/
public static Tag fromString(String name) {
return TAG_LIST.stream().filter(tag -> ArrayUtils.contains(tag.names, name.toLowerCase())).findFirst().orElse(null);
public String getName() {
return names[0];
}
/**
* Gets a tag by one of its names.
*
* @param name The name to search for.
* @return The tag, if found, or null.
*/
public static Tag getByName(String name) {
for (Tag action : Tag.values()) {
for (String alias : action.names) {
if (alias.equalsIgnoreCase(name)) {
return action;
}
}
}
return null;
}
/**
* @return All tag names.
*/
public static String[] getAllNames() {
Set<String> names = new HashSet<>();
for (Tag tag : Tag.values()) {
names.addAll(Arrays.asList(tag.names));
}
return names.toArray(new String[0]);
}
}
}

View File

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

View File

@@ -17,12 +17,12 @@
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
@@ -33,28 +33,63 @@ public interface IWorldScanner {
/**
* Scans the world, up to the specified max chunk radius, for the specified blocks.
*
* @param ctx The {@link IPlayerContext} containing player and world info that the
* scan is based upon
* @param blocks The blocks to scan for
* @param ctx The {@link IPlayerContext} containing player and world info that the scan is based upon
* @param filter The blocks to scan for
* @param max The maximum number of blocks to scan before cutoff
* @param yLevelThreshold If a block is found within this Y level, the current result will be
* returned, if the value is negative, then this condition doesn't apply.
* @param yLevelThreshold If a block is found within this Y level, the current result will be returned, if the value
* is negative, then this condition doesn't apply.
* @param maxSearchRadius The maximum chunk search radius
* @return The matching block positions
*/
List<BlockPos> scanChunkRadius(IPlayerContext ctx, List<Block> blocks, int max, int yLevelThreshold, int maxSearchRadius);
List<BlockPos> scanChunkRadius(IPlayerContext ctx, BlockOptionalMetaLookup filter, int max, int yLevelThreshold, int maxSearchRadius);
default List<BlockPos> scanChunkRadius(IPlayerContext ctx, List<Block> filter, int max, int yLevelThreshold, int maxSearchRadius) {
return scanChunkRadius(ctx, new BlockOptionalMetaLookup(filter.toArray(new Block[0])), max, yLevelThreshold, maxSearchRadius);
}
/**
* Scans a single chunk for the specified blocks.
*
* @param ctx The {@link IPlayerContext} containing player and world info that the
* scan is based upon
* @param ctx The {@link IPlayerContext} containing player and world info that the scan is based upon
* @param filter The blocks to scan for
* @param pos The position of the target chunk
* @param max The maximum number of blocks to scan before cutoff
* @param yLevelThreshold If a block is found within this Y level, the current result will be returned, if the value
* is negative, then this condition doesn't apply.
* @return The matching block positions
*/
List<BlockPos> scanChunk(IPlayerContext ctx, BlockOptionalMetaLookup filter, ChunkPos pos, int max, int yLevelThreshold);
/**
* Scans a single chunk for the specified blocks.
*
* @param ctx The {@link IPlayerContext} containing player and world info that the scan is based upon
* @param blocks The blocks to scan for
* @param pos The position of the target chunk
* @param max The maximum number of blocks to scan before cutoff
* @param yLevelThreshold If a block is found within this Y level, the current result will be
* returned, if the value is negative, then this condition doesn't apply.
* @param yLevelThreshold If a block is found within this Y level, the current result will be returned, if the value
* is negative, then this condition doesn't apply.
* @return The matching block positions
*/
List<BlockPos> scanChunk(IPlayerContext ctx, List<Block> blocks, ChunkPos pos, int max, int yLevelThreshold);
default List<BlockPos> scanChunk(IPlayerContext ctx, List<Block> blocks, ChunkPos pos, int max, int yLevelThreshold) {
return scanChunk(ctx, new BlockOptionalMetaLookup(blocks), pos, max, yLevelThreshold);
}
/**
* Overload of {@link #repack(IPlayerContext, int)} where the value of the {@code range} parameter is {@code 40}.
*
* @param ctx The player, describing the origin
* @return The amount of chunks successfully queued for repacking
*/
int repack(IPlayerContext ctx);
/**
* 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 range The range to repack
* @return The amount of chunks successfully queued for repacking
*/
int repack(IPlayerContext ctx, int range);
}

View File

@@ -15,10 +15,9 @@
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
*/
package baritone.cache;
package baritone.api.cache;
import baritone.api.cache.IWaypoint;
import net.minecraft.util.math.BlockPos;
import baritone.api.utils.BetterBlockPos;
import java.util.Date;
@@ -32,9 +31,9 @@ public class Waypoint implements IWaypoint {
private final String name;
private final Tag tag;
private final long creationTimestamp;
private final BlockPos location;
private final BetterBlockPos location;
public Waypoint(String name, Tag tag, BlockPos location) {
public Waypoint(String name, Tag tag, BetterBlockPos location) {
this(name, tag, location, System.currentTimeMillis());
}
@@ -47,7 +46,7 @@ public class Waypoint implements IWaypoint {
* @param location The waypoint location
* @param creationTimestamp When the waypoint was created
*/
Waypoint(String name, Tag tag, BlockPos location, long creationTimestamp) {
public Waypoint(String name, Tag tag, BetterBlockPos location, long creationTimestamp) {
this.name = name;
this.tag = tag;
this.location = location;
@@ -56,7 +55,7 @@ public class Waypoint implements IWaypoint {
@Override
public int hashCode() {
return name.hashCode() + tag.hashCode() + location.hashCode(); //lol
return name.hashCode() ^ tag.hashCode() ^ location.hashCode() ^ Long.hashCode(creationTimestamp);
}
@Override
@@ -75,13 +74,18 @@ public class Waypoint implements IWaypoint {
}
@Override
public BlockPos getLocation() {
public BetterBlockPos getLocation() {
return this.location;
}
@Override
public String toString() {
return name + " " + location.toString() + " " + new Date(creationTimestamp).toString();
return String.format(
"%s %s %s",
name,
BetterBlockPos.from(location).toString(),
new Date(creationTimestamp).toString()
);
}
@Override

View File

@@ -0,0 +1,67 @@
/*
* 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;
import baritone.api.IBaritone;
import baritone.api.utils.IPlayerContext;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* A default implementation of {@link ICommand} which provides easy access to the
* command's bound {@link IBaritone} instance, {@link IPlayerContext} and an easy
* way to provide multiple valid command execution names through the default constructor.
* <p>
* So basically, you should use it because it provides a small amount of boilerplate,
* but you're not forced to use it.
*
* @author LoganDark
* @see ICommand
*/
public abstract class Command implements ICommand {
protected IBaritone baritone;
protected IPlayerContext ctx;
/**
* The names of this command. This is what you put after the command prefix.
*/
protected final List<String> names;
/**
* Creates a new Baritone control command.
*
* @param names The names of this command. This is what you put after the command prefix.
*/
protected Command(IBaritone baritone, String... names) {
this.names = Collections.unmodifiableList(Stream.of(names)
.map(s -> s.toLowerCase(Locale.US))
.collect(Collectors.toList()));
this.baritone = baritone;
this.ctx = baritone.getPlayerContext();
}
@Override
public final List<String> getNames() {
return this.names;
}
}

View File

@@ -0,0 +1,42 @@
/*
* 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;
import baritone.api.Settings;
import java.util.UUID;
/**
* @author Brady
* @since 9/26/2019
*/
public interface IBaritoneChatControl {
/**
* In certain cases chat components need to execute commands for you. For example, the paginator automatically runs
* commands when you click the forward and back arrows to show you the previous/next page.
* <p>
* If the prefix is changed in the meantime, then the command will go to chat. That's no good. So here's a permanent
* prefix that forces a command to run, regardless of the current prefix, chat/prefix control being enabled, etc.
* <p>
* If used right (by both developers and users), it should be impossible to expose a command accidentally to the
* server. As a rule of thumb, if you have a clickable chat component, always use this prefix. If you're suggesting
* a command (a component that puts text into your text box, or something else), use {@link Settings#prefix}.
*/
String FORCE_COMMAND_PREFIX = String.format("<<%s>>", UUID.randomUUID().toString());
}

View File

@@ -0,0 +1,67 @@
/*
* 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;
import baritone.api.command.argument.IArgConsumer;
import baritone.api.command.exception.CommandException;
import baritone.api.utils.Helper;
import java.util.List;
import java.util.stream.Stream;
/**
* The base for a command.
*
* @author Brady
* @since 10/7/2019
*/
public interface ICommand extends Helper {
/**
* Called when this command is executed.
*/
void execute(String label, IArgConsumer args) throws CommandException;
/**
* Called when the command needs to tab complete. Return a Stream representing the entries to put in the completions
* list.
*/
Stream<String> tabComplete(String label, IArgConsumer args) throws CommandException;
/**
* @return A <b>single-line</b> string containing a short description of this command's purpose.
*/
String getShortDesc();
/**
* @return A list of lines that will be printed by the help command when the user wishes to view them.
*/
List<String> getLongDesc();
/**
* @return A list of the names that can be accepted to have arguments passed to this command
*/
List<String> getNames();
/**
* @return {@code true} if this command should be hidden from the help menu
*/
default boolean hiddenFromHelp() {
return false;
}
}

View File

@@ -15,25 +15,15 @@
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
*/
package baritone.api.cache;
package baritone.api.command;
import net.minecraft.item.ItemStack;
import java.util.List;
import baritone.api.command.argparser.IArgParserManager;
/**
* @author Brady
* @since 9/23/2018
* @since 10/4/2019
*/
public interface IRememberedInventory {
public interface ICommandSystem {
/**
* @return The contents of this inventory
*/
List<ItemStack> getContents();
/**
* @return The number of slots in this inventory
*/
int getSize();
IArgParserManager getParserManager();
}

View File

@@ -0,0 +1,60 @@
/*
* 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.argparser;
import baritone.api.command.argument.ICommandArgument;
public interface IArgParser<T> {
/**
* @return the class of this parser.
*/
Class<T> getTarget();
/**
* A stateless argument parser is just that. It takes a {@link ICommandArgument} and outputs its type.
*/
interface Stateless<T> extends IArgParser<T> {
/**
* @param arg The argument to parse.
* @return What it was parsed into.
* @throws RuntimeException if you want the parsing to fail. The exception will be caught and turned into an
* appropriate error.
*/
T parseArg(ICommandArgument arg) throws Exception;
}
/**
* A stated argument parser is similar to a stateless one. It also takes a {@link ICommandArgument}, but it also
* takes a second argument that can be any type, referred to as the state.
*/
interface Stated<T, S> extends IArgParser<T> {
Class<S> getStateType();
/**
* @param arg The argument to parse.
* @param state Can be anything.
* @return What it was parsed into.
* @throws RuntimeException if you want the parsing to fail. The exception will be caught and turned into an
* appropriate error.
*/
T parseArg(ICommandArgument arg, S state) throws Exception;
}
}

View File

@@ -0,0 +1,69 @@
/*
* 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.argparser;
import baritone.api.command.argument.ICommandArgument;
import baritone.api.command.exception.CommandInvalidTypeException;
import baritone.api.command.registry.Registry;
/**
* Used to retrieve {@link IArgParser} instances from the registry, by their target class.
* It can be assumed that a {@link IArgParser} exists for {@link Integer}, {@link Long},
* {@link Float}, {@link Double} and {@link Boolean}.
*
* @author Brady
* @since 10/4/2019
*/
public interface IArgParserManager {
/**
* @param type The type trying to be parsed
* @return A parser that can parse arguments into this class, if found.
*/
<T> IArgParser.Stateless<T> getParserStateless(Class<T> type);
/**
* @param type The type trying to be parsed
* @return A parser that can parse arguments into this class, if found.
*/
<T, S> IArgParser.Stated<T, S> getParserStated(Class<T> type, Class<S> stateKlass);
/**
* 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.
* @return An instance of the specified class.
* @throws CommandInvalidTypeException If the parsing failed
*/
<T> T parseStateless(Class<T> type, ICommandArgument arg) throws CommandInvalidTypeException;
/**
* Attempt to parse the specified argument with a stated {@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 state The state to pass to the {@link IArgParser.Stated}.
* @return An instance of the specified class.
* @throws CommandInvalidTypeException If the parsing failed
* @see IArgParser.Stated
*/
<T, S> T parseStated(Class<T> type, Class<S> stateKlass, ICommandArgument arg, S state) throws CommandInvalidTypeException;
Registry<IArgParser> getRegistry();
}

View File

@@ -0,0 +1,593 @@
/*
* 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.argument;
import baritone.api.command.ICommand;
import baritone.api.command.argparser.IArgParser;
import baritone.api.command.datatypes.IDatatype;
import baritone.api.command.datatypes.IDatatypeFor;
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 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:
*
* <ul>
* <li>Mutability. The whole concept of the {@link IArgConsumer}} is to let you gradually consume arguments in any way
* you'd like. You can change your consumption based on earlier arguments, for subcommands for example.</li>
* <li>You don't need to keep track of your consumption. The {@link IArgConsumer}} keeps track of the arguments you
* consume so that it can throw detailed exceptions whenever something is out of the ordinary. Additionally, if you
* need to retrieve an argument after you've already consumed it - look no further than {@link #consumed()}!</li>
* <li>Easy retrieval of many different types. If you need to retrieve an instance of an int or float for example,
* look no further than {@link #getAs(Class)}. If you need a more powerful way of retrieving data, try out the many
* {@code getDatatype...} methods.</li>
* <li>It's very easy to throw detailed exceptions. The {@link IArgConsumer}} has many different methods that can
* enforce the number of arguments, the type of arguments, and more, throwing different types of
* {@link CommandException}s if something seems off. You're recommended to do all validation and store all needed
* data in variables BEFORE logging any data to chat via {@link Helper#logDirect(String)}, so that the error
* handlers can do their job and log the error to chat.</li>
* </ul>
*/
public interface IArgConsumer {
LinkedList<ICommandArgument> getArgs();
Deque<ICommandArgument> getConsumed();
/**
* @param num The number of arguments to check for
* @return {@code true} if there are <i>at least</i> {@code num} arguments left in this {@link IArgConsumer}}
* @see #hasAny()
* @see #hasAtMost(int)
* @see #hasExactly(int)
*/
boolean has(int num);
/**
* @return {@code true} if there is <i>at least</i> 1 argument left in this {@link IArgConsumer}}
* @see #has(int)
* @see #hasAtMostOne()
* @see #hasExactlyOne()
*/
boolean hasAny();
/**
* @param num The number of arguments to check for
* @return {@code true} if there are <i>at most</i> {@code num} arguments left in this {@link IArgConsumer}}
* @see #has(int)
* @see #hasAtMost(int)
* @see #hasExactly(int)
*/
boolean hasAtMost(int num);
/**
* @return {@code true} if there is <i>at most</i> 1 argument left in this {@link IArgConsumer}}
* @see #hasAny()
* @see #hasAtMostOne()
* @see #hasExactlyOne()
*/
boolean hasAtMostOne();
/**
* @param num The number of arguments to check for
* @return {@code true} if there are <i>exactly</i> {@code num} arguments left in this {@link IArgConsumer}}
* @see #has(int)
* @see #hasAtMost(int)
*/
boolean hasExactly(int num);
/**
* @return {@code true} if there is <i>exactly</i> 1 argument left in this {@link IArgConsumer}}
* @see #hasAny()
* @see #hasAtMostOne()
*/
boolean hasExactlyOne();
/**
* @param index The index to peek
* @return The argument at index {@code index} in this {@link IArgConsumer}}, with 0 being the next one. This does not
* mutate the {@link IArgConsumer}}
* @throws CommandNotEnoughArgumentsException If there is less than {@code index + 1} arguments left
* @see #peek()
* @see #peekString(int)
* @see #peekAs(Class, int)
* @see #get()
*/
ICommandArgument peek(int index) throws CommandNotEnoughArgumentsException;
/**
* @return The next argument in this {@link IArgConsumer}}. This does not mutate the {@link IArgConsumer}}
* @throws CommandNotEnoughArgumentsException If there is less than one argument left
* @see #peek(int)
* @see #peekString()
* @see #peekAs(Class)
* @see #get()
*/
ICommandArgument peek() throws CommandNotEnoughArgumentsException;
/**
* @param index The index to peek
* @param type The type to check for
* @return If an ArgParser.Stateless for the specified {@code type} would succeed in parsing the next
* argument
* @throws CommandNotEnoughArgumentsException If there is less than {@code index + 1} arguments left
* @see #peek()
* @see #getAs(Class)
*/
boolean is(Class<?> type, int index) throws CommandNotEnoughArgumentsException;
/**
* @param type The type to check for
* @return If an ArgParser.Stateless for the specified {@code type} would succeed in parsing the next
* argument
* @throws CommandNotEnoughArgumentsException If there is less than one argument left
* @see #peek()
* @see #getAs(Class)
*/
boolean is(Class<?> type) throws CommandNotEnoughArgumentsException;
/**
* @param index The index to peek
* @return The value of the argument at index {@code index} in this {@link IArgConsumer}}, with 0 being the next one
* This does not mutate the {@link IArgConsumer}}
* @throws CommandNotEnoughArgumentsException If there is less than {@code index + 1} arguments left
* @see #peek()
* @see #peekString()
*/
String peekString(int index) throws CommandNotEnoughArgumentsException;
/**
* @return The value of the next argument in this {@link IArgConsumer}}. This does not mutate the {@link IArgConsumer}}
* @throws CommandNotEnoughArgumentsException If there is less than one argument left
* @see #peekString(int)
* @see #getString()
*/
String peekString() throws CommandNotEnoughArgumentsException;
/**
* @param index The index to peek
* @param enumClass The class to search
* @return From the specified enum class, an enum constant of that class. The enum constant's name will match the
* next argument's value
* @throws java.util.NoSuchElementException If the constant couldn't be found
* @see #peekEnumOrNull(Class)
* @see #getEnum(Class)
* @see ICommandArgument#getEnum(Class)
*/
<E extends Enum<?>> E peekEnum(Class<E> enumClass, int index) throws CommandInvalidTypeException, CommandNotEnoughArgumentsException;
/**
* @param enumClass The class to search
* @return From the specified enum class, an enum constant of that class. The enum constant's name will match the
* next argument's value
* @throws CommandInvalidTypeException If the constant couldn't be found
* @see #peekEnumOrNull(Class)
* @see #getEnum(Class)
* @see ICommandArgument#getEnum(Class)
*/
<E extends Enum<?>> E peekEnum(Class<E> enumClass) throws CommandInvalidTypeException, CommandNotEnoughArgumentsException;
/**
* @param index The index to peek
* @param enumClass The class to search
* @return From the specified enum class, an enum constant of that class. The enum constant's name will match the
* next argument's value. If no constant could be found, null
* @see #peekEnum(Class)
* @see #getEnumOrNull(Class)
* @see ICommandArgument#getEnum(Class)
*/
<E extends Enum<?>> E peekEnumOrNull(Class<E> enumClass, int index) throws CommandNotEnoughArgumentsException;
/**
* @param enumClass The class to search
* @return From the specified enum class, an enum constant of that class. The enum constant's name will match the
* next argument's value. If no constant could be found, null
* @see #peekEnum(Class)
* @see #getEnumOrNull(Class)
* @see ICommandArgument#getEnum(Class)
*/
<E extends Enum<?>> E peekEnumOrNull(Class<E> enumClass) throws CommandNotEnoughArgumentsException;
/**
* Tries to use a <b>stateless</b> {@link IArgParser} to parse the argument at the specified index into the specified
* class
* <p>
* A critical difference between {@link IDatatype}s and {@link IArgParser}s is how many arguments they can take.
* While {@link IArgParser}s always operate on a single argument's value, {@link IDatatype}s get access to the entire
* {@link 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
* @see IArgParser
* @see #peekAs(Class)
* @see #peekAsOrDefault(Class, Object, int)
* @see #peekAsOrNull(Class, int)
*/
<T> T peekAs(Class<T> type, int index) throws CommandInvalidTypeException, CommandNotEnoughArgumentsException;
/**
* Tries to use a <b>stateless</b> {@link IArgParser} to parse the next argument into the specified class
* <p>
* A critical difference between {@link IDatatype}s and {@link IArgParser}s is how many arguments they can take.
* While {@link IArgParser}s always operate on a single argument's value, {@link IDatatype}s get access to the entire
* {@link IArgConsumer}}.
*
* @param type The type to peek as
* @return An instance of the specified type
* @throws CommandInvalidTypeException If the parsing failed
* @see IArgParser
* @see #peekAs(Class, int)
* @see #peekAsOrDefault(Class, Object)
* @see #peekAsOrNull(Class)
*/
<T> T peekAs(Class<T> type) throws CommandInvalidTypeException, CommandNotEnoughArgumentsException;
/**
* Tries to use a <b>stateless</b> {@link IArgParser} to parse the argument at the specified index into the specified
* class
* <p>
* A critical difference between {@link IDatatype}s and {@link IArgParser}s is how many arguments they can take.
* While {@link IArgParser}s always operate on a single argument's value, {@link IDatatype}s get access to the entire
* {@link IArgConsumer}}.
*
* @param type The type to peek as
* @param def The value to return if the argument can't be parsed
* @param index The index to peek
* @return An instance of the specified type, or {@code def} if it couldn't be parsed
* @see IArgParser
* @see #peekAsOrDefault(Class, Object)
* @see #peekAs(Class, int)
* @see #peekAsOrNull(Class, int)
*/
<T> T peekAsOrDefault(Class<T> type, T def, int index) throws CommandNotEnoughArgumentsException;
/**
* Tries to use a <b>stateless</b> {@link IArgParser} to parse the next argument into the specified class
* <p>
* A critical difference between {@link IDatatype}s and {@link IArgParser}s is how many arguments they can take.
* While {@link IArgParser}s always operate on a single argument's value, {@link IDatatype}s get access to the entire
* {@link IArgConsumer}}.
*
* @param type The type to peek as
* @param def The value to return if the argument can't be parsed
* @return An instance of the specified type, or {@code def} if it couldn't be parsed
* @see IArgParser
* @see #peekAsOrDefault(Class, Object, int)
* @see #peekAs(Class)
* @see #peekAsOrNull(Class)
*/
<T> T peekAsOrDefault(Class<T> type, T def) throws CommandNotEnoughArgumentsException;
/**
* Tries to use a <b>stateless</b> {@link IArgParser} to parse the argument at the specified index into the specified
* class
* <p>
* A critical difference between {@link IDatatype}s and {@link IArgParser}s is how many arguments they can take.
* While {@link IArgParser}s always operate on a single argument's value, {@link IDatatype}s get access to the entire
* {@link IArgConsumer}}.
*
* @param type The type to peek as
* @param index The index to peek
* @return An instance of the specified type, or {@code null} if it couldn't be parsed
* @see IArgParser
* @see #peekAsOrNull(Class)
* @see #peekAs(Class, int)
* @see #peekAsOrDefault(Class, Object, int)
*/
<T> T peekAsOrNull(Class<T> type, int index) throws CommandNotEnoughArgumentsException;
/**
* Tries to use a <b>stateless</b> {@link IArgParser} to parse the next argument into the specified class
* <p>
* A critical difference between {@link IDatatype}s and {@link IArgParser}s is how many arguments they can take.
* While {@link IArgParser}s always operate on a single argument's value, {@link IDatatype}s get access to the entire
* {@link IArgConsumer}}.
*
* @param type The type to peek as
* @return An instance of the specified type, or {@code null} if it couldn't be parsed
* @see IArgParser
* @see #peekAsOrNull(Class, int)
* @see #peekAs(Class)
* @see #peekAsOrDefault(Class, Object)
*/
<T> T peekAsOrNull(Class<T> type) throws CommandNotEnoughArgumentsException;
<T> T peekDatatype(IDatatypeFor<T> datatype) throws CommandInvalidTypeException, CommandNotEnoughArgumentsException;
<T, O> T peekDatatype(IDatatypePost<T, O> datatype) throws CommandInvalidTypeException, CommandNotEnoughArgumentsException;
<T, O> T peekDatatype(IDatatypePost<T, O> datatype, O original) throws CommandInvalidTypeException, CommandNotEnoughArgumentsException;
<T> T peekDatatypeOrNull(IDatatypeFor<T> datatype);
<T, O> T peekDatatypeOrNull(IDatatypePost<T, O> datatype);
<T, O, D extends IDatatypePost<T, O>> T peekDatatypePost(D datatype, O original) throws CommandInvalidTypeException, CommandNotEnoughArgumentsException;
<T, O, D extends IDatatypePost<T, O>> T peekDatatypePostOrDefault(D datatype, O original, T def);
<T, O, D extends IDatatypePost<T, O>> T peekDatatypePostOrNull(D datatype, O original);
/**
* Attempts to get the specified {@link IDatatypeFor} from this ArgConsumer
* <p>
* A critical difference between {@link IDatatype}s and {@link IArgParser}s is how many arguments they can take.
* While {@link IArgParser}s always operate on a single argument's value, {@link IDatatype}s get access to the entire
* {@link IArgConsumer}}.
* <p>
* Since this is a peek operation, this ArgConsumer will not be mutated by any call to this method.
*
* @param datatype The datatype to get
* @return The datatype instance
* @see IDatatype
* @see IDatatypeFor
*/
<T, D extends IDatatypeFor<T>> T peekDatatypeFor(Class<D> datatype);
/**
* Attempts to get the specified {@link IDatatypeFor} from this ArgConsumer
* <p>
* A critical difference between {@link IDatatype}s and {@link IArgParser}s is how many arguments they can take.
* While {@link IArgParser}s always operate on a single argument's value, {@link IDatatype}s get access to the entire
* {@link IArgConsumer}}.
* <p>
* Since this is a peek operation, this ArgConsumer will not be mutated by any call to this method.
*
* @param datatype The datatype to get
* @param def The default value
* @return The datatype instance, or {@code def} if it throws an exception
* @see IDatatype
* @see IDatatypeFor
*/
<T, D extends IDatatypeFor<T>> T peekDatatypeForOrDefault(Class<D> datatype, T def);
/**
* Attempts to get the specified {@link IDatatypeFor} from this ArgConsumer
* <p>
* A critical difference between {@link IDatatype}s and {@link IArgParser}s is how many arguments they can take.
* While {@link IArgParser}s always operate on a single argument's value, {@link IDatatype}s get access to the entire
* {@link IArgConsumer}}.
* <p>
* Since this is a peek operation, this ArgConsumer will not be mutated by any call to this method.
*
* @param datatype The datatype to get
* @return The datatype instance, or {@code null} if it throws an exception
* @see IDatatype
* @see IDatatypeFor
*/
<T, D extends IDatatypeFor<T>> T peekDatatypeForOrNull(Class<D> datatype);
/**
* Gets the next argument and returns it. This consumes the first argument so that subsequent calls will return
* later arguments
*
* @return The next argument
* @throws CommandNotEnoughArgumentsException If there's less than one argument left
*/
ICommandArgument get() throws CommandNotEnoughArgumentsException;
/**
* Gets the value of the next argument and returns it. This consumes the first argument so that subsequent calls
* will return later arguments
*
* @return The value of the next argument
* @throws CommandNotEnoughArgumentsException If there's less than one argument left
*/
String getString() throws CommandNotEnoughArgumentsException;
/**
* 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 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
* @throws CommandInvalidTypeException If the constant couldn't be found
* @see #peekEnum(Class)
* @see #getEnumOrNull(Class)
* @see ICommandArgument#getEnum(Class)
*/
<E extends Enum<?>> E getEnum(Class<E> enumClass) throws CommandInvalidTypeException, CommandNotEnoughArgumentsException;
/**
* 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 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
* @return An enum constant of that class with the same name as the next argument's value, or {@code def} if it
* couldn't be found
* @see #getEnum(Class)
* @see #getEnumOrNull(Class)
* @see #peekEnumOrNull(Class)
* @see ICommandArgument#getEnum(Class)
*/
<E extends Enum<?>> E getEnumOrDefault(Class<E> enumClass, E def) throws CommandNotEnoughArgumentsException;
/**
* 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 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
* couldn't be found
* @see #getEnum(Class)
* @see #getEnumOrDefault(Class, Enum)
* @see #peekEnumOrNull(Class)
* @see ICommandArgument#getEnum(Class)
*/
<E extends Enum<?>> E getEnumOrNull(Class<E> enumClass) throws CommandNotEnoughArgumentsException;
/**
* Tries to use a <b>stateless</b> {@link IArgParser} to parse the next argument into the specified class
* <p>
* A critical difference between {@link IDatatype}s and {@link IArgParser}s is how many arguments they can take.
* While {@link IArgParser}s always operate on a single argument's value, {@link IDatatype}s get access to the entire
* {@link IArgConsumer}}.
*
* @param type The type to peek as
* @return An instance of the specified type
* @throws CommandInvalidTypeException If the parsing failed
* @see IArgParser
* @see #get()
* @see #getAsOrDefault(Class, Object)
* @see #getAsOrNull(Class)
* @see #peekAs(Class)
* @see #peekAsOrDefault(Class, Object, int)
* @see #peekAsOrNull(Class, int)
*/
<T> T getAs(Class<T> type) throws CommandInvalidTypeException, CommandNotEnoughArgumentsException;
/**
* Tries to use a <b>stateless</b> {@link IArgParser} to parse the next argument into the specified class
* <p>
* A critical difference between {@link IDatatype}s and {@link IArgParser}s is how many arguments they can take.
* While {@link IArgParser}s always operate on a single argument's value, {@link IDatatype}s get access to the entire
* {@link IArgConsumer}}.
*
* @param type The type to peek as
* @param def The default value
* @return An instance of the specified type, or {@code def} if it couldn't be parsed
* @see IArgParser
* @see #get()
* @see #getAs(Class)
* @see #getAsOrNull(Class)
* @see #peekAs(Class)
* @see #peekAsOrDefault(Class, Object, int)
* @see #peekAsOrNull(Class, int)
*/
<T> T getAsOrDefault(Class<T> type, T def) throws CommandNotEnoughArgumentsException;
/**
* Tries to use a <b>stateless</b> {@link IArgParser} to parse the next argument into the specified class
* <p>
* A critical difference between {@link IDatatype}s and {@link IArgParser}s is how many arguments they can take.
* While {@link IArgParser}s always operate on a single argument's value, {@link IDatatype}s get access to the entire
* {@link IArgConsumer}}.
*
* @param type The type to peek as
* @return An instance of the specified type, or {@code null} if it couldn't be parsed
* @see IArgParser
* @see #get()
* @see #getAs(Class)
* @see #getAsOrDefault(Class, Object)
* @see #peekAs(Class)
* @see #peekAsOrDefault(Class, Object, int)
* @see #peekAsOrNull(Class, int)
*/
<T> T getAsOrNull(Class<T> type) throws CommandNotEnoughArgumentsException;
<T, O, D extends IDatatypePost<T, O>> T getDatatypePost(D datatype, O original) throws CommandInvalidTypeException, CommandNotEnoughArgumentsException;
<T, O, D extends IDatatypePost<T, O>> T getDatatypePostOrDefault(D datatype, O original, T _default);
<T, O, D extends IDatatypePost<T, O>> T getDatatypePostOrNull(D datatype, O original);
<T, D extends IDatatypeFor<T>> T getDatatypeFor(D datatype) throws CommandInvalidTypeException, CommandNotEnoughArgumentsException;
<T, D extends IDatatypeFor<T>> T getDatatypeForOrDefault(D datatype, T def);
<T, D extends IDatatypeFor<T>> T getDatatypeForOrNull(D datatype);
<T extends IDatatype> Stream<String> tabCompleteDatatype(T datatype);
/**
* Returns the "raw rest" of the string. For example, from a string <code>arg1 arg2&nbsp;&nbsp;arg3</code>, split
* into three {@link ICommandArgument}s {@code "arg1"}, {@code "arg2"}, and {@code "arg3"}:
*
* <ul>
* <li>{@code rawRest()} would return <code>arg1 arg2&nbsp;&nbsp;arg3</code></li>
* <li>After calling {@link #get()}, {@code rawRest()} would return <code>arg2&nbsp;&nbsp;arg3</code> (note the
* double space - it is preserved!)</li>
* <li>After calling {@link #get()} again, {@code rawRest()} would return {@code "arg3"}</li>
* <li>After calling {@link #get()} one last time, {@code rawRest()} would return {@code ""}</li>
* </ul>
*
* @return The "raw rest" of the string.
*/
String rawRest();
/**
* @param min The minimum amount of arguments to require.
* @throws CommandNotEnoughArgumentsException If there are less than {@code min} arguments left.
* @see #requireMax(int)
* @see #requireExactly(int)
*/
void requireMin(int min) throws CommandNotEnoughArgumentsException;
/**
* @param max The maximum amount of arguments allowed.
* @throws CommandTooManyArgumentsException If there are more than {@code max} arguments left.
* @see #requireMin(int)
* @see #requireExactly(int)
*/
void requireMax(int max) throws CommandTooManyArgumentsException;
/**
* @param args The exact amount of arguments to require.
* @throws CommandNotEnoughArgumentsException If there are less than {@code args} arguments left.
* @throws CommandTooManyArgumentsException If there are more than {@code args} arguments left.
* @see #requireMin(int)
* @see #requireMax(int)
*/
void requireExactly(int args) throws CommandException;
/**
* @return If this {@link IArgConsumer}} has consumed at least one argument.
* @see #consumed()
* @see #consumedString()
*/
boolean hasConsumed();
/**
* @return The last argument this {@link IArgConsumer}} has consumed, or an "unknown" argument, indicated by a
* comamnd argument index that has a value of {@code -1}, if no arguments have been consumed yet.
* @see #consumedString()
* @see #hasConsumed()
*/
ICommandArgument consumed();
/**
* @return The value of thelast argument this {@link IArgConsumer}} has consumed, or an empty string if no arguments
* have been consumed yet
* @see #consumed()
* @see #hasConsumed()
*/
String consumedString();
/**
* @return A copy of this {@link IArgConsumer}}. It has the same arguments (both consumed and not), but does not
* affect or mutate this instance. Useful for the various {@code peek} functions
*/
IArgConsumer copy();
}

View File

@@ -0,0 +1,101 @@
/*
* 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.argument;
import baritone.api.command.argparser.IArgParser;
import baritone.api.command.exception.CommandInvalidTypeException;
import net.minecraft.core.Direction;
/**
* A {@link ICommandArgument} is an immutable object representing one command argument. It contains data on the index of
* that argument, its value, and the rest of the string that argument was found in
* <p>
* You're recommended to use {@link IArgConsumer}}s to handle these.
*
* @author Brady
* @since 10/2/2019
*/
public interface ICommandArgument {
/**
* @return The index of this command argument in the list of command arguments generated
*/
int getIndex();
/**
* @return The raw value of just this argument
*/
String getValue();
/**
* @return The raw value of the remaining arguments after this one was captured
*/
String getRawRest();
/**
* 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 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
* @throws CommandInvalidTypeException If the constant couldn't be found
* @see IArgConsumer#peekEnum(Class)
* @see IArgConsumer#peekEnum(Class, int)
* @see IArgConsumer#peekEnumOrNull(Class)
* @see IArgConsumer#peekEnumOrNull(Class, int)
* @see IArgConsumer#getEnum(Class)
* @see IArgConsumer#getEnumOrNull(Class)
*/
<E extends Enum<?>> E getEnum(Class<E> enumClass) throws CommandInvalidTypeException;
/**
* Tries to use a <b>stateless</b> {@link IArgParser} to parse this argument into the specified class
*
* @param type The class to parse this argument into
* @return An instance of the specified type
* @throws CommandInvalidTypeException If the parsing failed
*/
<T> T getAs(Class<T> type) throws CommandInvalidTypeException;
/**
* Tries to use a <b>stateless</b> {@link IArgParser} to parse this argument into the specified class
*
* @param type The class to parse this argument into
* @return If the parser succeeded
*/
<T> boolean is(Class<T> type);
/**
* Tries to use a <b>stated</b> {@link IArgParser} to parse this argument into the specified class
*
* @param type The class to parse this argument into
* @return An instance of the specified type
* @throws CommandInvalidTypeException If the parsing failed
*/
<T, S> T getAs(Class<T> type, Class<S> stateType, S state) throws CommandInvalidTypeException;
/**
* Tries to use a <b>stated</b> {@link IArgParser} to parse this argument into the specified class
*
* @param type The class to parse this argument into
* @return If the parser succeeded
*/
<T, S> boolean is(Class<T> type, Class<S> stateType, S state);
}

View File

@@ -0,0 +1,52 @@
/*
* 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 java.util.stream.Stream;
import net.minecraft.core.Registry;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.block.Block;
public enum BlockById implements IDatatypeFor<Block> {
INSTANCE;
@Override
public Block get(IDatatypeContext ctx) throws CommandException {
ResourceLocation id = new ResourceLocation(ctx.getConsumer().getString());
Block block;
if ((block = Registry.BLOCK.getOptional(id).orElse(null)) == null) {
throw new IllegalArgumentException("no block found by that id");
}
return block;
}
@Override
public Stream<String> tabComplete(IDatatypeContext ctx) throws CommandException {
return new TabCompleteHelper()
.append(
Registry.BLOCK.keySet()
.stream()
.map(Object::toString)
)
.filterPrefixNamespaced(ctx.getConsumer().getString())
.sortAlphabetically()
.stream();
}
}

View File

@@ -0,0 +1,48 @@
/*
* 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 java.util.stream.Stream;
import net.minecraft.core.Registry;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.EntityType;
public enum EntityClassById implements IDatatypeFor<EntityType> {
INSTANCE;
@Override
public EntityType get(IDatatypeContext ctx) throws CommandException {
ResourceLocation id = new ResourceLocation(ctx.getConsumer().getString());
EntityType entity;
if ((entity = Registry.ENTITY_TYPE.getOptional(id).orElse(null)) == null) {
throw new IllegalArgumentException("no entity found by that id");
}
return entity;
}
@Override
public Stream<String> tabComplete(IDatatypeContext ctx) throws CommandException {
return new TabCompleteHelper()
.append(Registry.ENTITY_TYPE.stream().map(Object::toString))
.filterPrefixNamespaced(ctx.getConsumer().getString())
.sortAlphabetically()
.stream();
}
}

View File

@@ -15,29 +15,23 @@
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
*/
package baritone.launch.mixins;
package baritone.api.command.datatypes;
import baritone.utils.accessor.IAnvilChunkLoader;
import net.minecraft.world.chunk.storage.AnvilChunkLoader;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import baritone.api.command.exception.CommandException;
import baritone.api.utils.BlockOptionalMeta;
import java.io.File;
import java.util.stream.Stream;
/**
* @author Brady
* @since 9/4/2018
*/
@Mixin(AnvilChunkLoader.class)
public class MixinAnvilChunkLoader implements IAnvilChunkLoader {
@Shadow
@Final
private File chunkSaveLocation;
public enum ForBlockOptionalMeta implements IDatatypeFor<BlockOptionalMeta> {
INSTANCE;
@Override
public File getChunkSaveLocation() {
return this.chunkSaveLocation;
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);
}
}

View File

@@ -0,0 +1,42 @@
/*
* 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 java.util.Locale;
import java.util.stream.Stream;
import net.minecraft.core.Direction;
public enum ForDirection implements IDatatypeFor<Direction> {
INSTANCE;
@Override
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(Direction.values())
.map(Direction::getName).map(String::toLowerCase))
.filterPrefix(ctx.getConsumer().getString())
.stream();
}
}

View File

@@ -0,0 +1,81 @@
/*
* 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.IBaritone;
import baritone.api.cache.IWaypoint;
import baritone.api.cache.IWaypointCollection;
import baritone.api.command.exception.CommandException;
import baritone.api.command.helpers.TabCompleteHelper;
import java.util.Comparator;
import java.util.stream.Stream;
public enum ForWaypoints implements IDatatypeFor<IWaypoint[]> {
INSTANCE;
@Override
public IWaypoint[] get(IDatatypeContext ctx) throws CommandException {
final String input = ctx.getConsumer().getString();
final IWaypoint.Tag tag = IWaypoint.Tag.getByName(input);
// If the input doesn't resolve to a valid tag, resolve by name
return tag == null
? getWaypointsByName(ctx.getBaritone(), input)
: getWaypointsByTag(ctx.getBaritone(), tag);
}
@Override
public Stream<String> tabComplete(IDatatypeContext ctx) throws CommandException {
return new TabCompleteHelper()
.append(getWaypointNames(ctx.getBaritone()))
.sortAlphabetically()
.prepend(IWaypoint.Tag.getAllNames())
.filterPrefix(ctx.getConsumer().getString())
.stream();
}
public static IWaypointCollection waypoints(IBaritone baritone) {
return baritone.getWorldProvider().getCurrentWorld().getWaypoints();
}
public static IWaypoint[] getWaypoints(IBaritone baritone) {
return waypoints(baritone).getAllWaypoints().stream()
.sorted(Comparator.comparingLong(IWaypoint::getCreationTimestamp).reversed())
.toArray(IWaypoint[]::new);
}
public static String[] getWaypointNames(IBaritone baritone) {
return Stream.of(getWaypoints(baritone))
.map(IWaypoint::getName)
.filter(name -> !name.isEmpty())
.toArray(String[]::new);
}
public static IWaypoint[] getWaypointsByTag(IBaritone baritone, IWaypoint.Tag tag) {
return waypoints(baritone).getByTag(tag).stream()
.sorted(Comparator.comparingLong(IWaypoint::getCreationTimestamp).reversed())
.toArray(IWaypoint[]::new);
}
public static IWaypoint[] getWaypointsByName(IBaritone baritone, String name) {
return Stream.of(getWaypoints(baritone))
.filter(waypoint -> waypoint.getName().equalsIgnoreCase(name))
.toArray(IWaypoint[]::new);
}
}

View File

@@ -0,0 +1,56 @@
/*
* 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.argparser.IArgParser;
import baritone.api.command.argument.IArgConsumer;
import baritone.api.command.exception.CommandException;
import java.util.stream.Stream;
/**
* An {@link IDatatype} is similar to an {@link IArgParser} in the sense that it is capable of consuming an argument
* to transform it into a usable form as the code desires.
* <p>
* A fundamental difference is that an {@link IDatatype} is capable of consuming multiple arguments. For example,
* {@link RelativeBlockPos} is an {@link IDatatypePost} which requires at least 3 {@link RelativeCoordinate} arguments
* to be specified.
* <p>
* Another difference is that an {@link IDatatype} can be tab-completed, providing comprehensive auto completion
* that can substitute based on existing input or provide possibilities for the next piece of input.
*
* @see IDatatypeContext
* @see IDatatypeFor
* @see IDatatypePost
*/
public interface IDatatype {
/**
* Attempts to complete missing or partial input provided through the {@link IArgConsumer}} provided by
* {@link IDatatypeContext#getConsumer()} in order to aide the user in executing commands.
* <p>
* One benefit over datatypes over {@link IArgParser}s is that instead of each command trying to guess what values
* the datatype will accept, or simply not tab completing at all, datatypes that support tab completion can provide
* accurate information using the same methods used to parse arguments in the first place.
*
* @param ctx The argument consumer to tab complete
* @return A stream representing the strings that can be tab completed. DO NOT INCLUDE SPACES IN ANY STRINGS.
* @see IArgConsumer#tabCompleteDatatype(IDatatype)
*/
Stream<String> tabComplete(IDatatypeContext ctx) throws CommandException;
}

View File

@@ -0,0 +1,46 @@
/*
* 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.IBaritone;
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.
*
* @author Brady
* @see IDatatype
* @since 9/26/2019
*/
public interface IDatatypeContext {
/**
* Provides the {@link IBaritone} instance that is associated with the action relating to datatype handling.
*
* @return The context {@link IBaritone} instance.
*/
IBaritone getBaritone();
/**
* Provides the {@link IArgConsumer}} to fetch input information from.
*
* @return The context {@link IArgConsumer}}.
*/
IArgConsumer getConsumer();
}

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 java.util.function.Supplier;
/**
* An {@link IDatatype} which acts as a {@link Supplier}, in essence. The only difference
* is that it requires an {@link IDatatypeContext} to be provided due to the expectation that
* implementations of {@link IDatatype} are singletons.
*/
public interface IDatatypeFor<T> extends IDatatype {
/**
* Consumes the desired amount of arguments from the specified {@link IDatatypeContext}, and
* then returns the parsed value. This method will more than likely return a {@link IllegalArgumentException}
* 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.
*
* @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,41 @@
/*
* 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 java.util.function.Function;
/**
* An {@link IDatatype} which acts as a {@link Function}, in essence. The only difference
* is that it requires an {@link IDatatypeContext} to be provided due to the expectation that
* implementations of {@link IDatatype} are singletons.
*/
public interface IDatatypePost<T, O> extends IDatatype {
/**
* Takes the expected input and transforms it based on the value held by {@code original}. If {@code original}
* is null, it is expected that the implementation of this method has a case to handle it, such that a
* {@link NullPointerException} will never be thrown as a result.
*
* @param ctx The datatype context
* @param original The transformable value
* @return The transformed value
*/
T apply(IDatatypeContext ctx, O original) throws CommandException;
}

View File

@@ -15,15 +15,15 @@
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
*/
package baritone.gradle.util;
package baritone.api.command.datatypes;
import baritone.api.command.exception.CommandException;
/**
* All credits go to AsmLibGradle and its contributors.
*
* @see <a href="https://github.com/pozzed/AsmLibGradle/blob/8f917dbc3939eab7a3d9daf54d9d285fdf34f4b2/src/main/java/net/futureclient/asmlib/forgegradle/MappingType.java">Original Source</a>
* @author Brady
* @since 9/26/2019
*/
public enum MappingType {
SEARGE,
NOTCH,
CUSTOM // forgegradle
public interface IDatatypePostFunction<T, O> {
T apply(O original) throws CommandException;
}

View File

@@ -0,0 +1,55 @@
/*
* 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.IBaritone;
import baritone.api.command.exception.CommandException;
import baritone.api.command.helpers.TabCompleteHelper;
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<Player> {
INSTANCE;
@Override
public Player get(IDatatypeContext ctx) throws CommandException {
final String username = ctx.getConsumer().getString();
return getPlayers(ctx).stream()
.filter(s -> s.getName().getString().equalsIgnoreCase(username))
.findFirst().orElse(null);
}
@Override
public Stream<String> tabComplete(IDatatypeContext ctx) throws CommandException {
return new TabCompleteHelper()
.append(getPlayers(ctx).stream().map(Player::getName).map(Component::getString))
.filterPrefix(ctx.getConsumer().getString())
.sortAlphabetically()
.stream();
}
private static List<? extends Player> getPlayers(IDatatypeContext ctx) {
return ctx.getBaritone().getPlayerContext().world().players();
}
}

View File

@@ -0,0 +1,57 @@
/*
* 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.argument.IArgConsumer;
import baritone.api.command.exception.CommandException;
import baritone.api.utils.BetterBlockPos;
import java.util.stream.Stream;
public enum RelativeBlockPos implements IDatatypePost<BetterBlockPos, BetterBlockPos> {
INSTANCE;
@Override
public BetterBlockPos apply(IDatatypeContext ctx, BetterBlockPos origin) throws CommandException {
if (origin == null) {
origin = BetterBlockPos.ORIGIN;
}
final IArgConsumer consumer = ctx.getConsumer();
return new BetterBlockPos(
consumer.getDatatypePost(RelativeCoordinate.INSTANCE, (double) origin.x),
consumer.getDatatypePost(RelativeCoordinate.INSTANCE, (double) origin.y),
consumer.getDatatypePost(RelativeCoordinate.INSTANCE, (double) origin.z)
);
}
@Override
public Stream<String> tabComplete(IDatatypeContext ctx) throws CommandException {
final IArgConsumer consumer = ctx.getConsumer();
if (consumer.hasAny() && !consumer.has(4)) {
while (consumer.has(2)) {
if (consumer.peekDatatypeOrNull(RelativeCoordinate.INSTANCE) == null) {
break;
}
consumer.get();
}
return consumer.tabCompleteDatatype(RelativeCoordinate.INSTANCE);
}
return Stream.empty();
}
}

View File

@@ -0,0 +1,69 @@
/*
* 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.argument.IArgConsumer;
import baritone.api.command.exception.CommandException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Stream;
public enum RelativeCoordinate implements IDatatypePost<Double, Double> {
INSTANCE;
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 {
if (origin == null) {
origin = 0.0D;
}
Matcher matcher = PATTERN.matcher(ctx.getConsumer().getString());
if (!matcher.matches()) {
throw new IllegalArgumentException("pattern doesn't match");
}
boolean isRelative = !matcher.group(1).isEmpty();
double offset = matcher.group(2).isEmpty() ? 0 : Double.parseDouble(matcher.group(2).replaceAll(ScalesAliasRegex, ""));
if (matcher.group(2).toLowerCase().contains("k")) {
offset *= 1000;
}
if (matcher.group(2).toLowerCase().contains("m")) {
offset *= 1000000;
}
if (isRelative) {
return origin + offset;
}
return offset;
}
@Override
public Stream<String> tabComplete(IDatatypeContext ctx) throws CommandException {
final IArgConsumer consumer = ctx.getConsumer();
if (!consumer.has(2) && consumer.getString().matches("^(~|$)")) {
return Stream.of("~");
}
return Stream.empty();
}
}

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/>.
*/
package baritone.api.command.datatypes;
import baritone.api.command.argument.IArgConsumer;
import baritone.api.command.exception.CommandException;
import java.io.File;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.nio.file.FileSystems;
import java.nio.file.InvalidPathException;
import java.nio.file.Path;
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;
@Override
public File apply(IDatatypeContext ctx, File original) throws CommandException {
if (original == null) {
original = new File("./");
}
Path path;
try {
path = FileSystems.getDefault().getPath(ctx.getConsumer().getString());
} catch (InvalidPathException e) {
throw new IllegalArgumentException("invalid path");
}
return getCanonicalFileUnchecked(original.toPath().resolve(path).toFile());
}
@Override
public Stream<String> tabComplete(IDatatypeContext ctx) {
return Stream.empty();
}
/**
* Seriously
*
* @param file File
* @return Canonical file of file
* @author LoganDark
*/
private static File getCanonicalFileUnchecked(File file) {
try {
return file.getCanonicalFile();
} catch (IOException e) {
throw new UncheckedIOException(e);
}
}
public static Stream<String> tabComplete(IArgConsumer consumer, File base0) throws CommandException {
// I will not make the caller deal with this, seriously
// Tab complete code is beautiful and I'm not going to bloat it with dumb ass checked exception bullshit -LoganDark
// lol owned -Brady
File base = getCanonicalFileUnchecked(base0);
String currentPathStringThing = consumer.getString();
Path currentPath = FileSystems.getDefault().getPath(currentPathStringThing);
Path basePath = currentPath.isAbsolute() ? currentPath.getRoot() : base.toPath();
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()))
.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(" "));
}
public static File gameDir() {
File gameDir = HELPER.mc.gameDirectory.getAbsoluteFile();
if (gameDir.getName().equals(".")) {
return gameDir.getParentFile();
}
return gameDir;
}
}

View File

@@ -0,0 +1,64 @@
/*
* 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.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 java.util.stream.Stream;
public enum RelativeGoal implements IDatatypePost<Goal, BetterBlockPos> {
INSTANCE;
@Override
public Goal apply(IDatatypeContext ctx, BetterBlockPos origin) throws CommandException {
if (origin == null) {
origin = BetterBlockPos.ORIGIN;
}
final IArgConsumer consumer = ctx.getConsumer();
GoalBlock goalBlock = consumer.peekDatatypePostOrNull(RelativeGoalBlock.INSTANCE, origin);
if (goalBlock != null) {
return goalBlock;
}
GoalXZ goalXZ = consumer.peekDatatypePostOrNull(RelativeGoalXZ.INSTANCE, origin);
if (goalXZ != null) {
return goalXZ;
}
GoalYLevel goalYLevel = consumer.peekDatatypePostOrNull(RelativeGoalYLevel.INSTANCE, origin);
if (goalYLevel != null) {
return goalYLevel;
}
// when the user doesn't input anything, default to the origin
return new GoalBlock(origin);
}
@Override
public Stream<String> tabComplete(IDatatypeContext ctx) {
return ctx.getConsumer().tabCompleteDatatype(RelativeCoordinate.INSTANCE);
}
}

View File

@@ -0,0 +1,52 @@
/*
* 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.argument.IArgConsumer;
import baritone.api.command.exception.CommandException;
import baritone.api.pathing.goals.GoalBlock;
import baritone.api.utils.BetterBlockPos;
import java.util.stream.Stream;
import net.minecraft.util.Mth;
public enum RelativeGoalBlock implements IDatatypePost<GoalBlock, BetterBlockPos> {
INSTANCE;
@Override
public GoalBlock apply(IDatatypeContext ctx, BetterBlockPos origin) throws CommandException {
if (origin == null) {
origin = BetterBlockPos.ORIGIN;
}
final IArgConsumer consumer = ctx.getConsumer();
return new GoalBlock(
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))
);
}
@Override
public Stream<String> tabComplete(IDatatypeContext ctx) {
final IArgConsumer consumer = ctx.getConsumer();
if (consumer.hasAtMost(3)) {
return consumer.tabCompleteDatatype(RelativeCoordinate.INSTANCE);
}
return Stream.empty();
}
}

View File

@@ -0,0 +1,51 @@
/*
* 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.argument.IArgConsumer;
import baritone.api.command.exception.CommandException;
import baritone.api.pathing.goals.GoalXZ;
import baritone.api.utils.BetterBlockPos;
import java.util.stream.Stream;
import net.minecraft.util.Mth;
public enum RelativeGoalXZ implements IDatatypePost<GoalXZ, BetterBlockPos> {
INSTANCE;
@Override
public GoalXZ apply(IDatatypeContext ctx, BetterBlockPos origin) throws CommandException {
if (origin == null) {
origin = BetterBlockPos.ORIGIN;
}
final IArgConsumer consumer = ctx.getConsumer();
return new GoalXZ(
Mth.floor(consumer.getDatatypePost(RelativeCoordinate.INSTANCE, (double) origin.x)),
Mth.floor(consumer.getDatatypePost(RelativeCoordinate.INSTANCE, (double) origin.z))
);
}
@Override
public Stream<String> tabComplete(IDatatypeContext ctx) {
final IArgConsumer consumer = ctx.getConsumer();
if (consumer.hasAtMost(2)) {
return consumer.tabCompleteDatatype(RelativeCoordinate.INSTANCE);
}
return Stream.empty();
}
}

View File

@@ -0,0 +1,49 @@
/*
* 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.argument.IArgConsumer;
import baritone.api.command.exception.CommandException;
import baritone.api.pathing.goals.GoalYLevel;
import baritone.api.utils.BetterBlockPos;
import java.util.stream.Stream;
import net.minecraft.util.Mth;
public enum RelativeGoalYLevel implements IDatatypePost<GoalYLevel, BetterBlockPos> {
INSTANCE;
@Override
public GoalYLevel apply(IDatatypeContext ctx, BetterBlockPos origin) throws CommandException {
if (origin == null) {
origin = BetterBlockPos.ORIGIN;
}
return new GoalYLevel(
Mth.floor(ctx.getConsumer().getDatatypePost(RelativeCoordinate.INSTANCE, (double) origin.y))
);
}
@Override
public Stream<String> tabComplete(IDatatypeContext ctx) {
final IArgConsumer consumer = ctx.getConsumer();
if (consumer.hasAtMost(1)) {
return consumer.tabCompleteDatatype(RelativeCoordinate.INSTANCE);
}
return Stream.empty();
}
}

View File

@@ -0,0 +1,29 @@
/*
* 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.exception;
public abstract class CommandErrorMessageException extends CommandException {
protected CommandErrorMessageException(String reason) {
super(reason);
}
protected CommandErrorMessageException(String reason, Throwable cause) {
super(reason, cause);
}
}

View File

@@ -0,0 +1,29 @@
/*
* 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.exception;
public abstract class CommandException extends Exception implements ICommandException {
protected CommandException(String reason) {
super(reason);
}
protected CommandException(String reason, Throwable cause) {
super(reason, cause);
}
}

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.exception;
import baritone.api.command.argument.ICommandArgument;
public abstract class CommandInvalidArgumentException extends CommandErrorMessageException {
public final ICommandArgument arg;
protected CommandInvalidArgumentException(ICommandArgument arg, String message) {
super(formatMessage(arg, message));
this.arg = arg;
}
protected CommandInvalidArgumentException(ICommandArgument arg, String message, Throwable cause) {
super(formatMessage(arg, message), cause);
this.arg = arg;
}
private static String formatMessage(ICommandArgument arg, String message) {
return String.format(
"Error at argument #%s: %s",
arg.getIndex() == -1 ? "<unknown>" : Integer.toString(arg.getIndex() + 1),
message
);
}
}

View File

@@ -0,0 +1,25 @@
/*
* 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.exception;
public class CommandInvalidStateException extends CommandErrorMessageException {
public CommandInvalidStateException(String reason) {
super(reason);
}
}

View File

@@ -0,0 +1,39 @@
/*
* 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.exception;
import baritone.api.command.argument.ICommandArgument;
public class CommandInvalidTypeException extends CommandInvalidArgumentException {
public CommandInvalidTypeException(ICommandArgument arg, String expected) {
super(arg, String.format("Expected %s", expected));
}
public CommandInvalidTypeException(ICommandArgument arg, String expected, Throwable cause) {
super(arg, String.format("Expected %s", expected), cause);
}
public CommandInvalidTypeException(ICommandArgument arg, String expected, String got) {
super(arg, String.format("Expected %s, but got %s instead", expected, got));
}
public CommandInvalidTypeException(ICommandArgument arg, String expected, String got, Throwable cause) {
super(arg, String.format("Expected %s, but got %s instead", expected, got), cause);
}
}

View File

@@ -0,0 +1,25 @@
/*
* 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.exception;
public class CommandNoParserForTypeException extends CommandUnhandledException {
public CommandNoParserForTypeException(Class<?> klass) {
super(String.format("Could not find a handler for type %s", klass.getSimpleName()));
}
}

View File

@@ -0,0 +1,25 @@
/*
* 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.exception;
public class CommandNotEnoughArgumentsException extends CommandErrorMessageException {
public CommandNotEnoughArgumentsException(int minArgs) {
super(String.format("Not enough arguments (expected at least %d)", minArgs));
}
}

View File

@@ -0,0 +1,40 @@
/*
* 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.exception;
import baritone.api.command.ICommand;
import baritone.api.command.argument.ICommandArgument;
import java.util.List;
import static baritone.api.utils.Helper.HELPER;
public class CommandNotFoundException extends CommandException {
public final String command;
public CommandNotFoundException(String command) {
super(String.format("Command not found: %s", command));
this.command = command;
}
@Override
public void handle(ICommand command, List<ICommandArgument> args) {
HELPER.logDirect(getMessage());
}
}

View File

@@ -0,0 +1,25 @@
/*
* 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.exception;
public class CommandTooManyArgumentsException extends CommandErrorMessageException {
public CommandTooManyArgumentsException(int maxArgs) {
super(String.format("Too many arguments (expected at most %d)", maxArgs));
}
}

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.command.exception;
import baritone.api.command.ICommand;
import baritone.api.command.argument.ICommandArgument;
import java.util.List;
import net.minecraft.ChatFormatting;
import static baritone.api.utils.Helper.HELPER;
public class CommandUnhandledException extends RuntimeException implements ICommandException {
public CommandUnhandledException(String message) {
super(message);
}
public CommandUnhandledException(Throwable cause) {
super(cause);
}
@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",
ChatFormatting.RED);
this.printStackTrace();
}
}

View File

@@ -0,0 +1,54 @@
/*
* 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.exception;
import baritone.api.command.ICommand;
import baritone.api.command.argument.ICommandArgument;
import java.util.List;
import net.minecraft.ChatFormatting;
import static baritone.api.utils.Helper.HELPER;
/**
* The base for a Baritone Command Exception, checked or unchecked. Provides a
* {@link #handle(ICommand, List)} method that is used to provide useful output
* to the user for diagnosing issues that may have occurred during execution.
* <p>
* Anything implementing this interface should be assignable to {@link Exception}.
*
* @author Brady
* @since 9/20/2019
*/
public interface ICommandException {
/**
* @return The exception details
* @see Exception#getMessage()
*/
String getMessage();
/**
* Called when this exception is thrown, to handle the exception.
*
* @param command The command that threw it.
* @param args The arguments the command was called with.
*/
default void handle(ICommand command, List<ICommandArgument> args) {
HELPER.logDirect(this.getMessage(), ChatFormatting.RED);
}
}

View File

@@ -0,0 +1,184 @@
/*
* 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.helpers;
import baritone.api.command.argument.IArgConsumer;
import baritone.api.command.exception.CommandException;
import baritone.api.command.exception.CommandInvalidTypeException;
import baritone.api.utils.Helper;
import java.util.Arrays;
import java.util.List;
import java.util.function.Function;
import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.BaseComponent;
import net.minecraft.network.chat.ClickEvent;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.HoverEvent;
import net.minecraft.network.chat.TextComponent;
public class Paginator<E> implements Helper {
public final List<E> entries;
public int pageSize = 8;
public int page = 1;
public Paginator(List<E> entries) {
this.entries = entries;
}
public Paginator(E... entries) {
this.entries = Arrays.asList(entries);
}
public Paginator<E> setPageSize(int pageSize) {
this.pageSize = pageSize;
return this;
}
public int getMaxPage() {
return (entries.size() - 1) / pageSize + 1;
}
public boolean validPage(int page) {
return page > 0 && page <= getMaxPage();
}
public Paginator<E> skipPages(int pages) {
page += pages;
return this;
}
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("--", ChatFormatting.DARK_GRAY);
}
}
boolean hasPrevPage = commandPrefix != null && validPage(page - 1);
boolean hasNextPage = commandPrefix != null && validPage(page + 1);
BaseComponent prevPageComponent = new TextComponent("<<");
if (hasPrevPage) {
prevPageComponent.setStyle(prevPageComponent.getStyle()
.withClickEvent(new ClickEvent(
ClickEvent.Action.RUN_COMMAND,
String.format("%s %d", commandPrefix, page - 1)
))
.withHoverEvent(new HoverEvent(
HoverEvent.Action.SHOW_TEXT,
new TextComponent("Click to view previous page")
)));
} else {
prevPageComponent.setStyle(prevPageComponent.getStyle().withColor(ChatFormatting.DARK_GRAY));
}
BaseComponent nextPageComponent = new TextComponent(">>");
if (hasNextPage) {
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 TextComponent("Click to view next page")
)));
} else {
nextPageComponent.setStyle(nextPageComponent.getStyle().withColor(ChatFormatting.DARK_GRAY));
}
BaseComponent pagerComponent = new TextComponent("");
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, Component> transform) {
display(transform, null);
}
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()) {
page = consumer.getAs(Integer.class);
if (!pagi.validPage(page)) {
throw new CommandInvalidTypeException(
consumer.consumed(),
String.format(
"a valid page (1-%d)",
pagi.getMaxPage()
),
consumer.consumed().getValue()
);
}
}
pagi.skipPages(page - pagi.page);
if (pre != null) {
pre.run();
}
pagi.display(transform, commandPrefix);
}
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, 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, Component> transform, String commandPrefix) throws CommandException {
paginate(consumer, pagi, null, transform, commandPrefix);
}
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, 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, Component> transform) throws CommandException {
paginate(consumer, pagi, pre, transform, null);
}
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, Component> transform) throws CommandException {
paginate(consumer, Arrays.asList(elems), pre, transform, null);
}
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, Component> transform) throws CommandException {
paginate(consumer, new Paginator<>(elems), null, transform, null);
}
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

@@ -0,0 +1,286 @@
/*
* 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.helpers;
import baritone.api.BaritoneAPI;
import baritone.api.Settings;
import baritone.api.command.argument.IArgConsumer;
import baritone.api.command.manager.ICommandManager;
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
* methods for appending and prepending streams, sorting, filtering by prefix, and so on.
* <p>
* The recommended way to use this class is:
* <ul>
* <li>Create a new instance with the empty constructor</li>
* <li>Use {@code append}, {@code prepend} or {@code add<something>} methods to add completions</li>
* <li>Sort using {@link #sort(Comparator)} or {@link #sortAlphabetically()} and then filter by prefix using
* {@link #filterPrefix(String)}</li>
* <li>Get the stream using {@link #stream()}</li>
* <li>Pass it up to whatever's calling your tab complete function (i.e.
* {@link ICommandManager#tabComplete(String)} or {@link IArgConsumer}#tabCompleteDatatype(IDatatype)})</li>
* </ul>
* <p>
* For advanced users: if you're intercepting {@link TabCompleteEvent}s directly, use {@link #build()} instead for an
* array.
*/
public class TabCompleteHelper {
private Stream<String> stream;
public TabCompleteHelper(String[] base) {
stream = Stream.of(base);
}
public TabCompleteHelper(List<String> base) {
stream = base.stream();
}
public TabCompleteHelper() {
stream = Stream.empty();
}
/**
* Appends the specified stream to this {@link TabCompleteHelper} and returns it for chaining
*
* @param source The stream to append
* @return This {@link TabCompleteHelper} after having appended the stream
* @see #append(String...)
* @see #append(Class)
*/
public TabCompleteHelper append(Stream<String> source) {
stream = Stream.concat(stream, source);
return this;
}
/**
* Appends the specified strings to this {@link TabCompleteHelper} and returns it for chaining
*
* @param source The stream to append
* @return This {@link TabCompleteHelper} after having appended the strings
* @see #append(Stream)
* @see #append(Class)
*/
public TabCompleteHelper append(String... source) {
return append(Stream.of(source));
}
/**
* Appends all values of the specified enum to this {@link TabCompleteHelper} and returns it for chaining
*
* @param num The enum to append the values of
* @return This {@link TabCompleteHelper} after having appended the values
* @see #append(Stream)
* @see #append(String...)
*/
public TabCompleteHelper append(Class<? extends Enum<?>> num) {
return append(
Stream.of(num.getEnumConstants())
.map(Enum::name)
.map(String::toLowerCase)
);
}
/**
* Prepends the specified stream to this {@link TabCompleteHelper} and returns it for chaining
*
* @param source The stream to prepend
* @return This {@link TabCompleteHelper} after having prepended the stream
* @see #prepend(String...)
* @see #prepend(Class)
*/
public TabCompleteHelper prepend(Stream<String> source) {
stream = Stream.concat(source, stream);
return this;
}
/**
* Prepends the specified strings to this {@link TabCompleteHelper} and returns it for chaining
*
* @param source The stream to prepend
* @return This {@link TabCompleteHelper} after having prepended the strings
* @see #prepend(Stream)
* @see #prepend(Class)
*/
public TabCompleteHelper prepend(String... source) {
return prepend(Stream.of(source));
}
/**
* Prepends all values of the specified enum to this {@link TabCompleteHelper} and returns it for chaining
*
* @param num The enum to prepend the values of
* @return This {@link TabCompleteHelper} after having prepended the values
* @see #prepend(Stream)
* @see #prepend(String...)
*/
public TabCompleteHelper prepend(Class<? extends Enum<?>> num) {
return prepend(
Stream.of(num.getEnumConstants())
.map(Enum::name)
.map(String::toLowerCase)
);
}
/**
* Apply the specified {@code transform} to every element <b>currently</b> in this {@link TabCompleteHelper} and
* return this object for chaining
*
* @param transform The transform to apply
* @return This {@link TabCompleteHelper}
*/
public TabCompleteHelper map(Function<String, String> transform) {
stream = stream.map(transform);
return this;
}
/**
* Apply the specified {@code filter} to every element <b>currently</b> in this {@link TabCompleteHelper} and return
* this object for chaining
*
* @param filter The filter to apply
* @return This {@link TabCompleteHelper}
*/
public TabCompleteHelper filter(Predicate<String> filter) {
stream = stream.filter(filter);
return this;
}
/**
* Apply the specified {@code sort} to every element <b>currently</b> in this {@link TabCompleteHelper} and return
* this object for chaining
*
* @param comparator The comparator to use
* @return This {@link TabCompleteHelper}
*/
public TabCompleteHelper sort(Comparator<String> comparator) {
stream = stream.sorted(comparator);
return this;
}
/**
* Sort every element <b>currently</b> in this {@link TabCompleteHelper} alphabetically and return this object for
* chaining
*
* @return This {@link TabCompleteHelper}
*/
public TabCompleteHelper sortAlphabetically() {
return sort(String.CASE_INSENSITIVE_ORDER);
}
/**
* Filter out any element that doesn't start with {@code prefix} and return this object for chaining
*
* @param prefix The prefix to filter for
* @return This {@link TabCompleteHelper}
*/
public TabCompleteHelper filterPrefix(String prefix) {
return filter(x -> x.toLowerCase(Locale.US).startsWith(prefix.toLowerCase(Locale.US)));
}
/**
* Filter out any element that doesn't start with {@code prefix} and return this object for chaining
* <p>
* Assumes every element in this {@link TabCompleteHelper} is a {@link ResourceLocation}
*
* @param prefix The prefix to filter for
* @return This {@link TabCompleteHelper}
*/
public TabCompleteHelper filterPrefixNamespaced(String prefix) {
return filterPrefix(new ResourceLocation(prefix).toString());
}
/**
* @return An array containing every element in this {@link TabCompleteHelper}
* @see #stream()
*/
public String[] build() {
return stream.toArray(String[]::new);
}
/**
* @return A stream containing every element in this {@link TabCompleteHelper}
* @see #build()
*/
public Stream<String> stream() {
return stream;
}
/**
* 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) {
return append(manager.getRegistry().descendingStream()
.flatMap(command -> command.getNames().stream())
.distinct()
);
}
/**
* Appends every setting in the {@link Settings} to this {@link TabCompleteHelper}
*
* @return This {@link TabCompleteHelper}
*/
public TabCompleteHelper addSettings() {
return append(
BaritoneAPI.getSettings().allSettings.stream()
.filter(s -> !SettingsUtil.javaOnlySetting(s))
.map(Settings.Setting::getName)
.sorted(String.CASE_INSENSITIVE_ORDER)
);
}
/**
* Appends every modified setting in the {@link Settings} to this {@link TabCompleteHelper}
*
* @return This {@link TabCompleteHelper}
*/
public TabCompleteHelper addModifiedSettings() {
return append(
SettingsUtil.modifiedSettings(BaritoneAPI.getSettings()).stream()
.map(Settings.Setting::getName)
.sorted(String.CASE_INSENSITIVE_ORDER)
);
}
/**
* Appends every {@link Boolean} setting in the {@link Settings} to this {@link TabCompleteHelper}
*
* @return This {@link TabCompleteHelper}
*/
public TabCompleteHelper addToggleableSettings() {
return append(
BaritoneAPI.getSettings().getAllValuesByType(Boolean.class).stream()
.map(Settings.Setting::getName)
.sorted(String.CASE_INSENSITIVE_ORDER)
);
}
}

View File

@@ -0,0 +1,52 @@
/*
* 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.manager;
import baritone.api.IBaritone;
import baritone.api.command.ICommand;
import baritone.api.command.argument.ICommandArgument;
import baritone.api.command.registry.Registry;
import net.minecraft.util.Tuple;
import java.util.List;
import java.util.stream.Stream;
/**
* @author Brady
* @since 9/21/2019
*/
public interface ICommandManager {
IBaritone getBaritone();
Registry<ICommand> getRegistry();
/**
* @param name The command name to search for.
* @return The command, if found.
*/
ICommand getCommand(String name);
boolean execute(String string);
boolean execute(Tuple<String, List<ICommandArgument>> expanded);
Stream<String> tabComplete(Tuple<String, List<ICommandArgument>> expanded);
Stream<String> tabComplete(String prefix);
}

View File

@@ -0,0 +1,135 @@
/*
* 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.registry;
import java.util.*;
import java.util.function.Consumer;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
/**
* This registry class allows for registration and unregistration of a certain type. This is mainly designed for use by
* event handlers where newly registered ones are encountered first during iteration and can therefore override older
* ones. In Baritone, this is used for commands and argument parsers so that mods and addons can extend Baritone's
* functionality without resorting to hacks, wrappers, or mixins.
*
* @param <V> The entry type that will be stored in this registry. This can be anything, really - preferably anything
* that works as a HashMap key, as that's what's used to keep track of which entries are registered or not.
*/
public class Registry<V> {
/**
* An internal linked list of all the entries that are currently registered. This is a linked list so that entries
* can be inserted at the beginning, which means that newer entries are encountered first during iteration. This is
* an important property of the registry that makes it more useful than a simple list, and also the reason it does
* not just use a map.
*/
private final Deque<V> _entries = new LinkedList<>();
/**
* A HashSet containing every entry currently registered. Entries are added to this set when something is registered
* and removed from the set when they are unregistered. An entry being present in this set indicates that it is
* currently registered, can be removed, and should not be reregistered until it is removed.
*/
private final Set<V> registered = new HashSet<>();
/**
* The collection of entries that are currently in this registry. This is a collection (and not a list) because,
* internally, entries are stored in a linked list, which is not the same as a normal list.
*/
public final Collection<V> entries = Collections.unmodifiableCollection(_entries);
/**
* @param entry The entry to check.
* @return If this entry is currently registered in this registry.
*/
public boolean registered(V entry) {
return registered.contains(entry);
}
/**
* Ensures that the entry {@code entry} is registered.
*
* @param entry The entry to register.
* @return A boolean indicating whether or not this is a new registration. No matter the value of this boolean, the
* entry is always guaranteed to now be in this registry. This boolean simply indicates if the entry was <i>not</i>
* in the map prior to this method call.
*/
public boolean register(V entry) {
if (!registered(entry)) {
_entries.addFirst(entry);
registered.add(entry);
return true;
}
return false;
}
/**
* Unregisters this entry from this registry. After this method call, the entry is guaranteed to be removed from the
* registry, since each entry only ever appears once.
*
* @param entry The entry to unregister.
*/
public void unregister(V entry) {
if (!registered(entry)) {
return;
}
_entries.remove(entry);
registered.remove(entry);
}
/**
* Returns an iterator that iterates over each entry in this registry, with the newest elements iterated over first.
* Internally, as new elements are prepended to the registry rather than appended to the end, this order is the best
* way to search through the registry if you want to discover newer items first.
*/
public Iterator<V> iterator() {
return _entries.iterator();
}
/**
* Returns an iterator that iterates over each entry in this registry, in the order they were added. Internally,
* this iterates through the registry backwards, as new elements are prepended to the registry rather than appended
* to the end. You should only do this when you need to, for example, list elements in order - it is almost always
* fine to simply use {@link Iterable#forEach(Consumer) forEach} on the {@link #entries} collection instead.
*/
public Iterator<V> descendingIterator() {
return _entries.descendingIterator();
}
/**
* Returns a stream that contains each entry in this registry, with the newest elements ordered first. Internally,
* as new elements are prepended to the registry rather than appended to the end, this order is the best way to
* search through the registry if you want to discover newer items first.
*/
public Stream<V> stream() {
return _entries.stream();
}
/**
* Returns a stream that returns each entry in this registry, in the order they were added. Internally, this orders
* the registry backwards, as new elements are prepended to the registry rather than appended to the end. You should
* only use this when you need to, for example, list elements in order - it is almost always fine to simply use the
* regular {@link #stream()} method instead.
*/
public Stream<V> descendingStream() {
return StreamSupport.stream(Spliterators.spliterator(
descendingIterator(),
_entries.size(),
Spliterator.SIZED | Spliterator.SUBSIZED
), false);
}
}

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

@@ -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 com.mojang.math.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,9 @@
package baritone.api.event.events;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.phys.Vec3;
/**
* @author Brady
@@ -69,14 +70,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

@@ -0,0 +1,34 @@
/*
* 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.event.events.type.Cancellable;
/**
* @author LoganDark
*/
public final class TabCompleteEvent extends Cancellable {
public final String prefix;
public String[] completions;
public TabCompleteEvent(String prefix) {
this.prefix = prefix;
this.completions = null;
}
}

View File

@@ -19,22 +19,20 @@ package baritone.api.event.events;
import baritone.api.event.events.type.EventState;
import java.util.function.BiFunction;
public final class TickEvent {
private static int overallTickCount;
private final EventState state;
private final Type type;
private final int count;
private static int overallTickCount;
public TickEvent(EventState state, Type type) {
public TickEvent(EventState state, Type type, int count) {
this.state = state;
this.type = type;
this.count = incrementCount();
}
private static synchronized int incrementCount() {
return overallTickCount++;
this.count = count;
}
public int getCount() {
@@ -49,6 +47,10 @@ public final class TickEvent {
return state;
}
public static synchronized BiFunction<EventState, Type, TickEvent> createNextProvider() {
final int count = overallTickCount++;
return (state, type) -> new TickEvent(state, type, count);
}
public enum Type {
/**

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

@@ -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.event.events.type;
/**
* @author LoganDark
*/
public class Overrideable<T> {
private T value;
private boolean modified;
public Overrideable(T current) {
value = current;
}
public T get() {
return value;
}
public void set(T newValue) {
value = newValue;
modified = true;
}
public boolean wasModified() {
return modified;
}
@Override
public String toString() {
return String.format(
"Overrideable{modified=%b,value=%s}",
modified,
value.toString()
);
}
}

View File

@@ -39,6 +39,9 @@ public interface AbstractGameEventListener extends IGameEventListener {
@Override
default void onSendChatMessage(ChatEvent event) {}
@Override
default void onPreTabComplete(TabCompleteEvent event) {}
@Override
default void onChunkEvent(ChunkEvent event) {}

View File

@@ -18,14 +18,13 @@
package baritone.api.event.listener;
import baritone.api.event.events.*;
import io.netty.util.concurrent.GenericFutureListener;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.gui.GuiGameOver;
import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.client.settings.GameSettings;
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
@@ -37,7 +36,7 @@ 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);
@@ -45,7 +44,7 @@ public interface IGameEventListener {
* Run once per game tick from before and after the player rotation is sent to the server.
*
* @param event The event
* @see EntityPlayerSP#onUpdate()
* @see LocalPlayer#tick()
*/
void onPlayerUpdate(PlayerUpdateEvent event);
@@ -53,22 +52,26 @@ 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);
/**
* Runs whenever the client player tries to tab complete in chat.
*
* @param event The event
*/
void onPreTabComplete(TabCompleteEvent event);
/**
* Runs before and after whenever a chunk is either loaded, unloaded, or populated.
*
* @param event The event
* @see WorldClient#doPreChunk(int, int, boolean)
*/
void onChunkEvent(ChunkEvent event);
/**
* Runs once per world render pass. Two passes are made when {@link GameSettings#anaglyph} is on.
* <p>
* <b>Note:</b> {@link GameSettings#anaglyph} has been removed in Minecraft 1.13
* Runs once per world render pass.
*
* @param event The event
*/
@@ -78,7 +81,7 @@ public interface IGameEventListener {
* Runs before and after whenever a new world is loaded
*
* @param event The event
* @see Minecraft#loadWorld(WorldClient, String)
* @see Minecraft#setLevel(ClientLevel)
*/
void onWorldEvent(WorldEvent event);
@@ -87,7 +90,6 @@ public interface IGameEventListener {
*
* @param event The event
* @see Packet
* @see GenericFutureListener
*/
void onSendPacket(PacketEvent event);
@@ -96,7 +98,6 @@ public interface IGameEventListener {
*
* @param event The event
* @see Packet
* @see GenericFutureListener
*/
void onReceivePacket(PacketEvent event);
@@ -105,15 +106,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#onLivingUpdate}
* Called whenever the sprint keybind state is checked in {@link LocalPlayer#aiStep}
*
* @param event The event
* @see EntityPlayerSP#onLivingUpdate()
* @see LocalPlayer#aiStep()
*/
void onPlayerSprintState(SprintStateEvent event);
@@ -125,9 +126,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

@@ -25,7 +25,7 @@ public class GoalAxis implements Goal {
@Override
public boolean isInGoal(int x, int y, int z) {
return y == BaritoneAPI.getSettings().axisHeight.get() && (x == 0 || z == 0 || Math.abs(x) == Math.abs(z));
return y == BaritoneAPI.getSettings().axisHeight.value && (x == 0 || z == 0 || Math.abs(x) == Math.abs(z));
}
@Override
@@ -39,7 +39,7 @@ public class GoalAxis implements Goal {
double flatAxisDistance = Math.min(x, Math.min(z, diff * SQRT_2_OVER_2));
return flatAxisDistance * BaritoneAPI.getSettings().costHeuristic.get() + GoalYLevel.calculate(BaritoneAPI.getSettings().axisHeight.get(), y);
return flatAxisDistance * BaritoneAPI.getSettings().costHeuristic.value + GoalYLevel.calculate(BaritoneAPI.getSettings().axisHeight.value, y);
}
@Override

View File

@@ -17,8 +17,9 @@
package baritone.api.pathing.goals;
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
@@ -30,17 +31,17 @@ public class GoalBlock implements Goal, IGoalRenderPos {
/**
* The X block position of this goal
*/
private final int x;
public final int x;
/**
* The Y block position of this goal
*/
private final int y;
public final int y;
/**
* The Z block position of this goal
*/
private final int z;
public final int z;
public GoalBlock(BlockPos pos) {
this(pos.getX(), pos.getY(), pos.getZ());
@@ -67,7 +68,12 @@ public class GoalBlock implements Goal, IGoalRenderPos {
@Override
public String toString() {
return "GoalBlock{x=" + x + ",y=" + y + ",z=" + z + "}";
return String.format(
"GoalBlock{x=%s,y=%s,z=%s}",
SettingsUtil.maybeCensor(x),
SettingsUtil.maybeCensor(y),
SettingsUtil.maybeCensor(z)
);
}
/**
@@ -81,9 +87,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);

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