From 0ade37f14f8af914c50046a5d681f1ffff3635c0 Mon Sep 17 00:00:00 2001 From: ehylo <1487662ehylo@gmail.com> Date: Tue, 8 Feb 2022 21:13:51 -0800 Subject: [PATCH] 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 --- README.md | 2 +- SETUP.md | 21 ++++++++++++------- USAGE.md | 16 ++++++++++---- src/api/java/baritone/api/Settings.java | 6 ++++++ .../command/defaults/FindCommand.java | 4 ++-- 5 files changed, 35 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index b125edf6e..7222e4d89 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ 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; diff --git a/SETUP.md b/SETUP.md index 7a43faa62..57866b192 100644 --- a/SETUP.md +++ b/SETUP.md @@ -11,7 +11,7 @@ These releases are not always completely up to date with latest features, and ar 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.2 or 1.16.4 or 1.16.5 (LOL) +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`. @@ -22,15 +22,16 @@ The build is fully deterministic and reproducible, and you can verify Travis did 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 release can simply be added as a Forge mod.** +**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. +- **Forge/Fabric Unoptimized**: Same as Unoptimized, but packaged for Forge/Fabric. ## Build it yourself - Clone or download Baritone @@ -42,13 +43,13 @@ If another one of your Forge mods has a Baritone integration, you want `baritone ## 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. +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, it might not work because the Java distributions above JDK 8 using may not have the needed javax classes. +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 8 download: https://openjdk.java.net/install/ +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` @@ -84,6 +85,12 @@ 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: ``` diff --git a/USAGE.md b/USAGE.md index f896ad012..46241e3fe 100644 --- a/USAGE.md +++ b/USAGE.md @@ -32,13 +32,13 @@ Watch this [showcase video](https://youtu.be/CZkLXWo4Fg4)! To toggle a boolean setting, just say its name in chat (for example saying `allowBreak` toggles whether Baritone will consider breaking blocks). For a numeric setting, say its name then the new value (like `primaryTimeoutMS 250`). It's case insensitive. To reset a setting to its default value, say `acceptableThrowawayItems reset`. To reset all settings, say `reset`. To see all settings that have been modified from their default values, say `modified`. -Some common examples: +Commands in Baritone: - `thisway 1000` then `path` to go in the direction you're facing for a thousand blocks - `goal x y z` or `goal x z` or `goal y`, then `path` to set a goal to a certain coordinate then path to it - `goto x y z` or `goto x z` or `goto y` to go to a certain coordinate (in a single step, starts going immediately) - `goal` to set the goal to your player's feet - `goal clear` to clear the goal -- `cancel` or `stop` to stop everything +- `cancel` or `stop` to stop everything, `forcecancel` is also an option - `goto portal` or `goto ender_chest` or `goto block_type` to go to a block. (in Impact, `.goto` is an alias for `.b goto` for the most part) - `mine diamond_ore iron_ore` to mine diamond ore or iron ore (turn on the setting `legitMine` to only mine ores that it can actually see. It will explore randomly around y=11 until it finds them.) An amount of blocks can also be specified, for example, `mine 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). @@ -51,11 +51,19 @@ Some common examples: - `axis` to go to an axis or diagonal axis at y=120 (`axisHeight` is a configurable setting, defaults to 120). - `explore x z` to explore the world from the origin of x,z. Leave out x and z to default to player feet. This will continually path towards the closest chunk to the origin that it's never seen before. `explorefilter filter.json` with optional invert can be used to load in a list of chunks to load. - `invert` to invert the current goal and path. This gets as far away from it as possible, instead of as close as possible. For example, do `goal` then `invert` to run as far as possible from where you're standing at the start. +- `come` tells Baritone to head towards your camera, useful when freecam doesn't move your player position. +- `blacklist` will stop baritone from going to the closest block so it won't attempt to get to it. +- `eta` to get information about the estimated time until the next segment and the goal, be aware that the ETA to your goal is really unprecise. +- `proc` to view miscellaneous information about the process currently controlling Baritone. +- `repack` to re-cache the chunks around you. +- `gc` to call `System.gc()` which may free up some memory. +- `render` to fix glitched chunk rendering without having to reload all of them. +- `reloadall` to reload Baritone's world cache or `saveall` to save Baritone's world cache. +- `find` to search through Baritone's cache and attempt to find the location of the block. +- `surface` or `top` to tell Baritone to head towards the closest surface-like area, this can be the surface or highest available air space. - `version` to get the version of Baritone you're running - `damn` daniel -For the rest of the commands, you can take a look at the code [here](https://baritone.leijurv.com/baritone/api/Settings.html). - All the settings and documentation are here. If you find HTML easier to read than Javadoc, you can look here. 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. diff --git a/src/api/java/baritone/api/Settings.java b/src/api/java/baritone/api/Settings.java index c3ea4225a..b0eda7489 100644 --- a/src/api/java/baritone/api/Settings.java +++ b/src/api/java/baritone/api/Settings.java @@ -385,6 +385,9 @@ public final class Settings { */ public final Setting mobSpawnerAvoidanceCoefficient = new Setting<>(2.0); + /** + * Distance to avoid mob spawners. + */ public final Setting mobSpawnerAvoidanceRadius = new Setting<>(16); /** @@ -394,6 +397,9 @@ public final class Settings { */ public final Setting mobAvoidanceCoefficient = new Setting<>(1.5); + /** + * Distance to avoid mobs. + */ public final Setting mobAvoidanceRadius = new Setting<>(8); /** diff --git a/src/main/java/baritone/command/defaults/FindCommand.java b/src/main/java/baritone/command/defaults/FindCommand.java index 22e6815be..65eb9b5c3 100644 --- a/src/main/java/baritone/command/defaults/FindCommand.java +++ b/src/main/java/baritone/command/defaults/FindCommand.java @@ -71,10 +71,10 @@ public class FindCommand extends Command { @Override public List getLongDesc() { return Arrays.asList( - "", + "The find command searches through Baritone's cache and attempts to find the location of the block.", "", "Usage:", - "> " + "> find - Find positions of a certain block" ); } }