fix a bunch of scuff
This commit is contained in:
parent
a5a795a22c
commit
25024b58de
@ -36,6 +36,7 @@ import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public class MovementPillar extends Movement {
|
||||
|
||||
@ -161,6 +162,7 @@ public class MovementPillar extends Movement {
|
||||
state.setInput(Input.MOVE_FORWARD, true);
|
||||
}
|
||||
if (ctx.playerFeet().equals(dest)) {
|
||||
logDebug("wtf2");
|
||||
return state.setStatus(MovementStatus.SUCCESS);
|
||||
}
|
||||
return state;
|
||||
@ -183,6 +185,7 @@ public class MovementPillar extends Movement {
|
||||
}
|
||||
|
||||
if (ctx.playerFeet().equals(against.up()) || ctx.playerFeet().equals(dest)) {
|
||||
logDebug("wtf3");
|
||||
return state.setStatus(MovementStatus.SUCCESS);
|
||||
}
|
||||
if (MovementHelper.isBottomSlab(BlockStateInterface.get(ctx, src.down()))) {
|
||||
@ -226,8 +229,14 @@ public class MovementPillar extends Movement {
|
||||
|
||||
|
||||
if (!blockIsThere) {
|
||||
Block fr = BlockStateInterface.get(ctx, src).getBlock();
|
||||
if (!(fr instanceof BlockAir || fr.isReplaceable(ctx.world(), src))) {
|
||||
IBlockState frState = BlockStateInterface.get(ctx, src);
|
||||
Block fr = frState.getBlock();
|
||||
// TODO: Evaluate usage of getMaterial().isReplaceable()
|
||||
if (!(fr instanceof BlockAir || frState.getMaterial().isReplaceable())) {
|
||||
Optional<Rotation> reachable = RotationUtils.reachable(ctx.player(), src, ctx.playerController().getBlockReachDistance());
|
||||
if (reachable.isPresent()) {
|
||||
state.setTarget(new MovementState.MovementTarget(reachable.get(), true));
|
||||
}
|
||||
state.setInput(Input.CLICK_LEFT, true);
|
||||
blockIsThere = false;
|
||||
} else if (ctx.player().isSneaking() && (Objects.equals(src.down(), ctx.objectMouseOver().getBlockPos()) || Objects.equals(src, ctx.objectMouseOver().getBlockPos())) && ctx.player().posY > dest.getY() + 0.1) {
|
||||
|
@ -88,7 +88,7 @@ public class CustomGoalProcess extends BaritoneProcessHelper implements ICustomG
|
||||
onLostControl();
|
||||
return new PathingCommand(this.goal, PathingCommandType.CANCEL_AND_SET_GOAL);
|
||||
}
|
||||
if (this.goal == null || this.goal.isInGoal(ctx.playerFeet())) {
|
||||
if (this.goal == null || (this.goal.isInGoal(ctx.playerFeet()) && ctx.player().onGround)) {
|
||||
onLostControl(); // we're there xd
|
||||
return new PathingCommand(this.goal, PathingCommandType.CANCEL_AND_SET_GOAL);
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ public class GetToBlockProcess extends BaritoneProcessHelper implements IGetToBl
|
||||
CalculationContext context = new CalculationContext(baritone, true);
|
||||
Baritone.getExecutor().execute(() -> rescan(current, context));
|
||||
}
|
||||
if (goal.isInGoal(ctx.playerFeet()) && isSafeToCancel) {
|
||||
if (goal.isInGoal(ctx.playerFeet()) && ctx.player().onGround && isSafeToCancel) {
|
||||
// we're there
|
||||
if (rightClickOnArrival(gettingTo)) {
|
||||
if (rightClick()) {
|
||||
|
Loading…
Reference in New Issue
Block a user