Skip to content

Commit

Permalink
move baritone right click options towards the top
Browse files Browse the repository at this point in the history
  • Loading branch information
rfresh2 committed Jul 4, 2023
1 parent dc4940b commit ab1b942
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions src/main/java/xaeroplus/mixin/client/MixinGuiMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
import java.util.List;
import java.util.stream.Collectors;

import static java.util.Arrays.asList;
import static java.util.Objects.isNull;
import static net.minecraft.world.World.*;
import static xaero.map.gui.GuiMap.*;
Expand Down Expand Up @@ -1924,18 +1925,20 @@ public void onInputPress(final int code, final int scanCode, final int modifiers
public void getRightClickOptionsInject(final CallbackInfoReturnable<ArrayList<RightClickOption>> cir) {
if (BaritoneHelper.isBaritonePresent()) {
final ArrayList<RightClickOption> options = cir.getReturnValue();
options.add(new RightClickOption("Baritone Goal Here", options.size(), this) {
@Override
public void onAction(Screen screen) {
BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoal(new GoalXZ(rightClickX, rightClickZ));
}
});
options.add(new RightClickOption("Baritone Path Here", options.size(), this) {
@Override
public void onAction(Screen screen) {
BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoalAndPath(new GoalXZ(rightClickX, rightClickZ));
}
});
options.addAll(3, asList(
new RightClickOption("Baritone Goal Here", options.size(), this) {
@Override
public void onAction(Screen screen) {
BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoal(new GoalXZ(rightClickX, rightClickZ));
}
},
new RightClickOption("Baritone Path Here", options.size(), this) {
@Override
public void onAction(Screen screen) {
BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoalAndPath(new GoalXZ(rightClickX, rightClickZ));
}
}
));
}
}

Expand Down

0 comments on commit ab1b942

Please sign in to comment.