diff --git a/src/main/java/keystrokesmod/module/impl/world/Scaffold.java b/src/main/java/keystrokesmod/module/impl/world/Scaffold.java index 25554ada..8008686d 100644 --- a/src/main/java/keystrokesmod/module/impl/world/Scaffold.java +++ b/src/main/java/keystrokesmod/module/impl/world/Scaffold.java @@ -42,6 +42,8 @@ public class Scaffold extends Module { // from b4 :) private final SliderSetting aimSpeed; private final SliderSetting motion; private final ModeSetting rotation; + private final SliderSetting tellyStartTick; + private final SliderSetting tellyStopTick; private final SliderSetting strafe; private final ModeSetting fastScaffold; private final ButtonSetting cancelSprint; @@ -65,7 +67,7 @@ public class Scaffold extends Module { // from b4 :) protected MovingObjectPosition placeBlock; private int lastSlot; private static final String[] rotationModes = new String[]{"None", "Backwards", "Strict", "Precise", "Telly"}; - private static final String[] fastScaffoldModes = new String[]{"Disabled", "Sprint", "Edge", "Jump A", "Jump B", "Jump C", "Float", "Side", "Legit", "Auto Jump"}; + private static final String[] fastScaffoldModes = new String[]{"Disabled", "Sprint", "Edge", "Jump A", "Jump B", "Jump C", "Float", "Side", "Legit", "Auto Jump", "GrimAC"}; private static final String[] precisionModes = new String[]{"Very low", "Low", "Moderate", "High", "Very high"}; public float placeYaw; public float placePitch; @@ -89,10 +91,12 @@ public Scaffold() { this.registerSetting(aimSpeed = new SliderSetting("Aim speed", 20, 5, 20, 0.1)); this.registerSetting(motion = new SliderSetting("Motion", 1.0, 0.5, 1.2, 0.01)); this.registerSetting(rotation = new ModeSetting("Rotation", rotationModes, 1)); + this.registerSetting(tellyStartTick = new SliderSetting("Telly start", 3, 0, 11, 1, "tick", new ModeOnly(rotation, 4))); + this.registerSetting(tellyStopTick = new SliderSetting("Telly stop", 8, 0, 11, 1, "tick", new ModeOnly(rotation, 4))); this.registerSetting(strafe = new SliderSetting("Strafe", 0, -45, 45, 5)); this.registerSetting(fastScaffold = new ModeSetting("Fast scaffold", fastScaffoldModes, 0)); this.registerSetting(precision = new ModeSetting("Precision", precisionModes, 4)); - this.registerSetting(cancelSprint = new ButtonSetting("Cancel sprint", false, new ModeOnly(fastScaffold, 0, 9).reserve())); + this.registerSetting(cancelSprint = new ButtonSetting("Cancel sprint", false, new ModeOnly(fastScaffold, 0).reserve())); this.registerSetting(rayCast = new ButtonSetting("Ray cast", false)); this.registerSetting(sneak = new ButtonSetting("Sneak", false)); this.registerSetting(sneakEveryBlocks = new SliderSetting("Sneak every blocks", 1, 1, 10, 1, sneak::isToggled)); @@ -107,7 +111,7 @@ public Scaffold() { this.registerSetting(silentSwing = new ButtonSetting("Silent swing", false)); this.registerSetting(tower = new ButtonSetting("Tower", false)); this.registerSetting(fast = new ButtonSetting("Fast", false)); - this.registerSetting(sameY = new ButtonSetting("SameY", false, new ModeOnly(fastScaffold, 9).reserve())); + this.registerSetting(sameY = new ButtonSetting("SameY", false)); } public void onDisable() { @@ -160,7 +164,7 @@ public void onRotation(RotationEvent event) { pitch = placePitch; break; case 4: - if (offGroundTicks >= 3 && offGroundTicks < 8 && placeBlock != null && MoveUtil.isMoving()) { + if (offGroundTicks >= tellyStartTick.getInput() && offGroundTicks < tellyStopTick.getInput() && placeBlock != null && MoveUtil.isMoving() && !Utils.jumpDown()) { telly$noBlockPlace = true; yaw = event.getYaw(); pitch = event.getPitch(); @@ -180,9 +184,17 @@ public void onRotation(RotationEvent event) { @SubscribeEvent public void onPreMotion(PreMotionEvent event) { - if (cancelSprint.isToggled() || fastScaffold.getInput() == 9) { + if (cancelSprint.isToggled()) { event.setSprinting(false); } + + if (fastScaffold.getInput() == 10) { + if (Math.abs(MathHelper.wrapAngleTo180_float(mc.thePlayer.rotationYaw) - + MathHelper.wrapAngleTo180_float(RotationHandler.getRotationYaw())) > 100) { + ((KeyBindingAccessor) mc.gameSettings.keyBindSprint).setPressed(false); + mc.thePlayer.setSprinting(false); + } + } } @SubscribeEvent @@ -512,6 +524,7 @@ public boolean sprint() { switch ((int) fastScaffold.getInput()) { case 1: case 7: + case 10: return true; case 2: return Utils.onEdge();