Fixing crash after clicking into the air
This commit is contained in:
parent
80c8294f5f
commit
8262909063
@ -93,10 +93,16 @@ public class GuiClick extends GuiScreen {
|
||||
Helper.HELPER.logDirect(component);
|
||||
clickStart = null;
|
||||
} else {
|
||||
BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoalAndPath(new GoalTwoBlocks(currentMouseOver));
|
||||
if(currentMouseOver != null)//Catch this, or else a click into void will result in a crash
|
||||
BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoalAndPath(new GoalBlock(currentMouseOver));
|
||||
else
|
||||
Helper.HELPER.logDirect("Sorry, I can't go to nothing");
|
||||
}
|
||||
} else if (mouseButton == 1) {
|
||||
BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoalAndPath(new GoalBlock(currentMouseOver.up()));
|
||||
if(currentMouseOver != null)
|
||||
BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoalAndPath(new GoalBlock(currentMouseOver.up()));
|
||||
else
|
||||
Helper.HELPER.logDirect("Sorry, I can't go to nothing");
|
||||
}
|
||||
clickStart = null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user