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 net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
public class MovementPillar extends Movement {
|
public class MovementPillar extends Movement {
|
||||||
|
|
||||||
@ -161,6 +162,7 @@ public class MovementPillar extends Movement {
|
|||||||
state.setInput(Input.MOVE_FORWARD, true);
|
state.setInput(Input.MOVE_FORWARD, true);
|
||||||
}
|
}
|
||||||
if (ctx.playerFeet().equals(dest)) {
|
if (ctx.playerFeet().equals(dest)) {
|
||||||
|
logDebug("wtf2");
|
||||||
return state.setStatus(MovementStatus.SUCCESS);
|
return state.setStatus(MovementStatus.SUCCESS);
|
||||||
}
|
}
|
||||||
return state;
|
return state;
|
||||||
@ -183,6 +185,7 @@ public class MovementPillar extends Movement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ctx.playerFeet().equals(against.up()) || ctx.playerFeet().equals(dest)) {
|
if (ctx.playerFeet().equals(against.up()) || ctx.playerFeet().equals(dest)) {
|
||||||
|
logDebug("wtf3");
|
||||||
return state.setStatus(MovementStatus.SUCCESS);
|
return state.setStatus(MovementStatus.SUCCESS);
|
||||||
}
|
}
|
||||||
if (MovementHelper.isBottomSlab(BlockStateInterface.get(ctx, src.down()))) {
|
if (MovementHelper.isBottomSlab(BlockStateInterface.get(ctx, src.down()))) {
|
||||||
@ -226,8 +229,14 @@ public class MovementPillar extends Movement {
|
|||||||
|
|
||||||
|
|
||||||
if (!blockIsThere) {
|
if (!blockIsThere) {
|
||||||
Block fr = BlockStateInterface.get(ctx, src).getBlock();
|
IBlockState frState = BlockStateInterface.get(ctx, src);
|
||||||
if (!(fr instanceof BlockAir || fr.isReplaceable(ctx.world(), 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);
|
state.setInput(Input.CLICK_LEFT, true);
|
||||||
blockIsThere = false;
|
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) {
|
} 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();
|
onLostControl();
|
||||||
return new PathingCommand(this.goal, PathingCommandType.CANCEL_AND_SET_GOAL);
|
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
|
onLostControl(); // we're there xd
|
||||||
return new PathingCommand(this.goal, PathingCommandType.CANCEL_AND_SET_GOAL);
|
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);
|
CalculationContext context = new CalculationContext(baritone, true);
|
||||||
Baritone.getExecutor().execute(() -> rescan(current, context));
|
Baritone.getExecutor().execute(() -> rescan(current, context));
|
||||||
}
|
}
|
||||||
if (goal.isInGoal(ctx.playerFeet()) && isSafeToCancel) {
|
if (goal.isInGoal(ctx.playerFeet()) && ctx.player().onGround && isSafeToCancel) {
|
||||||
// we're there
|
// we're there
|
||||||
if (rightClickOnArrival(gettingTo)) {
|
if (rightClickOnArrival(gettingTo)) {
|
||||||
if (rightClick()) {
|
if (rightClick()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user