This commit is contained in:
Leijurv 2018-08-01 14:44:19 -04:00
parent f12215eac9
commit c68367b865
No known key found for this signature in database
GPG Key ID: 0936202430AE187C
2 changed files with 16 additions and 1 deletions

View File

@ -237,6 +237,7 @@ public class Baritone {
}
}
Manager.tick(LookManager.class, false);
MovementManager.tick();
}
public static boolean isPathFinding() {

View File

@ -6,6 +6,7 @@
package baritone.movement;
import baritone.Baritone;
import baritone.bot.InputOverrideHandler;
import baritone.ui.LookManager;
import net.minecraft.block.BlockLadder;
import net.minecraft.block.BlockVine;
@ -130,6 +131,17 @@ public class MovementManager {
return isRightClick && rightPressTime >= -2;
}
public static void tick(){
InputOverrideHandler handler = baritone.bot.Baritone.INSTANCE.getInputOverrideHandler();
handler.setInputForceState(InputOverrideHandler.Input.CLICK_LEFT, isLeftClick);
handler.setInputForceState(InputOverrideHandler.Input.CLICK_RIGHT, isRightClick);
handler.setInputForceState(InputOverrideHandler.Input.MOVE_FORWARD, forward);
handler.setInputForceState(InputOverrideHandler.Input.MOVE_BACK, backward);
handler.setInputForceState(InputOverrideHandler.Input.MOVE_LEFT, left);
handler.setInputForceState(InputOverrideHandler.Input.MOVE_RIGHT, right);
handler.setInputForceState(InputOverrideHandler.Input.JUMP, jumping);
}
public static boolean moveTowardsCoords(double x, double y, double z) {
return moveTowardsCoords(x, y, z, true);
}
@ -215,7 +227,9 @@ public class MovementManager {
}
public static void rightClickMouse() {
isRightClick=true;
//TODO fix
//Minecraft.getMinecraft().rightClickMouse();
throw new UnsupportedOperationException("Not public");
//throw new UnsupportedOperationException("Not public");
}
}