From c2624bbaafd88b7c02b07f8fc4d65c35637b9f1a Mon Sep 17 00:00:00 2001 From: Leijurv Date: Tue, 21 Apr 2020 13:32:47 -0700 Subject: [PATCH 01/23] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 75ce55135..5e19309d4 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ A Minecraft pathfinder bot. 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. -The easiest way to install Baritone is to install [Impact](https://impactclient.net/), which comes with Baritone. The second easiest way (for 1.12.2 only) is to install the v1.2.* forge api jar from [releases](https://github.com/cabaletta/baritone/releases). Otherwise, see [Installation & setup](SETUP.md). Once Baritone is installed, look [here](USAGE.md) for instructions on how to use it. +The easiest way to install Baritone is to install [Impact](https://impactclient.net/), which comes with Baritone. The second easiest way (for 1.12.2 only) is to install the v1.2.* forge api jar from [releases](https://github.com/cabaletta/baritone/releases). For 1.12.2, click [here](https://github.com/cabaletta/baritone/releases/download/v1.2.14/baritone-api-forge-1.2.14.jar). Otherwise, see [Installation & setup](SETUP.md). Once Baritone is installed, look [here](USAGE.md) for instructions on how to use it. For 1.15.2, [click here](https://www.youtube.com/watch?v=j1qKtCZFURM) and see description. From 10677040e07c93e60ae7d07f8e01680fad6f0328 Mon Sep 17 00:00:00 2001 From: Dominika Date: Sun, 26 Apr 2020 15:22:24 -0400 Subject: [PATCH 02/23] Fix broken API Settings link in USAGE. Close #1040 --- USAGE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/USAGE.md b/USAGE.md index b22537406..d817c24cb 100644 --- a/USAGE.md +++ b/USAGE.md @@ -52,7 +52,7 @@ Some common examples: - `version` to get the version of Baritone you're running - `damn` daniel -For the rest of the commands, you can take a look at the code [here](https://github.com/cabaletta/baritone/blob/master/src/api/java/baritone/api/utils/ExampleBaritoneControl.java). +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. From d0f594065d9fe86a4f1ecfca6e3314c8c506a59e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Sun, 26 Apr 2020 13:22:55 -0700 Subject: [PATCH 03/23] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5e19309d4..21ae5cd7e 100644 --- a/README.md +++ b/README.md @@ -34,9 +34,9 @@ A Minecraft pathfinder bot. 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. -The easiest way to install Baritone is to install [Impact](https://impactclient.net/), which comes with Baritone. The second easiest way (for 1.12.2 only) is to install the v1.2.* forge api jar from [releases](https://github.com/cabaletta/baritone/releases). For 1.12.2, click [here](https://github.com/cabaletta/baritone/releases/download/v1.2.14/baritone-api-forge-1.2.14.jar). Otherwise, see [Installation & setup](SETUP.md). Once Baritone is installed, look [here](USAGE.md) for instructions on how to use it. +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, click [here](https://github.com/cabaletta/baritone/releases/download/v1.2.14/baritone-api-forge-1.2.14.jar). Otherwise, see [Installation & setup](SETUP.md). Once Baritone is installed, look [here](USAGE.md) for instructions on how to use it. -For 1.15.2, [click here](https://www.youtube.com/watch?v=j1qKtCZFURM) and see description. +For 1.15.2, [click here](https://www.youtube.com/watch?v=j1qKtCZFURM) and see description. If you need Forge 1.15.2, look [here](https://github.com/cabaletta/baritone/releases/tag/v1.5.3), follow the instructions, and get the `api-forge` jar. This project is an updated version of [MineBot](https://github.com/leijurv/MineBot/), the original version of the bot for Minecraft 1.8.9, rebuilt for 1.12.2 through 1.15.2. Baritone focuses on reliability and particularly performance (it's over [30x faster](https://github.com/cabaletta/baritone/pull/180#issuecomment-423822928) than MineBot at calculating paths). From 89ab78a329a86d980f1660e30f6d04d4426e5a1c Mon Sep 17 00:00:00 2001 From: Leijurv Date: Sun, 3 May 2020 18:51:21 -0700 Subject: [PATCH 04/23] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 21ae5cd7e..e0d5ee70d 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ A Minecraft pathfinder bot. 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. -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, click [here](https://github.com/cabaletta/baritone/releases/download/v1.2.14/baritone-api-forge-1.2.14.jar). Otherwise, see [Installation & setup](SETUP.md). Once Baritone is installed, look [here](USAGE.md) for instructions on how to use it. +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.14/baritone-api-forge-1.2.14.jar)**. Otherwise, see [Installation & setup](SETUP.md). Once Baritone is installed, look [here](USAGE.md) for instructions on how to use it. For 1.15.2, [click here](https://www.youtube.com/watch?v=j1qKtCZFURM) and see description. If you need Forge 1.15.2, look [here](https://github.com/cabaletta/baritone/releases/tag/v1.5.3), follow the instructions, and get the `api-forge` jar. From 806dc8f0171907c394e32b7c8a69c8cf052aeaa0 Mon Sep 17 00:00:00 2001 From: Babbaj Date: Mon, 4 May 2020 01:15:18 -0400 Subject: [PATCH 05/23] This had to be done --- src/main/java/baritone/BaritoneProvider.java | 4 ++-- .../{BaritoneChatControl.java => ExampleBaritoneControl.java} | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename src/main/java/baritone/command/{BaritoneChatControl.java => ExampleBaritoneControl.java} (98%) diff --git a/src/main/java/baritone/BaritoneProvider.java b/src/main/java/baritone/BaritoneProvider.java index 84034ef33..6f64a8350 100644 --- a/src/main/java/baritone/BaritoneProvider.java +++ b/src/main/java/baritone/BaritoneProvider.java @@ -22,7 +22,7 @@ import baritone.api.IBaritoneProvider; import baritone.api.cache.IWorldScanner; import baritone.api.command.ICommandSystem; import baritone.api.schematic.ISchematicSystem; -import baritone.command.BaritoneChatControl; +import baritone.command.ExampleBaritoneControl; import baritone.cache.WorldScanner; import baritone.command.CommandSystem; import baritone.utils.schematic.SchematicSystem; @@ -44,7 +44,7 @@ public final class BaritoneProvider implements IBaritoneProvider { this.all = Collections.singletonList(this.primary); // Setup chat control, just for the primary instance - new BaritoneChatControl(this.primary); + new ExampleBaritoneControl(this.primary); } @Override diff --git a/src/main/java/baritone/command/BaritoneChatControl.java b/src/main/java/baritone/command/ExampleBaritoneControl.java similarity index 98% rename from src/main/java/baritone/command/BaritoneChatControl.java rename to src/main/java/baritone/command/ExampleBaritoneControl.java index 15f15abe6..53b34df0a 100644 --- a/src/main/java/baritone/command/BaritoneChatControl.java +++ b/src/main/java/baritone/command/ExampleBaritoneControl.java @@ -49,12 +49,12 @@ import java.util.stream.Stream; import static baritone.api.command.IBaritoneChatControl.FORCE_COMMAND_PREFIX; -public class BaritoneChatControl implements Helper, AbstractGameEventListener { +public class ExampleBaritoneControl implements Helper, AbstractGameEventListener { private static final Settings settings = BaritoneAPI.getSettings(); private final ICommandManager manager; - public BaritoneChatControl(IBaritone baritone) { + public ExampleBaritoneControl(IBaritone baritone) { this.manager = baritone.getCommandManager(); baritone.getGameEventHandler().registerEventListener(this); } From a76cf0fe9a1837ab3abbc8fe425a3be5b6cff220 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Sun, 17 May 2020 18:35:41 -0700 Subject: [PATCH 06/23] brady more like brainletdy --- src/main/java/baritone/command/defaults/BuildCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/baritone/command/defaults/BuildCommand.java b/src/main/java/baritone/command/defaults/BuildCommand.java index 273c5bc3d..724582865 100644 --- a/src/main/java/baritone/command/defaults/BuildCommand.java +++ b/src/main/java/baritone/command/defaults/BuildCommand.java @@ -46,7 +46,7 @@ public class BuildCommand extends Command { public void execute(String label, IArgConsumer args) throws CommandException { File file = args.getDatatypePost(RelativeFile.INSTANCE, schematicsDir).getAbsoluteFile(); if (FilenameUtils.getExtension(file.getAbsolutePath()).isEmpty()) { - file = new File(file.getAbsolutePath() + "." + Baritone.settings().schematicFallbackExtension); + file = new File(file.getAbsolutePath() + "." + Baritone.settings().schematicFallbackExtension.value); } BetterBlockPos origin = ctx.playerFeet(); BetterBlockPos buildOrigin; From ca831bc734c5de76c458f89f311843df14b14e0f Mon Sep 17 00:00:00 2001 From: Dominika Date: Mon, 18 May 2020 13:47:57 -0400 Subject: [PATCH 07/23] Added blue badge to integrations badges --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e0d5ee70d..dbb1331c3 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ [![GitHub contributors](https://img.shields.io/github/contributors/cabaletta/baritone.svg)](https://github.com/cabaletta/baritone/graphs/contributors/) [![GitHub commits](https://img.shields.io/github/commits-since/cabaletta/baritone/v1.0.0.svg)](https://github.com/cabaletta/baritone/commit/) [![Impact integration](https://img.shields.io/badge/Impact%20integration-v1.2.10%20/%20v1.3.5%20/%20v1.4.3-brightgreen.svg)](https://impactclient.net/) +[![KAMI Blue integration](https://img.shields.io/badge/KAMI%20Blue%20integration-v1.2.14--master-brightgreen)](https://github.com/kami-blue/client) [![ForgeHax integration](https://img.shields.io/badge/ForgeHax%20%22integration%22-scuffed-yellow.svg)](https://github.com/fr1kin/ForgeHax/) [![Aristois add-on integration](https://img.shields.io/badge/Aristois%20add--on%20integration-v1.3.4%20/%20v1.4.1-green.svg)](https://gitlab.com/emc-mods-indrit/baritone_api) [![rootNET integration](https://img.shields.io/badge/rootNET%20integration-v1.2.11-green.svg)](https://rootnet.dev/) From 80c8294f5f956896ffc3f12cbf51e476d6859f8a Mon Sep 17 00:00:00 2001 From: Leijurv Date: Thu, 4 Jun 2020 11:32:20 -0700 Subject: [PATCH 08/23] maintain obscenely obvious pro impact bias in subconscious coloring --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dbb1331c3..0d36fdcc0 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ [![GitHub contributors](https://img.shields.io/github/contributors/cabaletta/baritone.svg)](https://github.com/cabaletta/baritone/graphs/contributors/) [![GitHub commits](https://img.shields.io/github/commits-since/cabaletta/baritone/v1.0.0.svg)](https://github.com/cabaletta/baritone/commit/) [![Impact integration](https://img.shields.io/badge/Impact%20integration-v1.2.10%20/%20v1.3.5%20/%20v1.4.3-brightgreen.svg)](https://impactclient.net/) -[![KAMI Blue integration](https://img.shields.io/badge/KAMI%20Blue%20integration-v1.2.14--master-brightgreen)](https://github.com/kami-blue/client) +[![KAMI Blue integration](https://img.shields.io/badge/KAMI%20Blue%20integration-v1.2.14--master-green)](https://github.com/kami-blue/client) [![ForgeHax integration](https://img.shields.io/badge/ForgeHax%20%22integration%22-scuffed-yellow.svg)](https://github.com/fr1kin/ForgeHax/) [![Aristois add-on integration](https://img.shields.io/badge/Aristois%20add--on%20integration-v1.3.4%20/%20v1.4.1-green.svg)](https://gitlab.com/emc-mods-indrit/baritone_api) [![rootNET integration](https://img.shields.io/badge/rootNET%20integration-v1.2.11-green.svg)](https://rootnet.dev/) From eafca1e1fe46d277fc573760b68ce5beae315ef2 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Mon, 6 Jul 2020 17:07:59 -0700 Subject: [PATCH 09/23] yourkit --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0d36fdcc0..16641d617 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,16 @@ That's what it's for, sure! (As long as usage is in compliance with the LGPL 3.0 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. From f02476ff3aaf722f2dd76e5c94d0fce27b8e0760 Mon Sep 17 00:00:00 2001 From: CorruptedSeal <68251040+CorruptedSeal@users.noreply.github.com> Date: Wed, 15 Jul 2020 01:18:01 -0600 Subject: [PATCH 10/23] Update ProguardTask.java --- .../baritone/gradle/task/ProguardTask.java | 105 +++++++++++++++++- 1 file changed, 104 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java b/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java index 30ffddfbc..dbeca172b 100644 --- a/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java +++ b/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java @@ -21,13 +21,21 @@ 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.JavaVersion; import org.gradle.api.NamedDomainObjectContainer; import org.gradle.api.artifacts.Configuration; import org.gradle.api.artifacts.Dependency; +import org.gradle.api.internal.file.IdentityFileResolver; import org.gradle.api.internal.plugins.DefaultConvention; import org.gradle.api.tasks.Input; import org.gradle.api.tasks.TaskAction; +import org.gradle.api.tasks.TaskCollection; +import org.gradle.api.tasks.compile.ForkOptions; +import org.gradle.api.tasks.compile.JavaCompile; import org.gradle.internal.Pair; +import org.gradle.internal.jvm.Jvm; +import org.gradle.internal.jvm.inspection.DefaultJvmVersionDetector; +import org.gradle.process.internal.DefaultExecActionFactory; import java.io.*; import java.lang.reflect.Field; @@ -101,6 +109,101 @@ public class ProguardTask extends BaritoneGradleTask { } } + private String getJavaBinPathForProguard() { + 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 RuntimeException("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 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) { + 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); @@ -110,7 +213,7 @@ public class ProguardTask extends BaritoneGradleTask { 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(); + Process p = new ProcessBuilder(this.getJavaBinPathForProguard(), "-verbose").start(); String out = IOUtils.toString(p.getInputStream(), "UTF-8").split("\n")[0].split("Opened ")[1].replace("]", ""); template.add(2, "-libraryjars '" + out + "'"); From d522f9dfa3e2b5c000e4ebf8e57a6a00607f45ea Mon Sep 17 00:00:00 2001 From: CorruptedSeal <68251040+CorruptedSeal@users.noreply.github.com> Date: Wed, 15 Jul 2020 01:34:19 -0600 Subject: [PATCH 11/23] Update ProguardTask.java --- buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java b/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java index dbeca172b..ead398b37 100644 --- a/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java +++ b/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java @@ -132,8 +132,8 @@ public class ProguardTask extends BaritoneGradleTask { path = findJavaByGradleCurrentRuntime(); if (path != null) return path; - - throw new RuntimeException("Unable to find java to determine ProGuard libraryjars. Please specify forkOptions.executable in javaCompile," + + + 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)"); } From cbb3483456c74e509b18e5ee98ea2369c65ee4b7 Mon Sep 17 00:00:00 2001 From: elongated muskrat <56513556+elonmusksama@users.noreply.github.com> Date: Thu, 16 Jul 2020 14:35:17 -0300 Subject: [PATCH 12/23] updated compatible versions to future badge updated the compatible versions to the future integrations badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 16641d617..83305b618 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ [![Aristois add-on integration](https://img.shields.io/badge/Aristois%20add--on%20integration-v1.3.4%20/%20v1.4.1-green.svg)](https://gitlab.com/emc-mods-indrit/baritone_api) [![rootNET integration](https://img.shields.io/badge/rootNET%20integration-v1.2.11-green.svg)](https://rootnet.dev/) [![WWE integration](https://img.shields.io/badge/WWE%20%22integration%22-master%3F-green.svg)](https://wweclient.com/) -[![Future integration](https://img.shields.io/badge/Future%20integration-Soon™%3F%3F%3F-red.svg)](https://futureclient.net/) +[![Future integration](https://img.shields.io/badge/Future%20integration-v1.2.12%20%2F%20v1.3.6%20%2F%20v1.4.4-red)](https://futureclient.net/) [![forthebadge](https://forthebadge.com/images/badges/built-with-swag.svg)](http://forthebadge.com/) [![forthebadge](https://forthebadge.com/images/badges/mom-made-pizza-rolls.svg)](http://forthebadge.com/) From 2acf64a0d069e33eccb7e6d10840467809f8b843 Mon Sep 17 00:00:00 2001 From: John <43681932+John200410@users.noreply.github.com> Date: Mon, 20 Jul 2020 03:12:24 -0400 Subject: [PATCH 13/23] add rusherhack integration badge as of rusherhack v1.0 there is baritone API integration, similar to future's. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 83305b618..a095a2e5f 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ [![rootNET integration](https://img.shields.io/badge/rootNET%20integration-v1.2.11-green.svg)](https://rootnet.dev/) [![WWE integration](https://img.shields.io/badge/WWE%20%22integration%22-master%3F-green.svg)](https://wweclient.com/) [![Future integration](https://img.shields.io/badge/Future%20integration-v1.2.12%20%2F%20v1.3.6%20%2F%20v1.4.4-red)](https://futureclient.net/) +[![RusherHack integration](https://img.shields.io/badge/RusherHack%20integration-v1.2.14-green)](https://rusherhack.org/) [![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/) From 246dd2b0ad2303bc6ac8a9b3810a29161ffaaf9e Mon Sep 17 00:00:00 2001 From: CDAGaming Date: Sat, 25 Jul 2020 22:28:38 -0500 Subject: [PATCH 14/23] [Change] Added Auto Build Support --- .gitlab-ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..35220c614 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,13 @@ +image: java:8 + +before_script: + - which java + - which javac + +build: + script: + - ./gradlew build + artifacts: + paths: + - build/libs/*.jar + expire_in: 1 month From dbeee3365782560d344b0a728284ee8289e5f8f4 Mon Sep 17 00:00:00 2001 From: CDAGaming Date: Sat, 25 Jul 2020 22:52:46 -0500 Subject: [PATCH 15/23] [Fix] Fix Proguard from Master Merge Someone didn't verify this even built xD --- buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java b/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java index 6ad9e5a4e..9a2e063f6 100644 --- a/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java +++ b/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java @@ -99,7 +99,7 @@ public class ProguardTask extends BaritoneGradleTask { } } - private String getJavaBinPathForProguard() { + private String getJavaBinPathForProguard() throws Exception { String path; try { path = findJavaPathByGradleConfig(); From 4f1db04224db8f2c76e84e02055d2d8c09127aba Mon Sep 17 00:00:00 2001 From: CDAGaming Date: Sat, 25 Jul 2020 22:53:22 -0500 Subject: [PATCH 16/23] [Change] Updated Mappings --- build.gradle | 2 +- .../api/command/helpers/Paginator.java | 18 +++++++------- src/api/java/baritone/api/utils/Helper.java | 18 +++++++------- .../mixins/MixinCommandSuggestionHelper.java | 8 +++---- .../baritone/behavior/PathingBehavior.java | 2 +- .../command/ExampleBaritoneControl.java | 2 +- .../command/defaults/ChestsCommand.java | 2 +- .../command/defaults/ComeCommand.java | 2 +- .../command/defaults/HelpCommand.java | 20 ++++++++-------- .../baritone/command/defaults/SelCommand.java | 2 +- .../baritone/command/defaults/SetCommand.java | 18 +++++++------- .../command/defaults/WaypointsCommand.java | 24 +++++++++---------- .../pathing/movement/CalculationContext.java | 2 +- .../movement/movements/MovementFall.java | 8 +++---- .../movement/movements/MovementParkour.java | 2 +- .../movement/movements/MovementTraverse.java | 2 +- .../baritone/pathing/path/PathExecutor.java | 4 ++-- .../java/baritone/process/BuilderProcess.java | 6 ++--- .../java/baritone/process/FarmProcess.java | 2 +- .../java/baritone/process/FollowProcess.java | 2 +- .../java/baritone/process/MineProcess.java | 6 ++--- .../java/baritone/utils/BaritoneAutoTest.java | 2 +- src/main/java/baritone/utils/GuiClick.java | 2 +- .../baritone/utils/PlayerMovementInput.java | 2 +- .../baritone/utils/pathing/Avoidance.java | 2 +- 25 files changed, 80 insertions(+), 80 deletions(-) diff --git a/build.gradle b/build.gradle index 5cb167351..f92ec606f 100755 --- a/build.gradle +++ b/build.gradle @@ -85,7 +85,7 @@ task sourceJar(type: Jar, dependsOn: classes) { } minecraft { - mappings channel: 'snapshot', version: '20200707-1.16.1' + mappings channel: 'snapshot', version: '20200723-1.16.1' if (getProject().hasProperty("baritone.forge_build")) { reobfMappings 'searge' diff --git a/src/api/java/baritone/api/command/helpers/Paginator.java b/src/api/java/baritone/api/command/helpers/Paginator.java index b4fe28941..dda510ecd 100644 --- a/src/api/java/baritone/api/command/helpers/Paginator.java +++ b/src/api/java/baritone/api/command/helpers/Paginator.java @@ -77,7 +77,7 @@ public class Paginator implements Helper { boolean hasNextPage = commandPrefix != null && validPage(page + 1); TextComponent prevPageComponent = new StringTextComponent("<<"); if (hasPrevPage) { - prevPageComponent.func_230530_a_(prevPageComponent.getStyle() + prevPageComponent.setStyle(prevPageComponent.getStyle() .setClickEvent(new ClickEvent( ClickEvent.Action.RUN_COMMAND, String.format("%s %d", commandPrefix, page - 1) @@ -87,11 +87,11 @@ public class Paginator implements Helper { new StringTextComponent("Click to view previous page") ))); } else { - prevPageComponent.func_230530_a_(prevPageComponent.getStyle().setFormatting(TextFormatting.DARK_GRAY)); + prevPageComponent.setStyle(prevPageComponent.getStyle().setFormatting(TextFormatting.DARK_GRAY)); } TextComponent nextPageComponent = new StringTextComponent(">>"); if (hasNextPage) { - nextPageComponent.func_230530_a_(nextPageComponent.getStyle() + nextPageComponent.setStyle(nextPageComponent.getStyle() .setClickEvent(new ClickEvent( ClickEvent.Action.RUN_COMMAND, String.format("%s %d", commandPrefix, page + 1) @@ -101,14 +101,14 @@ public class Paginator implements Helper { new StringTextComponent("Click to view next page") ))); } else { - nextPageComponent.func_230530_a_(nextPageComponent.getStyle().setFormatting(TextFormatting.DARK_GRAY)); + nextPageComponent.setStyle(nextPageComponent.getStyle().setFormatting(TextFormatting.DARK_GRAY)); } TextComponent pagerComponent = new StringTextComponent(""); - pagerComponent.func_230530_a_(pagerComponent.getStyle().setFormatting(TextFormatting.GRAY)); - pagerComponent.func_230529_a_(prevPageComponent); // appendSibling - pagerComponent.func_240702_b_(" | "); // appendText - pagerComponent.func_230529_a_(nextPageComponent); - pagerComponent.func_240702_b_(String.format(" %d/%d", page, getMaxPage())); + pagerComponent.setStyle(pagerComponent.getStyle().setFormatting(TextFormatting.GRAY)); + pagerComponent.append(prevPageComponent); + pagerComponent.appendString(" | "); + pagerComponent.append(nextPageComponent); + pagerComponent.appendString(String.format(" %d/%d", page, getMaxPage())); logDirect(pagerComponent); } diff --git a/src/api/java/baritone/api/utils/Helper.java b/src/api/java/baritone/api/utils/Helper.java index c96c8d8d4..2562e563e 100755 --- a/src/api/java/baritone/api/utils/Helper.java +++ b/src/api/java/baritone/api/utils/Helper.java @@ -52,14 +52,14 @@ public interface Helper { final Calendar now = Calendar.getInstance(); final boolean xd = now.get(Calendar.MONTH) == Calendar.APRIL && now.get(Calendar.DAY_OF_MONTH) <= 3; TextComponent baritone = new StringTextComponent(xd ? "Baritoe" : BaritoneAPI.getSettings().shortBaritonePrefix.value ? "B" : "Baritone"); - baritone.func_230530_a_(baritone.getStyle().setFormatting(TextFormatting.LIGHT_PURPLE)); + baritone.setStyle(baritone.getStyle().setFormatting(TextFormatting.LIGHT_PURPLE)); // Outer brackets TextComponent prefix = new StringTextComponent(""); - prefix.func_230530_a_(baritone.getStyle().setFormatting(TextFormatting.DARK_PURPLE)); - prefix.func_240702_b_("["); - prefix.func_230529_a_(baritone); - prefix.func_240702_b_("]"); + prefix.setStyle(baritone.getStyle().setFormatting(TextFormatting.DARK_PURPLE)); + prefix.appendString("["); + prefix.append(baritone); + prefix.appendString("]"); return prefix; } @@ -85,9 +85,9 @@ public interface Helper { */ default void logDirect(ITextComponent... components) { TextComponent component = new StringTextComponent(""); - component.func_230529_a_(getPrefix()); - component.func_230529_a_(new StringTextComponent(" ")); - Arrays.asList(components).forEach(component::func_230529_a_); + component.append(getPrefix()); + component.append(new StringTextComponent(" ")); + Arrays.asList(components).forEach(component::append); mc.execute(() -> BaritoneAPI.getSettings().logger.value.accept(component)); } @@ -101,7 +101,7 @@ public interface Helper { default void logDirect(String message, TextFormatting color) { Stream.of(message.split("\n")).forEach(line -> { TextComponent component = new StringTextComponent(line.replace("\t", " ")); - component.func_230530_a_(component.getStyle().setFormatting(color)); + component.setStyle(component.getStyle().setFormatting(color)); logDirect(component); }); } diff --git a/src/launch/java/baritone/launch/mixins/MixinCommandSuggestionHelper.java b/src/launch/java/baritone/launch/mixins/MixinCommandSuggestionHelper.java index d749c35b8..06abfd674 100644 --- a/src/launch/java/baritone/launch/mixins/MixinCommandSuggestionHelper.java +++ b/src/launch/java/baritone/launch/mixins/MixinCommandSuggestionHelper.java @@ -52,7 +52,7 @@ public class MixinCommandSuggestionHelper { private List field_228103_l_; @Shadow - private CompletableFuture field_228107_p_; + private CompletableFuture suggestionsFuture; @Inject( method = "init", @@ -78,7 +78,7 @@ public class MixinCommandSuggestionHelper { this.field_228103_l_.clear(); if (event.completions.length == 0) { - this.field_228107_p_ = Suggestions.empty(); + this.suggestionsFuture = Suggestions.empty(); } else { int offset = this.field_228095_d_.getText().endsWith(" ") ? this.field_228095_d_.getCursorPosition() @@ -92,8 +92,8 @@ public class MixinCommandSuggestionHelper { StringRange.between(offset, offset + suggestionList.stream().mapToInt(s -> s.getText().length()).max().orElse(0)), suggestionList); - this.field_228107_p_ = new CompletableFuture<>(); - this.field_228107_p_.complete(suggestions); + this.suggestionsFuture = new CompletableFuture<>(); + this.suggestionsFuture.complete(suggestions); } } } diff --git a/src/main/java/baritone/behavior/PathingBehavior.java b/src/main/java/baritone/behavior/PathingBehavior.java index 91f6a8504..8db5a7416 100644 --- a/src/main/java/baritone/behavior/PathingBehavior.java +++ b/src/main/java/baritone/behavior/PathingBehavior.java @@ -380,7 +380,7 @@ public final class PathingBehavior extends Behavior implements IPathingBehavior, public BetterBlockPos pathStart() { // TODO move to a helper or util class BetterBlockPos feet = ctx.playerFeet(); if (!MovementHelper.canWalkOn(ctx, feet.down())) { - if (ctx.player().func_233570_aj_()) { + if (ctx.player().isOnGround()) { double playerX = ctx.player().getPositionVec().x; double playerZ = ctx.player().getPositionVec().z; ArrayList closest = new ArrayList<>(); diff --git a/src/main/java/baritone/command/ExampleBaritoneControl.java b/src/main/java/baritone/command/ExampleBaritoneControl.java index 9c6313dd2..ed2c1f06c 100644 --- a/src/main/java/baritone/command/ExampleBaritoneControl.java +++ b/src/main/java/baritone/command/ExampleBaritoneControl.java @@ -80,7 +80,7 @@ public class ExampleBaritoneControl implements Helper, AbstractGameEventListener String msg = command + rest; String toDisplay = settings.censorRanCommands.value ? command + " ..." : msg; TextComponent component = new StringTextComponent(String.format("> %s", toDisplay)); - component.func_230530_a_(component.getStyle() + component.setStyle(component.getStyle() .setFormatting(TextFormatting.WHITE) .setHoverEvent(new HoverEvent( HoverEvent.Action.SHOW_TEXT, diff --git a/src/main/java/baritone/command/defaults/ChestsCommand.java b/src/main/java/baritone/command/defaults/ChestsCommand.java index 2037e1f61..4e4f3a2c3 100644 --- a/src/main/java/baritone/command/defaults/ChestsCommand.java +++ b/src/main/java/baritone/command/defaults/ChestsCommand.java @@ -55,7 +55,7 @@ public class ChestsCommand extends Command { logDirect(pos.toString()); for (ItemStack item : inv.getContents()) { IFormattableTextComponent component = (IFormattableTextComponent) item.getTextComponent(); - component.func_240702_b_(String.format(" x %d", item.getCount())); + component.appendString(String.format(" x %d", item.getCount())); logDirect(component); } } diff --git a/src/main/java/baritone/command/defaults/ComeCommand.java b/src/main/java/baritone/command/defaults/ComeCommand.java index 04d804b46..354acb9e4 100644 --- a/src/main/java/baritone/command/defaults/ComeCommand.java +++ b/src/main/java/baritone/command/defaults/ComeCommand.java @@ -42,7 +42,7 @@ public class ComeCommand extends Command { if (entity == null) { throw new CommandInvalidStateException("render view entity is null"); } - baritone.getCustomGoalProcess().setGoalAndPath(new GoalBlock(entity.func_233580_cy_())); + baritone.getCustomGoalProcess().setGoalAndPath(new GoalBlock(entity.getPosition())); logDirect("Coming"); } diff --git a/src/main/java/baritone/command/defaults/HelpCommand.java b/src/main/java/baritone/command/defaults/HelpCommand.java index 19cdce6ca..bdd49bc99 100644 --- a/src/main/java/baritone/command/defaults/HelpCommand.java +++ b/src/main/java/baritone/command/defaults/HelpCommand.java @@ -59,19 +59,19 @@ public class HelpCommand extends Command { String names = String.join("/", command.getNames()); String name = command.getNames().get(0); TextComponent shortDescComponent = new StringTextComponent(" - " + command.getShortDesc()); - shortDescComponent.func_230530_a_(shortDescComponent.getStyle().setFormatting(TextFormatting.DARK_GRAY)); + shortDescComponent.setStyle(shortDescComponent.getStyle().setFormatting(TextFormatting.DARK_GRAY)); TextComponent namesComponent = new StringTextComponent(names); - namesComponent.func_230530_a_(namesComponent.getStyle().setFormatting(TextFormatting.WHITE)); + namesComponent.setStyle(namesComponent.getStyle().setFormatting(TextFormatting.WHITE)); TextComponent hoverComponent = new StringTextComponent(""); - hoverComponent.func_230530_a_(hoverComponent.getStyle().setFormatting(TextFormatting.GRAY)); - hoverComponent.func_230529_a_(namesComponent); - hoverComponent.func_240702_b_("\n" + command.getShortDesc()); - hoverComponent.func_240702_b_("\n\nClick to view full help"); + hoverComponent.setStyle(hoverComponent.getStyle().setFormatting(TextFormatting.GRAY)); + hoverComponent.append(namesComponent); + hoverComponent.appendString("\n" + command.getShortDesc()); + hoverComponent.appendString("\n\nClick to view full help"); String clickCommand = FORCE_COMMAND_PREFIX + String.format("%s %s", label, command.getNames().get(0)); TextComponent component = new StringTextComponent(name); - component.func_230530_a_(component.getStyle().setFormatting(TextFormatting.GRAY)); - component.func_230529_a_(shortDescComponent); - component.func_230530_a_(component.getStyle() + component.setStyle(component.getStyle().setFormatting(TextFormatting.GRAY)); + component.append(shortDescComponent); + component.setStyle(component.getStyle() .setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, hoverComponent)) .setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, clickCommand))); return component; @@ -89,7 +89,7 @@ public class HelpCommand extends Command { command.getLongDesc().forEach(this::logDirect); logDirect(""); TextComponent returnComponent = new StringTextComponent("Click to return to the help menu"); - returnComponent.func_230530_a_(returnComponent.getStyle().setClickEvent(new ClickEvent( + returnComponent.setStyle(returnComponent.getStyle().setClickEvent(new ClickEvent( ClickEvent.Action.RUN_COMMAND, FORCE_COMMAND_PREFIX + label ))); diff --git a/src/main/java/baritone/command/defaults/SelCommand.java b/src/main/java/baritone/command/defaults/SelCommand.java index 529421f7a..5a04fc1df 100644 --- a/src/main/java/baritone/command/defaults/SelCommand.java +++ b/src/main/java/baritone/command/defaults/SelCommand.java @@ -83,7 +83,7 @@ public class SelCommand extends Command { if (action == Action.POS2 && pos1 == null) { throw new CommandInvalidStateException("Set pos1 first before using pos2"); } - BetterBlockPos playerPos = mc.getRenderViewEntity() != null ? BetterBlockPos.from(mc.getRenderViewEntity().func_233580_cy_()) : ctx.playerFeet(); + BetterBlockPos playerPos = mc.getRenderViewEntity() != null ? BetterBlockPos.from(mc.getRenderViewEntity().getPosition()) : ctx.playerFeet(); BetterBlockPos pos = args.hasAny() ? args.getDatatypePost(RelativeBlockPos.INSTANCE, playerPos) : playerPos; args.requireMax(0); if (action == Action.POS1) { diff --git a/src/main/java/baritone/command/defaults/SetCommand.java b/src/main/java/baritone/command/defaults/SetCommand.java index 49430040b..5654670db 100644 --- a/src/main/java/baritone/command/defaults/SetCommand.java +++ b/src/main/java/baritone/command/defaults/SetCommand.java @@ -82,17 +82,17 @@ public class SetCommand extends Command { " (%s)", settingTypeToString(setting) )); - typeComponent.func_230530_a_(typeComponent.getStyle().setFormatting(TextFormatting.DARK_GRAY)); + typeComponent.setStyle(typeComponent.getStyle().setFormatting(TextFormatting.DARK_GRAY)); TextComponent hoverComponent = new StringTextComponent(""); - hoverComponent.func_230530_a_(hoverComponent.getStyle().setFormatting(TextFormatting.GRAY)); - hoverComponent.func_240702_b_(setting.getName()); - hoverComponent.func_240702_b_(String.format("\nType: %s", settingTypeToString(setting))); - hoverComponent.func_240702_b_(String.format("\n\nValue:\n%s", settingValueToString(setting))); + hoverComponent.setStyle(hoverComponent.getStyle().setFormatting(TextFormatting.GRAY)); + hoverComponent.appendString(setting.getName()); + hoverComponent.appendString(String.format("\nType: %s", settingTypeToString(setting))); + hoverComponent.appendString(String.format("\n\nValue:\n%s", settingValueToString(setting))); String commandSuggestion = Baritone.settings().prefix.value + String.format("set %s ", setting.getName()); TextComponent component = new StringTextComponent(setting.getName()); - component.func_230530_a_(component.getStyle().setFormatting(TextFormatting.GRAY)); - component.func_230529_a_(typeComponent); - component.func_230530_a_(component.getStyle() + component.setStyle(component.getStyle().setFormatting(TextFormatting.GRAY)); + component.append(typeComponent); + component.setStyle(component.getStyle() .setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, hoverComponent)) .setClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, commandSuggestion))); return component; @@ -164,7 +164,7 @@ public class SetCommand extends Command { )); } TextComponent oldValueComponent = new StringTextComponent(String.format("Old value: %s", oldValue)); - oldValueComponent.func_230530_a_(oldValueComponent.getStyle() + oldValueComponent.setStyle(oldValueComponent.getStyle() .setFormatting(TextFormatting.GRAY) .setHoverEvent(new HoverEvent( HoverEvent.Action.SHOW_TEXT, diff --git a/src/main/java/baritone/command/defaults/WaypointsCommand.java b/src/main/java/baritone/command/defaults/WaypointsCommand.java index df91d805f..c264088a9 100644 --- a/src/main/java/baritone/command/defaults/WaypointsCommand.java +++ b/src/main/java/baritone/command/defaults/WaypointsCommand.java @@ -61,16 +61,16 @@ public class WaypointsCommand extends Command { BiFunction toComponent = (waypoint, _action) -> { TextComponent component = new StringTextComponent(""); TextComponent tagComponent = new StringTextComponent(waypoint.getTag().name() + " "); - tagComponent.func_230530_a_(tagComponent.getStyle().setFormatting(TextFormatting.GRAY)); + tagComponent.setStyle(tagComponent.getStyle().setFormatting(TextFormatting.GRAY)); String name = waypoint.getName(); TextComponent nameComponent = new StringTextComponent(!name.isEmpty() ? name : ""); - nameComponent.func_230530_a_(nameComponent.getStyle().setFormatting(!name.isEmpty() ? TextFormatting.GRAY : TextFormatting.DARK_GRAY)); + nameComponent.setStyle(nameComponent.getStyle().setFormatting(!name.isEmpty() ? TextFormatting.GRAY : TextFormatting.DARK_GRAY)); TextComponent timestamp = new StringTextComponent(" @ " + new Date(waypoint.getCreationTimestamp())); - timestamp.func_230530_a_(timestamp.getStyle().setFormatting(TextFormatting.DARK_GRAY)); - component.func_230529_a_(tagComponent); - component.func_230529_a_(nameComponent); - component.func_230529_a_(timestamp); - component.func_230530_a_(component.getStyle() + timestamp.setStyle(timestamp.getStyle().setFormatting(TextFormatting.DARK_GRAY)); + component.append(tagComponent); + component.append(nameComponent); + component.append(timestamp); + component.setStyle(component.getStyle() .setHoverEvent(new HoverEvent( HoverEvent.Action.SHOW_TEXT, new StringTextComponent("Click to select") @@ -138,8 +138,8 @@ public class WaypointsCommand extends Command { IWaypoint waypoint = new Waypoint(name, tag, pos); ForWaypoints.waypoints(this.baritone).addWaypoint(waypoint); TextComponent component = new StringTextComponent("Waypoint added: "); - component.func_230530_a_(component.getStyle().setFormatting(TextFormatting.GRAY)); - component.func_230529_a_(toComponent.apply(waypoint, Action.INFO)); + component.setStyle(component.getStyle().setFormatting(TextFormatting.GRAY)); + component.append(toComponent.apply(waypoint, Action.INFO)); logDirect(component); } else if (action == Action.CLEAR) { args.requireMax(1); @@ -196,7 +196,7 @@ public class WaypointsCommand extends Command { logDirect(transform.apply(waypoint)); logDirect(String.format("Position: %s", waypoint.getLocation())); TextComponent deleteComponent = new StringTextComponent("Click to delete this waypoint"); - deleteComponent.func_230530_a_(deleteComponent.getStyle().setClickEvent(new ClickEvent( + deleteComponent.setStyle(deleteComponent.getStyle().setClickEvent(new ClickEvent( ClickEvent.Action.RUN_COMMAND, String.format( "%s%s delete %s @ %d", @@ -207,7 +207,7 @@ public class WaypointsCommand extends Command { ) ))); TextComponent goalComponent = new StringTextComponent("Click to set goal to this waypoint"); - goalComponent.func_230530_a_(goalComponent.getStyle().setClickEvent(new ClickEvent( + goalComponent.setStyle(goalComponent.getStyle().setClickEvent(new ClickEvent( ClickEvent.Action.RUN_COMMAND, String.format( "%s%s goal %s @ %d", @@ -218,7 +218,7 @@ public class WaypointsCommand extends Command { ) ))); TextComponent backComponent = new StringTextComponent("Click to return to the waypoints list"); - backComponent.func_230530_a_(backComponent.getStyle().setClickEvent(new ClickEvent( + backComponent.setStyle(backComponent.getStyle().setClickEvent(new ClickEvent( ClickEvent.Action.RUN_COMMAND, String.format( "%s%s list", diff --git a/src/main/java/baritone/pathing/movement/CalculationContext.java b/src/main/java/baritone/pathing/movement/CalculationContext.java index 744707a50..260e403af 100644 --- a/src/main/java/baritone/pathing/movement/CalculationContext.java +++ b/src/main/java/baritone/pathing/movement/CalculationContext.java @@ -86,7 +86,7 @@ public class CalculationContext { this.bsi = new BlockStateInterface(world, worldData, forUseOnAnotherThread); this.toolSet = new ToolSet(player); this.hasThrowaway = Baritone.settings().allowPlace.value && ((Baritone) baritone).getInventoryBehavior().hasGenericThrowaway(); - this.hasWaterBucket = Baritone.settings().allowWaterBucketFall.value && PlayerInventory.isHotbar(player.inventory.getSlotFor(STACK_BUCKET_WATER)) && world.func_234922_V_() != DimensionType.field_236000_d_; + this.hasWaterBucket = Baritone.settings().allowWaterBucketFall.value && PlayerInventory.isHotbar(player.inventory.getSlotFor(STACK_BUCKET_WATER)) && world.func_234922_V_() != DimensionType.THE_NETHER; this.canSprint = Baritone.settings().allowSprint.value && player.getFoodStats().getFoodLevel() > 6; this.placeBlockCost = Baritone.settings().blockPlacementPenalty.value; this.allowBreak = Baritone.settings().allowBreak.value; diff --git a/src/main/java/baritone/pathing/movement/movements/MovementFall.java b/src/main/java/baritone/pathing/movement/movements/MovementFall.java index a6489384f..da36ac5f8 100644 --- a/src/main/java/baritone/pathing/movement/movements/MovementFall.java +++ b/src/main/java/baritone/pathing/movement/movements/MovementFall.java @@ -97,11 +97,11 @@ public class MovementFall extends Movement { Block destBlock = destState.getBlock(); boolean isWater = destState.getFluidState().getFluid() instanceof WaterFluid; if (!isWater && willPlaceBucket() && !playerFeet.equals(dest)) { - if (!PlayerInventory.isHotbar(ctx.player().inventory.getSlotFor(STACK_BUCKET_WATER)) || ctx.world().func_234922_V_() == DimensionType.field_236000_d_) { + if (!PlayerInventory.isHotbar(ctx.player().inventory.getSlotFor(STACK_BUCKET_WATER)) || ctx.world().func_234922_V_() == DimensionType.THE_NETHER) { return state.setStatus(MovementStatus.UNREACHABLE); } - if (ctx.player().getPositionVec().y - dest.getY() < ctx.playerController().getBlockReachDistance() && !ctx.player().func_233570_aj_()) { + if (ctx.player().getPositionVec().y - dest.getY() < ctx.playerController().getBlockReachDistance() && !ctx.player().isOnGround()) { ctx.player().inventory.currentItem = ctx.player().inventory.getSlotFor(STACK_BUCKET_WATER); targetRotation = new Rotation(toDest.getYaw(), 90.0F); @@ -136,7 +136,7 @@ public class MovementFall extends Movement { } Vector3d destCenter = VecUtils.getBlockPosCenter(dest); // we are moving to the 0.5 center not the edge (like if we were falling on a ladder) if (Math.abs(ctx.player().getPositionVec().x + ctx.player().getMotion().x - destCenter.x) > 0.1 || Math.abs(ctx.player().getPositionVec().z + ctx.player().getMotion().z - destCenter.z) > 0.1) { - if (!ctx.player().func_233570_aj_() && Math.abs(ctx.player().getMotion().y) > 0.4) { + if (!ctx.player().isOnGround() && Math.abs(ctx.player().getMotion().y) > 0.4) { state.setInput(Input.SNEAK, true); } state.setInput(Input.MOVE_FORWARD, true); @@ -148,7 +148,7 @@ public class MovementFall extends Movement { double dist = Math.abs(avoid.getX() * (destCenter.x - avoid.getX() / 2.0 - ctx.player().getPositionVec().x)) + Math.abs(avoid.getZ() * (destCenter.z - avoid.getZ() / 2.0 - ctx.player().getPositionVec().z)); if (dist < 0.6) { state.setInput(Input.MOVE_FORWARD, true); - } else if (!ctx.player().func_233570_aj_()) { + } else if (!ctx.player().isOnGround()) { state.setInput(Input.SNEAK, false); } } diff --git a/src/main/java/baritone/pathing/movement/movements/MovementParkour.java b/src/main/java/baritone/pathing/movement/movements/MovementParkour.java index 9a538bd47..a2afb1996 100644 --- a/src/main/java/baritone/pathing/movement/movements/MovementParkour.java +++ b/src/main/java/baritone/pathing/movement/movements/MovementParkour.java @@ -251,7 +251,7 @@ public class MovementParkour extends Movement { } } else if (!ctx.playerFeet().equals(src)) { if (ctx.playerFeet().equals(src.offset(direction)) || ctx.player().getPositionVec().y - src.y > 0.0001) { - if (!MovementHelper.canWalkOn(ctx, dest.down()) && !ctx.player().func_233570_aj_() && MovementHelper.attemptToPlaceABlock(state, baritone, dest.down(), true, false) == PlaceResult.READY_TO_PLACE) { + if (!MovementHelper.canWalkOn(ctx, dest.down()) && !ctx.player().isOnGround() && MovementHelper.attemptToPlaceABlock(state, baritone, dest.down(), true, false) == PlaceResult.READY_TO_PLACE) { // go in the opposite order to check DOWN before all horizontals -- down is preferable because you don't have to look to the side while in midair, which could mess up the trajectory state.setInput(Input.CLICK_RIGHT, true); } diff --git a/src/main/java/baritone/pathing/movement/movements/MovementTraverse.java b/src/main/java/baritone/pathing/movement/movements/MovementTraverse.java index 62274e2d7..73649a445 100644 --- a/src/main/java/baritone/pathing/movement/movements/MovementTraverse.java +++ b/src/main/java/baritone/pathing/movement/movements/MovementTraverse.java @@ -245,7 +245,7 @@ public class MovementTraverse extends Movement { } Block low = BlockStateInterface.get(ctx, src).getBlock(); Block high = BlockStateInterface.get(ctx, src.up()).getBlock(); - if (ctx.player().getPositionVec().y > src.y + 0.1D && !ctx.player().func_233570_aj_() && (low == Blocks.VINE || low == Blocks.LADDER || high == Blocks.VINE || high == Blocks.LADDER)) { + if (ctx.player().getPositionVec().y > src.y + 0.1D && !ctx.player().isOnGround() && (low == Blocks.VINE || low == Blocks.LADDER || high == Blocks.VINE || high == Blocks.LADDER)) { // hitting W could cause us to climb the ladder instead of going forward // wait until we're on the ground return state; diff --git a/src/main/java/baritone/pathing/path/PathExecutor.java b/src/main/java/baritone/pathing/path/PathExecutor.java index 7c03235c9..ac992cfa6 100644 --- a/src/main/java/baritone/pathing/path/PathExecutor.java +++ b/src/main/java/baritone/pathing/path/PathExecutor.java @@ -274,7 +274,7 @@ public class PathExecutor implements IPathExecutor, Helper { if (!current.isPresent()) { return false; } - if (!ctx.player().func_233570_aj_()) { + if (!ctx.player().isOnGround()) { return false; } if (!MovementHelper.canWalkOn(ctx, ctx.playerFeet().down())) { @@ -323,7 +323,7 @@ public class PathExecutor implements IPathExecutor, Helper { * @return Whether or not it was possible to snap to the current player feet */ public boolean snipsnapifpossible() { - if (!ctx.player().func_233570_aj_() && ctx.world().getFluidState(ctx.playerFeet()).isEmpty()) { + if (!ctx.player().isOnGround() && ctx.world().getFluidState(ctx.playerFeet()).isEmpty()) { // if we're falling in the air, and not in water, don't splice return false; } else { diff --git a/src/main/java/baritone/process/BuilderProcess.java b/src/main/java/baritone/process/BuilderProcess.java index 577244bd2..4acf38a0d 100644 --- a/src/main/java/baritone/process/BuilderProcess.java +++ b/src/main/java/baritone/process/BuilderProcess.java @@ -438,7 +438,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil } Optional> toBreak = toBreakNearPlayer(bcc); - if (toBreak.isPresent() && isSafeToCancel && ctx.player().func_233570_aj_()) { + if (toBreak.isPresent() && isSafeToCancel && ctx.player().isOnGround()) { // we'd like to pause to break this block // only change look direction if it's safe (don't want to fuck up an in progress parkour for example Rotation rot = toBreak.get().getB(); @@ -458,7 +458,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil } List desirableOnHotbar = new ArrayList<>(); Optional toPlace = searchForPlacables(bcc, desirableOnHotbar); - if (toPlace.isPresent() && isSafeToCancel && ctx.player().func_233570_aj_() && ticks <= 0) { + if (toPlace.isPresent() && isSafeToCancel && ctx.player().isOnGround() && ticks <= 0) { Rotation rot = toPlace.get().rot; baritone.getLookBehavior().updateTarget(rot, true); ctx.player().inventory.currentItem = toPlace.get().hotbarSelection; @@ -523,7 +523,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil private void trim() { HashSet copy = new HashSet<>(incorrectPositions); - copy.removeIf(pos -> pos.distanceSq(ctx.player().func_233580_cy_()) > 200); + copy.removeIf(pos -> pos.distanceSq(ctx.player().getPosition()) > 200); if (!copy.isEmpty()) { incorrectPositions = copy; } diff --git a/src/main/java/baritone/process/FarmProcess.java b/src/main/java/baritone/process/FarmProcess.java index 8f93d54b3..b8412de91 100644 --- a/src/main/java/baritone/process/FarmProcess.java +++ b/src/main/java/baritone/process/FarmProcess.java @@ -278,7 +278,7 @@ public final class FarmProcess extends BaritoneProcessHelper implements IFarmPro } } for (Entity entity : ctx.entities()) { - if (entity instanceof ItemEntity && entity.func_233570_aj_()) { + if (entity instanceof ItemEntity && entity.isOnGround()) { ItemEntity ei = (ItemEntity) entity; if (PICKUP_DROPPED.contains(ei.getItem().getItem())) { // +0.1 because of farmland's 0.9375 dummy height lol diff --git a/src/main/java/baritone/process/FollowProcess.java b/src/main/java/baritone/process/FollowProcess.java index a93ae0895..85a273e75 100644 --- a/src/main/java/baritone/process/FollowProcess.java +++ b/src/main/java/baritone/process/FollowProcess.java @@ -57,7 +57,7 @@ public final class FollowProcess extends BaritoneProcessHelper implements IFollo private Goal towards(Entity following) { BlockPos pos; if (Baritone.settings().followOffsetDistance.value == 0) { - pos = following.func_233580_cy_(); + pos = following.getPosition(); } else { GoalXZ g = GoalXZ.fromDirection(following.getPositionVec(), Baritone.settings().followOffsetDirection.value, Baritone.settings().followOffsetDistance.value); pos = new BlockPos(g.getX(), following.getPositionVec().y, g.getZ()); diff --git a/src/main/java/baritone/process/MineProcess.java b/src/main/java/baritone/process/MineProcess.java index 864cf162a..108a0c780 100644 --- a/src/main/java/baritone/process/MineProcess.java +++ b/src/main/java/baritone/process/MineProcess.java @@ -114,7 +114,7 @@ public final class MineProcess extends BaritoneProcessHelper implements IMinePro .filter(pos -> !(BlockStateInterface.get(ctx, pos).getBlock() instanceof AirBlock)) // after breaking a block, it takes mineGoalUpdateInterval ticks for it to actually update this list =( .min(Comparator.comparingDouble(ctx.playerFeet()::distanceSq)); baritone.getInputOverrideHandler().clearAllKeys(); - if (shaft.isPresent() && ctx.player().func_233570_aj_()) { + if (shaft.isPresent() && ctx.player().isOnGround()) { BlockPos pos = shaft.get(); BlockState state = baritone.bsi.get0(pos); if (!MovementHelper.avoidBreaking(baritone.bsi, pos.getX(), pos.getY(), pos.getZ(), state)) { @@ -308,7 +308,7 @@ public final class MineProcess extends BaritoneProcessHelper implements IMinePro if (entity instanceof ItemEntity) { ItemEntity ei = (ItemEntity) entity; if (filter.has(ei.getItem())) { - ret.add(entity.func_233580_cy_()); + ret.add(entity.getPosition()); } } } @@ -399,7 +399,7 @@ public final class MineProcess extends BaritoneProcessHelper implements IMinePro .filter(pos -> !blacklist.contains(pos)) - .sorted(Comparator.comparingDouble(ctx.getBaritone().getPlayerContext().player().func_233580_cy_()::distanceSq)) + .sorted(Comparator.comparingDouble(ctx.getBaritone().getPlayerContext().player().getPosition()::distanceSq)) .collect(Collectors.toList()); if (locs.size() > max) { diff --git a/src/main/java/baritone/utils/BaritoneAutoTest.java b/src/main/java/baritone/utils/BaritoneAutoTest.java index 37a7dc8d4..a54e85fa1 100644 --- a/src/main/java/baritone/utils/BaritoneAutoTest.java +++ b/src/main/java/baritone/utils/BaritoneAutoTest.java @@ -99,7 +99,7 @@ public class BaritoneAutoTest implements AbstractGameEventListener, Helper { System.out.println("Beginning Baritone automatic test routine"); mc.displayGuiScreen(null); WorldSettings worldsettings = new WorldSettings("BaritoneAutoTest", GameType.SURVIVAL, false, Difficulty.NORMAL, true, new GameRules(), DatapackCodec.field_234880_a_); - mc.func_238192_a_("BaritoneAutoTest", worldsettings, IDynamicRegistries.func_239770_b_(), DimensionGeneratorSettings.field_236202_b_.func_236220_a_(false, OptionalLong.of(TEST_SEED))); + mc.func_238192_a_("BaritoneAutoTest", worldsettings, IDynamicRegistries.func_239770_b_(), DimensionGeneratorSettings.field_236202_b_.create(false, OptionalLong.of(TEST_SEED))); } IntegratedServer server = mc.getIntegratedServer(); diff --git a/src/main/java/baritone/utils/GuiClick.java b/src/main/java/baritone/utils/GuiClick.java index b2202c850..c6b2ea3e3 100644 --- a/src/main/java/baritone/utils/GuiClick.java +++ b/src/main/java/baritone/utils/GuiClick.java @@ -88,7 +88,7 @@ public class GuiClick extends Screen implements Helper { BaritoneAPI.getProvider().getPrimaryBaritone().getSelectionManager().removeAllSelections(); BaritoneAPI.getProvider().getPrimaryBaritone().getSelectionManager().addSelection(BetterBlockPos.from(clickStart), BetterBlockPos.from(currentMouseOver)); TextComponent component = new StringTextComponent("Selection made! For usage: " + Baritone.settings().prefix.value + "help sel"); - component.func_230530_a_(component.getStyle() + component.setStyle(component.getStyle() .setFormatting(TextFormatting.WHITE) .setClickEvent(new ClickEvent( ClickEvent.Action.RUN_COMMAND, diff --git a/src/main/java/baritone/utils/PlayerMovementInput.java b/src/main/java/baritone/utils/PlayerMovementInput.java index 247fda702..57745b922 100644 --- a/src/main/java/baritone/utils/PlayerMovementInput.java +++ b/src/main/java/baritone/utils/PlayerMovementInput.java @@ -29,7 +29,7 @@ public class PlayerMovementInput extends MovementInput { } @Override - public void func_225607_a_(boolean p_225607_1_) { + public void tickMovement(boolean p_225607_1_) { this.moveStrafe = 0.0F; this.moveForward = 0.0F; diff --git a/src/main/java/baritone/utils/pathing/Avoidance.java b/src/main/java/baritone/utils/pathing/Avoidance.java index 82a4c1796..b9848845a 100644 --- a/src/main/java/baritone/utils/pathing/Avoidance.java +++ b/src/main/java/baritone/utils/pathing/Avoidance.java @@ -77,7 +77,7 @@ public class Avoidance { .filter(entity -> (!(entity instanceof SpiderEntity)) || ctx.player().getBrightness() < 0.5) .filter(entity -> !(entity instanceof ZombifiedPiglinEntity) || ((ZombifiedPiglinEntity) entity).getRevengeTarget() != null) .filter(entity -> !(entity instanceof EndermanEntity) || ((EndermanEntity) entity).isScreaming()) - .forEach(entity -> res.add(new Avoidance(entity.func_233580_cy_(), mobCoeff, Baritone.settings().mobAvoidanceRadius.value))); + .forEach(entity -> res.add(new Avoidance(entity.getPosition(), mobCoeff, Baritone.settings().mobAvoidanceRadius.value))); } return res; } From 8aaa49c80d97cc568111b97b761ca96ed129712f Mon Sep 17 00:00:00 2001 From: CDAGaming Date: Sat, 25 Jul 2020 22:59:33 -0500 Subject: [PATCH 17/23] [Change] Edit CI to use Proguard Data --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 35220c614..38f2fa63a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,5 +9,5 @@ build: - ./gradlew build artifacts: paths: - - build/libs/*.jar - expire_in: 1 month + - dist/* + expire_in: 1 week From a09f5d41f676b8294b4c424de5599c51233ea854 Mon Sep 17 00:00:00 2001 From: CDAGaming Date: Sat, 25 Jul 2020 23:16:08 -0500 Subject: [PATCH 18/23] [Change] Also allow Forge Building Also sets minimum Forge version to 32.0.72 so we don't need MixinBootstrap --- .gitlab-ci.yml | 1 + src/launch/resources/META-INF/mods.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 38f2fa63a..9efb58c97 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,7 @@ before_script: build: script: - ./gradlew build + - ./gradlew build -Pbaritone.forge_build artifacts: paths: - dist/* diff --git a/src/launch/resources/META-INF/mods.toml b/src/launch/resources/META-INF/mods.toml index 2e788f382..a48c2b875 100644 --- a/src/launch/resources/META-INF/mods.toml +++ b/src/launch/resources/META-INF/mods.toml @@ -6,7 +6,7 @@ # The name of the mod loader type to load - for regular FML @Mod mods it should be javafml modLoader="javafml" #mandatory # A version range to match for said mod loader - for regular FML @Mod it will be the forge version -loaderVersion="[31,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. +loaderVersion="[32.0.72,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. # A URL to refer people to when problems occur with this mod issueTrackerURL="https://github.com/cabaletta/baritone/issues" #optional # A list of mods - how many allowed here is determined by the individual mod loader From 6cd12bf84dd3ddfc011383c9d35f35a90bac9a60 Mon Sep 17 00:00:00 2001 From: CDAGaming Date: Sun, 26 Jul 2020 09:47:05 -0500 Subject: [PATCH 19/23] [Fix] Attempted Fix for Forge Version Error --- src/launch/resources/META-INF/mods.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/launch/resources/META-INF/mods.toml b/src/launch/resources/META-INF/mods.toml index a48c2b875..7b45a66db 100644 --- a/src/launch/resources/META-INF/mods.toml +++ b/src/launch/resources/META-INF/mods.toml @@ -6,7 +6,7 @@ # The name of the mod loader type to load - for regular FML @Mod mods it should be javafml modLoader="javafml" #mandatory # A version range to match for said mod loader - for regular FML @Mod it will be the forge version -loaderVersion="[32.0.72,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. +loaderVersion="[32,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. # A URL to refer people to when problems occur with this mod issueTrackerURL="https://github.com/cabaletta/baritone/issues" #optional # A list of mods - how many allowed here is determined by the individual mod loader From 9e45998a656a2f203c874e831677b99d86028572 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Sun, 26 Jul 2020 13:21:51 -0700 Subject: [PATCH 20/23] brady shouldn't merge PRs that don't compile, thanks cdagaming --- buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java b/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java index ead398b37..01e561775 100644 --- a/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java +++ b/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java @@ -109,7 +109,7 @@ public class ProguardTask extends BaritoneGradleTask { } } - private String getJavaBinPathForProguard() { + private String getJavaBinPathForProguard() throws Exception { String path; try { path = findJavaPathByGradleConfig(); From c180eb9975257b8d18368b7de62c6e34b0fe4ea1 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Wed, 29 Jul 2020 12:52:19 -0700 Subject: [PATCH 21/23] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 83305b618..0f33c9d58 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ ![Lines of Code](https://tokei.rs/b1/github/cabaletta/baritone?category=code) [![GitHub contributors](https://img.shields.io/github/contributors/cabaletta/baritone.svg)](https://github.com/cabaletta/baritone/graphs/contributors/) [![GitHub commits](https://img.shields.io/github/commits-since/cabaletta/baritone/v1.0.0.svg)](https://github.com/cabaletta/baritone/commit/) -[![Impact integration](https://img.shields.io/badge/Impact%20integration-v1.2.10%20/%20v1.3.5%20/%20v1.4.3-brightgreen.svg)](https://impactclient.net/) +[![Impact integration](https://img.shields.io/badge/Impact%20integration-v1.2.14%20/%20v1.3.8%20/%20v1.4.6%20/%20v1.5.3-brightgreen.svg)](https://impactclient.net/) [![KAMI Blue integration](https://img.shields.io/badge/KAMI%20Blue%20integration-v1.2.14--master-green)](https://github.com/kami-blue/client) [![ForgeHax integration](https://img.shields.io/badge/ForgeHax%20%22integration%22-scuffed-yellow.svg)](https://github.com/fr1kin/ForgeHax/) [![Aristois add-on integration](https://img.shields.io/badge/Aristois%20add--on%20integration-v1.3.4%20/%20v1.4.1-green.svg)](https://gitlab.com/emc-mods-indrit/baritone_api) From 7081cf7172d4b385dec5be95686089eeefc9ee44 Mon Sep 17 00:00:00 2001 From: orsondmc Date: Thu, 6 Aug 2020 16:23:13 +1000 Subject: [PATCH 22/23] Introduce startAtLayer to start building at a specific layer in the schematic. To be used only with buildWithLayers true. --- src/api/java/baritone/api/Settings.java | 6 ++++++ src/main/java/baritone/process/BuilderProcess.java | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/api/java/baritone/api/Settings.java b/src/api/java/baritone/api/Settings.java index 1bbde3b2b..e3716751c 100644 --- a/src/api/java/baritone/api/Settings.java +++ b/src/api/java/baritone/api/Settings.java @@ -752,6 +752,12 @@ public final class Settings { */ public final Setting layerOrder = new Setting<>(false); + /** + * Start building the schematic at a specific layer. + * Can help on larger builds when schematic wants to break things its already built + */ + public final Setting startAtLayer = new Setting<>(1); + /** * How far to move before repeating the build. 0 to disable repeating on a certain axis, 0,0,0 to disable entirely */ diff --git a/src/main/java/baritone/process/BuilderProcess.java b/src/main/java/baritone/process/BuilderProcess.java index 17a8f5f94..e25a30afa 100644 --- a/src/main/java/baritone/process/BuilderProcess.java +++ b/src/main/java/baritone/process/BuilderProcess.java @@ -97,7 +97,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil } this.origin = new Vec3i(x, y, z); this.paused = false; - this.layer = 0; + this.layer = Baritone.settings().startAtLayer.value; this.numRepeats = 0; this.observedCompleted = new LongOpenHashSet(); } @@ -743,7 +743,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil name = null; schematic = null; realSchematic = null; - layer = 0; + layer = Baritone.settings().startAtLayer.value; numRepeats = 0; paused = false; observedCompleted = null; From b187d860741c7e5b6cb6aab64a5b80dcdadec9a9 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Wed, 5 Aug 2020 23:31:32 -0700 Subject: [PATCH 23/23] fix orsond rock brain moment --- src/api/java/baritone/api/Settings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/java/baritone/api/Settings.java b/src/api/java/baritone/api/Settings.java index e3716751c..3da1d21b7 100644 --- a/src/api/java/baritone/api/Settings.java +++ b/src/api/java/baritone/api/Settings.java @@ -756,7 +756,7 @@ public final class Settings { * Start building the schematic at a specific layer. * Can help on larger builds when schematic wants to break things its already built */ - public final Setting startAtLayer = new Setting<>(1); + public final Setting startAtLayer = new Setting<>(0); /** * How far to move before repeating the build. 0 to disable repeating on a certain axis, 0,0,0 to disable entirely