This commit is contained in:
Leijurv 2018-08-04 23:25:05 -04:00
parent 72c69eb962
commit b1ced3fe84
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
8 changed files with 21 additions and 9 deletions

View File

@ -1,4 +1,11 @@
package baritone.bot.behavior;
public class PathingBehavior {
import baritone.bot.pathing.path.PathExecutor;
public class PathingBehavior extends Behavior{
public static final PathingBehavior INSTANCE=new PathingBehavior();
private PathingBehavior(){}
private PathExecutor current;
}

View File

@ -3,11 +3,12 @@ package baritone.bot.pathing.calc;
//import baritone.Baritone;
import baritone.bot.pathing.calc.openset.BinaryHeapOpenSet;
import baritone.bot.pathing.calc.openset.IOpenSet;
import baritone.bot.pathing.goals.Goal;
import baritone.bot.pathing.movement.ActionCosts;
import baritone.bot.pathing.movement.Movement;
import baritone.bot.pathing.calc.openset.BinaryHeapOpenSet;
import baritone.bot.pathing.calc.openset.IOpenSet;
import baritone.bot.pathing.path.IPath;
import baritone.bot.utils.ToolSet;
import net.minecraft.client.Minecraft;
import net.minecraft.util.math.BlockPos;

View File

@ -1,6 +1,7 @@
package baritone.bot.pathing.calc;
import baritone.bot.pathing.goals.Goal;
import baritone.bot.pathing.path.IPath;
import net.minecraft.util.math.BlockPos;
import java.util.HashMap;

View File

@ -1,6 +1,7 @@
package baritone.bot.pathing.calc;
import baritone.bot.pathing.goals.Goal;
import baritone.bot.pathing.path.IPath;
import net.minecraft.util.math.BlockPos;
/**

View File

@ -1,7 +1,9 @@
package baritone.bot.pathing.calc;
import baritone.bot.pathing.calc.PathNode;
import baritone.bot.pathing.goals.Goal;
import baritone.bot.pathing.movement.Movement;
import baritone.bot.pathing.path.IPath;
import net.minecraft.util.math.BlockPos;
import java.util.*;

View File

@ -1,4 +1,4 @@
package baritone.bot.pathing.calc;
package baritone.bot.pathing.path;
import baritone.bot.pathing.movement.Movement;
import baritone.bot.utils.Utils;

View File

@ -1,6 +1,6 @@
package baritone.bot.behavior;
package baritone.bot.pathing.path;
import baritone.bot.pathing.calc.IPath;
import baritone.bot.behavior.Behavior;
import baritone.bot.pathing.movement.ActionCosts;
import baritone.bot.pathing.movement.Movement;
import baritone.bot.pathing.movement.MovementState;
@ -19,7 +19,7 @@ import static baritone.bot.pathing.movement.MovementState.MovementStatus.*;
*
* @author leijurv
*/
public class PathExecution extends Behavior {
public class PathExecutor extends Behavior {
private static final double MAX_DIST_FROM_PATH = 2;
private static final double MAX_TICKS_AWAY = 200; // ten seconds
private final IPath path;
@ -28,7 +28,7 @@ public class PathExecution extends Behavior {
private int ticksOnCurrent;
private boolean failed;
public PathExecution(IPath path) {
public PathExecutor(IPath path) {
this.path = path;
this.pathPosition = 0;
}

View File

@ -12,7 +12,7 @@ public class ActionCostsButOnlyTheOnesThatMakeMickeyDieInsideTest {
assertEquals(FALL_N_BLOCKS_COST.length, 257); // Fall 0 blocks through fall 256 blocks
for (int i = 0; i < 257; i++) {
double blocks = ticksToBlocks(FALL_N_BLOCKS_COST[i]);
assertEquals(blocks, i, 0.01);
assertEquals(blocks, i, 0.000000000001); // If you add another 0 the test fails at i=217 LOL
}
}