From 945d5ef3f79e725a77c4bddef1367d2590393f70 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Mon, 13 Aug 2018 08:31:59 -0700 Subject: [PATCH] add comment --- .../baritone/bot/behavior/impl/LookBehaviorUtils.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/baritone/bot/behavior/impl/LookBehaviorUtils.java b/src/main/java/baritone/bot/behavior/impl/LookBehaviorUtils.java index f3c0e1fa..f4ba2c52 100644 --- a/src/main/java/baritone/bot/behavior/impl/LookBehaviorUtils.java +++ b/src/main/java/baritone/bot/behavior/impl/LookBehaviorUtils.java @@ -59,6 +59,14 @@ public final class LookBehaviorUtils implements Helper { public static Optional reachable(BlockPos pos) { if (pos.equals(getSelectedBlock().orElse(null))) { + /* + * why add 0.0001? + * to indicate that we actually have a desired pitch + * the way we indicate that the pitch can be whatever and we only care about the yaw + * is by setting the desired pitch to the current pitch + * setting the desired pitch to the current pitch + 0.0001 means that we do have a desired pitch, it's + * just what it currently is + */ return Optional.of(new Rotation(mc.player.rotationYaw, mc.player.rotationPitch + 0.0001f)); } Optional possibleRotation = reachableCenter(pos);