remove spammy log prints
This commit is contained in:
parent
3cac37d1a5
commit
b41fdc2bbd
@ -104,7 +104,7 @@ public final class RotationUtils {
|
|||||||
* angles back to it.
|
* angles back to it.
|
||||||
*
|
*
|
||||||
* @param current The current angles
|
* @param current The current angles
|
||||||
* @param target The target angles
|
* @param target The target angles
|
||||||
* @return The wrapped angles
|
* @return The wrapped angles
|
||||||
*/
|
*/
|
||||||
public static Rotation wrapAnglesToRelative(Rotation current, Rotation target) {
|
public static Rotation wrapAnglesToRelative(Rotation current, Rotation target) {
|
||||||
@ -115,12 +115,11 @@ public final class RotationUtils {
|
|||||||
* Calculates the rotation from Vec<sub>dest</sub> to Vec<sub>orig</sub> and makes the
|
* Calculates the rotation from Vec<sub>dest</sub> to Vec<sub>orig</sub> and makes the
|
||||||
* return value relative to the specified current rotations.
|
* return value relative to the specified current rotations.
|
||||||
*
|
*
|
||||||
* @see #wrapAnglesToRelative(Rotation, Rotation)
|
* @param orig The origin position
|
||||||
*
|
* @param dest The destination position
|
||||||
* @param orig The origin position
|
|
||||||
* @param dest The destination position
|
|
||||||
* @param current The current rotations
|
* @param current The current rotations
|
||||||
* @return The rotation from the origin to the destination
|
* @return The rotation from the origin to the destination
|
||||||
|
* @see #wrapAnglesToRelative(Rotation, Rotation)
|
||||||
*/
|
*/
|
||||||
public static Rotation calcRotationFromVec3d(Vec3d orig, Vec3d dest, Rotation current) {
|
public static Rotation calcRotationFromVec3d(Vec3d orig, Vec3d dest, Rotation current) {
|
||||||
return wrapAnglesToRelative(current, calcRotationFromVec3d(orig, dest));
|
return wrapAnglesToRelative(current, calcRotationFromVec3d(orig, dest));
|
||||||
@ -134,7 +133,7 @@ public final class RotationUtils {
|
|||||||
* @return The rotation from the origin to the destination
|
* @return The rotation from the origin to the destination
|
||||||
*/
|
*/
|
||||||
public static Rotation calcRotationFromVec3d(Vec3d orig, Vec3d dest) {
|
public static Rotation calcRotationFromVec3d(Vec3d orig, Vec3d dest) {
|
||||||
double[] delta = { orig.x - dest.x, orig.y - dest.y, orig.z - dest.z };
|
double[] delta = {orig.x - dest.x, orig.y - dest.y, orig.z - dest.z};
|
||||||
double yaw = MathHelper.atan2(delta[0], -delta[2]);
|
double yaw = MathHelper.atan2(delta[0], -delta[2]);
|
||||||
double dist = Math.sqrt(delta[0] * delta[0] + delta[2] * delta[2]);
|
double dist = Math.sqrt(delta[0] * delta[0] + delta[2] * delta[2]);
|
||||||
double pitch = MathHelper.atan2(delta[1], dist);
|
double pitch = MathHelper.atan2(delta[1], dist);
|
||||||
@ -166,7 +165,7 @@ public final class RotationUtils {
|
|||||||
* unable to reach any of the sides of the block.
|
* unable to reach any of the sides of the block.
|
||||||
*
|
*
|
||||||
* @param entity The viewing entity
|
* @param entity The viewing entity
|
||||||
* @param pos The target block position
|
* @param pos The target block position
|
||||||
* @return The optional rotation
|
* @return The optional rotation
|
||||||
*/
|
*/
|
||||||
public static Optional<Rotation> reachable(Entity entity, BlockPos pos) {
|
public static Optional<Rotation> reachable(Entity entity, BlockPos pos) {
|
||||||
@ -206,15 +205,15 @@ public final class RotationUtils {
|
|||||||
* the given offsetted position. The return type will be {@link Optional#empty()} if
|
* the given offsetted position. The return type will be {@link Optional#empty()} if
|
||||||
* the entity is unable to reach the block with the offset applied.
|
* the entity is unable to reach the block with the offset applied.
|
||||||
*
|
*
|
||||||
* @param entity The viewing entity
|
* @param entity The viewing entity
|
||||||
* @param pos The target block position
|
* @param pos The target block position
|
||||||
* @param offsetPos The position of the block with the offset applied.
|
* @param offsetPos The position of the block with the offset applied.
|
||||||
* @return The optional rotation
|
* @return The optional rotation
|
||||||
*/
|
*/
|
||||||
public static Optional<Rotation> reachableOffset(Entity entity, BlockPos pos, Vec3d offsetPos) {
|
public static Optional<Rotation> reachableOffset(Entity entity, BlockPos pos, Vec3d offsetPos) {
|
||||||
Rotation rotation = calcRotationFromVec3d(entity.getPositionEyes(1.0F), offsetPos);
|
Rotation rotation = calcRotationFromVec3d(entity.getPositionEyes(1.0F), offsetPos);
|
||||||
RayTraceResult result = RayTraceUtils.rayTraceTowards(rotation);
|
RayTraceResult result = RayTraceUtils.rayTraceTowards(rotation);
|
||||||
System.out.println(result);
|
//System.out.println(result);
|
||||||
if (result != null && result.typeOfHit == RayTraceResult.Type.BLOCK) {
|
if (result != null && result.typeOfHit == RayTraceResult.Type.BLOCK) {
|
||||||
if (result.getBlockPos().equals(pos)) {
|
if (result.getBlockPos().equals(pos)) {
|
||||||
return Optional.of(rotation);
|
return Optional.of(rotation);
|
||||||
@ -233,7 +232,7 @@ public final class RotationUtils {
|
|||||||
* looking at the direct center of it's hitbox.
|
* looking at the direct center of it's hitbox.
|
||||||
*
|
*
|
||||||
* @param entity The viewing entity
|
* @param entity The viewing entity
|
||||||
* @param pos The target block position
|
* @param pos The target block position
|
||||||
* @return The optional rotation
|
* @return The optional rotation
|
||||||
*/
|
*/
|
||||||
public static Optional<Rotation> reachableCenter(Entity entity, BlockPos pos) {
|
public static Optional<Rotation> reachableCenter(Entity entity, BlockPos pos) {
|
||||||
|
@ -198,7 +198,7 @@ public class MovementAscend extends Movement {
|
|||||||
} else {
|
} else {
|
||||||
state.setInput(InputOverrideHandler.Input.CLICK_LEFT, true); // break whatever replaceable block is in the way
|
state.setInput(InputOverrideHandler.Input.CLICK_LEFT, true); // break whatever replaceable block is in the way
|
||||||
}
|
}
|
||||||
System.out.println("Trying to look at " + anAgainst + ", actually looking at" + selectedBlock);
|
//System.out.println("Trying to look at " + anAgainst + ", actually looking at" + selectedBlock);
|
||||||
});
|
});
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
@ -187,9 +187,9 @@ public class MovementDescend extends Movement {
|
|||||||
if (BlockStateInterface.isLiquid(dest) || player().posY - playerFeet.getY() < 0.094) { // lilypads
|
if (BlockStateInterface.isLiquid(dest) || player().posY - playerFeet.getY() < 0.094) { // lilypads
|
||||||
// Wait until we're actually on the ground before saying we're done because sometimes we continue to fall if the next action starts immediately
|
// Wait until we're actually on the ground before saying we're done because sometimes we continue to fall if the next action starts immediately
|
||||||
return state.setStatus(MovementStatus.SUCCESS);
|
return state.setStatus(MovementStatus.SUCCESS);
|
||||||
} else {
|
}/* else {
|
||||||
System.out.println(player().posY + " " + playerFeet.getY() + " " + (player().posY - playerFeet.getY()));
|
// System.out.println(player().posY + " " + playerFeet.getY() + " " + (player().posY - playerFeet.getY()));
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
double diffX = player().posX - (dest.getX() + 0.5);
|
double diffX = player().posX - (dest.getX() + 0.5);
|
||||||
double diffZ = player().posZ - (dest.getZ() + 0.5);
|
double diffZ = player().posZ - (dest.getZ() + 0.5);
|
||||||
|
@ -273,7 +273,7 @@ public class MovementTraverse extends Movement {
|
|||||||
}
|
}
|
||||||
// wrong side?
|
// wrong side?
|
||||||
}
|
}
|
||||||
System.out.println("Trying to look at " + against1 + ", actually looking at" + RayTraceUtils.getSelectedBlock());
|
//System.out.println("Trying to look at " + against1 + ", actually looking at" + RayTraceUtils.getSelectedBlock());
|
||||||
return state.setInput(InputOverrideHandler.Input.CLICK_LEFT, true);
|
return state.setInput(InputOverrideHandler.Input.CLICK_LEFT, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,10 @@ import baritone.pathing.calc.AbstractNodeCostSearch;
|
|||||||
import baritone.pathing.movement.CalculationContext;
|
import baritone.pathing.movement.CalculationContext;
|
||||||
import baritone.pathing.movement.MovementHelper;
|
import baritone.pathing.movement.MovementHelper;
|
||||||
import baritone.pathing.movement.movements.*;
|
import baritone.pathing.movement.movements.*;
|
||||||
import baritone.utils.*;
|
import baritone.utils.BlockBreakHelper;
|
||||||
|
import baritone.utils.BlockStateInterface;
|
||||||
|
import baritone.utils.Helper;
|
||||||
|
import baritone.utils.InputOverrideHandler;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.util.Tuple;
|
import net.minecraft.util.Tuple;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
@ -123,7 +126,7 @@ public class PathExecutor implements IPathExecutor, Helper {
|
|||||||
if (i - pathPosition > 2) {
|
if (i - pathPosition > 2) {
|
||||||
logDebug("Skipping forward " + (i - pathPosition) + " steps, to " + i);
|
logDebug("Skipping forward " + (i - pathPosition) + " steps, to " + i);
|
||||||
}
|
}
|
||||||
System.out.println("Double skip sundae");
|
//System.out.println("Double skip sundae");
|
||||||
pathPosition = i - 1;
|
pathPosition = i - 1;
|
||||||
onChangeInPathPosition();
|
onChangeInPathPosition();
|
||||||
return false;
|
return false;
|
||||||
|
@ -86,8 +86,8 @@ public interface Helper {
|
|||||||
*/
|
*/
|
||||||
default void logDebug(String message) {
|
default void logDebug(String message) {
|
||||||
if (!Baritone.settings().chatDebug.get()) {
|
if (!Baritone.settings().chatDebug.get()) {
|
||||||
System.out.println("Suppressed debug message:");
|
//System.out.println("Suppressed debug message:");
|
||||||
System.out.println(message);
|
//System.out.println(message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
logDirect(message);
|
logDirect(message);
|
||||||
|
Loading…
Reference in New Issue
Block a user