more pathing

This commit is contained in:
Leijurv 2018-08-02 10:48:22 -04:00
parent 8c8ce9cd5e
commit b29b66a19c
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 7 additions and 3 deletions

View File

@ -34,5 +34,4 @@ public class PathExecution extends Behavior implements Helper {
} }
} }
} }
} }

View File

@ -64,12 +64,17 @@ public interface IPath {
/** /**
* Where does this path start * Where does this path start
*/ */
BlockPos getSrc(); default BlockPos getSrc() {
return positions().get(0);
}
/** /**
* Where does this path end * Where does this path end
*/ */
BlockPos getDest(); default BlockPos getDest() {
List<BlockPos> pos = positions();
return pos.get(pos.size() - 1);
}
/** /**
* For rendering purposes, what blocks should be highlighted in red * For rendering purposes, what blocks should be highlighted in red