File tree Expand file tree Collapse file tree
api/java/baritone/api/process
main/java/baritone/process Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818package baritone .api .process ;
1919
2020import baritone .api .pathing .goals .Goal ;
21+ import baritone .api .utils .BetterBlockPos ;
2122import net .minecraft .core .BlockPos ;
2223
24+ import java .util .List ;
25+
2326public interface IElytraProcess extends IBaritoneProcess {
2427
2528 void repackChunks ();
@@ -29,6 +32,11 @@ public interface IElytraProcess extends IBaritoneProcess {
2932 */
3033 BlockPos currentDestination ();
3134
35+ /**
36+ * @return Current active path, empty if not active or no path has been calculated yet
37+ */
38+ List <BetterBlockPos > getPath ();
39+
3240 void pathTo (BlockPos destination );
3341
3442 void pathTo (Goal destination );
Original file line number Diff line number Diff line change @@ -316,6 +316,11 @@ public BlockPos currentDestination() {
316316 return this .behavior != null ? this .behavior .destination : null ;
317317 }
318318
319+ @ Override
320+ public List <BetterBlockPos > getPath () {
321+ return this .behavior != null ? behavior .pathManager .getPath () : Collections .emptyList ();
322+ }
323+
319324 @ Override
320325 public void pathTo (BlockPos destination ) {
321326 this .pathTo0 (destination , false );
Original file line number Diff line number Diff line change 2121import baritone .api .pathing .goals .Goal ;
2222import baritone .api .process .IElytraProcess ;
2323import baritone .api .process .PathingCommand ;
24+ import baritone .api .utils .BetterBlockPos ;
2425import baritone .utils .BaritoneProcessHelper ;
2526import net .minecraft .core .BlockPos ;
2627
28+ import java .util .Collections ;
29+ import java .util .List ;
30+
2731/**
2832 * @author Brady
2933 */
@@ -43,6 +47,11 @@ public BlockPos currentDestination() {
4347 return null ;
4448 }
4549
50+ @ Override
51+ public List <BetterBlockPos > getPath () {
52+ return Collections .emptyList ();
53+ }
54+
4655 @ Override
4756 public void pathTo (BlockPos destination ) {
4857 throw new UnsupportedOperationException ("Called pathTo() on NullElytraBehavior" );
You can’t perform that action at this time.
0 commit comments