diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 000000000..9efb58c97
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,14 @@
+image: java:8
+
+before_script:
+ - which java
+ - which javac
+
+build:
+ script:
+ - ./gradlew build
+ - ./gradlew build -Pbaritone.forge_build
+ artifacts:
+ paths:
+ - dist/*
+ expire_in: 1 week
diff --git a/README.md b/README.md
index 75ce55135..26ff3b3b2 100644
--- a/README.md
+++ b/README.md
@@ -21,12 +21,14 @@

[](https://github.com/cabaletta/baritone/graphs/contributors/)
[](https://github.com/cabaletta/baritone/commit/)
-[](https://impactclient.net/)
+[](https://impactclient.net/)
+[](https://github.com/kami-blue/client)
[](https://github.com/fr1kin/ForgeHax/)
[](https://gitlab.com/emc-mods-indrit/baritone_api)
[](https://rootnet.dev/)
[](https://wweclient.com/)
-[](https://futureclient.net/)
+[](https://futureclient.net/)
+[](https://rusherhack.org/)
[](http://forthebadge.com/)
[](http://forthebadge.com/)
@@ -34,9 +36,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). 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.
+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).
@@ -88,6 +90,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 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.
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.
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/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java b/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java
index b19efdedd..9a2e063f6 100644
--- a/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java
+++ b/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java
@@ -20,8 +20,21 @@ package baritone.gradle.task;
import baritone.gradle.util.Determinizer;
import org.apache.commons.io.IOUtils;
import org.gradle.api.plugins.JavaPluginConvention;
+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.net.URL;
@@ -86,6 +99,101 @@ public class ProguardTask extends BaritoneGradleTask {
}
}
+ private String getJavaBinPathForProguard() throws Exception {
+ String path;
+ try {
+ path = findJavaPathByGradleConfig();
+ if (path != null) return path;
+ }
+ catch (Exception ex) {
+ System.err.println("Unable to find java by javaCompile options");
+ ex.printStackTrace();
+ }
+
+ try {
+ path = findJavaByJavaHome();
+ if (path != null) return path;
+ }
+ catch(Exception ex) {
+ System.err.println("Unable to find java by JAVA_HOME");
+ ex.printStackTrace();
+ }
+
+
+ path = findJavaByGradleCurrentRuntime();
+ if (path != null) return path;
+
+ throw new Exception("Unable to find java to determine ProGuard libraryjars. Please specify forkOptions.executable in javaCompile," +
+ " JAVA_HOME environment variable, or make sure to run Gradle with the correct JDK (a v1.8 only)");
+ }
+
+ private String findJavaByGradleCurrentRuntime() {
+ String path = Jvm.current().getJavaExecutable().getAbsolutePath();
+
+ if (this.validateJavaVersion(path)) {
+ System.out.println("Using Gradle's runtime Java for ProGuard");
+ return path;
+ }
+ return null;
+ }
+
+ private String findJavaByJavaHome() {
+ final String javaHomeEnv = System.getenv("JAVA_HOME");
+ if (javaHomeEnv != null) {
+
+ String path = Jvm.forHome(new File(javaHomeEnv)).getJavaExecutable().getAbsolutePath();
+ if (this.validateJavaVersion(path)) {
+ System.out.println("Detected Java path by JAVA_HOME");
+ return path;
+ }
+ }
+ return null;
+ }
+
+ private String findJavaPathByGradleConfig() {
+ final TaskCollection 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);
@@ -95,7 +203,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 + "'");
diff --git a/src/api/java/baritone/api/Settings.java b/src/api/java/baritone/api/Settings.java
index bfac065af..9130165f7 100644
--- a/src/api/java/baritone/api/Settings.java
+++ b/src/api/java/baritone/api/Settings.java
@@ -754,6 +754,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<>(0);
+
/**
* 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/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/launch/resources/META-INF/mods.toml b/src/launch/resources/META-INF/mods.toml
index 2e788f382..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="[31,)" #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
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/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/BaritoneChatControl.java b/src/main/java/baritone/command/ExampleBaritoneControl.java
similarity index 97%
rename from src/main/java/baritone/command/BaritoneChatControl.java
rename to src/main/java/baritone/command/ExampleBaritoneControl.java
index 7071cedd8..ed2c1f06c 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);
}
@@ -80,7 +80,7 @@ public class BaritoneChatControl 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/BuildCommand.java b/src/main/java/baritone/command/defaults/BuildCommand.java
index 9bfa8732a..aa6723c27 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;
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..6f9b85bea 100644
--- a/src/main/java/baritone/process/BuilderProcess.java
+++ b/src/main/java/baritone/process/BuilderProcess.java
@@ -103,7 +103,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
}
this.origin = new Vector3i(x, y, z);
this.paused = false;
- this.layer = 0;
+ this.layer = Baritone.settings().startAtLayer.value;
this.numRepeats = 0;
this.observedCompleted = new LongOpenHashSet();
}
@@ -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;
}
@@ -761,7 +761,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;
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;
}