From e976224258dd6566a8a984a527ee1b518c92b7c2 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Thu, 19 Sep 2019 15:31:21 -0700 Subject: [PATCH] a moderate amount of gamer --- src/api/java/baritone/api/Settings.java | 2 +- .../baritone/api/schematic/MaskSchematic.java | 2 +- src/main/java/baritone/utils/GuiClick.java | 17 ++++++++++++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/api/java/baritone/api/Settings.java b/src/api/java/baritone/api/Settings.java index 22d597da3..9a03fac20 100644 --- a/src/api/java/baritone/api/Settings.java +++ b/src/api/java/baritone/api/Settings.java @@ -991,7 +991,7 @@ public final class Settings { /** * Line width of the goal when rendered, in pixels */ - public final Setting selectionLineWidth = new Setting<>(1F); + public final Setting selectionLineWidth = new Setting<>(2F); /** * Render selections diff --git a/src/api/java/baritone/api/schematic/MaskSchematic.java b/src/api/java/baritone/api/schematic/MaskSchematic.java index f74ccc8f2..fa9b81269 100644 --- a/src/api/java/baritone/api/schematic/MaskSchematic.java +++ b/src/api/java/baritone/api/schematic/MaskSchematic.java @@ -35,7 +35,7 @@ public abstract class MaskSchematic extends AbstractSchematic { @Override public boolean inSchematic(int x, int y, int z, IBlockState currentState) { - return partOfMask(x, y, z, currentState) && schematic.inSchematic(x, y, z, currentState); + return schematic.inSchematic(x, y, z, currentState) && partOfMask(x, y, z, currentState); } @Override diff --git a/src/main/java/baritone/utils/GuiClick.java b/src/main/java/baritone/utils/GuiClick.java index 48b80231c..ec8ade72f 100644 --- a/src/main/java/baritone/utils/GuiClick.java +++ b/src/main/java/baritone/utils/GuiClick.java @@ -22,6 +22,8 @@ import baritone.api.BaritoneAPI; import baritone.api.pathing.goals.GoalBlock; import baritone.api.pathing.goals.GoalTwoBlocks; import baritone.api.utils.BetterBlockPos; +import baritone.api.utils.Helper; +import baritone.api.utils.command.BaritoneChatControl; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.Entity; @@ -29,6 +31,10 @@ import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.Vec3d; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextComponentString; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.event.ClickEvent; import org.lwjgl.BufferUtils; import org.lwjgl.input.Mouse; import org.lwjgl.util.glu.GLU; @@ -75,7 +81,16 @@ public class GuiClick extends GuiScreen { protected void mouseReleased(int mouseX, int mouseY, int mouseButton) { if (mouseButton == 0) { if (clickStart != null && !clickStart.equals(currentMouseOver)) { - ((Baritone) BaritoneAPI.getProvider().getPrimaryBaritone()).getBuilderProcess().clearArea(clickStart, currentMouseOver); + BaritoneAPI.getProvider().getPrimaryBaritone().getSelectionManager().removeAllSelections(); + BaritoneAPI.getProvider().getPrimaryBaritone().getSelectionManager().addSelection(BetterBlockPos.from(clickStart), BetterBlockPos.from(currentMouseOver)); + ITextComponent component = new TextComponentString("Selection made! For usage: " + Baritone.settings().prefix.value + "help sel"); + component.getStyle() + .setColor(TextFormatting.WHITE) + .setClickEvent(new ClickEvent( + ClickEvent.Action.RUN_COMMAND, + BaritoneChatControl.FORCE_COMMAND_PREFIX + "help sel" + )); + Helper.HELPER.logDirect(component); clickStart = null; } else { BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoalAndPath(new GoalTwoBlocks(currentMouseOver));