forked from RepoMirrors/baritone
Merge branch 'master' into 1.13.2
This commit is contained in:
commit
e7658b75ef
|
@ -537,7 +537,7 @@ public interface MovementHelper extends ActionCosts, Helper {
|
||||||
double faceX = (placeAt.getX() + against1.getX() + 1.0D) * 0.5D;
|
double faceX = (placeAt.getX() + against1.getX() + 1.0D) * 0.5D;
|
||||||
double faceY = (placeAt.getY() + against1.getY() + 0.5D) * 0.5D;
|
double faceY = (placeAt.getY() + against1.getY() + 0.5D) * 0.5D;
|
||||||
double faceZ = (placeAt.getZ() + against1.getZ() + 1.0D) * 0.5D;
|
double faceZ = (placeAt.getZ() + against1.getZ() + 1.0D) * 0.5D;
|
||||||
Rotation place = RotationUtils.calcRotationFromVec3d(ctx.playerHead(), new Vec3d(faceX, faceY, faceZ), ctx.playerRotations());
|
Rotation place = RotationUtils.calcRotationFromVec3d(wouldSneak ? RayTraceUtils.inferSneakingEyePosition(ctx.player()) : ctx.playerHead(), new Vec3d(faceX, faceY, faceZ), ctx.playerRotations());
|
||||||
RayTraceResult res = RayTraceUtils.rayTraceTowards(ctx.player(), place, ctx.playerController().getBlockReachDistance(), wouldSneak);
|
RayTraceResult res = RayTraceUtils.rayTraceTowards(ctx.player(), place, ctx.playerController().getBlockReachDistance(), wouldSneak);
|
||||||
if (res != null && res.type == RayTraceResult.Type.BLOCK && res.getBlockPos().equals(against1) && res.getBlockPos().offset(res.sideHit).equals(placeAt)) {
|
if (res != null && res.type == RayTraceResult.Type.BLOCK && res.getBlockPos().equals(against1) && res.getBlockPos().offset(res.sideHit).equals(placeAt)) {
|
||||||
state.setTarget(new MovementState.MovementTarget(place, true));
|
state.setTarget(new MovementState.MovementTarget(place, true));
|
||||||
|
|
Loading…
Reference in New Issue