From 807b1b5eb01bcc82f80da0cd055f728df937e70a Mon Sep 17 00:00:00 2001 From: CDAGaming Date: Sun, 19 Jul 2020 16:47:30 -0500 Subject: [PATCH] [Change] Updated Mappings + Simplified Port --- build.gradle | 2 +- .../api/command/helpers/Paginator.java | 18 ++++++++--------- src/api/java/baritone/api/utils/Helper.java | 6 +++--- .../baritone/api/utils/IPlayerContext.java | 1 - .../launch/mixins/MixinMinecraft.java | 4 ++-- .../baritone/launch/mixins/MixinScreen.java | 2 +- .../java/baritone/cache/WorldProvider.java | 2 ++ .../baritone/command/BaritoneChatControl.java | 9 ++++----- .../command/defaults/ChestsCommand.java | 2 -- .../command/defaults/ComeCommand.java | 1 - .../command/defaults/HelpCommand.java | 14 ++++++------- .../baritone/command/defaults/SetCommand.java | 19 +++++++++--------- .../command/defaults/WaypointsCommand.java | 20 +++++++++---------- .../java/baritone/process/BuilderProcess.java | 1 - src/main/java/baritone/utils/GuiClick.java | 16 +++++++-------- src/main/java/baritone/utils/ToolSet.java | 2 +- 16 files changed, 57 insertions(+), 62 deletions(-) diff --git a/build.gradle b/build.gradle index a9ea66a33..5cb167351 100755 --- a/build.gradle +++ b/build.gradle @@ -85,7 +85,7 @@ task sourceJar(type: Jar, dependsOn: classes) { } minecraft { - mappings channel: 'snapshot', version: '20200514-1.16' + mappings channel: 'snapshot', version: '20200707-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 4cea55261..b4fe28941 100644 --- a/src/api/java/baritone/api/command/helpers/Paginator.java +++ b/src/api/java/baritone/api/command/helpers/Paginator.java @@ -78,33 +78,33 @@ public class Paginator implements Helper { TextComponent prevPageComponent = new StringTextComponent("<<"); if (hasPrevPage) { prevPageComponent.func_230530_a_(prevPageComponent.getStyle() - .func_240715_a_(new ClickEvent( + .setClickEvent(new ClickEvent( ClickEvent.Action.RUN_COMMAND, String.format("%s %d", commandPrefix, page - 1) )) - .func_240716_a_(new HoverEvent( - HoverEvent.Action.field_230550_a_, + .setHoverEvent(new HoverEvent( + HoverEvent.Action.SHOW_TEXT, new StringTextComponent("Click to view previous page") ))); } else { - prevPageComponent.func_230530_a_(prevPageComponent.getStyle().func_240712_a_(TextFormatting.DARK_GRAY)); + prevPageComponent.func_230530_a_(prevPageComponent.getStyle().setFormatting(TextFormatting.DARK_GRAY)); } TextComponent nextPageComponent = new StringTextComponent(">>"); if (hasNextPage) { nextPageComponent.func_230530_a_(nextPageComponent.getStyle() - .func_240715_a_(new ClickEvent( + .setClickEvent(new ClickEvent( ClickEvent.Action.RUN_COMMAND, String.format("%s %d", commandPrefix, page + 1) )) - .func_240716_a_(new HoverEvent( - HoverEvent.Action.field_230550_a_, + .setHoverEvent(new HoverEvent( + HoverEvent.Action.SHOW_TEXT, new StringTextComponent("Click to view next page") ))); } else { - nextPageComponent.func_230530_a_(nextPageComponent.getStyle().func_240712_a_(TextFormatting.DARK_GRAY)); + nextPageComponent.func_230530_a_(nextPageComponent.getStyle().setFormatting(TextFormatting.DARK_GRAY)); } TextComponent pagerComponent = new StringTextComponent(""); - pagerComponent.func_230530_a_(pagerComponent.getStyle().func_240712_a_(TextFormatting.GRAY)); + 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); diff --git a/src/api/java/baritone/api/utils/Helper.java b/src/api/java/baritone/api/utils/Helper.java index 9a6020674..c96c8d8d4 100755 --- a/src/api/java/baritone/api/utils/Helper.java +++ b/src/api/java/baritone/api/utils/Helper.java @@ -52,11 +52,11 @@ 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().func_240712_a_(TextFormatting.LIGHT_PURPLE)); + baritone.func_230530_a_(baritone.getStyle().setFormatting(TextFormatting.LIGHT_PURPLE)); // Outer brackets TextComponent prefix = new StringTextComponent(""); - prefix.func_230530_a_(baritone.getStyle().func_240712_a_(TextFormatting.DARK_PURPLE)); + prefix.func_230530_a_(baritone.getStyle().setFormatting(TextFormatting.DARK_PURPLE)); prefix.func_240702_b_("["); prefix.func_230529_a_(baritone); prefix.func_240702_b_("]"); @@ -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().func_240712_a_(color)); + component.func_230530_a_(component.getStyle().setFormatting(color)); logDirect(component); }); } diff --git a/src/api/java/baritone/api/utils/IPlayerContext.java b/src/api/java/baritone/api/utils/IPlayerContext.java index f143d7be5..ffa7939b4 100644 --- a/src/api/java/baritone/api/utils/IPlayerContext.java +++ b/src/api/java/baritone/api/utils/IPlayerContext.java @@ -24,7 +24,6 @@ import net.minecraft.client.world.ClientWorld; import net.minecraft.entity.Entity; import net.minecraft.util.math.*; import net.minecraft.util.math.vector.Vector3d; -import net.minecraft.util.math.vector.Vector3f; import net.minecraft.world.World; import java.util.Optional; diff --git a/src/launch/java/baritone/launch/mixins/MixinMinecraft.java b/src/launch/java/baritone/launch/mixins/MixinMinecraft.java index ea627e830..6d771165e 100644 --- a/src/launch/java/baritone/launch/mixins/MixinMinecraft.java +++ b/src/launch/java/baritone/launch/mixins/MixinMinecraft.java @@ -133,12 +133,12 @@ public class MixinMinecraft { at = @At( value = "FIELD", opcode = Opcodes.GETFIELD, - target = "net/minecraft/client/gui/screen/Screen.field_230711_n_:Z" + target = "net/minecraft/client/gui/screen/Screen.passEvents:Z" ) ) private boolean passEvents(Screen screen) { // allow user input is only the primary baritone - return (BaritoneAPI.getProvider().getPrimaryBaritone().getPathingBehavior().isPathing() && player != null) || screen.field_230711_n_; + return (BaritoneAPI.getProvider().getPrimaryBaritone().getPathingBehavior().isPathing() && player != null) || screen.passEvents; } // TODO diff --git a/src/launch/java/baritone/launch/mixins/MixinScreen.java b/src/launch/java/baritone/launch/mixins/MixinScreen.java index 02578d540..8d5a801cd 100644 --- a/src/launch/java/baritone/launch/mixins/MixinScreen.java +++ b/src/launch/java/baritone/launch/mixins/MixinScreen.java @@ -28,6 +28,6 @@ import java.net.URI; public abstract class MixinScreen implements IGuiScreen { @Override - @Invoker("func_231156_a_") + @Invoker("openLink") public abstract void openLinkInvoker(URI url); } diff --git a/src/main/java/baritone/cache/WorldProvider.java b/src/main/java/baritone/cache/WorldProvider.java index d0f34c380..b56c0fdf8 100644 --- a/src/main/java/baritone/cache/WorldProvider.java +++ b/src/main/java/baritone/cache/WorldProvider.java @@ -53,6 +53,8 @@ public class WorldProvider implements IWorldProvider, Helper { /** * Called when a new world is initialized to discover the + * + * @param world The world's Registry Data */ public final void initWorld(RegistryKey world) { File directory; diff --git a/src/main/java/baritone/command/BaritoneChatControl.java b/src/main/java/baritone/command/BaritoneChatControl.java index 58a8bed43..7071cedd8 100644 --- a/src/main/java/baritone/command/BaritoneChatControl.java +++ b/src/main/java/baritone/command/BaritoneChatControl.java @@ -35,7 +35,6 @@ import baritone.api.command.manager.ICommandManager; import baritone.command.argument.CommandArguments; import baritone.command.manager.CommandManager; import net.minecraft.util.Tuple; -import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.StringTextComponent; import net.minecraft.util.text.TextComponent; import net.minecraft.util.text.TextFormatting; @@ -82,12 +81,12 @@ public class BaritoneChatControl implements Helper, AbstractGameEventListener { String toDisplay = settings.censorRanCommands.value ? command + " ..." : msg; TextComponent component = new StringTextComponent(String.format("> %s", toDisplay)); component.func_230530_a_(component.getStyle() - .func_240712_a_(TextFormatting.WHITE) - .func_240716_a_(new HoverEvent( - HoverEvent.Action.field_230550_a_, + .setFormatting(TextFormatting.WHITE) + .setHoverEvent(new HoverEvent( + HoverEvent.Action.SHOW_TEXT, new StringTextComponent("Click to rerun command") )) - .func_240715_a_(new ClickEvent( + .setClickEvent(new ClickEvent( ClickEvent.Action.RUN_COMMAND, FORCE_COMMAND_PREFIX + msg ))); diff --git a/src/main/java/baritone/command/defaults/ChestsCommand.java b/src/main/java/baritone/command/defaults/ChestsCommand.java index e2406b134..2037e1f61 100644 --- a/src/main/java/baritone/command/defaults/ChestsCommand.java +++ b/src/main/java/baritone/command/defaults/ChestsCommand.java @@ -27,8 +27,6 @@ import baritone.api.command.argument.IArgConsumer; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.util.text.IFormattableTextComponent; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextComponent; import java.util.Arrays; import java.util.List; diff --git a/src/main/java/baritone/command/defaults/ComeCommand.java b/src/main/java/baritone/command/defaults/ComeCommand.java index fe245d0bd..04d804b46 100644 --- a/src/main/java/baritone/command/defaults/ComeCommand.java +++ b/src/main/java/baritone/command/defaults/ComeCommand.java @@ -24,7 +24,6 @@ import baritone.api.command.exception.CommandException; import baritone.api.command.exception.CommandInvalidStateException; import baritone.api.command.argument.IArgConsumer; import net.minecraft.entity.Entity; -import net.minecraft.util.math.BlockPos; import java.util.Arrays; import java.util.List; diff --git a/src/main/java/baritone/command/defaults/HelpCommand.java b/src/main/java/baritone/command/defaults/HelpCommand.java index d80f8b84b..19cdce6ca 100644 --- a/src/main/java/baritone/command/defaults/HelpCommand.java +++ b/src/main/java/baritone/command/defaults/HelpCommand.java @@ -59,21 +59,21 @@ 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().func_240712_a_(TextFormatting.DARK_GRAY)); + shortDescComponent.func_230530_a_(shortDescComponent.getStyle().setFormatting(TextFormatting.DARK_GRAY)); TextComponent namesComponent = new StringTextComponent(names); - namesComponent.func_230530_a_(namesComponent.getStyle().func_240712_a_(TextFormatting.WHITE)); + namesComponent.func_230530_a_(namesComponent.getStyle().setFormatting(TextFormatting.WHITE)); TextComponent hoverComponent = new StringTextComponent(""); - hoverComponent.func_230530_a_(hoverComponent.getStyle().func_240712_a_(TextFormatting.GRAY)); + 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"); 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().func_240712_a_(TextFormatting.GRAY)); + component.func_230530_a_(component.getStyle().setFormatting(TextFormatting.GRAY)); component.func_230529_a_(shortDescComponent); component.func_230530_a_(component.getStyle() - .func_240716_a_(new HoverEvent(HoverEvent.Action.field_230550_a_, hoverComponent)) - .func_240715_a_(new ClickEvent(ClickEvent.Action.RUN_COMMAND, clickCommand))); + .setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, hoverComponent)) + .setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, clickCommand))); return component; }, FORCE_COMMAND_PREFIX + label @@ -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().func_240715_a_(new ClickEvent( + returnComponent.func_230530_a_(returnComponent.getStyle().setClickEvent(new ClickEvent( ClickEvent.Action.RUN_COMMAND, FORCE_COMMAND_PREFIX + label ))); diff --git a/src/main/java/baritone/command/defaults/SetCommand.java b/src/main/java/baritone/command/defaults/SetCommand.java index 8cb585d43..49430040b 100644 --- a/src/main/java/baritone/command/defaults/SetCommand.java +++ b/src/main/java/baritone/command/defaults/SetCommand.java @@ -27,7 +27,6 @@ import baritone.api.command.exception.CommandInvalidTypeException; import baritone.api.command.argument.IArgConsumer; import baritone.api.command.helpers.Paginator; import baritone.api.command.helpers.TabCompleteHelper; -import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.StringTextComponent; import net.minecraft.util.text.TextComponent; import net.minecraft.util.text.TextFormatting; @@ -83,19 +82,19 @@ public class SetCommand extends Command { " (%s)", settingTypeToString(setting) )); - typeComponent.func_230530_a_(typeComponent.getStyle().func_240712_a_(TextFormatting.DARK_GRAY)); + typeComponent.func_230530_a_(typeComponent.getStyle().setFormatting(TextFormatting.DARK_GRAY)); TextComponent hoverComponent = new StringTextComponent(""); - hoverComponent.func_230530_a_(hoverComponent.getStyle().func_240712_a_(TextFormatting.GRAY)); + 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))); String commandSuggestion = Baritone.settings().prefix.value + String.format("set %s ", setting.getName()); TextComponent component = new StringTextComponent(setting.getName()); - component.func_230530_a_(component.getStyle().func_240712_a_(TextFormatting.GRAY)); + component.func_230530_a_(component.getStyle().setFormatting(TextFormatting.GRAY)); component.func_230529_a_(typeComponent); component.func_230530_a_(component.getStyle() - .func_240716_a_(new HoverEvent(HoverEvent.Action.field_230550_a_, hoverComponent)) - .func_240715_a_(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, commandSuggestion))); + .setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, hoverComponent)) + .setClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, commandSuggestion))); return component; }, FORCE_COMMAND_PREFIX + "set " + arg + " " + search @@ -166,12 +165,12 @@ public class SetCommand extends Command { } TextComponent oldValueComponent = new StringTextComponent(String.format("Old value: %s", oldValue)); oldValueComponent.func_230530_a_(oldValueComponent.getStyle() - .func_240712_a_(TextFormatting.GRAY) - .func_240716_a_(new HoverEvent( - HoverEvent.Action.field_230550_a_, + .setFormatting(TextFormatting.GRAY) + .setHoverEvent(new HoverEvent( + HoverEvent.Action.SHOW_TEXT, new StringTextComponent("Click to set the setting back to this value") )) - .func_240715_a_(new ClickEvent( + .setClickEvent(new ClickEvent( ClickEvent.Action.RUN_COMMAND, FORCE_COMMAND_PREFIX + String.format("set %s %s", setting.getName(), oldValue) ))); diff --git a/src/main/java/baritone/command/defaults/WaypointsCommand.java b/src/main/java/baritone/command/defaults/WaypointsCommand.java index b0f115d97..df91d805f 100644 --- a/src/main/java/baritone/command/defaults/WaypointsCommand.java +++ b/src/main/java/baritone/command/defaults/WaypointsCommand.java @@ -61,21 +61,21 @@ 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().func_240712_a_(TextFormatting.GRAY)); + tagComponent.func_230530_a_(tagComponent.getStyle().setFormatting(TextFormatting.GRAY)); String name = waypoint.getName(); TextComponent nameComponent = new StringTextComponent(!name.isEmpty() ? name : ""); - nameComponent.func_230530_a_(nameComponent.getStyle().func_240712_a_(!name.isEmpty() ? TextFormatting.GRAY : TextFormatting.DARK_GRAY)); + nameComponent.func_230530_a_(nameComponent.getStyle().setFormatting(!name.isEmpty() ? TextFormatting.GRAY : TextFormatting.DARK_GRAY)); TextComponent timestamp = new StringTextComponent(" @ " + new Date(waypoint.getCreationTimestamp())); - timestamp.func_230530_a_(timestamp.getStyle().func_240712_a_(TextFormatting.DARK_GRAY)); + 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() - .func_240716_a_(new HoverEvent( - HoverEvent.Action.field_230550_a_, + .setHoverEvent(new HoverEvent( + HoverEvent.Action.SHOW_TEXT, new StringTextComponent("Click to select") )) - .func_240715_a_(new ClickEvent( + .setClickEvent(new ClickEvent( ClickEvent.Action.RUN_COMMAND, String.format( "%s%s %s %s @ %d", @@ -138,7 +138,7 @@ 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().func_240712_a_(TextFormatting.GRAY)); + component.func_230530_a_(component.getStyle().setFormatting(TextFormatting.GRAY)); component.func_230529_a_(toComponent.apply(waypoint, Action.INFO)); logDirect(component); } else if (action == Action.CLEAR) { @@ -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().func_240715_a_(new ClickEvent( + deleteComponent.func_230530_a_(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().func_240715_a_(new ClickEvent( + goalComponent.func_230530_a_(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().func_240715_a_(new ClickEvent( + backComponent.func_230530_a_(backComponent.getStyle().setClickEvent(new ClickEvent( ClickEvent.Action.RUN_COMMAND, String.format( "%s%s list", diff --git a/src/main/java/baritone/process/BuilderProcess.java b/src/main/java/baritone/process/BuilderProcess.java index ac5157e56..577244bd2 100644 --- a/src/main/java/baritone/process/BuilderProcess.java +++ b/src/main/java/baritone/process/BuilderProcess.java @@ -58,7 +58,6 @@ import net.minecraft.util.Tuple; import net.minecraft.util.math.*; import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.util.math.vector.Vector3d; -import net.minecraft.util.math.vector.Vector3f; import net.minecraft.util.math.vector.Vector3i; import java.io.File; diff --git a/src/main/java/baritone/utils/GuiClick.java b/src/main/java/baritone/utils/GuiClick.java index fb37cc67f..b2202c850 100644 --- a/src/main/java/baritone/utils/GuiClick.java +++ b/src/main/java/baritone/utils/GuiClick.java @@ -55,12 +55,12 @@ public class GuiClick extends Screen implements Helper { } @Override - public boolean func_231177_au__() { + public boolean isPauseScreen() { return false; } @Override - public void func_230430_a_(MatrixStack stack, int mouseX, int mouseY, float partialTicks) { + public void render(MatrixStack stack, int mouseX, int mouseY, float partialTicks) { double mx = mc.mouseHelper.getMouseX(); double my = mc.mouseHelper.getMouseY(); @@ -82,15 +82,15 @@ public class GuiClick extends Screen implements Helper { } @Override - public boolean func_231048_c_(double mouseX, double mouseY, int mouseButton) { + public boolean mouseReleased(double mouseX, double mouseY, int mouseButton) { if (mouseButton == 0) { if (clickStart != null && !clickStart.equals(currentMouseOver)) { 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() - .func_240712_a_(TextFormatting.WHITE) - .func_240715_a_(new ClickEvent( + .setFormatting(TextFormatting.WHITE) + .setClickEvent(new ClickEvent( ClickEvent.Action.RUN_COMMAND, FORCE_COMMAND_PREFIX + "help sel" ))); @@ -103,13 +103,13 @@ public class GuiClick extends Screen implements Helper { BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoalAndPath(new GoalBlock(currentMouseOver.up())); } clickStart = null; - return super.func_231048_c_(mouseX, mouseY, mouseButton); + return super.mouseReleased(mouseX, mouseY, mouseButton); } @Override - public boolean func_231044_a_(double mouseX, double mouseY, int mouseButton) { + public boolean mouseClicked(double mouseX, double mouseY, int mouseButton) { clickStart = currentMouseOver; - return super.func_231044_a_(mouseX, mouseY, mouseButton); + return super.mouseClicked(mouseX, mouseY, mouseButton); } public void onRender(MatrixStack modelViewStack, Matrix4f projectionMatrix) { diff --git a/src/main/java/baritone/utils/ToolSet.java b/src/main/java/baritone/utils/ToolSet.java index ffa5eb417..edd033061 100644 --- a/src/main/java/baritone/utils/ToolSet.java +++ b/src/main/java/baritone/utils/ToolSet.java @@ -161,7 +161,7 @@ public class ToolSet { } speed /= hardness; - if (!state.func_235783_q_() || (!item.isEmpty() && item.canHarvestBlock(state))) { + if (!state.getRequiresTool() || (!item.isEmpty() && item.canHarvestBlock(state))) { return speed / 30; } else { return speed / 100;