edging
This commit is contained in:
parent
1b4640aee4
commit
6b3d1b6fec
|
|
@ -8,6 +8,7 @@ import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||||
import keystrokesmod.module.setting.impl.DescriptionSetting;
|
import keystrokesmod.module.setting.impl.DescriptionSetting;
|
||||||
import keystrokesmod.module.setting.impl.SliderSetting;
|
import keystrokesmod.module.setting.impl.SliderSetting;
|
||||||
import keystrokesmod.utility.BlockUtils;
|
import keystrokesmod.utility.BlockUtils;
|
||||||
|
import keystrokesmod.utility.ModuleUtils;
|
||||||
import keystrokesmod.utility.Reflection;
|
import keystrokesmod.utility.Reflection;
|
||||||
import keystrokesmod.utility.Utils;
|
import keystrokesmod.utility.Utils;
|
||||||
import net.minecraft.item.*;
|
import net.minecraft.item.*;
|
||||||
|
|
@ -79,7 +80,7 @@ public class NoSlow extends Module {
|
||||||
if (mc.thePlayer.onGround) {
|
if (mc.thePlayer.onGround) {
|
||||||
mc.thePlayer.jump();
|
mc.thePlayer.jump();
|
||||||
break;
|
break;
|
||||||
} else {
|
} else if (ModuleUtils.inAirTicks >= 2) {
|
||||||
mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem());
|
mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem());
|
||||||
canFloat = true;
|
canFloat = true;
|
||||||
reSendConsume = false;
|
reSendConsume = false;
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,6 @@ public class Scaffold extends Module {
|
||||||
private boolean lowhop;
|
private boolean lowhop;
|
||||||
private int rotationDelay;
|
private int rotationDelay;
|
||||||
private int blockSlot = -1;
|
private int blockSlot = -1;
|
||||||
private int inAirTicks;
|
|
||||||
private boolean modifyPitch;
|
private boolean modifyPitch;
|
||||||
private boolean flipRotation;
|
private boolean flipRotation;
|
||||||
private long lastSwap;
|
private long lastSwap;
|
||||||
|
|
@ -151,7 +150,6 @@ public class Scaffold extends Module {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onPreMotion(PreMotionEvent e) {
|
public void onPreMotion(PreMotionEvent e) {
|
||||||
inAirTicks = mc.thePlayer.onGround ? 0 : ++inAirTicks;
|
|
||||||
onGroundTicks = !mc.thePlayer.onGround ? 0 : ++onGroundTicks;
|
onGroundTicks = !mc.thePlayer.onGround ? 0 : ++onGroundTicks;
|
||||||
if (!isEnabled || !holdingBlocks()) {
|
if (!isEnabled || !holdingBlocks()) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -195,7 +193,7 @@ public class Scaffold extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
//Float
|
//Float
|
||||||
if (sprint.getInput() == 2 && !usingFastScaffold() && !ModuleManager.tower.canTower() && !ModuleManager.LongJump.isEnabled()) {
|
if (sprint.getInput() == 2 && mc.thePlayer.motionY <= -0.0784 && !usingFastScaffold() && !ModuleManager.bhop.isEnabled() && !ModuleManager.tower.canTower() && !ModuleManager.LongJump.isEnabled()) {
|
||||||
floatWasEnabled = true;
|
floatWasEnabled = true;
|
||||||
if (!floatStarted) {
|
if (!floatStarted) {
|
||||||
if (onGroundTicks > 8 && mc.thePlayer.onGround) {
|
if (onGroundTicks > 8 && mc.thePlayer.onGround) {
|
||||||
|
|
@ -214,7 +212,7 @@ public class Scaffold extends Module {
|
||||||
if (floatStarted && mc.thePlayer.onGround) {
|
if (floatStarted && mc.thePlayer.onGround) {
|
||||||
floatKeepY = false;
|
floatKeepY = false;
|
||||||
startYPos = -1;
|
startYPos = -1;
|
||||||
if (moduleEnabled) e.setPosY(e.getPosY() + 1E-10);
|
if (moduleEnabled && !Utils.jumpDown()) e.setPosY(e.getPosY() + 1E-14);
|
||||||
if (Utils.isMoving()) Utils.setSpeed(getFloatSpeed(getSpeedLevel()));
|
if (Utils.isMoving()) Utils.setSpeed(getFloatSpeed(getSpeedLevel()));
|
||||||
}
|
}
|
||||||
} else if (floatWasEnabled) {
|
} else if (floatWasEnabled) {
|
||||||
|
|
@ -232,7 +230,7 @@ public class Scaffold extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
getPitch = 82;
|
getPitch = 82;
|
||||||
if (inAirTicks >= 2) {
|
if (ModuleUtils.inAirTicks >= 2) {
|
||||||
rotateForward = false;
|
rotateForward = false;
|
||||||
}
|
}
|
||||||
if (rotation.getInput() > 0 && (!rotateForward || !jumpFacingForward.isToggled())) {
|
if (rotation.getInput() > 0 && (!rotateForward || !jumpFacingForward.isToggled())) {
|
||||||
|
|
@ -247,12 +245,12 @@ public class Scaffold extends Module {
|
||||||
|
|
||||||
float main = MathHelper.wrapAngleTo180_float(getMotionYaw() - yaw);
|
float main = MathHelper.wrapAngleTo180_float(getMotionYaw() - yaw);
|
||||||
if (main >= 0) {
|
if (main >= 0) {
|
||||||
if (flipRotation) e.setYaw(offsetRotation() + (!Utils.scaffoldDiagonal(false) ? 230.625F : 274.625F));
|
if (flipRotation) e.setYaw(offsetRotation() + (!Utils.scaffoldDiagonal(false) ? 244.625F : 274.625F));
|
||||||
Utils.print("1 " + mainOffset);
|
//Utils.print("1 " + mainOffset);
|
||||||
}
|
}
|
||||||
else if (main <= -0) {
|
else if (main <= -0) {
|
||||||
if (flipRotation) e.setYaw(offsetRotation() - (!Utils.scaffoldDiagonal(false) ? 230.625F : 274.625F));
|
if (flipRotation) e.setYaw(offsetRotation() - (!Utils.scaffoldDiagonal(false) ? 244.625F : 274.625F));
|
||||||
Utils.print("2 " + mainOffset);
|
//Utils.print("2 " + mainOffset);
|
||||||
}
|
}
|
||||||
if (System.currentTimeMillis() - lastSwap > 250) {
|
if (System.currentTimeMillis() - lastSwap > 250) {
|
||||||
if (main >= 0 && mainOffset >= 0 && mainOffset <= 20 || main <= -0 && mainOffset <= -0 && mainOffset >= -20) {
|
if (main >= 0 && mainOffset >= 0 && mainOffset <= 20 || main <= -0 && mainOffset <= -0 && mainOffset >= -20) {
|
||||||
|
|
@ -262,7 +260,7 @@ public class Scaffold extends Module {
|
||||||
flipRotation = false;
|
flipRotation = false;
|
||||||
}
|
}
|
||||||
lastSwap = System.currentTimeMillis();
|
lastSwap = System.currentTimeMillis();
|
||||||
Utils.print("flip " + mainOffset);
|
//Utils.print("flip " + mainOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if (e.getPitch() >= 50 && !ModuleManager.tower.canTower() && mc.thePlayer.motionY <= 0.42F) {
|
/*if (e.getPitch() >= 50 && !ModuleManager.tower.canTower() && mc.thePlayer.motionY <= 0.42F) {
|
||||||
|
|
@ -342,6 +340,7 @@ public class Scaffold extends Module {
|
||||||
else if (main <= -0) {
|
else if (main <= -0) {
|
||||||
mainOffset = 25;
|
mainOffset = 25;
|
||||||
}
|
}
|
||||||
|
lastSwap = System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Utils.isMoving() || Utils.getHorizontalSpeed(mc.thePlayer) == 0.0D) {
|
if (!Utils.isMoving() || Utils.getHorizontalSpeed(mc.thePlayer) == 0.0D) {
|
||||||
|
|
@ -349,7 +348,7 @@ public class Scaffold extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
float lastYaw = lastBlockYaw;
|
float lastYaw = lastBlockYaw;
|
||||||
float newYaw = getMotionYaw() - (!Utils.scaffoldDiagonal(false) ? 126.625F : 138.625F) * Math.signum(
|
float newYaw = getMotionYaw() - (!Utils.scaffoldDiagonal(false) ? 128.625F : 138.625F) * Math.signum(
|
||||||
MathHelper.wrapAngleTo180_float(getMotionYaw() - yaw)
|
MathHelper.wrapAngleTo180_float(getMotionYaw() - yaw)
|
||||||
);
|
);
|
||||||
yaw = applyGcd(
|
yaw = applyGcd(
|
||||||
|
|
@ -449,7 +448,7 @@ public class Scaffold extends Module {
|
||||||
blockRotations = null;
|
blockRotations = null;
|
||||||
startYPos = -1;
|
startYPos = -1;
|
||||||
fastScaffoldKeepY = firstKeepYPlace = rotateForward = rotatingForward = lowhop = floatStarted = floatJumped = floatWasEnabled = false;
|
fastScaffoldKeepY = firstKeepYPlace = rotateForward = rotatingForward = lowhop = floatStarted = floatJumped = floatWasEnabled = false;
|
||||||
inAirTicks = keepYDelay = rotationDelay = keepYTicks = keepYPlaceTicks = 0;
|
keepYDelay = rotationDelay = keepYTicks = keepYPlaceTicks = 0;
|
||||||
startYPos = -1;
|
startYPos = -1;
|
||||||
lookVec = null;
|
lookVec = null;
|
||||||
}
|
}
|
||||||
|
|
@ -730,22 +729,22 @@ public class Scaffold extends Module {
|
||||||
|
|
||||||
/*private boolean allowedFaces(EnumFacing enumFacing) {
|
/*private boolean allowedFaces(EnumFacing enumFacing) {
|
||||||
if (yaw >= 0 && yaw < 90) {
|
if (yaw >= 0 && yaw < 90) {
|
||||||
Utils.print("1");
|
//Utils.print("1");
|
||||||
//west south
|
//west south
|
||||||
return enumFacing == EnumFacing.DOWN || enumFacing == EnumFacing.WEST || enumFacing == EnumFacing.SOUTH;
|
return enumFacing == EnumFacing.DOWN || enumFacing == EnumFacing.WEST || enumFacing == EnumFacing.SOUTH;
|
||||||
}
|
}
|
||||||
else if (yaw >= 90 && yaw < 180) {
|
else if (yaw >= 90 && yaw < 180) {
|
||||||
Utils.print("2");
|
//Utils.print("2");
|
||||||
//north west
|
//north west
|
||||||
return enumFacing == EnumFacing.DOWN || enumFacing == EnumFacing.NORTH || enumFacing == EnumFacing.WEST;
|
return enumFacing == EnumFacing.DOWN || enumFacing == EnumFacing.NORTH || enumFacing == EnumFacing.WEST;
|
||||||
}
|
}
|
||||||
else if (yaw == 180 || yaw >= -180 && yaw < -90) {
|
else if (yaw == 180 || yaw >= -180 && yaw < -90) {
|
||||||
Utils.print("3");
|
//Utils.print("3");
|
||||||
//north east
|
//north east
|
||||||
return enumFacing == EnumFacing.DOWN || enumFacing == EnumFacing.NORTH || enumFacing == EnumFacing.EAST;
|
return enumFacing == EnumFacing.DOWN || enumFacing == EnumFacing.NORTH || enumFacing == EnumFacing.EAST;
|
||||||
}
|
}
|
||||||
else if (yaw >= -90 && yaw <= 0) {
|
else if (yaw >= -90 && yaw <= 0) {
|
||||||
Utils.print("4");
|
//Utils.print("4");
|
||||||
//east south
|
//east south
|
||||||
return enumFacing == EnumFacing.DOWN || enumFacing == EnumFacing.EAST || enumFacing == EnumFacing.SOUTH;
|
return enumFacing == EnumFacing.DOWN || enumFacing == EnumFacing.EAST || enumFacing == EnumFacing.SOUTH;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ public class ModuleUtils {
|
||||||
private int isBreakingTick;
|
private int isBreakingTick;
|
||||||
public static long MAX_EXPLOSION_DIST_SQ = 9;
|
public static long MAX_EXPLOSION_DIST_SQ = 9;
|
||||||
private long FIREBALL_TIMEOUT = 750L, fireballTime = 0;
|
private long FIREBALL_TIMEOUT = 750L, fireballTime = 0;
|
||||||
|
public static int inAirTicks;
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onSendPacket(SendPacketEvent e) {
|
public void onSendPacket(SendPacketEvent e) {
|
||||||
|
|
@ -60,6 +61,8 @@ public class ModuleUtils {
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onPreUpdate(PreUpdateEvent e) {
|
public void onPreUpdate(PreUpdateEvent e) {
|
||||||
|
|
||||||
|
inAirTicks = mc.thePlayer.onGround ? 0 : ++inAirTicks;
|
||||||
|
|
||||||
if (LongJump.slotReset && ++LongJump.slotResetTicks >= 2) {
|
if (LongJump.slotReset && ++LongJump.slotResetTicks >= 2) {
|
||||||
LongJump.stopKillAura = false;
|
LongJump.stopKillAura = false;
|
||||||
LongJump.stopScaffold = false;
|
LongJump.stopScaffold = false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue