vines patch tempfix
This commit is contained in:
parent
eee43ad5d1
commit
b97852dd68
@ -21,10 +21,14 @@ import baritone.bot.Baritone;
|
||||
import baritone.bot.behavior.impl.LookBehavior;
|
||||
import baritone.bot.behavior.impl.LookBehaviorUtils;
|
||||
import baritone.bot.pathing.movement.MovementState.MovementStatus;
|
||||
import baritone.bot.pathing.movement.movements.*;
|
||||
import baritone.bot.utils.BlockStateInterface;
|
||||
import baritone.bot.utils.Helper;
|
||||
import baritone.bot.utils.Rotation;
|
||||
import baritone.bot.utils.ToolSet;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockLadder;
|
||||
import net.minecraft.block.BlockVine;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
@ -68,11 +72,21 @@ public abstract class Movement implements Helper, MovementHelper {
|
||||
if (cost == null) {
|
||||
if (context == null)
|
||||
context = new CalculationContext();
|
||||
cost = calculateCost(context);
|
||||
cost = calculateCost0(context);
|
||||
}
|
||||
return cost;
|
||||
}
|
||||
|
||||
private double calculateCost0(CalculationContext context){
|
||||
if (!(this instanceof MovementPillar) && !(this instanceof MovementTraverse) && !(this instanceof MovementDownward)) {
|
||||
Block fromDown = BlockStateInterface.get(src.down()).getBlock();
|
||||
if (fromDown instanceof BlockLadder || fromDown instanceof BlockVine) {
|
||||
return COST_INF;
|
||||
}
|
||||
}
|
||||
return calculateCost(context);
|
||||
}
|
||||
|
||||
protected abstract double calculateCost(CalculationContext context);
|
||||
|
||||
public double recalculateCost() {
|
||||
|
Loading…
Reference in New Issue
Block a user