From d4103a924dc72839812e8d53763ee6e5f340db0d Mon Sep 17 00:00:00 2001 From: Leijurv Date: Thu, 21 Mar 2019 16:58:31 -0700 Subject: [PATCH 1/4] add two new awesome badges --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index f292bc644..f498951c5 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ [![KAMI integration](https://img.shields.io/badge/KAMI%20integration-v1.0.0-red.svg)](https://github.com/zeroeightysix/KAMI/) [![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) +[![forthebadge](https://forthebadge.com/images/badges/built-with-swag.svg)](http://forthebadge.com) +[![forthebadge](https://forthebadge.com/images/badges/mom-made-pizza-rolls.svg)](http://forthebadge.com) A Minecraft pathfinder bot. From ac1ac50158e1b463e93e59ba8d39881cf080da58 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 22 Mar 2019 14:36:21 -0700 Subject: [PATCH 2/4] add some builder commands to usage --- USAGE.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/USAGE.md b/USAGE.md index 2750ac781..224603786 100644 --- a/USAGE.md +++ b/USAGE.md @@ -34,7 +34,7 @@ Some common examples: - `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. left click to path into it, right click to path on top of it. +- `click` to click your destination on the screen. left click to path into it, right click to path on top of it. left click and drag to clear 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). - `save waypointName` to save a waypoint. `goto waypointName` to go to it. - `axis` to go to an axis or diagonal axis at y=120 (`axisHeight` is a configurable setting, defaults to 120). @@ -42,6 +42,7 @@ Some common examples: - `render` to rerender the world in case `renderCachedChunks` is being glitchy - `version` to get the version of Baritone you're running - `damn` daniel +- `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). 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). From bc49b2d5ba9bb8871f2f08a919629f1f1ec5275a Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 22 Mar 2019 15:50:23 -0700 Subject: [PATCH 3/4] add allowDownward, fixes #369 --- src/api/java/baritone/api/Settings.java | 7 +++++++ .../java/baritone/pathing/movement/CalculationContext.java | 2 ++ .../pathing/movement/movements/MovementDownward.java | 3 +++ 3 files changed, 12 insertions(+) diff --git a/src/api/java/baritone/api/Settings.java b/src/api/java/baritone/api/Settings.java index c70d60dee..b2d89fd87 100644 --- a/src/api/java/baritone/api/Settings.java +++ b/src/api/java/baritone/api/Settings.java @@ -121,6 +121,13 @@ public final class Settings { */ public final Setting allowDiagonalDescend = new Setting<>(false); + /** + * Allow mining the block directly beneath its feet + *

+ * Turn this off to force it to make more staircases and less shafts + */ + public final Setting allowDownward = new Setting<>(true); + /** * Blocks that Baritone is allowed to place (as throwaway, for sneak bridging, pillaring, etc.) */ diff --git a/src/main/java/baritone/pathing/movement/CalculationContext.java b/src/main/java/baritone/pathing/movement/CalculationContext.java index 6edb89532..4dda32831 100644 --- a/src/main/java/baritone/pathing/movement/CalculationContext.java +++ b/src/main/java/baritone/pathing/movement/CalculationContext.java @@ -60,6 +60,7 @@ public class CalculationContext { public final boolean allowJumpAt256; public final boolean assumeWalkOnWater; public final boolean allowDiagonalDescend; + public final boolean allowDownward; public final int maxFallHeightNoWater; public final int maxFallHeightBucket; public final double waterWalkSpeed; @@ -91,6 +92,7 @@ public class CalculationContext { this.allowJumpAt256 = Baritone.settings().allowJumpAt256.value; this.assumeWalkOnWater = Baritone.settings().assumeWalkOnWater.value; this.allowDiagonalDescend = Baritone.settings().allowDiagonalDescend.value; + this.allowDownward = Baritone.settings().allowDownward.value; this.maxFallHeightNoWater = Baritone.settings().maxFallHeightNoWater.value; this.maxFallHeightBucket = Baritone.settings().maxFallHeightBucket.value; int depth = EnchantmentHelper.getDepthStriderModifier(player); diff --git a/src/main/java/baritone/pathing/movement/movements/MovementDownward.java b/src/main/java/baritone/pathing/movement/movements/MovementDownward.java index 2bec8fcf3..47ed95808 100644 --- a/src/main/java/baritone/pathing/movement/movements/MovementDownward.java +++ b/src/main/java/baritone/pathing/movement/movements/MovementDownward.java @@ -48,6 +48,9 @@ public class MovementDownward extends Movement { } public static double cost(CalculationContext context, int x, int y, int z) { + if (!context.allowDownward) { + return COST_INF; + } if (!MovementHelper.canWalkOn(context.bsi, x, y - 2, z)) { return COST_INF; } From 170c2d35c2d380a9347bddc8e2bcdd8dce587624 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 22 Mar 2019 21:17:20 -0700 Subject: [PATCH 4/4] perhaps updating debian will help --- Dockerfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index bec43d699..020bea0c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,16 @@ -FROM debian:jessie +FROM debian:stretch -RUN echo 'deb http://deb.debian.org/debian jessie-backports main' > /etc/apt/sources.list.d/jessie-backports.list +RUN echo 'deb http://deb.debian.org/debian stretch-backports main' > /etc/apt/sources.list.d/stretch-backports.list ENV DEBIAN_FRONTEND noninteractive RUN apt update -y -RUN apt install --target-release jessie-backports \ +RUN apt install \ openjdk-8-jdk \ - ca-certificates-java \ --assume-yes -RUN apt install -qq --force-yes mesa-utils libgl1-mesa-glx libxcursor1 libxrandr2 libxxf86vm1 x11-xserver-utils xfonts-base xserver-common +RUN apt install -qq --assume-yes mesa-utils libgl1-mesa-glx libxcursor1 libxrandr2 libxxf86vm1 x11-xserver-utils xfonts-base xserver-common COPY . /code @@ -21,4 +20,4 @@ WORKDIR /code # source: https://github.com/tectonicus/tectonicus/issues/60#issuecomment-154239173 RUN dpkg -i scripts/xvfb_1.16.4-1_amd64.deb -RUN ./gradlew build \ No newline at end of file +RUN ./gradlew build