This commit is contained in:
jackh 2025-01-30 13:47:53 -07:00
parent 301e599c74
commit 07a076e8ad
6 changed files with 84 additions and 73 deletions

View File

@ -282,11 +282,11 @@ public abstract class MixinEntityPlayerSP extends AbstractClientPlayer {
}
}
if (!this.isSprinting() && this.mc.gameSettings.keyBindSprint.isKeyDown() && (ModuleManager.sprint.omniSprint() || ModuleManager.scaffold.sprint() || NoSlow.groundSpeed() || this.movementInput.moveForward >= f && flag3) && (!(this.isUsingItem() || mc.thePlayer.isBlocking()) || !stopSprint) && !this.isPotionActive(Potion.blindness)) {
if (!this.isSprinting() && this.mc.gameSettings.keyBindSprint.isKeyDown() && (this.movementInput.moveForward != 0 || this.movementInput.moveStrafe != 0) && (ModuleManager.sprint.omniSprint() || ModuleManager.scaffold.sprint() || NoSlow.groundSpeed() || this.movementInput.moveForward >= f && flag3) && (!(this.isUsingItem() || mc.thePlayer.isBlocking()) || !stopSprint) && !this.isPotionActive(Potion.blindness)) {
this.setSprinting(true);
}
if (this.isSprinting() && (!ModuleManager.sprint.omniSprint() && !NoSlow.groundSpeed() && !ModuleManager.scaffold.sprint() && (this.movementInput.moveForward < f || !flag3)) || this.isCollidedHorizontally || ModuleManager.sprint.disableBackwards() || this.mc.gameSettings.keyBindSneak.isKeyDown() || (ModuleManager.scaffold != null && ModuleManager.scaffold.isEnabled && (!ModuleManager.scaffold.sprint() || ModuleManager.tower.canTower())) || (ModuleManager.wTap.isEnabled() && WTap.stopSprint)) {
if (this.isSprinting() && (!ModuleManager.sprint.omniSprint() && !NoSlow.groundSpeed() && !ModuleManager.scaffold.sprint() && (this.movementInput.moveForward < f || !flag3)) || this.isCollidedHorizontally || ModuleManager.sprint.disableBackwards() || (this.movementInput.moveForward == 0 && this.movementInput.moveStrafe == 0) || this.mc.gameSettings.keyBindSneak.isKeyDown() || (ModuleManager.scaffold != null && ModuleManager.scaffold.isEnabled && (!ModuleManager.scaffold.sprint() || ModuleManager.tower.canTower())) || (ModuleManager.wTap.isEnabled() && WTap.stopSprint)) {
this.setSprinting(false);
WTap.stopSprint = false;
}

View File

@ -70,7 +70,7 @@ public class KillAura extends Module {
private String[] autoBlockModes = new String[] { "Manual", "Vanilla", "Partial", "Interact A", "Interact B" };
private String[] interactAModes = new String[] { "10", "7" };
private String[] interactBModes = new String[] { "10", "8" };
private String[] interactBModes = new String[] { "10", "8.5" };
private String[] rotationModes = new String[] { "Silent", "Lock view", "None" };
private String[] sortModes = new String[] { "Distance", "Health", "Hurttime", "Yaw" };
@ -125,8 +125,8 @@ public class KillAura extends Module {
super("KillAura", category.combat);
this.registerSetting(aps = new SliderSetting("APS", 16.0, 1.0, 20.0, 0.5));
this.registerSetting(autoBlockMode = new SliderSetting("Autoblock", 0, autoBlockModes));
this.registerSetting(interactA = new SliderSetting("APS cap", 0, interactAModes));
this.registerSetting(interactB = new SliderSetting("APS cap", 0, interactBModes));
this.registerSetting(interactA = new SliderSetting("Interact mode", " aps", 0, interactAModes));
this.registerSetting(interactB = new SliderSetting("Interact mode", " aps", 0, interactBModes));
this.registerSetting(fov = new SliderSetting("FOV", 360.0, 30.0, 360.0, 4.0));
this.registerSetting(attackRange = new SliderSetting("Range (attack)", 3.0, 3.0, 6.0, 0.05));
this.registerSetting(swingRange = new SliderSetting("Range (swing)", 3.3, 3.0, 8.0, 0.05));
@ -227,7 +227,7 @@ public class KillAura extends Module {
if (!Utils.nullCheck()) {
return;
}
if (target != null) {
if (target != null && Utils.holdingSword()) {
if (Mouse.isButtonDown(0)) {
swingItem();
}
@ -239,7 +239,7 @@ public class KillAura extends Module {
checkUsing = false;
}
if (target == null && Utils.tabbedIn()) {
if (checkUsing && !sendUnBlock && Mouse.isButtonDown(1) && !blinkAutoBlock()) {
if (checkUsing && !sendUnBlock && Mouse.isButtonDown(1) && !blinkAutoBlock() && Utils.holdingSword()) {
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), true);
checkUsing = false;
}

View File

@ -9,6 +9,9 @@ import keystrokesmod.module.setting.impl.ButtonSetting;
import keystrokesmod.module.setting.impl.DescriptionSetting;
import keystrokesmod.module.setting.impl.SliderSetting;
import keystrokesmod.utility.*;
import net.minecraft.block.Block;
import net.minecraft.block.BlockSlab;
import net.minecraft.block.BlockStairs;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
@ -35,10 +38,10 @@ public class NoSlow extends Module {
public static ButtonSetting groundSpeedOption;
private String[] modes = new String[]{"Vanilla", "Pre", "Post", "Alpha", "Float"};
private boolean postPlace;
private boolean canFloat;
public static boolean canFloat;
private boolean reSendConsume;
public static boolean noSlowing;
private int offsetDelay;
public static boolean noSlowing, offset;
private int ticksOffStairs = 30;
private boolean setCancelled;
public NoSlow() {
@ -102,7 +105,7 @@ public class NoSlow extends Module {
@SubscribeEvent
public void onPostPlayerInput(PostPlayerInputEvent e) {
if (canFloat && noSlowing && mc.thePlayer.onGround) {
if (canFloat && noSlowing && offset && mc.thePlayer.onGround) {
if (groundSpeedOption.isToggled() && !Utils.jumpDown() && !ModuleManager.bhop.isEnabled() && Utils.keysDown() && !Utils.bowBackwards()) {
Utils.setSpeed(getSpeedModifier());
//Utils.print("ground speed");
@ -162,21 +165,26 @@ public class NoSlow extends Module {
@SubscribeEvent
public void onPreMotion(PreMotionEvent e) {
Block blockBelow = BlockUtils.getBlock(new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY - 1, mc.thePlayer.posZ));
Block block = BlockUtils.getBlock(new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ));
if (block instanceof BlockStairs || block instanceof BlockSlab && ModuleUtils.lastTickOnGround && ModuleUtils.lastTickPos1) {
ticksOffStairs = 0;
}
else {
ticksOffStairs++;
}
if (ModuleManager.bedAura.stopAutoblock || mode.getInput() != 4) {
resetFloat();
return;
}
postPlace = false;
if (mc.thePlayer.getHeldItem() != null && holdingConsumable(mc.thePlayer.getHeldItem()) && (!Mouse.isButtonDown(1) || !canFloat)) {
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), false);
}
if (!Mouse.isButtonDown(1) || (mc.thePlayer.getHeldItem() == null || !holdingConsumable(mc.thePlayer.getHeldItem()))) {
resetFloat();
noSlowing = false;
offsetDelay = 0;
//Utils.print("!Noslowing");
return;
}
if (mc.thePlayer.getHeldItem() != null && holdingConsumable(mc.thePlayer.getHeldItem()) && !Mouse.isButtonDown(1)) {
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), false);
}
if (reSendConsume) {
if (ModuleUtils.inAirTicks > 0) {
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), true);
@ -184,18 +192,17 @@ public class NoSlow extends Module {
canFloat = true;
}
}
if (!canFloat) {
offsetDelay = 0;
noSlowing = true;
if (ticksOffStairs < 30) {
offset = false;
return;
}
/*offsetDelay++;
if (offsetDelay < 3) {
return;
}*/
Utils.sendModuleMessage(this, "Offset");
e.setPosY(e.getPosY() + ModuleUtils.offsetValue);
noSlowing = true;
offset = true;
if (groundSpeedOption.isToggled()) {
if (!ModuleManager.killAura.isTargeting && !Utils.noSlowingBackWithBow() && !Utils.jumpDown() && mc.thePlayer.moveForward <= -0.5 && mc.thePlayer.moveStrafing == 0 && Utils.isMoving() && mc.thePlayer.onGround) {
if (!ModuleManager.killAura.isTargeting && !Utils.noSlowingBackWithBow() && !Utils.jumpDown() && mc.thePlayer.moveForward <= -0.5 && mc.thePlayer.moveStrafing == 0 && offset && Utils.isMoving() && mc.thePlayer.onGround) {
float yaw = mc.thePlayer.rotationYaw;
e.setYaw(yaw - 55);
}
@ -229,7 +236,7 @@ public class NoSlow extends Module {
}
public static boolean groundSpeed() {
return groundSpeedOption.isToggled() && noSlowing && Utils.isMoving() && !Utils.jumpDown();
return groundSpeedOption.isToggled() && noSlowing && canFloat && offset && Utils.isMoving() && !Utils.jumpDown();
}
@Override
@ -238,8 +245,7 @@ public class NoSlow extends Module {
}
private void resetFloat() {
reSendConsume = false;
canFloat = false;
reSendConsume = canFloat = noSlowing = offset = false;
}
public static boolean hasArrows(ItemStack stack) {

View File

@ -266,36 +266,39 @@ public class Scaffold extends Module {
float fourthDiag = 138f;
//first straight
if (quad < 5 || quad >= 85) {
if (quad <= 5 || quad >= 85) {
yawAngle = firstStraight;
}
else if (quad > 5 || quad < 85) {
//second straight
} else if (quad >= 80 || quad < 10) {
yawAngle = secondStraight;
//second straight
if (quad >= 80 || quad < 10) {
yawAngle = secondStraight;
//third straight
} else if (quad >= 65 || quad < 25) {
yawAngle = thirdStraight;
//third straight
} else if (quad >= 65 || quad < 25) {
yawAngle = thirdStraight;
//first diag
} else if (quad >= 55 || quad < 35) {
yawAngle = firstDiag;
//first diag
} else if (quad >= 55 || quad < 35) {
yawAngle = firstDiag;
//second diag
} else if (quad >= 15 && quad < 45) {
yawAngle = secondDiag;
if (quad >= 38) {
yawAngle = thirdDiag;
if (quad >= 42) {
yawAngle = fourthDiag;
//second diag
} else if (quad >= 15 && quad < 45) {
yawAngle = secondDiag;
if (quad >= 38) {
yawAngle = thirdDiag;
if (quad >= 42) {
yawAngle = fourthDiag;
}
}
}
} else {
yawAngle = secondDiag;
if (quad >= 45 && quad < 52) {
yawAngle = thirdDiag;
if (quad < 48) {
yawAngle = fourthDiag;
} else {
yawAngle = secondDiag;
if (quad >= 45 && quad < 52) {
yawAngle = thirdDiag;
if (quad < 48) {
yawAngle = fourthDiag;
}
}
}
}
@ -312,12 +315,12 @@ public class Scaffold extends Module {
//pitch = minPitch;
}
if (firstStroke == 0) {
strokeDelay = 275;
strokeDelay = 400;
}
} else {
yawOffset = minOffset;
pitch = minPitch;
strokeDelay = 575;
strokeDelay = 600;
}
if (!Utils.isMoving() || Utils.getHorizontalSpeed() == 0.0D) {
@ -335,7 +338,7 @@ public class Scaffold extends Module {
lastYaw + MathHelper.wrapAngleTo180_float(newYaw - lastYaw)
);
if (firstStroke == 0 && Utils.scaffoldDiagonal(false)) {
if (firstStroke == 0 && (quad > 5 && quad < 85)) {
if (quad >= 0 && quad < 45) {
if (side >= 0) {
set2 = false;
@ -354,7 +357,7 @@ public class Scaffold extends Module {
double minSwitch = (!Utils.scaffoldDiagonal(false)) ? 0 : 15;
if (side >= 0) {
if (!Utils.scaffoldDiagonal(false) && (quad >= 85 || quad <= 5)) {
if (quad <= 5 || quad >= 85) {
if (yawOffset <= -minSwitch && firstStroke == 0) {
set2 = false;
firstStroke = Utils.time();
@ -372,7 +375,7 @@ public class Scaffold extends Module {
break;
}
} else if (side <= -0) {
if (!Utils.scaffoldDiagonal(false) && (quad >= 85 || quad <= 5)) {
if (quad <= 5 || quad >= 85) {
if (yawOffset >= minSwitch && firstStroke == 0) {
set2 = false;
firstStroke = Utils.time();

View File

@ -13,9 +13,6 @@ import keystrokesmod.utility.RotationUtils;
import keystrokesmod.utility.Utils;
import net.minecraft.network.play.client.*;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.BlockPos;
import net.minecraft.util.Vec3;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
public class Tower extends Module {
@ -29,7 +26,7 @@ public class Tower extends Module {
final private String[] verticalTowerModes = new String[]{"None", "Vanilla", "Extra block"};
private int slowTicks;
private boolean wasTowering;
private int offGroundTicks;
private int towerTicks;
private boolean tower;
private boolean hasTowered, startedTowerInAir, setLowMotion, firstJump;
private int cMotionTicks, placeTicks;
@ -60,6 +57,7 @@ public class Tower extends Module {
@SubscribeEvent
public void onPreMotion(PreMotionEvent e) {
if (canTower() && Utils.keysDown()) {
towerTicks = mc.thePlayer.onGround ? 0 : ++towerTicks;
switch ((int) towerMove.getInput()) {
case 1:
@ -72,7 +70,7 @@ public class Tower extends Module {
break;
case 4:
if (tower) {
if (ModuleUtils.inAirTicks == 6) {
if (towerTicks == 6) {
e.setPosY(e.getPosY() + 0.000383527);
ModuleManager.scaffold.rotateForward();
}
@ -85,16 +83,12 @@ public class Tower extends Module {
@SubscribeEvent
public void onPreUpdate(PreUpdateEvent e) {
int valY = (int) Math.round((mc.thePlayer.posY % 1) * 10000);
offGroundTicks++;
if (mc.thePlayer.onGround) {
offGroundTicks = 0;
}
if (canTower() && Utils.keysDown()) {
wasTowering = true;
switch ((int) towerMove.getInput()) {
case 1:
mc.thePlayer.motionY = 0.41965;
switch (offGroundTicks) {
switch (towerTicks) {
case 1:
mc.thePlayer.motionY = 0.33;
break;
@ -102,15 +96,15 @@ public class Tower extends Module {
mc.thePlayer.motionY = 1 - mc.thePlayer.posY % 1;
break;
}
if (offGroundTicks >= 3) {
offGroundTicks = 0;
if (towerTicks >= 3) {
towerTicks = 0;
}
case 2:
if (mc.thePlayer.onGround) {
mc.thePlayer.motionY = 0.4196;
}
else {
switch (offGroundTicks) {
switch (towerTicks) {
case 3:
case 4:
mc.thePlayer.motionY = 0;
@ -174,7 +168,7 @@ public class Tower extends Module {
switch (simpleY) {
case 0:
mc.thePlayer.motionY = 0.42f;
if (ModuleUtils.inAirTicks == 6) {
if (towerTicks == 6) {
mc.thePlayer.motionY = -0.078400001525879;
}
Utils.setSpeed(getTowerSpeed(getSpeedLevel()));
@ -211,7 +205,7 @@ public class Tower extends Module {
slowTicks = 0;
}
hasTowered = tower = firstJump = startedTowerInAir = setLowMotion = speed = false;
cMotionTicks = placeTicks = 0;
cMotionTicks = placeTicks = towerTicks = 0;
reset();
}
if (canTower() && !Utils.keysDown()) {
@ -317,7 +311,7 @@ public class Tower extends Module {
}
private void reset() {
offGroundTicks = 0;
towerTicks = 0;
tower = false;
placeTicks = 0;
setLowMotion = false;

View File

@ -44,6 +44,8 @@ public class ModuleUtils {
private int attackingTicks;
private int unTargetTicks;
public static int profileTicks = -1;
public static boolean lastTickOnGround, lastTickPos1;
private boolean thisTickOnGround, thisTickPos1;
public static boolean isBlocked;
@ -257,6 +259,12 @@ public class ModuleUtils {
public void onPreMotion(PreMotionEvent e) {
int simpleY = (int) Math.round((e.posY % 1) * 10000);
lastTickOnGround = thisTickOnGround;
thisTickOnGround = mc.thePlayer.onGround;
lastTickPos1 = thisTickPos1;
thisTickPos1 = mc.thePlayer.posY % 1 == 0;
if (inAirTicks <= 20) {
inAirTicks = mc.thePlayer.onGround ? 0 : ++inAirTicks;
}