From 6dc7a7788e90ddfa32419570473d393b5e3edecc Mon Sep 17 00:00:00 2001 From: Leijurv Date: Tue, 23 Jul 2019 22:30:04 -0700 Subject: [PATCH 1/2] install for 1.14.4 --- README.md | 5 ++++- SETUP.md | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index db5be4c23..68d4af7a8 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,9 @@ [![Codacy Badge](https://api.codacy.com/project/badge/Grade/a73d037823b64a5faf597a18d71e3400)](https://www.codacy.com/app/leijurv/baritone?utm_source=github.com&utm_medium=referral&utm_content=cabaletta/baritone&utm_campaign=Badge_Grade) [![HitCount](http://hits.dwyl.com/cabaletta/baritone.svg)](http://hits.dwyl.com/cabaletta/baritone/) [![GitHub All Releases](https://img.shields.io/github/downloads/cabaletta/baritone/total.svg)](https://github.com/cabaletta/baritone/releases/) -[![Minecraft](https://img.shields.io/badge/MC-1.12.2-green.svg)](https://github.com/cabaletta/baritone/tree/master/) +[![Minecraft](https://img.shields.io/badge/MC-1.12.2-brightgreen.svg)](https://github.com/cabaletta/baritone/tree/master/) [![Minecraft](https://img.shields.io/badge/MC-1.13.2-brightgreen.svg)](https://github.com/cabaletta/baritone/tree/1.13.2/) +[![Minecraft](https://img.shields.io/badge/MC-1.14.4-brightgreen.svg)](https://github.com/cabaletta/baritone/tree/1.14.4/) [![Code of Conduct](https://img.shields.io/badge/%E2%9D%A4-code%20of%20conduct-blue.svg?style=flat)](https://github.com/cabaletta/baritone/blob/master/CODE_OF_CONDUCT.md) [![Known Vulnerabilities](https://snyk.io/test/github/cabaletta/baritone/badge.svg?targetFile=build.gradle)](https://snyk.io/test/github/cabaletta/baritone?targetFile=build.gradle) [![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/cabaletta/baritone/issues/) @@ -31,6 +32,8 @@ Baritone is the pathfinding system used in [Impact](https://impactdevelopment.gi The easiest way to install Baritone is to install [Impact](https://impactdevelopment.github.io/), which comes with Baritone. The second easiest way (for 1.12.2 only) is to install the forge jar from [releases](https://github.com/cabaletta/baritone/releases). Otherwise, see [Installation & setup](SETUP.md). Once Baritone is installed, look [here](USAGE.md) for instructions on how to use it. +For 1.14.4, [click here](https://www.dropbox.com/s/rkml3hjokd3qv0m/1.14.4-Baritone.zip?dl=1). + This project is an updated version of [MineBot](https://github.com/leijurv/MineBot/), the original version of the bot for Minecraft 1.8.9, rebuilt for 1.12.2 and 1.13.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). diff --git a/SETUP.md b/SETUP.md index aca5f6c5a..3492beaa9 100644 --- a/SETUP.md +++ b/SETUP.md @@ -2,6 +2,8 @@ The easiest way to install Baritone is to install [Impact](https://impactdevelopment.github.io/), which comes with Baritone. +For 1.14.4, [click here](https://www.dropbox.com/s/rkml3hjokd3qv0m/1.14.4-Baritone.zip?dl=1). + Once Baritone is installed, look [here](USAGE.md) for instructions on how to use it. ## Prebuilt official releases From f5b4de023f8a295dac5321ee7e2ef060410c27ed Mon Sep 17 00:00:00 2001 From: Leijurv Date: Wed, 24 Jul 2019 15:33:39 -0700 Subject: [PATCH 2/2] update usage stuff --- USAGE.md | 5 ++- .../api/utils/ExampleBaritoneControl.java | 45 +++++-------------- 2 files changed, 13 insertions(+), 37 deletions(-) diff --git a/USAGE.md b/USAGE.md index 865670b63..b01bf3fa7 100644 --- a/USAGE.md +++ b/USAGE.md @@ -18,14 +18,15 @@ To toggle a boolean setting, just say its name in chat (for example saying `allo Some common examples: - `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 - `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.) - `click` to click your destination on the screen. Right click path to on top of the block, left click to path into it (either at foot level or eye level), and left click and drag to clear all blocks from an area. -- `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). +- `follow playerName` to follow a player. `followplayers` to follow any players in range (combine with Kill Aura for a fun time). `followentities` to follow any entities. `followentity pig` to follow entities of a specific type. - `save waypointName` to save a waypoint. `goto waypointName` to go to it. - `build` to build a schematic. `build blah` will load `schematics/blah.schematic` and build it with the origin being your player feet. `build blah 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 diff --git a/src/api/java/baritone/api/utils/ExampleBaritoneControl.java b/src/api/java/baritone/api/utils/ExampleBaritoneControl.java index 463001501..bfa6a6403 100644 --- a/src/api/java/baritone/api/utils/ExampleBaritoneControl.java +++ b/src/api/java/baritone/api/utils/ExampleBaritoneControl.java @@ -40,44 +40,16 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.ReportedException; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextComponentString; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.event.ClickEvent; import net.minecraft.world.chunk.Chunk; import java.nio.file.Path; import java.util.*; public class ExampleBaritoneControl implements Helper, AbstractGameEventListener { - - private static final String HELP_MSG = - "baritone - Output settings into chat\n" + - "settings - Same as baritone\n" + - "goal - Create a goal (one number is '', two is ' ', three is ' , 'clear' to clear)\n" + - "path - Go towards goal\n" + - "repack - (debug) Repacks chunk cache\n" + - "rescan - (debug) Same as repack\n" + - "axis - Paths towards the closest axis or diagonal axis, at y=120\n" + - "cancel - Cancels current path\n" + - "forcecancel - sudo cancel (only use if very glitched, try toggling 'pause' first)\n" + - "gc - Calls System.gc();\n" + - "invert - Runs away from the goal instead of towards it\n" + - "follow - Follows a player 'follow username'\n" + - "reloadall - (debug) Reloads chunk cache\n" + - "saveall - (debug) Saves chunk cache\n" + - "find - (debug) outputs how many blocks of a certain type are within the cache\n" + - "mine - Paths to and mines specified blocks 'mine x_ore y_ore ...'\n" + - "thisway - Creates a goal X blocks where you're facing\n" + - "list - Lists waypoints under a category\n" + - "get - Same as list\n" + - "show - Same as list\n" + - "save - Saves a waypoint (works but don't try to make sense of it)\n" + - "delete - Deletes a waypoint\n" + - "goto - Paths towards specified block or waypoint\n" + - "spawn - Paths towards world spawn or your most recent bed right-click\n" + - "sethome - Sets \"home\"\n" + - "home - Paths towards \"home\" \n" + - "costs - (debug) all movement costs from current location\n" + - "damn - Daniel\n" + - "Go to https://github.com/cabaletta/baritone/blob/master/USAGE.md for more information"; - private static final String COMMAND_PREFIX = "#"; public final IBaritone baritone; @@ -148,9 +120,12 @@ public boolean runCommand(String msg0) { // you may think this can be private, b return true; } if (msg.equals("") || msg.equals("help") || msg.equals("?")) { - for (String line : HELP_MSG.split("\n")) { - logDirect(line); - } + ITextComponent component = MESSAGE_PREFIX.createCopy(); + component.getStyle().setColor(TextFormatting.GRAY); + TextComponentString helpLink = new TextComponentString(" Click here for instructions on how to use Baritone (https://github.com/cabaletta/baritone/blob/master/USAGE.md)"); + helpLink.getStyle().setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://github.com/cabaletta/baritone/blob/master/USAGE.md")); + component.appendSibling(helpLink); + BaritoneAPI.getSettings().logger.value.accept(component); return true; } if (msg.contains(" ")) {