@@ -99,14 +99,14 @@ public void onAction(Screen screen) {
9999 @ Override
100100 public void onAction (Screen screen ) {
101101 GoalBlock goal = new GoalBlock (new BlockPos (rightClickX , rightClickY , rightClickZ ).up ());
102- BaritoneAPI .getProvider ().getPrimaryBaritone ().getCustomGoalProcess ().setGoal ( goal );
102+ BaritoneAPI .getProvider ().getPrimaryBaritone ().getCommandManager ().execute ( " goal " + goal . x + " " + goal . y + " " + goal . z );
103103 }
104104 },
105105 new RightClickOption (I18n .translate ("gui.world_map.baritone_path_here" ), options .size (), guiMap ) {
106106 @ Override
107107 public void onAction (Screen screen ) {
108108 GoalBlock goal = new GoalBlock (new BlockPos (rightClickX , rightClickY , rightClickZ ).up ());
109- BaritoneAPI .getProvider ().getPrimaryBaritone ().getCustomGoalProcess ().setGoalAndPath ( goal );
109+ BaritoneAPI .getProvider ().getPrimaryBaritone ().getCommandManager ().execute ( "goto " + goal . x + " " + goal . y + " " + goal . z );
110110 }
111111 }
112112 ));
@@ -117,13 +117,8 @@ public void onAction(Screen screen) {
117117 @ Override
118118 public void onAction (Screen screen ) {
119119 GoalBlock goal = new GoalBlock (new BlockPos (rightClickX , rightClickY , rightClickZ ).up ());
120- BaritoneAPI .getProvider ().getPrimaryBaritone ().getCustomGoalProcess ().setGoal (goal );
121- for (IBaritone baritone : BaritoneAPI .getProvider ().getAllBaritones ()) {
122- if (!baritone .getCommandManager ().getRegistry ().stream ().filter ((a ) -> a .getNames ().get (0 ).equalsIgnoreCase ("elytra" )).findAny ().isEmpty ()) {
123- baritone .getCommandManager ().execute ("elytra" );
124- break ;
125- }
126- }
120+ BaritoneAPI .getProvider ().getPrimaryBaritone ().getCommandManager ().execute ("goal " + goal .x + " " + goal .y + " " + goal .z );
121+ BaritoneAPI .getProvider ().getPrimaryBaritone ().getCommandManager ().execute ("elytra" );
127122 }
128123 }
129124 ));
@@ -138,13 +133,8 @@ public void onAction(Screen screen) {
138133 @ Override
139134 public void onAction (Screen screen ) {
140135 GoalBlock goal = new GoalBlock (new BlockPos (rightClickX , rightClickY , rightClickZ ).up ());
141- BaritoneAPI .getProvider ().getPrimaryBaritone ().getCustomGoalProcess ().setGoal (goal );
142- for (IBaritone baritone : BaritoneAPI .getProvider ().getAllBaritones ()) {
143- if (!baritone .getCommandManager ().getRegistry ().stream ().filter ((a ) -> a .getNames ().get (0 ).equalsIgnoreCase ("elytra" )).findAny ().isEmpty ()) {
144- baritone .getCommandManager ().execute ("elytra" );
145- break ;
146- }
147- }
136+ BaritoneAPI .getProvider ().getPrimaryBaritone ().getCommandManager ().execute ("goal " + goal .x + " " + goal .y + " " + goal .z );
137+ BaritoneAPI .getProvider ().getPrimaryBaritone ().getCommandManager ().execute ("elytra" );
148138 }
149139 }
150140 ));
0 commit comments