appease codacy
This commit is contained in:
@@ -106,8 +106,7 @@ public class PathExecutor implements IPathExecutor, Helper {
|
|||||||
}
|
}
|
||||||
BetterBlockPos whereShouldIBe = path.positions().get(pathPosition);
|
BetterBlockPos whereShouldIBe = path.positions().get(pathPosition);
|
||||||
BetterBlockPos whereAmI = ctx.playerFeet();
|
BetterBlockPos whereAmI = ctx.playerFeet();
|
||||||
if (!whereShouldIBe.equals(whereAmI)) {
|
if (!whereShouldIBe.equals(whereAmI) && !Blocks.AIR.equals(BlockStateInterface.getBlock(ctx, whereAmI.down()))) {//do not skip if standing on air, because our position isn't stable to skip
|
||||||
if (!Blocks.AIR.equals(BlockStateInterface.getBlock(ctx, whereAmI.down()))) {//do not skip if standing on air, because our position isn't stable to skip
|
|
||||||
for (int i = 0; i < pathPosition - 1 && i < path.length(); i++) {//this happens for example when you lag out and get teleported back a couple blocks
|
for (int i = 0; i < pathPosition - 1 && i < path.length(); i++) {//this happens for example when you lag out and get teleported back a couple blocks
|
||||||
if (whereAmI.equals(path.positions().get(i))) {
|
if (whereAmI.equals(path.positions().get(i))) {
|
||||||
logDebug("Skipping back " + (pathPosition - i) + " steps, to " + i);
|
logDebug("Skipping back " + (pathPosition - i) + " steps, to " + i);
|
||||||
@@ -135,7 +134,6 @@ public class PathExecutor implements IPathExecutor, Helper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Tuple<Double, BlockPos> status = closestPathPos(path);
|
Tuple<Double, BlockPos> status = closestPathPos(path);
|
||||||
if (possiblyOffPath(status, MAX_DIST_FROM_PATH)) {
|
if (possiblyOffPath(status, MAX_DIST_FROM_PATH)) {
|
||||||
ticksAway++;
|
ticksAway++;
|
||||||
@@ -561,10 +559,7 @@ public class PathExecutor implements IPathExecutor, Helper {
|
|||||||
if (MovementHelper.avoidWalkingInto(ctx.world().getBlockState(current.getSrc().up(3)).getBlock())) {
|
if (MovementHelper.avoidWalkingInto(ctx.world().getBlockState(current.getSrc().up(3)).getBlock())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (MovementHelper.avoidWalkingInto(ctx.world().getBlockState(next.getDest().up(2)).getBlock())) {
|
return !MovementHelper.avoidWalkingInto(ctx.world().getBlockState(next.getDest().up(2)).getBlock()); // codacy smh my head
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean canSprintFromDescendInto(IPlayerContext ctx, IMovement current, IMovement next) {
|
private static boolean canSprintFromDescendInto(IPlayerContext ctx, IMovement current, IMovement next) {
|
||||||
|
|||||||
@@ -131,8 +131,11 @@ public class GetToBlockProcess extends BaritoneProcessHelper implements IGetToBl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (true) {
|
// i can't do break; (codacy gets mad), and i can't do if(true){break}; (codacy gets mad)
|
||||||
break; // codacy gets mad if i just end on a break LOL
|
// so i will do this
|
||||||
|
switch (newBlacklist.size()) {
|
||||||
|
default:
|
||||||
|
break outer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logDebug("Blacklisting unreachable locations " + newBlacklist);
|
logDebug("Blacklisting unreachable locations " + newBlacklist);
|
||||||
|
|||||||
Reference in New Issue
Block a user