This commit is contained in:
jackh 2025-02-24 09:25:47 -07:00
parent 608d1ae801
commit a6123a902b
11 changed files with 519 additions and 425 deletions

View File

@ -71,7 +71,7 @@ public class KillAura extends Module {
private ButtonSetting weaponOnly; private ButtonSetting weaponOnly;
private String[] autoBlockModes = new String[] { "Manual", "Vanilla", "Partial", "Interact A", "Interact B" }; private String[] autoBlockModes = new String[] { "Manual", "Vanilla", "Partial", "Interact A", "Interact B" };
private String[] interactAModes = new String[] { "10", "7", "7.5" }; private String[] interactAModes = new String[] { "10", "5", "6.5" };
private String[] interactBModes = new String[] { "10", "7", "8.5" }; private String[] interactBModes = new String[] { "10", "7", "8.5" };
private String[] rotationModes = new String[] { "Silent", "Lock view", "None" }; private String[] rotationModes = new String[] { "Silent", "Lock view", "None" };
private String[] sortModes = new String[] { "Distance", "Health", "Hurttime", "Yaw" }; private String[] sortModes = new String[] { "Distance", "Health", "Hurttime", "Yaw" };
@ -87,6 +87,7 @@ public class KillAura extends Module {
private List<Entity> hostileMobs = new ArrayList<>(); private List<Entity> hostileMobs = new ArrayList<>();
private Map<Integer, Boolean> golems = new HashMap<>(); // entity id, is teammate private Map<Integer, Boolean> golems = new HashMap<>(); // entity id, is teammate
public boolean justUnTargeted; public boolean justUnTargeted;
private final double reachVal = 0.007;
// blocking related // blocking related
public boolean blockingClient; public boolean blockingClient;
@ -182,7 +183,7 @@ public class KillAura extends Module {
resetBlinkState(true); resetBlinkState(true);
} }
blinking.set(false); blinking.set(false);
interactTicks = 0; interactTicks = firstEdge = 0;
setTarget(null); setTarget(null);
if (rotated || reset) { if (rotated || reset) {
resetYaw(); resetYaw();
@ -233,10 +234,10 @@ public class KillAura extends Module {
} }
if (target == null || !manualBlock() && manualBlock.isToggled()) { if (target == null || !manualBlock() && manualBlock.isToggled()) {
if (ModuleUtils.swapTick == 0 && !ModuleUtils.isBlocked) { if (ModuleUtils.swapTick == 0 && !ModuleUtils.isBlocked) {
interactTicks = 1; interactTicks = firstEdge = 1;
} }
else { else {
interactTicks = 0; interactTicks = firstEdge = 0;
} }
} }
if (target != null && Utils.holdingSword()) { if (target != null && Utils.holdingSword()) {
@ -441,7 +442,7 @@ public class KillAura extends Module {
return; return;
} }
if (rotationMode.getInput() != 2) { if (rotationMode.getInput() != 2) {
if (inRange(target, attackRange.getInput() - 0.006)) { if (inRange(target, attackRange.getInput() - reachVal)) {
float[] rotations = RotationUtils.getRotations(target, e.getYaw(), e.getPitch()); float[] rotations = RotationUtils.getRotations(target, e.getYaw(), e.getPitch());
float[] smoothedRotations = getRotationsSmoothed(rotations); float[] smoothedRotations = getRotationsSmoothed(rotations);
if (rotationMode.getInput() == 0) { // silent if (rotationMode.getInput() == 0) { // silent
@ -468,7 +469,7 @@ public class KillAura extends Module {
public void onUpdate() { public void onUpdate() {
if (rotationMode.getInput() == 1 && target != null) { if (rotationMode.getInput() == 1 && target != null) {
if (inRange(target, attackRange.getInput() - 0.006)) { if (inRange(target, attackRange.getInput() - reachVal)) {
float[] rotations = RotationUtils.getRotations(target, mc.thePlayer.rotationYaw, mc.thePlayer.rotationPitch); float[] rotations = RotationUtils.getRotations(target, mc.thePlayer.rotationYaw, mc.thePlayer.rotationPitch);
float[] smoothedRotations = getRotationsSmoothed(rotations); float[] smoothedRotations = getRotationsSmoothed(rotations);
mc.thePlayer.rotationYaw = smoothedRotations[0]; mc.thePlayer.rotationYaw = smoothedRotations[0];
@ -522,7 +523,7 @@ public class KillAura extends Module {
if (target == null) { if (target == null) {
return; return;
} }
boolean inAttackDistance = inRange(target, attackRange.getInput() - 0.006); boolean inAttackDistance = inRange(target, attackRange.getInput() - reachVal);
if (!Utils.holdingWeapon() || manualBlock() && target != null && !inAttackDistance) { if (!Utils.holdingWeapon() || manualBlock() && target != null && !inAttackDistance) {
return; return;
} }
@ -684,7 +685,7 @@ public class KillAura extends Module {
if (!(target instanceof EntityPlayer) && attackMobs.isToggled() && !isHostile((EntityCreature) target)) { if (!(target instanceof EntityPlayer) && attackMobs.isToggled() && !isHostile((EntityCreature) target)) {
continue; continue;
} }
if (!hitThroughBlocks.isToggled() && (!Utils.canPlayerBeSeen(target) || !inRange(target, attackRange.getInput() - 0.006))) { if (!hitThroughBlocks.isToggled() && (!Utils.canPlayerBeSeen(target) || !inRange(target, attackRange.getInput() - reachVal))) {
continue; continue;
} }
toClassTargets.add(new KillAuraTarget(distanceRayCasted, target.getHealth(), target.hurtTime, RotationUtils.distanceFromYaw(target, false), target.getEntityId(), (target instanceof EntityPlayer) ? Utils.isEnemy((EntityPlayer) target) : false)); toClassTargets.add(new KillAuraTarget(distanceRayCasted, target.getHealth(), target.hurtTime, RotationUtils.distanceFromYaw(target, false), target.getEntityId(), (target instanceof EntityPlayer) ? Utils.isEnemy((EntityPlayer) target) : false));
@ -723,7 +724,7 @@ public class KillAura extends Module {
List<KillAuraTarget> attackTargets = new ArrayList<>(); List<KillAuraTarget> attackTargets = new ArrayList<>();
for (KillAuraTarget killAuraTarget : toClassTargets) { for (KillAuraTarget killAuraTarget : toClassTargets) {
if (killAuraTarget.distance <= attackRange.getInput() - 0.006) { if (killAuraTarget.distance <= attackRange.getInput() - reachVal) {
attackTargets.add(killAuraTarget); attackTargets.add(killAuraTarget);
} }
} }
@ -738,7 +739,7 @@ public class KillAura extends Module {
if (firstHit == null || ticksExisted - firstHit >= switchDelayTicks) { if (firstHit == null || ticksExisted - firstHit >= switchDelayTicks) {
continue; continue;
} }
if (auraTarget.distance < attackRange.getInput() - 0.006) { if (auraTarget.distance < attackRange.getInput() - reachVal) {
setTarget(mc.theWorld.getEntityByID(auraTarget.entityId)); setTarget(mc.theWorld.getEntityByID(auraTarget.entityId));
return; return;
} }
@ -763,7 +764,7 @@ public class KillAura extends Module {
} }
private void handleSwingAndAttack(double distance, boolean swung) { private void handleSwingAndAttack(double distance, boolean swung) {
boolean inAttackDistance = inRange(target, attackRange.getInput() - 0.006); boolean inAttackDistance = inRange(target, attackRange.getInput() - reachVal);
if ((distance <= swingRange.getInput() || inAttackDistance) && shouldAttack && !swung) { // swing if in swing range or needs to attack if ((distance <= swingRange.getInput() || inAttackDistance) && shouldAttack && !swung) { // swing if in swing range or needs to attack
if (!mc.thePlayer.isBlocking() || !disableWhileBlocking.isToggled()) { if (!mc.thePlayer.isBlocking() || !disableWhileBlocking.isToggled()) {
swingItem(); swingItem();
@ -835,7 +836,7 @@ public class KillAura extends Module {
} }
private double getMaxRange() { private double getMaxRange() {
return Math.max(Math.max(swingRange.getInput(), attackRange.getInput() - 0.006), blockRange.getInput()); return Math.max(Math.max(swingRange.getInput(), attackRange.getInput() - reachVal), blockRange.getInput());
} }
public boolean autoBlockOverride() { public boolean autoBlockOverride() {
@ -852,13 +853,13 @@ public class KillAura extends Module {
private boolean isLookingAtEntity() { // private boolean isLookingAtEntity() { //
if (rotationMode.getInput() == 0 && rotationSmoothing.getInput() > 0) { // silent if (rotationMode.getInput() == 0 && rotationSmoothing.getInput() > 0) { // silent
return RotationUtils.isPossibleToHit(attackingEntity, attackRange.getInput() - 0.006, RotationUtils.serverRotations); return RotationUtils.isPossibleToHit(attackingEntity, attackRange.getInput() - reachVal, RotationUtils.serverRotations);
} }
return true; return true;
} }
private void handleAutoBlock(double distance) { private void handleAutoBlock(double distance) {
boolean inAttackDistance = inRange(target, attackRange.getInput() - 0.006); boolean inAttackDistance = inRange(target, attackRange.getInput() - reachVal);
if (inAttackDistance) { if (inAttackDistance) {
attackingEntity = target; attackingEntity = target;
} }
@ -943,7 +944,7 @@ public class KillAura extends Module {
} }
private void getInteractA1(double distance, boolean swung) { private void getInteractA1(double distance, boolean swung) {
if (interactTicks >= 3) { if (interactTicks >= 4) {
interactTicks = 0; interactTicks = 0;
} }
interactTicks++; interactTicks++;
@ -957,19 +958,16 @@ public class KillAura extends Module {
case 2: case 2:
handleInteractAndAttack(distance, true, true, swung); handleInteractAndAttack(distance, true, true, swung);
sendBlockPacket(); sendBlockPacket();
break;
case 3:
releasePackets(); // release releasePackets(); // release
break; break;
} }
} }
private void getInteractA2(double distance, boolean swung) { private void getInteractA2(double distance, boolean swung) {
if (interactTicks == 0) {
firstEdge++;
}
if (firstEdge > 8) {
firstEdge = 0;
}
interactTicks++; interactTicks++;
firstEdge++;
if (firstCycle) { if (firstCycle) {
switch (interactTicks) { switch (interactTicks) {
case 1: case 1:
@ -981,20 +979,12 @@ public class KillAura extends Module {
case 2: case 2:
handleInteractAndAttack(distance, true, true, swung); handleInteractAndAttack(distance, true, true, swung);
sendBlockPacket(); sendBlockPacket();
releasePackets(); // release firstCycle = false;
break;
case 3:
if (firstEdge == 2 || firstEdge == 6) {
firstCycle = false;
}
interactTicks = 0; interactTicks = 0;
releasePackets(); // release
break; break;
} }
} }
else { else {
switch (interactTicks) { switch (interactTicks) {
case 1: case 1:
@ -1006,9 +996,11 @@ public class KillAura extends Module {
case 2: case 2:
handleInteractAndAttack(distance, true, true, swung); handleInteractAndAttack(distance, true, true, swung);
sendBlockPacket(); sendBlockPacket();
releasePackets(); // release break;
case 4:
firstCycle = true; firstCycle = true;
interactTicks = 0; interactTicks = 0;
releasePackets(); // release
break; break;
} }
} }
@ -1074,7 +1066,7 @@ public class KillAura extends Module {
case 1: case 1:
blinking.set(true); blinking.set(true);
if (ModuleUtils.isBlocked) { if (ModuleUtils.isBlocked) {
if (firstGyatt == 3) { if (firstGyatt == 2) {
setSwapSlot(); setSwapSlot();
swapped = true; swapped = true;
} }
@ -1082,7 +1074,7 @@ public class KillAura extends Module {
sendUnBlockPacket(); sendUnBlockPacket();
} }
firstGyatt++; firstGyatt++;
if (firstGyatt > 4) { if (firstGyatt > 3) {
firstGyatt = 0; firstGyatt = 0;
} }
} }
@ -1110,7 +1102,7 @@ public class KillAura extends Module {
case 1: case 1:
blinking.set(true); blinking.set(true);
if (ModuleUtils.isBlocked) { if (ModuleUtils.isBlocked) {
if (firstEdge == 1) { if (firstEdge == 0) {
setSwapSlot(); setSwapSlot();
swapped = true; swapped = true;
} }
@ -1118,7 +1110,7 @@ public class KillAura extends Module {
sendUnBlockPacket(); sendUnBlockPacket();
} }
firstEdge++; firstEdge++;
if (firstEdge > 4) { if (firstEdge > 3) {
firstEdge = 0; firstEdge = 0;
} }
} }
@ -1169,9 +1161,9 @@ public class KillAura extends Module {
} }
private boolean settingCondition() { private boolean settingCondition() {
if (getOtherGUIs() && Mouse.isButtonDown(0)) { /*if (getOtherGUIs() && Mouse.isButtonDown(0)) {
return false; return false;
} }*/
if (requireMouseDown.isToggled() && !Mouse.isButtonDown(0)) { if (requireMouseDown.isToggled() && !Mouse.isButtonDown(0)) {
return false; return false;
} }
@ -1299,7 +1291,7 @@ public class KillAura extends Module {
} }
boolean sent = false; boolean sent = false;
if (interactAt) { if (interactAt) {
boolean canHit = RotationUtils.isPossibleToHit(attackingEntity, attackRange.getInput() - 0.006, RotationUtils.serverRotations); boolean canHit = RotationUtils.isPossibleToHit(attackingEntity, attackRange.getInput() - reachVal, RotationUtils.serverRotations);
if (!canHit) { if (!canHit) {
return; return;
} }
@ -1393,7 +1385,6 @@ public class KillAura extends Module {
} }
swapped = false; swapped = false;
lag = false; lag = false;
firstEdge = firstGyatt = 0;
firstCycle = true; firstCycle = true;
} }

View File

@ -21,14 +21,13 @@ import org.lwjgl.input.Keyboard;
public class Velocity extends Module { public class Velocity extends Module {
public SliderSetting velocityModes; public SliderSetting velocityModes;
public static SliderSetting vertical, horizontal, reverseHorizontal; public static SliderSetting vertical, horizontal, reverseHorizontal, explosionsHorizontal, explosionsVertical;
public static SliderSetting minExtraSpeed, extraSpeedBoost; public static SliderSetting minExtraSpeed, extraSpeedBoost;
private SliderSetting chance; private SliderSetting chance;
private ButtonSetting onlyWhileAttacking; private ButtonSetting onlyWhileAttacking;
private ButtonSetting onlyWhileTargeting; private ButtonSetting onlyWhileTargeting;
private ButtonSetting disableS; private ButtonSetting disableS;
private ButtonSetting zzWhileNotTargeting; private ButtonSetting zzWhileNotTargeting;
private ButtonSetting disableExplosions;
public ButtonSetting allowSelfFireball; public ButtonSetting allowSelfFireball;
public static ButtonSetting reverseDebug; public static ButtonSetting reverseDebug;
private KeySetting switchToReverse, switchToHypixel; private KeySetting switchToReverse, switchToHypixel;
@ -46,15 +45,19 @@ public class Velocity extends Module {
this.registerSetting(vertical = new SliderSetting("Vertical", 0.0, 0.0, 100.0, 1.0)); this.registerSetting(vertical = new SliderSetting("Vertical", 0.0, 0.0, 100.0, 1.0));
this.registerSetting(reverseHorizontal = new SliderSetting("-Horizontal", 0.0, 0.0, 100.0, 1.0)); this.registerSetting(reverseHorizontal = new SliderSetting("-Horizontal", 0.0, 0.0, 100.0, 1.0));
this.registerSetting(explosionsHorizontal = new SliderSetting("Horizontal (Explosions)", 0.0, 0.0, 100.0, 1.0));
this.registerSetting(explosionsVertical = new SliderSetting("Vertical (Explosions)", 0.0, 0.0, 100.0, 1.0));
this.registerSetting(minExtraSpeed = new SliderSetting("Maximum speed for extra boost", 0, 0, 0.7, 0.01)); this.registerSetting(minExtraSpeed = new SliderSetting("Maximum speed for extra boost", 0, 0, 0.7, 0.01));
this.registerSetting(extraSpeedBoost = new SliderSetting("Extra speed boost multiplier", "%", 0, 0, 100, 1)); this.registerSetting(extraSpeedBoost = new SliderSetting("Extra speed boost multiplier", "%", 0, 0, 100, 1));
this.registerSetting(chance = new SliderSetting("Chance", "%", 100.0D, 0.0D, 100.0D, 1.0D)); this.registerSetting(chance = new SliderSetting("Chance", "%", 100.0D, 0.0D, 100.0D, 1.0D));
this.registerSetting(onlyWhileAttacking = new ButtonSetting("Only while attacking", false)); this.registerSetting(onlyWhileAttacking = new ButtonSetting("Only while attacking", false));
this.registerSetting(onlyWhileTargeting = new ButtonSetting("Only while targeting", false)); this.registerSetting(onlyWhileTargeting = new ButtonSetting("Only while targeting", false));
this.registerSetting(disableS = new ButtonSetting("Disable while holding S", false)); this.registerSetting(disableS = new ButtonSetting("Disable while holding S", false));
this.registerSetting(zzWhileNotTargeting = new ButtonSetting("00 while not targeting", false)); this.registerSetting(zzWhileNotTargeting = new ButtonSetting("00 while not targeting", false));
this.registerSetting(disableExplosions = new ButtonSetting("Disable explosions", false));
this.registerSetting(allowSelfFireball = new ButtonSetting("Allow self fireball", false)); this.registerSetting(allowSelfFireball = new ButtonSetting("Allow self fireball", false));
this.registerSetting(switchToReverse = new KeySetting("Switch to reverse", Keyboard.KEY_SPACE)); this.registerSetting(switchToReverse = new KeySetting("Switch to reverse", Keyboard.KEY_SPACE));
@ -69,7 +72,6 @@ public class Velocity extends Module {
this.disableS.setVisible(velocityModes.getInput() == 0, this); this.disableS.setVisible(velocityModes.getInput() == 0, this);
this.allowSelfFireball.setVisible(velocityModes.getInput() == 1, this); this.allowSelfFireball.setVisible(velocityModes.getInput() == 1, this);
this.disableExplosions.setVisible(velocityModes.getInput() == 1, this);
this.zzWhileNotTargeting.setVisible(velocityModes.getInput() == 1, this); this.zzWhileNotTargeting.setVisible(velocityModes.getInput() == 1, this);
this.switchToReverse.setVisible(velocityModes.getInput() == 1, this); this.switchToReverse.setVisible(velocityModes.getInput() == 1, this);
@ -82,6 +84,9 @@ public class Velocity extends Module {
this.chance.setVisible(velocityModes.getInput() != 2, this); this.chance.setVisible(velocityModes.getInput() != 2, this);
this.reverseHorizontal.setVisible(velocityModes.getInput() == 2, this); this.reverseHorizontal.setVisible(velocityModes.getInput() == 2, this);
this.explosionsHorizontal.setVisible(velocityModes.getInput() != 0, this);
this.explosionsVertical.setVisible(velocityModes.getInput() != 0, this);
this.minExtraSpeed.setVisible(velocityModes.getInput() == 2, this); this.minExtraSpeed.setVisible(velocityModes.getInput() == 2, this);
this.extraSpeedBoost.setVisible(velocityModes.getInput() == 2, this); this.extraSpeedBoost.setVisible(velocityModes.getInput() == 2, this);
this.reverseDebug.setVisible(velocityModes.getInput() == 2, this); this.reverseDebug.setVisible(velocityModes.getInput() == 2, this);
@ -109,7 +114,7 @@ public class Velocity extends Module {
@SubscribeEvent @SubscribeEvent
public void onReceivePacket(ReceivePacketEvent e) { public void onReceivePacket(ReceivePacketEvent e) {
if (velocityModes.getInput() == 1) { if (velocityModes.getInput() >= 1) {
if (!Utils.nullCheck() || LongJump.stopVelocity || e.isCanceled() || ModuleManager.bedAura.cancelKnockback() || ModuleManager.tower.cancelKnockback() || velocityModes.getInput() == 2 && ModuleUtils.firstDamage || ModuleManager.bhop.isEnabled() && ModuleManager.bhop.damageBoost.isToggled() && ModuleUtils.firstDamage && (!ModuleManager.bhop.damageBoostRequireKey.isToggled() || ModuleManager.bhop.damageBoostKey.isPressed())) { if (!Utils.nullCheck() || LongJump.stopVelocity || e.isCanceled() || ModuleManager.bedAura.cancelKnockback() || ModuleManager.tower.cancelKnockback() || velocityModes.getInput() == 2 && ModuleUtils.firstDamage || ModuleManager.bhop.isEnabled() && ModuleManager.bhop.damageBoost.isToggled() && ModuleUtils.firstDamage && (!ModuleManager.bhop.damageBoostRequireKey.isToggled() || ModuleManager.bhop.damageBoostKey.isPressed())) {
return; return;
} }
@ -126,19 +131,19 @@ public class Velocity extends Module {
return; return;
} }
} }
if (!dontEditMotion() && !disableVelo && !disableExplosions.isToggled() && !ModuleManager.bedAura.cancelKnockback()) { if (!dontEditMotion() && !disableVelo) {
if (horizontal.getInput() == 0 && vertical.getInput() > 0) { if (explosionsHorizontal.getInput() == 0 && explosionsVertical.getInput() > 0) {
mc.thePlayer.motionY += s27PacketExplosion.func_149144_d() * vertical.getInput() / 100.0; mc.thePlayer.motionY += s27PacketExplosion.func_149144_d() * explosionsVertical.getInput() / 100.0;
} else if (horizontal.getInput() > 0 && vertical.getInput() == 0) { } else if (explosionsHorizontal.getInput() > 0 && explosionsVertical.getInput() == 0) {
mc.thePlayer.motionX += s27PacketExplosion.func_149149_c() * horizontal.getInput() / 100.0; mc.thePlayer.motionX += s27PacketExplosion.func_149149_c() * explosionsHorizontal.getInput() / 100.0;
mc.thePlayer.motionZ += s27PacketExplosion.func_149147_e() * horizontal.getInput() / 100.0; mc.thePlayer.motionZ += s27PacketExplosion.func_149147_e() * explosionsHorizontal.getInput() / 100.0;
} else if (horizontal.getInput() > 0 && vertical.getInput() > 0) { } else if (explosionsHorizontal.getInput() > 0 && explosionsVertical.getInput() > 0) {
mc.thePlayer.motionX += s27PacketExplosion.func_149149_c() * horizontal.getInput() / 100.0; mc.thePlayer.motionX += s27PacketExplosion.func_149149_c() * explosionsHorizontal.getInput() / 100.0;
mc.thePlayer.motionY += s27PacketExplosion.func_149144_d() * vertical.getInput() / 100.0; mc.thePlayer.motionY += s27PacketExplosion.func_149144_d() * explosionsVertical.getInput() / 100.0;
mc.thePlayer.motionZ += s27PacketExplosion.func_149147_e() * horizontal.getInput() / 100.0; mc.thePlayer.motionZ += s27PacketExplosion.func_149147_e() * explosionsHorizontal.getInput() / 100.0;
} }
} }
if (disableExplosions.isToggled()) stopFBvelo = true; stopFBvelo = true;
e.setCanceled(true); e.setCanceled(true);
disableVelo = false; disableVelo = false;
} }
@ -146,16 +151,32 @@ public class Velocity extends Module {
if (((S12PacketEntityVelocity) e.getPacket()).getEntityID() == mc.thePlayer.getEntityId()) { if (((S12PacketEntityVelocity) e.getPacket()).getEntityID() == mc.thePlayer.getEntityId()) {
S12PacketEntityVelocity s12PacketEntityVelocity = (S12PacketEntityVelocity) e.getPacket(); S12PacketEntityVelocity s12PacketEntityVelocity = (S12PacketEntityVelocity) e.getPacket();
if (!dontEditMotion() && !disableVelo && !stopFBvelo && !ModuleManager.bedAura.cancelKnockback()) { if (!stopFBvelo) {
if (horizontal.getInput() == 0 && vertical.getInput() > 0) { if (!dontEditMotion() && !disableVelo) {
mc.thePlayer.motionY = ((double) s12PacketEntityVelocity.getMotionY() / 8000) * vertical.getInput() / 100.0; if (horizontal.getInput() == 0 && vertical.getInput() > 0) {
} else if (horizontal.getInput() > 0 && vertical.getInput() == 0) { mc.thePlayer.motionY = ((double) s12PacketEntityVelocity.getMotionY() / 8000) * vertical.getInput() / 100.0;
mc.thePlayer.motionX = ((double) s12PacketEntityVelocity.getMotionX() / 8000) * horizontal.getInput() / 100.0; } else if (horizontal.getInput() > 0 && vertical.getInput() == 0) {
mc.thePlayer.motionZ = ((double) s12PacketEntityVelocity.getMotionZ() / 8000) * horizontal.getInput() / 100.0; mc.thePlayer.motionX = ((double) s12PacketEntityVelocity.getMotionX() / 8000) * horizontal.getInput() / 100.0;
} else if (horizontal.getInput() > 0 && vertical.getInput() > 0) { mc.thePlayer.motionZ = ((double) s12PacketEntityVelocity.getMotionZ() / 8000) * horizontal.getInput() / 100.0;
mc.thePlayer.motionX = ((double) s12PacketEntityVelocity.getMotionX() / 8000) * horizontal.getInput() / 100.0; } else if (horizontal.getInput() > 0 && vertical.getInput() > 0) {
mc.thePlayer.motionY = ((double) s12PacketEntityVelocity.getMotionY() / 8000) * vertical.getInput() / 100.0; mc.thePlayer.motionX = ((double) s12PacketEntityVelocity.getMotionX() / 8000) * horizontal.getInput() / 100.0;
mc.thePlayer.motionZ = ((double) s12PacketEntityVelocity.getMotionZ() / 8000) * horizontal.getInput() / 100.0; mc.thePlayer.motionY = ((double) s12PacketEntityVelocity.getMotionY() / 8000) * vertical.getInput() / 100.0;
mc.thePlayer.motionZ = ((double) s12PacketEntityVelocity.getMotionZ() / 8000) * horizontal.getInput() / 100.0;
}
}
}
else {
if (!dontEditMotion() && !disableVelo) {
if (explosionsHorizontal.getInput() == 0 && explosionsVertical.getInput() > 0) {
mc.thePlayer.motionY = ((double) s12PacketEntityVelocity.getMotionY() / 8000) * explosionsVertical.getInput() / 100.0;
} else if (explosionsHorizontal.getInput() > 0 && explosionsVertical.getInput() == 0) {
mc.thePlayer.motionX = ((double) s12PacketEntityVelocity.getMotionX() / 8000) * explosionsHorizontal.getInput() / 100.0;
mc.thePlayer.motionZ = ((double) s12PacketEntityVelocity.getMotionZ() / 8000) * explosionsHorizontal.getInput() / 100.0;
} else if (explosionsHorizontal.getInput() > 0 && explosionsVertical.getInput() > 0) {
mc.thePlayer.motionX = ((double) s12PacketEntityVelocity.getMotionX() / 8000) * explosionsHorizontal.getInput() / 100.0;
mc.thePlayer.motionY = ((double) s12PacketEntityVelocity.getMotionY() / 8000) * explosionsVertical.getInput() / 100.0;
mc.thePlayer.motionZ = ((double) s12PacketEntityVelocity.getMotionZ() / 8000) * explosionsHorizontal.getInput() / 100.0;
}
} }
} }
stopFBvelo = false; stopFBvelo = false;

View File

@ -24,26 +24,26 @@ public class Bhop extends Module {
public ButtonSetting disablerOnly; public ButtonSetting disablerOnly;
private ButtonSetting sneakDisable; private ButtonSetting sneakDisable;
private ButtonSetting jumpMoving; private ButtonSetting jumpMoving;
public ButtonSetting rotateYawOption, damageBoost, strafe, damageBoostRequireKey; public ButtonSetting rotateYaw, slowBackwards, damageBoost, strafe, damageBoostRequireKey;
public GroupSetting damageBoostGroup, strafeGroup; public GroupSetting damageBoostGroup, strafeGroup;
private SliderSetting strafeDegrees; private SliderSetting strafeDegrees;
public KeySetting damageBoostKey; public KeySetting damageBoostKey;
public String[] modes = new String[]{"Strafe", "Ground", "9 tick", "8 tick", "7 tick"}; public String[] modes = new String[]{"Strafe", "Ground", "9 tick", "8 tick", "7 tick"};
public boolean hopping, lowhop, didMove, setRotation; public boolean hopping, lowhop, didMove, setRotation;
private int motionTick = 0;
public boolean isNormalPos; public boolean isNormalPos;
public boolean running; public boolean running;
public Bhop() { public Bhop() {
super("Bhop", Module.category.movement); super("Bhop", Module.category.movement);
this.registerSetting(mode = new SliderSetting("Mode", 0, modes)); this.registerSetting(mode = new SliderSetting("Mode", 0, modes));
this.registerSetting(disablerOnly = new ButtonSetting("Require disabler", false));
this.registerSetting(speedSetting = new SliderSetting("Speed", 2.0, 0.8, 1.2, 0.01)); this.registerSetting(speedSetting = new SliderSetting("Speed", 2.0, 0.8, 1.2, 0.01));
this.registerSetting(friction = new SliderSetting("Friction multiplier", 1, 1, 1.3, 0.01)); this.registerSetting(friction = new SliderSetting("Friction multiplier", 1, 1, 1.3, 0.01));
this.registerSetting(disablerOnly = new ButtonSetting("Lowhop only if disabler loaded", false));
this.registerSetting(liquidDisable = new ButtonSetting("Disable in liquid", true)); this.registerSetting(liquidDisable = new ButtonSetting("Disable in liquid", true));
this.registerSetting(sneakDisable = new ButtonSetting("Disable while sneaking", true)); this.registerSetting(sneakDisable = new ButtonSetting("Disable while sneaking", true));
this.registerSetting(jumpMoving = new ButtonSetting("Only jump when moving", true)); this.registerSetting(jumpMoving = new ButtonSetting("Only jump when moving", true));
this.registerSetting(rotateYawOption = new ButtonSetting("Rotate yaw", false)); this.registerSetting(rotateYaw = new ButtonSetting("Rotate yaw", false));
this.registerSetting(slowBackwards = new ButtonSetting("Slow backwards", false));
this.registerSetting(damageBoostGroup = new GroupSetting("Damage boost")); this.registerSetting(damageBoostGroup = new GroupSetting("Damage boost"));
this.registerSetting(damageBoost = new ButtonSetting(damageBoostGroup, "Enable Damage boost", false)); this.registerSetting(damageBoost = new ButtonSetting(damageBoostGroup, "Enable Damage boost", false));
@ -57,6 +57,8 @@ public class Bhop extends Module {
public void guiUpdate() { public void guiUpdate() {
this.damageBoostKey.setVisible(damageBoostRequireKey.isToggled(), this); this.damageBoostKey.setVisible(damageBoostRequireKey.isToggled(), this);
this.disablerOnly.setVisible(mode.getInput() >= 2, this);
} }
@Override @Override
@ -88,7 +90,6 @@ public class Bhop extends Module {
if (LongJump.function) { if (LongJump.function) {
return; return;
} }
motionTick = 0;
if (mode.getInput() >= 1) { if (mode.getInput() >= 1) {
if (mc.thePlayer.onGround && (!jumpMoving.isToggled() || Utils.isMoving())) { if (mc.thePlayer.onGround && (!jumpMoving.isToggled() || Utils.isMoving())) {
if (mc.thePlayer.moveForward <= -0.5 && mc.thePlayer.moveStrafing == 0 && !ModuleManager.killAura.isTargeting && !Utils.noSlowingBackWithBow() && !ModuleManager.scaffold.isEnabled && !mc.thePlayer.isCollidedHorizontally) { if (mc.thePlayer.moveForward <= -0.5 && mc.thePlayer.moveStrafing == 0 && !ModuleManager.killAura.isTargeting && !Utils.noSlowingBackWithBow() && !ModuleManager.scaffold.isEnabled && !mc.thePlayer.isCollidedHorizontally) {
@ -123,9 +124,12 @@ public class Bhop extends Module {
} }
if (Utils.isMoving()) { if (Utils.isMoving()) {
if (!Utils.noSlowingBackWithBow() && !ModuleManager.sprint.disableBackwards()) { if (!Utils.noSlowingBackWithBow() && !ModuleManager.sprint.disableBackwards() && !slowBackwards()) {
Utils.setSpeed((speedModifier - Utils.randomizeDouble(0.0003, 0.0001)) * ModuleUtils.applyFrictionMulti()); Utils.setSpeed((speedModifier - Utils.randomizeDouble(0.0003, 0.0001)) * ModuleUtils.applyFrictionMulti());
} }
else {
Utils.setSpeed((speedModifier - Utils.randomizeDouble(0.0003, 0.0001)) - 0.3);
}
didMove = true; didMove = true;
} }
hopping = true; hopping = true;
@ -166,6 +170,10 @@ public class Bhop extends Module {
} }
private boolean slowBackwards() {
return slowBackwards.isToggled() && mc.thePlayer.moveForward <= -0.5;
}
public float hardcodedYaw() { public float hardcodedYaw() {
float simpleYaw = 0F; float simpleYaw = 0F;
float f = 0.8F; float f = 0.8F;

View File

@ -107,6 +107,7 @@ public class LongJump extends Module {
this.verticalMotion.setVisible(mode.getInput() == 0, this); this.verticalMotion.setVisible(mode.getInput() == 0, this);
this.motionDecay.setVisible(mode.getInput() == 0, this); this.motionDecay.setVisible(mode.getInput() == 0, this);
this.beginFlat.setVisible(mode.getInput() == 0, this);
this.verticalKey.setVisible(mode.getInput() == 0 && beginFlat.isToggled(), this); this.verticalKey.setVisible(mode.getInput() == 0 && beginFlat.isToggled(), this);
this.flatKey.setVisible(mode.getInput() == 0 && !beginFlat.isToggled(), this); this.flatKey.setVisible(mode.getInput() == 0 && !beginFlat.isToggled(), this);
} }
@ -157,12 +158,12 @@ public class LongJump extends Module {
disabled(); disabled();
} }
if (spoofItem.isToggled() && lastSlot != -1 && !manual.isToggled()) { if (spoofItem.isToggled() && lastSlot != -1 && !manual.isToggled()) {
((IMixinItemRenderer) mc.getItemRenderer()).setCancelUpdate(true); ((IMixinItemRenderer) mc.getItemRenderer()).setCancelUpdate(true);
((IMixinItemRenderer) mc.getItemRenderer()).setCancelReset(true); ((IMixinItemRenderer) mc.getItemRenderer()).setCancelReset(true);
} }
if (swapped) { if (swapped && rotateTick == 0) {
resetSlot(); resetSlot();
swapped = false; swapped = false;
} }
@ -256,7 +257,10 @@ public class LongJump extends Module {
if (!Utils.nullCheck()) { if (!Utils.nullCheck()) {
return; return;
} }
if (rotateTick == 1) { if (rotateTick >= 3) {
rotateTick = 0;
}
if (rotateTick >= 1) {
if ((invertYaw.isToggled() || stopMovement.isToggled()) && !notMoving) { if ((invertYaw.isToggled() || stopMovement.isToggled()) && !notMoving) {
if (!stopMovement.isToggled()) { if (!stopMovement.isToggled()) {
yaw = mc.thePlayer.rotationYaw - 180f; yaw = mc.thePlayer.rotationYaw - 180f;
@ -272,7 +276,6 @@ public class LongJump extends Module {
e.setRotations(yaw, pitch); e.setRotations(yaw, pitch);
} }
if (rotateTick > 0 && ++rotateTick >= 3) { if (rotateTick > 0 && ++rotateTick >= 3) {
rotateTick = 0;
int fireballSlot = setupFireballSlot(false); int fireballSlot = setupFireballSlot(false);
if (fireballSlot != -1) { if (fireballSlot != -1) {
fireballTime = System.currentTimeMillis(); fireballTime = System.currentTimeMillis();

View File

@ -193,6 +193,7 @@ public class NoSlow extends Module {
if (!floatConditions()) { if (!floatConditions()) {
grounded = 0; grounded = 0;
didC = true; didC = true;
requireJump = true;
} }
else if (didC) { else if (didC) {
grounded++; grounded++;
@ -209,23 +210,17 @@ public class NoSlow extends Module {
} }
noSlowing = true; noSlowing = true;
if (!floatConditions() || requireJump) { if (requireJump) {
requireJump = true;
offset = false; offset = false;
return; return;
} }
if (offsetDelay <= 2) { /*if (offsetDelay <= 2) {
++offsetDelay; ++offsetDelay;
return; return;
} }*/
if (mc.thePlayer.motionY >= -0.0784000015258789) {
e.setPosY(e.getPosY() + ModuleUtils.offsetValue);
}
else {
e.setPosY(e.getPosY() - ModuleUtils.offsetValue);
}
ModuleManager.scaffold.offsetDelay = 2;
offset = true; offset = true;
e.setPosY(e.getPosY() + ModuleUtils.offsetValue);
ModuleManager.scaffold.offsetDelay = 2;
if (groundSpeedOption.isToggled()) { if (groundSpeedOption.isToggled()) {
if (!ModuleManager.killAura.isTargeting && !Utils.noSlowingBackWithBow() && !Utils.jumpDown() && mc.thePlayer.moveForward <= -0.5 && mc.thePlayer.moveStrafing == 0 && offset && 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; float yaw = mc.thePlayer.rotationYaw;
@ -268,11 +263,11 @@ public class NoSlow extends Module {
private boolean floatConditions() { private boolean floatConditions() {
Block block = BlockUtils.getBlock(new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ)); Block block = BlockUtils.getBlock(new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ));
int edgeY = (int) Math.round((mc.thePlayer.posY % 1.0D) * 100.0D); int edge = (int) Math.round((mc.thePlayer.posY % 1.0D) * 100.0D);
if (mc.thePlayer.posY % 1 == 0) { if (mc.thePlayer.posY % 1 == 0) {
return true; return true;
} }
if (edgeY < 10) { if (edge < 10) {
return true; return true;
} }
if (!mc.thePlayer.onGround) { if (!mc.thePlayer.onGround) {

View File

@ -3,17 +3,25 @@ package keystrokesmod.module.impl.player;
import keystrokesmod.module.Module; import keystrokesmod.module.Module;
import keystrokesmod.module.setting.impl.ButtonSetting; import keystrokesmod.module.setting.impl.ButtonSetting;
import keystrokesmod.module.setting.impl.DescriptionSetting; import keystrokesmod.module.setting.impl.DescriptionSetting;
import keystrokesmod.module.setting.impl.SliderSetting;
public class AutoSwap extends Module { public class AutoSwap extends Module {
public ButtonSetting sameType; public ButtonSetting sameType;
public ButtonSetting spoofItem; public ButtonSetting spoofItem;
public ButtonSetting swapToGreaterStack; public ButtonSetting swapToGreaterStack;
public SliderSetting swapAt;
public AutoSwap() { public AutoSwap() {
super("AutoSwap", category.player); super("AutoSwap", category.player);
this.registerSetting(new DescriptionSetting("Automatically swaps blocks.")); this.registerSetting(new DescriptionSetting("Automatically swaps blocks."));
this.registerSetting(sameType = new ButtonSetting("Only same type", false)); this.registerSetting(sameType = new ButtonSetting("Only same type", false));
this.registerSetting(spoofItem = new ButtonSetting("Spoof item", false)); this.registerSetting(spoofItem = new ButtonSetting("Spoof item", false));
this.registerSetting(swapToGreaterStack = new ButtonSetting("Swap to greater stack", true)); this.registerSetting(swapToGreaterStack = new ButtonSetting("Swap to greater stack", true));
this.registerSetting(swapAt = new SliderSetting("Swap at", " blocks", 3, 1, 7, 1));
this.canBeEnabled = false; this.canBeEnabled = false;
} }
public void guiUpdate() {
this.swapAt.setVisible(!swapToGreaterStack.isToggled(), this);
}
} }

View File

@ -98,14 +98,17 @@ public class Safewalk extends Module {
if (!sneakState) { if (!sneakState) {
unsneakDelayTicks = 0; unsneakDelayTicks = 0;
} }
if (!sneakState && Utils.isBindDown(mc.gameSettings.keyBindSneak)) { if (Utils.isBindDown(mc.gameSettings.keyBindSneak)) {
return; return;
} }
canSneak = sneakState; canSneak = sneakState;
mc.thePlayer.movementInput.sneak = sneakState; mc.thePlayer.movementInput.sneak = sneakState;
mc.thePlayer.setSneaking(sneakState);
this.isSneaking = sneakState; this.isSneaking = sneakState;
//Utils.print("Edge " + mc.thePlayer.movementInput.sneak + " " + sneakState + " " + mc.thePlayer.ticksExisted); if (sneakState) {
double val = 0;
mc.thePlayer.motionX *= val;
mc.thePlayer.motionZ *= val;
}
} }
@ -141,6 +144,10 @@ public class Safewalk extends Module {
if (pitchCheck.isToggled() && mc.thePlayer.rotationPitch < 70.0f) { if (pitchCheck.isToggled() && mc.thePlayer.rotationPitch < 70.0f) {
return false; return false;
} }
if (!mc.thePlayer.onGround) {
return false;
}
return true; return true;
} }
} }

View File

@ -43,8 +43,6 @@ public class Scaffold extends Module {
private SliderSetting floatFirstJump; private SliderSetting floatFirstJump;
private SliderSetting fastScaffold; private SliderSetting fastScaffold;
private SliderSetting multiPlace; private SliderSetting multiPlace;
private GroupSetting multiPlaceSettings;
final private ButtonSetting mAlways, mSprint, mSprintWithSpeed, mKeepY, mKeepYWithSpeed, mTowerMove, mVerticalTower;
public ButtonSetting autoSwap; public ButtonSetting autoSwap;
private ButtonSetting fastOnRMB; private ButtonSetting fastOnRMB;
@ -110,12 +108,15 @@ public class Scaffold extends Module {
private float minOffset, pOffset; private float minOffset, pOffset;
private float minPitch = 80F; private float minPitch = 80F;
private float edge; private float edge;
private long firstStroke; private long firstStroke, yawEdge;
private float lastEdge2, yawAngle, theYaw; private float lastEdge2, yawAngle, theYaw;
private boolean enabledOffGround = false; private boolean enabledOffGround = false;
private float[] blockRotations; private float[] blockRotations;
public float scaffoldYaw, scaffoldPitch, blockYaw, yawOffset; public float scaffoldYaw, scaffoldPitch, blockYaw, yawOffset, lastOffset;
private boolean set2; private boolean set2;
private float maxOffset;
private int sameMouse;
private int randomF, yawChanges, dynamic;
//fake rotations //fake rotations
private float fakeYaw, fakePitch; private float fakeYaw, fakePitch;
private float fakeYaw1, fakeYaw2; private float fakeYaw1, fakeYaw2;
@ -131,14 +132,6 @@ public class Scaffold extends Module {
this.registerSetting(fastScaffold = new SliderSetting("Fast scaffold", 0, fastScaffoldModes)); this.registerSetting(fastScaffold = new SliderSetting("Fast scaffold", 0, fastScaffoldModes));
this.registerSetting(multiPlace = new SliderSetting("Multi-place", 0, multiPlaceModes)); this.registerSetting(multiPlace = new SliderSetting("Multi-place", 0, multiPlaceModes));
this.registerSetting(multiPlaceSettings = new GroupSetting("Multi-place settings"));
this.registerSetting(mAlways = new ButtonSetting(multiPlaceSettings, "Always", false));
this.registerSetting(mSprint = new ButtonSetting(multiPlaceSettings, "Sprint scaffold", false));
this.registerSetting(mSprintWithSpeed = new ButtonSetting(multiPlaceSettings, "Sprint scaffold with speed", false));
this.registerSetting(mKeepY = new ButtonSetting(multiPlaceSettings, "Keep-Y", false));
this.registerSetting(mKeepYWithSpeed = new ButtonSetting(multiPlaceSettings, "Keep-Y with speed", false));
this.registerSetting(mTowerMove = new ButtonSetting(multiPlaceSettings, "Tower move", false));
this.registerSetting(mVerticalTower = new ButtonSetting(multiPlaceSettings, "Vertical tower", false));
this.registerSetting(autoSwap = new ButtonSetting("Auto swap", true)); this.registerSetting(autoSwap = new ButtonSetting("Auto swap", true));
this.registerSetting(fastOnRMB = new ButtonSetting("Fast on RMB", true)); this.registerSetting(fastOnRMB = new ButtonSetting("Fast on RMB", true));
@ -156,7 +149,6 @@ public class Scaffold extends Module {
public void guiUpdate() { public void guiUpdate() {
this.floatFirstJump.setVisible(sprint.getInput() == 2, this); this.floatFirstJump.setVisible(sprint.getInput() == 2, this);
this.multiPlaceSettings.setVisible(multiPlace.getInput() > 0, this);
} }
public void onDisable() { public void onDisable() {
@ -208,8 +200,7 @@ public class Scaffold extends Module {
scaffoldTicks = 0; scaffoldTicks = 0;
} }
canBlockFade = true; canBlockFade = true;
int simpleY = (int) Math.round((e.posY % 1) * 10000); if (Utils.keysDown() && usingFastScaffold() && fastScaffold.getInput() >= 1 && !ModuleManager.tower.canTower() && !LongJump.function) { // jump mode
if (Utils.keysDown() && usingFastScaffold() && fastScaffold.getInput() >= 1 && !ModuleManager.tower.canTower() && !ModuleManager.LongJump.function) { // jump mode
if (mc.thePlayer.onGround && Utils.isMoving()) { if (mc.thePlayer.onGround && Utils.isMoving()) {
if (scaffoldTicks > 1) { if (scaffoldTicks > 1) {
rotateForward(); rotateForward();
@ -218,8 +209,7 @@ public class Scaffold extends Module {
if (fastScaffold.getInput() == 6 || fastScaffold.getInput() == 3 && firstKeepYPlace) { if (fastScaffold.getInput() == 6 || fastScaffold.getInput() == 3 && firstKeepYPlace) {
lowhop = true; lowhop = true;
} }
//Utils.print("Keepy"); if (startYPos == -1 || Math.abs(startYPos - e.posY) > 2) {
if (startYPos == -1 || Math.abs(startYPos - e.posY) > 5) {
startYPos = e.posY; startYPos = e.posY;
fastScaffoldKeepY = true; fastScaffoldKeepY = true;
} }
@ -269,15 +259,43 @@ public class Scaffold extends Module {
floatStarted = floatJumped = floatKeepY = floatWasEnabled = false; floatStarted = floatJumped = floatKeepY = floatWasEnabled = false;
} }
if (blockRotations != null) {
if (mc.thePlayer.rotationYaw == lastOffset) {
sameMouse++;
}
else {
sameMouse = 0;
yawChanges++;
}
if (sameMouse > 2) {
yawChanges = 0;
}
lastOffset = mc.thePlayer.rotationYaw;
if (yawChanges > 15) {
randomF = 1;
yawEdge = Utils.time();
}
if (yawEdge > 0 && (Utils.time() - yawEdge) > 500) {
yawEdge = 0;
}
}
else {
fakeYaw1 = mc.thePlayer.rotationYaw - hardcodedYaw();
}
dynamic = 0;
if (targetBlock != null) { if (targetBlock != null) {
Vec3 lookAt = new Vec3(targetBlock.xCoord - lookVec.xCoord, targetBlock.yCoord - lookVec.yCoord, targetBlock.zCoord - lookVec.zCoord); Vec3 lookAt = new Vec3(targetBlock.xCoord - lookVec.xCoord, targetBlock.yCoord - lookVec.yCoord, targetBlock.zCoord - lookVec.zCoord);
blockRotations = RotationUtils.getRotations(lookAt); blockRotations = RotationUtils.getRotations(lookAt);
targetBlock = null; targetBlock = null;
fakeYaw1 = mc.thePlayer.rotationYaw - hardcodedYaw(); fakeYaw1 = mc.thePlayer.rotationYaw - hardcodedYaw();
if (yawEdge == 0) {
randomF = Utils.randomizeInt(0, 9);
yawEdge = Utils.time();
}
dynamic++;
} }
if (blockRotations == null) { randomF = 0;
fakeYaw1 = mc.thePlayer.rotationYaw - hardcodedYaw();
}
switch ((int) rotation.getInput()) { switch ((int) rotation.getInput()) {
case 1: case 1:
@ -298,40 +316,35 @@ public class Scaffold extends Module {
long strokeDelay = 250; long strokeDelay = 250;
if (quad <= 5 || quad >= 85) { if (quad <= 5 || quad >= 85) {
yawAngle = 126.50F; yawAngle = 125.625F;
minOffset = 13; minOffset = 18;
minPitch = 71.08F;
} }
if (quad > 5 && quad <= 15 || quad >= 75 && quad < 85) { if (quad > 5 && quad <= 15 || quad >= 75 && quad < 85) {
yawAngle = 127.50F; yawAngle = 127.625F;
minOffset = 10; minOffset = 16;
minPitch = 72.34F;
} }
if (quad > 15 && quad <= 25 || quad >= 65 && quad < 75) { if (quad > 15 && quad <= 25 || quad >= 65 && quad < 75) {
yawAngle = 128.50F; yawAngle = 129.625F;
minOffset = 7; minOffset = 14;
minPitch = 73.65F;
} }
if (quad > 25 && quad <= 32 || quad >= 58 && quad < 65) { if (quad > 25 && quad <= 32 || quad >= 58 && quad < 65) {
yawAngle = 130F; yawAngle = 132.625F;
minOffset = 6; minOffset = 12;
minPitch = 74.13F;
} }
if (quad > 32 && quad <= 38 || quad >= 52 && quad < 58) { if (quad > 32 && quad <= 38 || quad >= 52 && quad < 58) {
yawAngle = 131.50F; yawAngle = 135.625F;
minOffset = 4; minOffset = 10;
minPitch = 75.41F;
} }
if (quad > 38 && quad <= 42 || quad >= 48 && quad < 52) { if (quad > 38 && quad <= 42 || quad >= 48 && quad < 52) {
yawAngle = 133.50F; yawAngle = 137.625F;
minOffset = 2; minOffset = 8;
minPitch = 76.54F;
} }
if (quad > 42 && quad <= 45 || quad >= 45 && quad < 48) { if (quad > 42 && quad <= 45 || quad >= 45 && quad < 48) {
yawAngle = 137F; yawAngle = 140.625F;
minOffset = 1; minOffset = 6;
minPitch = 77.43F;
} }
minPitch = 78F;
//Utils.print("" + minOffset); //Utils.print("" + minOffset);
//float offsetAmountD = ((((float) offsetAmount.getInput() / 10) - 10) * -2) - (((float) offsetAmount.getInput() / 10) - 10); //float offsetAmountD = ((((float) offsetAmount.getInput() / 10) - 10) * -2) - (((float) offsetAmount.getInput() / 10) - 10);
//yawAngle += offsetAmountD; //yawAngle += offsetAmountD;
@ -343,18 +356,18 @@ public class Scaffold extends Module {
if (firstStroke > 0 && (System.currentTimeMillis() - firstStroke) > strokeDelay) { if (firstStroke > 0 && (System.currentTimeMillis() - firstStroke) > strokeDelay) {
firstStroke = 0; firstStroke = 0;
} }
if (enabledOffGround) { /*if (enabledOffGround) {
if (blockRotations != null) { if (blockRotations != null) {
scaffoldYaw = blockRotations[0]; scaffoldYaw = blockRotations[0];
scaffoldPitch = blockRotations[1]; scaffoldPitch = blockRotations[1];
} }
else { else {
scaffoldYaw = mc.thePlayer.rotationYaw - hardcodedYaw(); scaffoldYaw = mc.thePlayer.rotationYaw - hardcodedYaw();
scaffoldPitch = 78f; scaffoldPitch = 77f;
} }
e.setRotations(scaffoldYaw, scaffoldPitch); e.setRotations(scaffoldYaw, scaffoldPitch);
break; break;
} }*/
if (blockRotations != null) { if (blockRotations != null) {
blockYaw = blockRotations[0]; blockYaw = blockRotations[0];
@ -365,10 +378,10 @@ public class Scaffold extends Module {
} }
} else { } else {
scaffoldPitch = minPitch; scaffoldPitch = minPitch;
if (edge == 1) { if (edge == 1 && ((quad <= 5 || quad >= 85) && !Utils.scaffoldDiagonal(false))) {
firstStroke = Utils.time(); firstStroke = Utils.time();
} }
yawOffset = 0; yawOffset = 5;
} }
if (!Utils.isMoving() || Utils.getHorizontalSpeed() == 0.0D) { if (!Utils.isMoving() || Utils.getHorizontalSpeed() == 0.0D) {
@ -383,7 +396,7 @@ public class Scaffold extends Module {
); );
scaffoldYaw = MathHelper.wrapAngleTo180_float(newYaw); scaffoldYaw = MathHelper.wrapAngleTo180_float(newYaw);
if (quad > 5 && quad < 85) { if (quad > 5 && quad < 85 && dynamic > 0) {
if (quad < 45F) { if (quad < 45F) {
if (firstStroke == 0) { if (firstStroke == 0) {
if (side >= 0) { if (side >= 0) {
@ -412,16 +425,16 @@ public class Scaffold extends Module {
was451 = false; was451 = false;
} }
} }
double minSwitch = (!Utils.scaffoldDiagonal(false)) ? 9 : 15; double minSwitch = (!Utils.scaffoldDiagonal(false)) ? 4 : 15;
if (side >= 0) { if (side >= 0) {
if (yawOffset <= -minSwitch && firstStroke == 0) { if (yawOffset <= -minSwitch && firstStroke == 0 && dynamic > 0) {
if (quad <= 5 || quad >= 85) { if (quad <= 5 || quad >= 85) {
if (set2) { if (set2) {
firstStroke = Utils.time(); firstStroke = Utils.time();
} }
set2 = false; set2 = false;
} }
} else if (yawOffset >= 0 && firstStroke == 0) { } else if (yawOffset >= 0 && firstStroke == 0 && dynamic > 0) {
if (quad <= 5 || quad >= 85) { if (quad <= 5 || quad >= 85) {
if (yawOffset >= minSwitch) { if (yawOffset >= minSwitch) {
if (!set2) { if (!set2) {
@ -439,14 +452,14 @@ public class Scaffold extends Module {
break; break;
} }
} else if (side <= -0) { } else if (side <= -0) {
if (yawOffset >= minSwitch && firstStroke == 0) { if (yawOffset >= minSwitch && firstStroke == 0 && dynamic > 0) {
if (quad <= 5 || quad >= 85) { if (quad <= 5 || quad >= 85) {
if (set2) { if (set2) {
firstStroke = Utils.time(); firstStroke = Utils.time();
} }
set2 = false; set2 = false;
} }
} else if (yawOffset <= 0 && firstStroke == 0) { } else if (yawOffset <= 0 && firstStroke == 0 && dynamic > 0) {
if (quad <= 5 || quad >= 85) { if (quad <= 5 || quad >= 85) {
if (yawOffset <= -minSwitch) { if (yawOffset <= -minSwitch) {
if (!set2) { if (!set2) {
@ -574,12 +587,12 @@ public class Scaffold extends Module {
} }
} }
@SubscribeEvent(priority = EventPriority.LOWEST) @SubscribeEvent
public void onMoveInput(PrePlayerInputEvent e) { public void onPostPlayerInput(PostPlayerInputEvent e) {
if (!ModuleManager.scaffold.isEnabled) { if (!ModuleManager.scaffold.isEnabled) {
return; return;
} }
if (fastScaffold.getInput() == 0) { if (!fastScaffoldKeepY && !floatKeepY) {
return; return;
} }
mc.thePlayer.movementInput.jump = false; mc.thePlayer.movementInput.jump = false;
@ -609,7 +622,7 @@ public class Scaffold extends Module {
} }
if (holdingBlocks() && setSlot()) { if (holdingBlocks() && setSlot()) {
if (moduleEnabled && !finishProcedure) { if (moduleEnabled && !finishProcedure) {
if (Utils.distanceToGround(mc.thePlayer) <= 3) { if (Utils.distanceToGround(mc.thePlayer) < 2) {
canPlace = true; canPlace = true;
finishProcedure = true; finishProcedure = true;
} }
@ -833,11 +846,6 @@ public class Scaffold extends Module {
private void placeBlock(int yOffset, int xOffset) { private void placeBlock(int yOffset, int xOffset) {
locateAndPlaceBlock(yOffset, xOffset); locateAndPlaceBlock(yOffset, xOffset);
int input = (int) multiPlace.getInput(); int input = (int) multiPlace.getInput();
if (!mAlways.isToggled()) {
if (!handleMultiPlaceSettings()) {
return;
}
}
if (input >= 1) { if (input >= 1) {
locateAndPlaceBlock(yOffset, xOffset); locateAndPlaceBlock(yOffset, xOffset);
if (input >= 2) { if (input >= 2) {
@ -846,28 +854,6 @@ public class Scaffold extends Module {
} }
} }
private boolean handleMultiPlaceSettings() {
if (mTowerMove.isToggled() && ModuleManager.tower.towerMove.getInput() != 0 && (ModuleManager.tower.canTower() && Utils.keysDown() && ModuleManager.tower.towering || ModuleManager.tower.finishedTower)) {
return true;
}
if (mVerticalTower.isToggled() && ModuleManager.tower.verticalTower.getInput() != 0 && ModuleManager.tower.canTower() && !Utils.keysDown()) {
return true;
}
if (mSprint.isToggled() && sprint.getInput() != 0 && !usingFastScaffold() && !ModuleManager.tower.canTower()) {
return true;
}
if (mSprintWithSpeed.isToggled() && sprint.getInput() != 0 && !usingFastScaffold() && getSpeedLevel() > 0 && !ModuleManager.tower.canTower()) {
return true;
}
if (mKeepY.isToggled() && fastScaffold.getInput() != 0 && usingFastScaffold() && !ModuleManager.tower.canTower()) {
return true;
}
if (mKeepYWithSpeed.isToggled() && fastScaffold.getInput() != 0 && usingFastScaffold() && getSpeedLevel() > 0 && !ModuleManager.tower.canTower()) {
return true;
}
return false;
}
private void locateAndPlaceBlock(int yOffset, int xOffset) { private void locateAndPlaceBlock(int yOffset, int xOffset) {
locateBlocks(yOffset, xOffset); locateBlocks(yOffset, xOffset);
if (blockInfo == null) { if (blockInfo == null) {
@ -1093,10 +1079,6 @@ public class Scaffold extends Module {
} }
float getMotionYaw() { float getMotionYaw() {
return MathHelper.wrapAngleTo180_float((float) Math.toDegrees(Math.atan2(mc.thePlayer.motionZ, mc.thePlayer.motionX)) - 90.0F);
}
float getMotionYaw2() {
return (float) Math.toDegrees(Math.atan2(mc.thePlayer.motionZ, mc.thePlayer.motionX)) - 90.0F; return (float) Math.toDegrees(Math.atan2(mc.thePlayer.motionZ, mc.thePlayer.motionX)) - 90.0F;
} }
@ -1210,6 +1192,7 @@ public class Scaffold extends Module {
} }
public boolean setSlot() { public boolean setSlot() {
ItemStack heldItem = mc.thePlayer.getHeldItem();
int slot = getSlot(); int slot = getSlot();
if (slot == -1) { if (slot == -1) {
return false; return false;
@ -1226,12 +1209,13 @@ public class Scaffold extends Module {
spoofSlot = slot; spoofSlot = slot;
} }
else { else {
mc.thePlayer.inventory.currentItem = blockSlot; if (heldItem == null || !(heldItem.getItem() instanceof ItemBlock) || !Utils.canBePlaced((ItemBlock) heldItem.getItem()) || mc.thePlayer.getHeldItem().stackSize <= ModuleManager.autoSwap.swapAt.getInput()) {
spoofSlot = blockSlot; mc.thePlayer.inventory.currentItem = slot;
spoofSlot = slot;
}
} }
} }
ItemStack heldItem = mc.thePlayer.getHeldItem();
if (heldItem == null || !(heldItem.getItem() instanceof ItemBlock) || !Utils.canBePlaced((ItemBlock) heldItem.getItem())) { if (heldItem == null || !(heldItem.getItem() instanceof ItemBlock) || !Utils.canBePlaced((ItemBlock) heldItem.getItem())) {
blockSlot = -1; blockSlot = -1;
return false; return false;

View File

@ -3,6 +3,7 @@ package keystrokesmod.module.impl.player;
import keystrokesmod.event.*; import keystrokesmod.event.*;
import keystrokesmod.module.Module; import keystrokesmod.module.Module;
import keystrokesmod.module.ModuleManager; import keystrokesmod.module.ModuleManager;
import keystrokesmod.module.impl.movement.LongJump;
import keystrokesmod.module.setting.impl.ButtonSetting; import keystrokesmod.module.setting.impl.ButtonSetting;
import keystrokesmod.module.setting.impl.GroupSetting; import keystrokesmod.module.setting.impl.GroupSetting;
import keystrokesmod.module.setting.impl.SliderSetting; import keystrokesmod.module.setting.impl.SliderSetting;
@ -28,7 +29,7 @@ public class Tower extends Module {
private final ButtonSetting cancelKnockback; private final ButtonSetting cancelKnockback;
private ButtonSetting cancelVelocityRequired; private ButtonSetting cancelVelocityRequired;
final private String[] towerMoveModes = new String[]{"None", "Vanilla", "Low", "Edge", "2.5 tick", "1.5 tick", "1 tick"}; final private String[] towerMoveModes = new String[]{"None", "Vanilla", "Low", "Edge", "2.5 tick", "1.5 tick", "1 tick", "10 tick"};
final private String[] verticalTowerModes = new String[]{"None", "Vanilla", "Extra block"}; final private String[] verticalTowerModes = new String[]{"None", "Vanilla", "Extra block"};
private int slowTicks; private int slowTicks;
private boolean wasTowering; private boolean wasTowering;
@ -112,6 +113,13 @@ public class Tower extends Module {
break; break;
case 6: case 6:
break;
case 7:
if (towering) {
if (towerTicks == 0) {
//e.setOnGround(true);
}
}
break; break;
} }
} }
@ -121,257 +129,289 @@ public class Tower extends Module {
public void onPreUpdate(PreUpdateEvent e) { public void onPreUpdate(PreUpdateEvent e) {
int valY = (int) Math.round((mc.thePlayer.posY % 1) * 10000); int valY = (int) Math.round((mc.thePlayer.posY % 1) * 10000);
int simpleY = (int) Math.round((mc.thePlayer.posY % 1.0D) * 100.0D); int simpleY = (int) Math.round((mc.thePlayer.posY % 1.0D) * 100.0D);
if (canTower() && Utils.keysDown()) { if (towerMove.getInput() > 0) {
speed = false; if (canTower() && Utils.keysDown()) {
wasTowering = hasTowered = true; speed = false;
if (disableWhileHurt.isToggled() && ModuleUtils.damage) { wasTowering = hasTowered = true;
towerTicks = 0; if (disableWhileHurt.isToggled() && ModuleUtils.damage) {
towering = false; towerTicks = 0;
return; towering = false;
} return;
switch ((int) towerMove.getInput()) { }
case 1: switch ((int) towerMove.getInput()) {
mc.thePlayer.motionY = 0.41965; case 1:
switch (towerTicks) { mc.thePlayer.motionY = 0.41965;
case 1:
mc.thePlayer.motionY = 0.33;
break;
case 2:
mc.thePlayer.motionY = 1 - mc.thePlayer.posY % 1;
break;
}
if (towerTicks >= 3) {
towerTicks = 0;
}
case 2:
if (mc.thePlayer.onGround) {
mc.thePlayer.motionY = 0.4196;
}
else {
switch (towerTicks) { switch (towerTicks) {
case 3:
case 4:
mc.thePlayer.motionY = 0;
break;
case 5:
mc.thePlayer.motionY = 0.4191;
break;
case 6:
mc.thePlayer.motionY = 0.3275;
break;
case 11:
mc.thePlayer.motionY = - 0.5;
}
}
break;
case 3:
if (mc.thePlayer.posY % 1 == 0 && mc.thePlayer.onGround && !setLowMotion) {
towering = true;
}
if (towering) {
if (valY == 0) {
mc.thePlayer.motionY = 0.42f;
Utils.setSpeed(getTowerGroundSpeed(getSpeedLevel()));
startedTowerInAir = false;
}
else if (valY > 4000 && valY < 4300) {
mc.thePlayer.motionY = 0.33f;
Utils.setSpeed(getTowerSpeed(getSpeedLevel()));
speed = true;
}
else if (valY > 7000) {
if (setLowMotion) {
towering = false;
}
mc.thePlayer.motionY = 1 - mc.thePlayer.posY % 1f;
}
}
else if (setLowMotion) {
++cMotionTicks;
if (cMotionTicks == 1) {
mc.thePlayer.motionY = 0.08F;
Utils.setSpeed(getTowerSpeed(getSpeedLevel()));
}
else if (cMotionTicks == 4) {
cMotionTicks = 0;
setLowMotion = false;
towering = true;
Utils.setSpeed(getTowerGroundSpeed(getSpeedLevel()) - 0.02);
}
}
break;
case 4:
if (mc.thePlayer.posY % 1 == 0 && mc.thePlayer.onGround) {
towering = true;
}
if (towering) {
towerTicks = mc.thePlayer.onGround ? 0 : ++towerTicks;
switch (simpleY) {
case 0:
mc.thePlayer.motionY = 0.42f;
if (towerTicks == 6) {
mc.thePlayer.motionY = -0.078400001525879;
}
Utils.setSpeed(getTowerSpeed(getSpeedLevel()));
speed = true;
break;
case 42:
mc.thePlayer.motionY = 0.33f;
Utils.setSpeed(getTowerSpeed(getSpeedLevel()));
speed = true;
break;
case 75:
mc.thePlayer.motionY = 1 - mc.thePlayer.posY % 1f;
break;
}
}
break;
case 5:
if (mc.thePlayer.posY % 1 == 0 && mc.thePlayer.onGround) {
towering = true;
}
if (towering) {
towerTicks = mc.thePlayer.onGround ? 0 : ++towerTicks;
switch (towerTicks) {
case 0:
mc.thePlayer.motionY = 0.42f;
Utils.setSpeed(get15tickspeed(getSpeedLevel())); // Speed + Strafe tick
speed = true;
break;
case 1: case 1:
mc.thePlayer.motionY = 0.33f; mc.thePlayer.motionY = 0.33;
Utils.setSpeed(Utils.getHorizontalSpeed()); // Strafe tick
break; break;
case 2: case 2:
mc.thePlayer.motionY = 1 - mc.thePlayer.posY % 1f; mc.thePlayer.motionY = 1 - mc.thePlayer.posY % 1;
break;
case 3:
mc.thePlayer.motionY = 0.42f;
Utils.setSpeed(Utils.getHorizontalSpeed()); // Strafe tick
break;
case 4:
mc.thePlayer.motionY = 0.33f;
Utils.setSpeed(Utils.getHorizontalSpeed()); // Strafe tick
break;
case 5:
mc.thePlayer.motionY = 1 - mc.thePlayer.posY % 1f + 0.0000001;
break;
case 6:
mc.thePlayer.motionY = -0.01;
break; break;
} }
} if (towerTicks >= 3) {
break; towerTicks = 0;
case 6:
if (mc.thePlayer.posY % 1 == 0 && mc.thePlayer.onGround) {
grounds++;
}
if (mc.thePlayer.posY % 1 == 0) {
towering = true;
}
if (towering) {
towerTicks = mc.thePlayer.onGround ? 0 : ++towerTicks;
switch (towerTicks) {
case 0:
mc.thePlayer.motionY = 0.42f;
Utils.setSpeed(get15tickspeed(getSpeedLevel())); // Speed + Strafe tick
speed = true;
break;
case 1:
mc.thePlayer.motionY = 0.33f;
Utils.setSpeed(Utils.getHorizontalSpeed()); // Strafe tick
break;
case 2:
mc.thePlayer.motionY = 1 - mc.thePlayer.posY % 1f;
break;
case 3:
mc.thePlayer.motionY = 0.005;
break;
} }
} case 2:
break;
}
}
else {
if (finishedTower) {
finishedTower = false;
}
if (hasTowered) {
finishedTower = true;
}
if (wasTowering && modulesEnabled()) {
if (slowedTicks.getInput() > 0 && slowedTicks.getInput() != 100 && slowTicks++ < slowedTicks.getInput()) {
mc.thePlayer.motionX *= slowedSpeed.getInput() / 100;
mc.thePlayer.motionZ *= slowedSpeed.getInput() / 100;
}
else {
ModuleUtils.handleSlow();
}
if (slowTicks >= slowedTicks.getInput()) {
slowTicks = 0;
wasTowering = false;
}
}
else {
if (wasTowering) {
wasTowering = false;
}
slowTicks = 0;
}
if (speed || hasTowered && mc.thePlayer.onGround) {
Utils.setSpeed(Utils.getHorizontalSpeed(mc.thePlayer) / 1.6);
}
hasTowered = towering = firstJump = startedTowerInAir = setLowMotion = speed = false;
cMotionTicks = placeTicks = towerTicks = grounds = 0;
reset();
}
if (canTower() && !Utils.keysDown()) {
wasTowering = true;
switch ((int) verticalTower.getInput()) {
case 1:
mc.thePlayer.motionY = 0.42f;
break;
case 2:
if (!aligned) {
if (mc.thePlayer.onGround) { if (mc.thePlayer.onGround) {
if (!aligning) { mc.thePlayer.motionY = 0.4196;
blockX = (int) mc.thePlayer.posX; } else {
switch (towerTicks) {
case 3:
case 4:
mc.thePlayer.motionY = 0;
break;
case 5:
mc.thePlayer.motionY = 0.4191;
break;
case 6:
mc.thePlayer.motionY = 0.3275;
break;
case 11:
mc.thePlayer.motionY = -0.5;
firstX = mc.thePlayer.posX - 10;
firstY = mc.thePlayer.posY;
firstZ = mc.thePlayer.posZ;
} }
mc.thePlayer.motionX = 0.22;
aligning = true;
} }
if (aligning && (int) mc.thePlayer.posX > blockX) { break;
aligned = true; case 3:
if (mc.thePlayer.posY % 1 == 0 && mc.thePlayer.onGround && !setLowMotion) {
towering = true;
} }
yaw = RotationUtils.getRotations(firstX, firstY, firstZ)[0]; if (towering) {
pitch = 0; if (valY == 0) {
mc.thePlayer.motionY = 0.42f;
Utils.setSpeed(getTowerGroundSpeed(getSpeedLevel()));
startedTowerInAir = false;
} else if (valY > 4000 && valY < 4300) {
mc.thePlayer.motionY = 0.33f;
Utils.setSpeed(getTowerSpeed(getSpeedLevel()));
speed = true;
} else if (valY > 7000) {
if (setLowMotion) {
towering = false;
}
mc.thePlayer.motionY = 1 - mc.thePlayer.posY % 1f;
}
} else if (setLowMotion) {
++cMotionTicks;
if (cMotionTicks == 1) {
mc.thePlayer.motionY = 0.08F;
Utils.setSpeed(getTowerSpeed(getSpeedLevel()));
} else if (cMotionTicks == 4) {
cMotionTicks = 0;
setLowMotion = false;
towering = true;
Utils.setSpeed(getTowerGroundSpeed(getSpeedLevel()) - 0.02);
}
}
break;
case 4:
if (mc.thePlayer.posY % 1 == 0 && mc.thePlayer.onGround) {
towering = true;
}
if (towering) {
towerTicks = mc.thePlayer.onGround ? 0 : ++towerTicks;
switch (simpleY) {
case 0:
mc.thePlayer.motionY = 0.42f;
if (towerTicks == 6) {
mc.thePlayer.motionY = -0.078400001525879;
}
Utils.setSpeed(getTowerSpeed(getSpeedLevel()));
speed = true;
break;
case 42:
mc.thePlayer.motionY = 0.33f;
Utils.setSpeed(getTowerSpeed(getSpeedLevel()));
speed = true;
break;
case 75:
mc.thePlayer.motionY = 1 - mc.thePlayer.posY % 1f;
break;
}
}
break;
case 5:
if (mc.thePlayer.posY % 1 == 0 && mc.thePlayer.onGround) {
towering = true;
}
if (towering) {
towerTicks = mc.thePlayer.onGround ? 0 : ++towerTicks;
switch (towerTicks) {
case 0:
mc.thePlayer.motionY = 0.42f;
Utils.setSpeed(get15tickspeed(getSpeedLevel())); // Speed + Strafe tick
speed = true;
break;
case 1:
mc.thePlayer.motionY = 0.33f;
Utils.setSpeed(Utils.getHorizontalSpeed()); // Strafe tick
break;
case 2:
mc.thePlayer.motionY = 1 - mc.thePlayer.posY % 1f;
break;
case 3:
mc.thePlayer.motionY = 0.42f;
Utils.setSpeed(Utils.getHorizontalSpeed()); // Strafe tick
break;
case 4:
mc.thePlayer.motionY = 0.33f;
Utils.setSpeed(Utils.getHorizontalSpeed()); // Strafe tick
break;
case 5:
mc.thePlayer.motionY = 1 - mc.thePlayer.posY % 1f + 0.0000001;
break;
case 6:
mc.thePlayer.motionY = -0.01;
break;
}
}
break;
case 6:
if (mc.thePlayer.posY % 1 == 0 && mc.thePlayer.onGround) {
grounds++;
}
if (mc.thePlayer.posY % 1 == 0) {
towering = true;
}
if (towering) {
towerTicks = mc.thePlayer.onGround ? 0 : ++towerTicks;
switch (towerTicks) {
case 0:
mc.thePlayer.motionY = 0.42f;
Utils.setSpeed(get1tickspeed(getSpeedLevel())); // Speed + Strafe tick
speed = true;
break;
case 1:
mc.thePlayer.motionY = 0.33f;
Utils.setSpeed(Utils.getHorizontalSpeed()); // Strafe tick
break;
case 2:
mc.thePlayer.motionY = 1 - mc.thePlayer.posY % 1f;
break;
case 3:
mc.thePlayer.motionY = 0.005;
break;
}
}
break;
case 7:
if (mc.thePlayer.posY % 1 == 0 && mc.thePlayer.onGround) {
towering = true;
}
if (towering) {
++towerTicks;
switch (towerTicks) {
case 7:
case 4:
case 1:
mc.thePlayer.motionY = 0.42f;
Utils.setSpeed(getTowerSpeed(getSpeedLevel())); // Speed + Strafe tick
speed = true;
break;
case 8:
case 5:
case 2:
mc.thePlayer.motionY = 0.33f;
Utils.setSpeed(Utils.getHorizontalSpeed()); // Strafe tick
break;
case 6:
case 3:
mc.thePlayer.motionY = 1 - mc.thePlayer.posY % 1f;
break;
case 9:
mc.thePlayer.motionY = 1 - mc.thePlayer.posY % 1f + 0.0000001;
break;
case 10:
mc.thePlayer.motionY = -0.01;
towerTicks = 0;
Utils.setSpeed(getTowerSpeed(getSpeedLevel())); // Speed + Strafe tick
speed = true;
break;
}
}
break;
}
} else {
if (finishedTower) {
finishedTower = false;
}
if (hasTowered) {
finishedTower = true;
}
if (wasTowering && modulesEnabled()) {
if (slowedTicks.getInput() > 0 && slowedTicks.getInput() != 100 && slowTicks++ < slowedTicks.getInput()) {
mc.thePlayer.motionX *= slowedSpeed.getInput() / 100;
mc.thePlayer.motionZ *= slowedSpeed.getInput() / 100;
} else {
ModuleUtils.handleSlow();
} }
if (aligned) { if (slowTicks >= slowedTicks.getInput()) {
if (placed) { slowTicks = 0;
yaw = 0; wasTowering = false;
pitch = 89.9F; }
} } else {
else { if (wasTowering) {
wasTowering = false;
}
slowTicks = 0;
}
if (speed || hasTowered && mc.thePlayer.onGround) {
Utils.setSpeed(Utils.getHorizontalSpeed(mc.thePlayer) / 1.6);
}
hasTowered = towering = firstJump = startedTowerInAir = setLowMotion = speed = false;
cMotionTicks = placeTicks = towerTicks = grounds = 0;
reset();
}
}
if (verticalTower.getInput() > 0) {
if (canTower() && !Utils.keysDown()) {
wasTowering = true;
switch ((int) verticalTower.getInput()) {
case 1:
mc.thePlayer.motionY = 0.42f;
break;
case 2:
if (!aligned) {
if (mc.thePlayer.onGround) {
if (!aligning) {
blockX = (int) mc.thePlayer.posX;
firstX = mc.thePlayer.posX - 10;
firstY = mc.thePlayer.posY;
firstZ = mc.thePlayer.posZ;
}
mc.thePlayer.motionX = 0.22;
aligning = true;
}
if (aligning && (int) mc.thePlayer.posX > blockX) {
aligned = true;
}
yaw = RotationUtils.getRotations(firstX, firstY, firstZ)[0]; yaw = RotationUtils.getRotations(firstX, firstY, firstZ)[0];
pitch = 0; pitch = 0;
} }
placeExtraBlock = true; if (aligned) {
mc.thePlayer.motionX = 0; if (placed) {
mc.thePlayer.motionY = verticalTowerValue(); yaw = 0;
mc.thePlayer.motionZ = 0; pitch = 89.9F;
} } else {
break; yaw = RotationUtils.getRotations(firstX, firstY, firstZ)[0];
pitch = 0;
}
placeExtraBlock = true;
mc.thePlayer.motionX = 0;
mc.thePlayer.motionY = verticalTowerValue();
mc.thePlayer.motionZ = 0;
}
break;
}
} else {
yaw = pitch = 0;
aligning = aligned = placed = false;
firstX = 0;
placeExtraBlock = false;
} }
} else {
yaw = pitch = 0;
aligning = aligned = placed = false;
firstX = 0;
placeExtraBlock = false;
} }
} }
@ -468,7 +508,7 @@ public class Tower extends Module {
} }
private boolean modulesEnabled() { private boolean modulesEnabled() {
return (ModuleManager.scaffold.moduleEnabled && ModuleManager.scaffold.holdingBlocks() && ModuleManager.scaffold.hasSwapped && !ModuleManager.LongJump.function); return (ModuleManager.scaffold.moduleEnabled && ModuleManager.scaffold.holdingBlocks() && ModuleManager.scaffold.hasSwapped && !LongJump.function);
} }
private int getSpeedLevel() { private int getSpeedLevel() {
@ -539,4 +579,19 @@ public class Tower extends Module {
return (speedSetting.getInput() / 10); return (speedSetting.getInput() / 10);
} }
private double get1tickspeed(int speedLevel) {
if (speedLevel == 0) {
return (speedSetting.getInput() / 10);
} else if (speedLevel == 1) {
return (speedSetting.getInput() / 10) + 0.03;
} else if (speedLevel == 2) {
return (speedSetting.getInput() / 10) + 0.06;
} else if (speedLevel == 3) {
return (speedSetting.getInput() / 10) + 0.1;
} else if (speedLevel == 4) {
return (speedSetting.getInput() / 10) + 0.11;
}
return (speedSetting.getInput() / 10);
}
} }

View File

@ -111,6 +111,7 @@ public class PlayerESP extends Module {
if (teamColor.isToggled()) { if (teamColor.isToggled()) {
rgb = Utils.getColorFromEntity(entity); rgb = Utils.getColorFromEntity(entity);
} }
rgb = Utils.mergeAlpha(rgb, 255);
this.render(entity, rgb); this.render(entity, rgb);
this.renderAsTwoD.put((EntityLivingBase) entity, rgb); this.renderAsTwoD.put((EntityLivingBase) entity, rgb);
} }
@ -132,6 +133,7 @@ public class PlayerESP extends Module {
if (teamColor.isToggled()) { if (teamColor.isToggled()) {
rgb = Utils.getColorFromEntity(player); rgb = Utils.getColorFromEntity(player);
} }
rgb = Utils.mergeAlpha(rgb, 255);
this.render(player, rgb); this.render(player, rgb);
this.renderAsTwoD.put(player, rgb); this.renderAsTwoD.put(player, rgb);
} }

View File

@ -18,6 +18,7 @@ import net.minecraft.network.play.client.*;
import net.minecraft.network.play.server.S12PacketEntityVelocity; import net.minecraft.network.play.server.S12PacketEntityVelocity;
import net.minecraft.network.play.server.S27PacketExplosion; import net.minecraft.network.play.server.S27PacketExplosion;
import net.minecraft.util.BlockPos; import net.minecraft.util.BlockPos;
import net.minecraft.util.MathHelper;
import net.minecraftforge.client.event.ClientChatReceivedEvent; import net.minecraftforge.client.event.ClientChatReceivedEvent;
import net.minecraftforge.client.event.RenderWorldLastEvent; import net.minecraftforge.client.event.RenderWorldLastEvent;
import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.event.entity.EntityJoinWorldEvent;
@ -60,7 +61,9 @@ public class ModuleUtils {
private int edgeTick; private int edgeTick;
public static boolean canSlow, didSlow, setSlow; private boolean dontCheckFD;
public static boolean canSlow, didSlow, setSlow, hasSlowed;
private static boolean allowFriction; private static boolean allowFriction;
@SubscribeEvent @SubscribeEvent
@ -174,12 +177,22 @@ public class ModuleUtils {
if (!Utils.nullCheck()) { if (!Utils.nullCheck()) {
return; return;
} }
if (e.getPacket() instanceof S27PacketExplosion) {
firstDamage = false;
dontCheckFD = true;
}
if (e.getPacket() instanceof S12PacketEntityVelocity) { if (e.getPacket() instanceof S12PacketEntityVelocity) {
if (((S12PacketEntityVelocity) e.getPacket()).getEntityID() == mc.thePlayer.getEntityId()) { if (((S12PacketEntityVelocity) e.getPacket()).getEntityID() == mc.thePlayer.getEntityId()) {
damage = firstDamage = true; damage = true;
damageTicks = 0; damageTicks = 0;
if (!dontCheckFD) {
firstDamage = true;
}
dontCheckFD = false;
} }
} }
} }
@ -224,24 +237,31 @@ public class ModuleUtils {
@SubscribeEvent @SubscribeEvent
public void onPreUpdate(PreUpdateEvent e) { public void onPreUpdate(PreUpdateEvent e) {
double ed = Math.toDegrees(Math.atan2(mc.thePlayer.motionZ, mc.thePlayer.motionX));
//Utils.print("" + ed);
if (swapTick > 0) { if (swapTick > 0) {
--swapTick; --swapTick;
} }
if ((canSlow || ModuleManager.scaffold.moduleEnabled && !ModuleManager.tower.canTower()) && !mc.thePlayer.onGround) { if (canSlow || ModuleManager.scaffold.moduleEnabled && !ModuleManager.tower.canTower()) {
double motionVal = 0.9507832 - ((double) inAirTicks / 10000) - Utils.randomizeDouble(0.00001, 0.00006); double motionVal = 0.9507832 - ((double) inAirTicks / 10000) - Utils.randomizeDouble(0.00001, 0.00006);
if (mc.thePlayer.hurtTime == 0 && inAirTicks >= 5 && !setSlow) { if (!hasSlowed) motionVal = motionVal - 0.15;
if (mc.thePlayer.hurtTime == 0 && inAirTicks >= 3 && !setSlow) {
mc.thePlayer.motionX *= motionVal; mc.thePlayer.motionX *= motionVal;
mc.thePlayer.motionZ *= motionVal; mc.thePlayer.motionZ *= motionVal;
setSlow = true; setSlow = hasSlowed = true;
//Utils.print("Slow " + motionVal); //Utils.print("Slow " + motionVal);
} }
didSlow = true; didSlow = true;
//Utils.print(mc.thePlayer.ticksExisted + " : " + Utils.getHorizontalSpeed()); //Utils.print(mc.thePlayer.ticksExisted + " : " + Utils.getHorizontalSpeed());
} }
else if (didSlow) { if (didSlow && mc.thePlayer.onGround) {
canSlow = didSlow = false; canSlow = didSlow = false;
} }
if (groundTicks > 1) {
hasSlowed = false;
}
if (mc.thePlayer.onGround || mc.thePlayer.hurtTime != 0) { if (mc.thePlayer.onGround || mc.thePlayer.hurtTime != 0) {
setSlow = false; setSlow = false;
} }
@ -436,7 +456,7 @@ public class ModuleUtils {
} }
} }
if (ModuleManager.bhop.setRotation) { if (ModuleManager.bhop.setRotation && ModuleManager.bhop.rotateYaw.isToggled()) {
if (!ModuleManager.killAura.isTargeting && !ModuleManager.scaffold.isEnabled) { if (!ModuleManager.killAura.isTargeting && !ModuleManager.scaffold.isEnabled) {
float yaw = mc.thePlayer.rotationYaw - 55; float yaw = mc.thePlayer.rotationYaw - 55;
e.setYaw(yaw); e.setYaw(yaw);