small cleanup

This commit is contained in:
Leijurv 2019-03-12 22:08:17 -07:00
parent 866408aece
commit 909ab553eb
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 2 additions and 11 deletions

View File

@ -74,14 +74,11 @@ public class GuiClick extends GuiScreen {
@Override
protected void mouseReleased(int mouseX, int mouseY, int mouseButton) {
System.out.println("Mouse released");
if (mouseButton == 0) {
if (clickStart != null && !clickStart.equals(currentMouseOver)) {
((Baritone) BaritoneAPI.getProvider().getPrimaryBaritone()).getBuilderProcess().clearArea(clickStart, currentMouseOver);
clickStart = null;
} else {
BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoalAndPath(new GoalTwoBlocks(currentMouseOver));
}
} else if (mouseButton == 1) {
@ -93,16 +90,10 @@ public class GuiClick extends GuiScreen {
@Override
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) {
System.out.println("Mouse clicked");
clickStart = currentMouseOver;
}
@Override
protected void mouseClickMove(int mouseX, int mouseY, int clickedMouseButton, long timeSinceLastClick) {
System.out.println("Click move");
}
public void onRender(float partialTicks) {
public void onRender() {
GlStateManager.getFloat(GL_MODELVIEW_MATRIX, (FloatBuffer) MODELVIEW.clear());
GlStateManager.getFloat(GL_PROJECTION_MATRIX, (FloatBuffer) PROJECTION.clear());
GlStateManager.glGetInteger(GL_VIEWPORT, (IntBuffer) VIEWPORT.clear());

View File

@ -60,7 +60,7 @@ public final class PathRenderer implements Helper {
float partialTicks = event.getPartialTicks();
Goal goal = behavior.getGoal();
if (mc.currentScreen instanceof GuiClick) {
((GuiClick) mc.currentScreen).onRender(partialTicks);
((GuiClick) mc.currentScreen).onRender();
}
int thisPlayerDimension = behavior.baritone.getPlayerContext().world().provider.getDimensionType().getId();