im idiot
This commit is contained in:
parent
40dfed7e9d
commit
5acb86e390
@ -86,7 +86,7 @@ public class MovementAscend extends Movement {
|
||||
}
|
||||
double halfWalk = WALK_ONE_BLOCK_COST / 2;
|
||||
if (toPlace.getBlock().equals(Blocks.SOUL_SAND)) {
|
||||
halfWalk *= SNEAK_ONE_BLOCK_COST / WALK_ONE_BLOCK_COST;
|
||||
halfWalk *= WALK_ONE_IN_WATER_COST / WALK_ONE_BLOCK_COST;
|
||||
}
|
||||
// we walk half the block to get to the edge, then we walk the other half while simultaneously jumping (math.max because of how it's in parallel)
|
||||
return halfWalk + Math.max(JUMP_ONE_BLOCK_COST, halfWalk) + getTotalHardnessOfBlocksToBreak(context.getToolSet());
|
||||
|
@ -48,7 +48,7 @@ public class MovementDescend extends Movement {
|
||||
// we walk half the block plus 0.3 to get to the edge, then we walk the other 0.2 while simultaneously falling (math.max because of how it's in parallel)
|
||||
double walk = WALK_OFF_BLOCK_COST;
|
||||
if (BlockStateInterface.get(src.down()).getBlock().equals(Blocks.SOUL_SAND)) {
|
||||
walk *= WALK_ONE_BLOCK_COST / SNEAK_ONE_BLOCK_COST;
|
||||
walk *= WALK_ONE_IN_WATER_COST / WALK_ONE_BLOCK_COST;
|
||||
}
|
||||
return walk + Math.max(FALL_N_BLOCKS_COST[1], CENTER_AFTER_FALL_COST) + getTotalHardnessOfBlocksToBreak(context.getToolSet());
|
||||
}
|
||||
|
@ -74,8 +74,7 @@ public class MovementDiagonal extends Movement {
|
||||
|
||||
@Override
|
||||
protected double calculateCost(CalculationContext context) {
|
||||
double lastPos = MovementHelper.getMiningDurationTicks(context.getToolSet(), positionsToBreak[4]) + MovementHelper.getMiningDurationTicks(context.getToolSet(), positionsToBreak[5]);
|
||||
if (lastPos != 0) {
|
||||
if (!MovementHelper.canWalkThrough(positionsToBreak[4]) || !MovementHelper.canWalkThrough(positionsToBreak[5])) {
|
||||
return COST_INF;
|
||||
}
|
||||
IBlockState destWalkOn = BlockStateInterface.get(positionsToPlace[0]);
|
||||
|
Loading…
Reference in New Issue
Block a user