This commit is contained in:
parent
24193c5a9a
commit
955f09e05e
|
|
@ -90,9 +90,9 @@ public class KillAura extends Module {
|
||||||
private boolean partialDown;
|
private boolean partialDown;
|
||||||
private int partialTicks;
|
private int partialTicks;
|
||||||
private int firstEdge;
|
private int firstEdge;
|
||||||
private boolean blocked;
|
|
||||||
private int unBlockDelay;
|
private int unBlockDelay;
|
||||||
private boolean canBlockServerside;
|
private boolean canBlockServerside;
|
||||||
|
private boolean checkUsing;
|
||||||
|
|
||||||
// blink related
|
// blink related
|
||||||
private ConcurrentLinkedQueue<Packet> blinkedPackets = new ConcurrentLinkedQueue<>();
|
private ConcurrentLinkedQueue<Packet> blinkedPackets = new ConcurrentLinkedQueue<>();
|
||||||
|
|
@ -112,9 +112,11 @@ public class KillAura extends Module {
|
||||||
private int delayTicks = 0;
|
private int delayTicks = 0;
|
||||||
private boolean lastPressedLeft;
|
private boolean lastPressedLeft;
|
||||||
private boolean lastPressedRight;
|
private boolean lastPressedRight;
|
||||||
private boolean sendDig = true;
|
|
||||||
private boolean usedWhileTargeting;
|
private boolean usedWhileTargeting;
|
||||||
|
|
||||||
|
private boolean disableCheckUsing;
|
||||||
|
private int disableCTicks;
|
||||||
|
|
||||||
public KillAura() {
|
public KillAura() {
|
||||||
super("KillAura", category.combat);
|
super("KillAura", category.combat);
|
||||||
this.registerSetting(aps = new SliderSetting("APS", 16.0, 1.0, 20.0, 0.5));
|
this.registerSetting(aps = new SliderSetting("APS", 16.0, 1.0, 20.0, 0.5));
|
||||||
|
|
@ -161,7 +163,7 @@ public class KillAura extends Module {
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
handleBlocking(false);
|
handleBlocking(false);
|
||||||
hitMap.clear();
|
hitMap.clear();
|
||||||
if (blinkAutoBlock()) { // interact autoblock
|
if (blinkAutoBlock() || autoBlockMode.getInput() == 2) { // interact autoblock
|
||||||
resetBlinkState(true);
|
resetBlinkState(true);
|
||||||
}
|
}
|
||||||
blinking.set(false);
|
blinking.set(false);
|
||||||
|
|
@ -206,7 +208,30 @@ public class KillAura extends Module {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onPreUpdate(PreUpdateEvent e) {
|
public void onPreUpdate(PreUpdateEvent e) {
|
||||||
|
if (!Utils.nullCheck()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (target != null && Mouse.isButtonDown(0)) {
|
||||||
|
swingItem();
|
||||||
|
}
|
||||||
|
if (checkUsing && disableCheckUsing && ++disableCTicks >= 2) {
|
||||||
|
checkUsing = false;
|
||||||
|
}
|
||||||
|
if (autoBlockOverride() && target != null) {
|
||||||
|
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), false);
|
||||||
|
}
|
||||||
|
if (target == null) {
|
||||||
|
if (checkUsing && Mouse.isButtonDown(1) && !blinkAutoBlock()) {
|
||||||
|
if (!sendUnBlock) {
|
||||||
|
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), true);
|
||||||
|
checkUsing = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!checkUsing) {
|
||||||
|
disableCheckUsing = false;
|
||||||
|
disableCTicks = 0;
|
||||||
|
}
|
||||||
if (blinkAutoBlock()) {
|
if (blinkAutoBlock()) {
|
||||||
EntityLivingBase g = Utils.raytrace(3);
|
EntityLivingBase g = Utils.raytrace(3);
|
||||||
/*if ((g != null || BlockUtils.isInteractable(mc.objectMouseOver)) && Utils.holdingSword()) {
|
/*if ((g != null || BlockUtils.isInteractable(mc.objectMouseOver)) && Utils.holdingSword()) {
|
||||||
|
|
@ -258,27 +283,32 @@ public class KillAura extends Module {
|
||||||
}
|
}
|
||||||
lastPressedLeft = pressedLeft;
|
lastPressedLeft = pressedLeft;
|
||||||
}
|
}
|
||||||
if (sendDig && ++unBlockDelay >= 2) {
|
|
||||||
if (target == null && !ModuleManager.bedAura.stopAutoblock && blocked) {
|
|
||||||
sendDigPacket();
|
|
||||||
}
|
|
||||||
sendDig = blocked = false;
|
|
||||||
unBlockDelay = 0;
|
|
||||||
}
|
|
||||||
delayTicks--;
|
delayTicks--;
|
||||||
if (sendUnBlock) {
|
if (sendUnBlock) {
|
||||||
if (Raven.packetsHandler.C07.get()) {
|
/*if (Raven.packetsHandler.C07.get()) {
|
||||||
sendUnBlock = false;
|
sendUnBlock = false;
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
if (!Utils.keybinds.isMouseDown(1)) {
|
/*if (unBlockDelay > 0) {
|
||||||
Reflection.setItemInUse(blockingClient = false);
|
++unBlockDelay;
|
||||||
|
if (unBlockDelay >= 3) {
|
||||||
|
unBlockDelay = 0;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}*/
|
||||||
|
if (!ModuleManager.bedAura.stopAutoblock) {
|
||||||
sendDigPacket();
|
sendDigPacket();
|
||||||
|
if (blockingClient) {
|
||||||
|
Reflection.setItemInUse(blockingClient = false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sendUnBlock = false;
|
sendUnBlock = false;
|
||||||
//Utils.print("Dig 2");
|
unBlockDelay = 0;
|
||||||
|
disableCheckUsing = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (ModuleManager.blink.isEnabled()) {
|
if (ModuleManager.blink.isEnabled()) {
|
||||||
if (blinking.get() || lag) {
|
if (blinking.get() || lag) {
|
||||||
resetBlinkState(true);
|
resetBlinkState(true);
|
||||||
|
|
@ -308,14 +338,6 @@ public class KillAura extends Module {
|
||||||
handleBlocking(false);
|
handleBlocking(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
double distanceToBB = getDistanceToBoundingBox(target);
|
|
||||||
boolean inBlockRange = distanceToBB <= blockRange.getInput();
|
|
||||||
if ((blinkAutoBlock() && !Utils.holdingSword()) || !inBlockRange) { // for blink autoblocks
|
|
||||||
if (blinking.get() || lag) {
|
|
||||||
resetBlinkState(true);
|
|
||||||
//Utils.print("2");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (delayTicks >= 0) {
|
if (delayTicks >= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -323,15 +345,28 @@ public class KillAura extends Module {
|
||||||
resetYaw();
|
resetYaw();
|
||||||
reset = false;
|
reset = false;
|
||||||
}
|
}
|
||||||
|
double distanceToBB = getDistanceToBoundingBox(target);
|
||||||
|
boolean inBlockRange = distanceToBB <= blockRange.getInput();
|
||||||
|
|
||||||
if (!autoBlockOverride() || !inBlockRange) { // regular swing & attack if autoblock isnt overriding or isnt in autoblock range
|
if (!autoBlockOverride() || !inBlockRange) { // regular swing & attack if autoblock isnt overriding or isnt in autoblock range
|
||||||
handleSwingAndAttack(distanceToBB, false);
|
handleSwingAndAttack(distanceToBB, false);
|
||||||
}
|
}
|
||||||
if (inBlockRange && autoBlockOverride() && manualBlock()) {
|
if (inBlockRange && autoBlockOverride()) {
|
||||||
handleAutoBlock(distanceToBB);
|
handleAutoBlock(distanceToBB);
|
||||||
|
if (manualBlock.isToggled()) {
|
||||||
|
handleBlocking(manualBlock());
|
||||||
|
} else {
|
||||||
|
handleBlocking(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (inBlockRange && manualBlock()) {
|
if (((blinkAutoBlock() || autoBlockMode.getInput() == 2) && !Utils.holdingSword()) || !inBlockRange || !manualBlock()) { // for blink autoblocks
|
||||||
handleBlocking(true);
|
if (blinking.get() || lag) {
|
||||||
|
resetBlinkState(true);
|
||||||
|
//Utils.print("2");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (mc.currentScreen == null || mc.currentScreen.allowUserInput) {
|
if (mc.currentScreen == null || mc.currentScreen.allowUserInput) {
|
||||||
boolean pressedRight = Mouse.isButtonDown(1);
|
boolean pressedRight = Mouse.isButtonDown(1);
|
||||||
if (pressedRight && !lastPressedRight) {
|
if (pressedRight && !lastPressedRight) {
|
||||||
|
|
@ -401,6 +436,9 @@ public class KillAura extends Module {
|
||||||
mc.thePlayer.rotationPitch = smoothedRotations[1];
|
mc.thePlayer.rotationPitch = smoothedRotations[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (target != null) {
|
||||||
|
checkUsing = true;
|
||||||
|
}
|
||||||
if (target != null && attackingEntity != null && inRange(target, attackRange.getInput())) {
|
if (target != null && attackingEntity != null && inRange(target, attackRange.getInput())) {
|
||||||
isTargeting = true;
|
isTargeting = true;
|
||||||
}
|
}
|
||||||
|
|
@ -447,7 +485,7 @@ public class KillAura extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onCustomMouse(int button, boolean state) {
|
public void onCustomMouse(int button, boolean state) {
|
||||||
if (blinkAutoBlock() || autoBlockMode.getInput() == 3) {
|
if (autoBlockOverride() || target == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (button == 1) {
|
if (button == 1) {
|
||||||
|
|
@ -714,11 +752,11 @@ public class KillAura extends Module {
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (blinkAutoBlock() && target == null) {
|
if (target == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (autoBlockMode.getInput() != previousAutoBlockMode) {
|
if (autoBlockMode.getInput() != previousAutoBlockMode) {
|
||||||
if (previousAutoBlockMode == 3 || previousAutoBlockMode == 4 || previousAutoBlockMode == 5 || previousAutoBlockMode == 6) { // if == interact
|
if (previousAutoBlockMode == 2 || previousAutoBlockMode == 3 || previousAutoBlockMode == 4 || previousAutoBlockMode == 5 || previousAutoBlockMode == 6) { // if == interact
|
||||||
resetBlinkState(true);
|
resetBlinkState(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -731,19 +769,7 @@ public class KillAura extends Module {
|
||||||
this.blockingClient = blockState;
|
this.blockingClient = blockState;
|
||||||
break;
|
break;
|
||||||
case 2: // partial
|
case 2: // partial
|
||||||
if (!blockState) {
|
Reflection.setItemInUse(this.blockingClient = ModuleUtils.isBlocked);
|
||||||
rightClick(partialDown = false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
partialTicks++;
|
|
||||||
if (partialDown) {
|
|
||||||
rightClick(partialDown = false);
|
|
||||||
partialTicks = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else if (partialTicks == 2) {
|
|
||||||
rightClick(partialDown = true);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 3: // interact a
|
case 3: // interact a
|
||||||
case 4: // interact b
|
case 4: // interact b
|
||||||
|
|
@ -769,7 +795,7 @@ public class KillAura extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean autoBlockOverride() {
|
public boolean autoBlockOverride() {
|
||||||
return blinkAutoBlock() && Utils.holdingSword();
|
return (blinkAutoBlock() || autoBlockMode.getInput() == 2) && Utils.holdingSword() && manualBlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean blinkAutoBlock() {
|
public boolean blinkAutoBlock() {
|
||||||
|
|
@ -805,6 +831,24 @@ public class KillAura extends Module {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch ((int) autoBlockMode.getInput()) {
|
switch ((int) autoBlockMode.getInput()) {
|
||||||
|
case 2: // partial
|
||||||
|
if (interactTicks >= 3) {
|
||||||
|
interactTicks = 0;
|
||||||
|
}
|
||||||
|
interactTicks++;
|
||||||
|
switch (interactTicks) {
|
||||||
|
case 1:
|
||||||
|
if (ModuleUtils.isBlocked) {
|
||||||
|
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
handleInteractAndAttack(distance, true, true, swung);
|
||||||
|
sendBlockPacket();
|
||||||
|
lag = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 3: // interact a
|
case 3: // interact a
|
||||||
if (interactTicks >= 2) {
|
if (interactTicks >= 2) {
|
||||||
interactTicks = 0;
|
interactTicks = 0;
|
||||||
|
|
@ -813,15 +857,13 @@ public class KillAura extends Module {
|
||||||
switch (interactTicks) {
|
switch (interactTicks) {
|
||||||
case 1:
|
case 1:
|
||||||
blinking.set(true);
|
blinking.set(true);
|
||||||
if (lag) {
|
if (ModuleUtils.isBlocked) {
|
||||||
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
||||||
blocked = false;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
handleInteractAndAttack(distance, true, true, swung);
|
handleInteractAndAttack(distance, true, true, swung);
|
||||||
sendBlockPacket();
|
sendBlockPacket();
|
||||||
blocked = true;
|
|
||||||
releasePackets(); // release
|
releasePackets(); // release
|
||||||
lag = true;
|
lag = true;
|
||||||
break;
|
break;
|
||||||
|
|
@ -837,7 +879,6 @@ public class KillAura extends Module {
|
||||||
blinking.set(true);
|
blinking.set(true);
|
||||||
if (lag) {
|
if (lag) {
|
||||||
setSwapSlot();
|
setSwapSlot();
|
||||||
blocked = false;
|
|
||||||
swapped = true;
|
swapped = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -848,7 +889,6 @@ public class KillAura extends Module {
|
||||||
}
|
}
|
||||||
handleInteractAndAttack(distance, true, true, swung);
|
handleInteractAndAttack(distance, true, true, swung);
|
||||||
sendBlockPacket();
|
sendBlockPacket();
|
||||||
blocked = true;
|
|
||||||
releasePackets(); // release
|
releasePackets(); // release
|
||||||
lag = true;
|
lag = true;
|
||||||
break;
|
break;
|
||||||
|
|
@ -862,16 +902,15 @@ public class KillAura extends Module {
|
||||||
switch (interactTicks) {
|
switch (interactTicks) {
|
||||||
case 1:
|
case 1:
|
||||||
blinking.set(true);
|
blinking.set(true);
|
||||||
if (blocked) {
|
if (ModuleUtils.isBlocked) {
|
||||||
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
||||||
blocked = false;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
handleInteractAndAttack(distance, true, true, swung);
|
handleInteractAndAttack(distance, true, true, swung);
|
||||||
sendBlockPacket();
|
sendBlockPacket();
|
||||||
blocked = true;
|
|
||||||
releasePackets(); // release
|
releasePackets(); // release
|
||||||
|
lag = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -884,15 +923,13 @@ public class KillAura extends Module {
|
||||||
switch (interactTicks) {
|
switch (interactTicks) {
|
||||||
case 1:
|
case 1:
|
||||||
blinking.set(true);
|
blinking.set(true);
|
||||||
if (blocked) {
|
if (ModuleUtils.isBlocked) {
|
||||||
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
||||||
blocked = false;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
handleInteractAndAttack(distance, true, true, swung);
|
handleInteractAndAttack(distance, true, true, swung);
|
||||||
sendBlockPacket();
|
sendBlockPacket();
|
||||||
blocked = true;
|
|
||||||
releasePackets();
|
releasePackets();
|
||||||
firstCycle = false;
|
firstCycle = false;
|
||||||
lag = true;
|
lag = true;
|
||||||
|
|
@ -903,15 +940,13 @@ public class KillAura extends Module {
|
||||||
switch (interactTicks) {
|
switch (interactTicks) {
|
||||||
case 1:
|
case 1:
|
||||||
blinking.set(true);
|
blinking.set(true);
|
||||||
if (blocked) {
|
if (ModuleUtils.isBlocked) {
|
||||||
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
||||||
blocked = false;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
handleInteractAndAttack(distance, true, true, swung);
|
handleInteractAndAttack(distance, true, true, swung);
|
||||||
sendBlockPacket();
|
sendBlockPacket();
|
||||||
blocked = true;
|
|
||||||
releasePackets();
|
releasePackets();
|
||||||
interactTicks = 0;
|
interactTicks = 0;
|
||||||
firstCycle = true;
|
firstCycle = true;
|
||||||
|
|
@ -1149,8 +1184,9 @@ public class KillAura extends Module {
|
||||||
mc.thePlayer.sendQueue.addToSendQueue(new C09PacketHeldItemChange(mc.thePlayer.inventory.currentItem));
|
mc.thePlayer.sendQueue.addToSendQueue(new C09PacketHeldItemChange(mc.thePlayer.inventory.currentItem));
|
||||||
Raven.packetsHandler.playerSlot.set(mc.thePlayer.inventory.currentItem);
|
Raven.packetsHandler.playerSlot.set(mc.thePlayer.inventory.currentItem);
|
||||||
}
|
}
|
||||||
else if (unblock && lag && !ModuleManager.scaffold.isEnabled) {
|
else if (unblock && ModuleUtils.isBlocked && !ModuleManager.scaffold.isEnabled) {
|
||||||
sendDig = true;
|
unBlockDelay = 1;
|
||||||
|
sendUnBlock = true;
|
||||||
}
|
}
|
||||||
swapped = false;
|
swapped = false;
|
||||||
lag = false;
|
lag = false;
|
||||||
|
|
@ -1159,7 +1195,7 @@ public class KillAura extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendDigPacket() {
|
public void sendDigPacket() {
|
||||||
if (!Utils.holdingSword()) {
|
if (!Utils.holdingSword() || !ModuleUtils.isBlocked) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
||||||
|
|
@ -1233,7 +1269,7 @@ public class KillAura extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean manualBlock() {
|
private boolean manualBlock() {
|
||||||
return !manualBlock.isToggled() || Mouse.isButtonDown(1);
|
return (!manualBlock.isToggled() || Mouse.isButtonDown(1) && Utils.tabbedIn()) && Utils.holdingSword();
|
||||||
}
|
}
|
||||||
|
|
||||||
static class KillAuraTarget {
|
static class KillAuraTarget {
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ public class NoSlow extends Module {
|
||||||
if (!canFloat) {
|
if (!canFloat) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
e.setPosY(e.getPosY() + 1E-11);
|
e.setPosY(e.getPosY() + ModuleUtils.offsetValue);
|
||||||
noSlowing = true;
|
noSlowing = true;
|
||||||
if (groundSpeedOption.isToggled()) {
|
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 && Utils.isMoving() && mc.thePlayer.onGround) {
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,6 @@ public class NoFall extends Module {
|
||||||
Utils.getTimer().timerSpeed = (float) 0.72;
|
Utils.getTimer().timerSpeed = (float) 0.72;
|
||||||
mc.getNetHandler().addToSendQueue(new C03PacketPlayer(true));
|
mc.getNetHandler().addToSendQueue(new C03PacketPlayer(true));
|
||||||
initialY = mc.thePlayer.posY;
|
initialY = mc.thePlayer.posY;
|
||||||
edging = "nofall packet";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isFalling && mode.getInput() == 3) {
|
if (isFalling && mode.getInput() == 3) {
|
||||||
|
|
@ -88,7 +87,6 @@ public class NoFall extends Module {
|
||||||
if (distanceFallen >= 3) {
|
if (distanceFallen >= 3) {
|
||||||
mc.getNetHandler().addToSendQueue(new C03PacketPlayer(true));
|
mc.getNetHandler().addToSendQueue(new C03PacketPlayer(true));
|
||||||
initialY = mc.thePlayer.posY;
|
initialY = mc.thePlayer.posY;
|
||||||
edging = "nofall packet";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
edging += " " + dynamic;
|
edging += " " + dynamic;
|
||||||
|
|
@ -129,7 +127,7 @@ public class NoFall extends Module {
|
||||||
if (mc.thePlayer.onGround) {
|
if (mc.thePlayer.onGround) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (BlockUtils.getBlock(new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY- 1, mc.thePlayer.posZ)) != Blocks.air) {
|
if (BlockUtils.getBlock(new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY - 1, mc.thePlayer.posZ)) != Blocks.air) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (mc.thePlayer.motionY > -0.0784) {
|
if (mc.thePlayer.motionY > -0.0784) {
|
||||||
|
|
@ -138,7 +136,7 @@ public class NoFall extends Module {
|
||||||
if (mc.thePlayer.capabilities.isCreativeMode) {
|
if (mc.thePlayer.capabilities.isCreativeMode) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (isVoid() && mc.thePlayer.posY <= 40) {
|
if (isVoid() && mc.thePlayer.posY <= 41) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (mc.thePlayer.capabilities.isFlying) {
|
if (mc.thePlayer.capabilities.isFlying) {
|
||||||
|
|
|
||||||
|
|
@ -215,7 +215,7 @@ public class Scaffold extends Module {
|
||||||
floatKeepY = false;
|
floatKeepY = false;
|
||||||
startYPos = -1;
|
startYPos = -1;
|
||||||
if (moduleEnabled) {
|
if (moduleEnabled) {
|
||||||
e.setPosY(e.getPosY() + 1E-11);
|
e.setPosY(e.getPosY() + ModuleUtils.offsetValue);
|
||||||
if (Utils.isMoving()) Utils.setSpeed(getFloatSpeed(getSpeedLevel()));
|
if (Utils.isMoving()) Utils.setSpeed(getFloatSpeed(getSpeedLevel()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -306,14 +306,17 @@ public class Scaffold extends Module {
|
||||||
if (blockRotations != null) {
|
if (blockRotations != null) {
|
||||||
blockYaw = blockRotations[0];
|
blockYaw = blockRotations[0];
|
||||||
pitch = blockRotations[1];
|
pitch = blockRotations[1];
|
||||||
if (pitch < 78.750F && Utils.getHorizontalSpeed() < 0.5) {
|
if (pitch < 79.150F && Utils.getHorizontalSpeed() < 0.5) {
|
||||||
pitch = 78.750F;
|
pitch = 79.150F;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
firstStroke = 0;
|
firstStroke = 0;
|
||||||
|
yawOffset = 40;
|
||||||
|
lastYawOffset = 50;
|
||||||
blockYaw = 0;
|
blockYaw = 0;
|
||||||
pitch = 78.750F;
|
pitch = 79.150F;
|
||||||
}
|
}
|
||||||
|
//Utils.print("" + pitch);
|
||||||
|
|
||||||
if (firstStroke > 0 && (System.currentTimeMillis() - firstStroke) > 250) {
|
if (firstStroke > 0 && (System.currentTimeMillis() - firstStroke) > 250) {
|
||||||
firstStroke = 0;
|
firstStroke = 0;
|
||||||
|
|
@ -328,8 +331,8 @@ public class Scaffold extends Module {
|
||||||
float firstStraight = 64.50f;
|
float firstStraight = 64.50f;
|
||||||
float secondStraight = 60.50f;
|
float secondStraight = 60.50f;
|
||||||
float thirdStraight = 54.50f;
|
float thirdStraight = 54.50f;
|
||||||
float firstDiag = 51.50f;
|
float firstDiag = 50.50f;
|
||||||
float secondDiag = 47.50f;
|
float secondDiag = 45.50f;
|
||||||
float thirdDiag = 41.50f;
|
float thirdDiag = 41.50f;
|
||||||
float fourthDiag = 34.50f;
|
float fourthDiag = 34.50f;
|
||||||
|
|
||||||
|
|
@ -440,7 +443,12 @@ public class Scaffold extends Module {
|
||||||
if (blockRotations != null) {
|
if (blockRotations != null) {
|
||||||
e.setYaw(blockRotations[0]);
|
e.setYaw(blockRotations[0]);
|
||||||
}
|
}
|
||||||
e.setPitch(ModuleManager.tower.pitch);
|
if (ModuleManager.tower.yaw != 0) {
|
||||||
|
e.setYaw(ModuleManager.tower.yaw);
|
||||||
|
}
|
||||||
|
if (ModuleManager.tower.pitch != 0) {
|
||||||
|
e.setPitch(ModuleManager.tower.pitch);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//pitch fix
|
//pitch fix
|
||||||
|
|
@ -509,11 +517,11 @@ public class Scaffold extends Module {
|
||||||
|
|
||||||
|
|
||||||
if (disabledModule) {
|
if (disabledModule) {
|
||||||
if (hasPlaced && (ModuleManager.tower.canTower() && (ModuleManager.tower.dCount == 0 || !Utils.isMoving()) || floatStarted && Utils.isMoving())) {
|
if (hasPlaced && (ModuleManager.tower.canTower() && (ModuleManager.tower.dCount == 0 || !Utils.isMoving()) || floatStarted && Utils.isMoving() && Utils.onEdge())) {
|
||||||
dontDisable = true;
|
dontDisable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dontDisable && ++disableTicks >= 3) {
|
if (dontDisable && ++disableTicks >= 2) {
|
||||||
isEnabled = false;
|
isEnabled = false;
|
||||||
//Utils.print("Extra tick");
|
//Utils.print("Extra tick");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,19 +5,13 @@ import keystrokesmod.event.PreMotionEvent;
|
||||||
import keystrokesmod.event.SendPacketEvent;
|
import keystrokesmod.event.SendPacketEvent;
|
||||||
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.DescriptionSetting;
|
|
||||||
import keystrokesmod.module.setting.impl.SliderSetting;
|
import keystrokesmod.module.setting.impl.SliderSetting;
|
||||||
import keystrokesmod.utility.Utils;
|
import keystrokesmod.utility.Utils;
|
||||||
import net.minecraft.network.Packet;
|
|
||||||
import net.minecraft.network.handshake.client.C00Handshake;
|
|
||||||
import net.minecraft.network.login.client.C00PacketLoginStart;
|
|
||||||
import net.minecraft.network.play.client.*;
|
import net.minecraft.network.play.client.*;
|
||||||
import net.minecraft.potion.PotionEffect;
|
import net.minecraft.potion.PotionEffect;
|
||||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
import org.lwjgl.input.Keyboard;
|
|
||||||
|
|
||||||
public class Tower extends Module {
|
public class Tower extends Module {
|
||||||
final private SliderSetting towerMove;
|
final private SliderSetting towerMove;
|
||||||
|
|
@ -34,6 +28,7 @@ public class Tower extends Module {
|
||||||
private boolean hasTowered, startedTowerInAir, setLowMotion, firstJump;
|
private boolean hasTowered, startedTowerInAir, setLowMotion, firstJump;
|
||||||
private int cMotionTicks, placeTicks;
|
private int cMotionTicks, placeTicks;
|
||||||
public int dCount;
|
public int dCount;
|
||||||
|
public float yaw;
|
||||||
|
|
||||||
public float pitch;
|
public float pitch;
|
||||||
|
|
||||||
|
|
@ -177,14 +172,17 @@ public class Tower extends Module {
|
||||||
if (aligning && (int) mc.thePlayer.posX > firstX) {
|
if (aligning && (int) mc.thePlayer.posX > firstX) {
|
||||||
aligned = true;
|
aligned = true;
|
||||||
}
|
}
|
||||||
pitch = 85F;
|
yaw = 80F;
|
||||||
|
pitch = 0;
|
||||||
}
|
}
|
||||||
if (aligned) {
|
if (aligned) {
|
||||||
if (placed) {
|
if (placed) {
|
||||||
|
yaw = 0;
|
||||||
pitch = 89.9F;
|
pitch = 89.9F;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
pitch = 85F;
|
yaw = 80F;
|
||||||
|
pitch = 0;
|
||||||
}
|
}
|
||||||
placeExtraBlock = true;
|
placeExtraBlock = true;
|
||||||
mc.thePlayer.motionX = 0;
|
mc.thePlayer.motionX = 0;
|
||||||
|
|
@ -194,6 +192,7 @@ public class Tower extends Module {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
yaw = pitch = 0;
|
||||||
aligning = aligned = placed = false;
|
aligning = aligned = placed = false;
|
||||||
firstX = 0;
|
firstX = 0;
|
||||||
placeExtraBlock = false;
|
placeExtraBlock = false;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package keystrokesmod.utility;
|
package keystrokesmod.utility;
|
||||||
|
|
||||||
|
import keystrokesmod.event.NoEventPacketEvent;
|
||||||
import keystrokesmod.event.PreMotionEvent;
|
import keystrokesmod.event.PreMotionEvent;
|
||||||
import keystrokesmod.event.PreUpdateEvent;
|
import keystrokesmod.event.PreUpdateEvent;
|
||||||
import keystrokesmod.event.SendPacketEvent;
|
import keystrokesmod.event.SendPacketEvent;
|
||||||
|
|
@ -7,8 +8,8 @@ import keystrokesmod.module.impl.movement.LongJump;
|
||||||
import keystrokesmod.module.impl.render.HUD;
|
import keystrokesmod.module.impl.render.HUD;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import keystrokesmod.module.ModuleManager;
|
import keystrokesmod.module.ModuleManager;
|
||||||
import net.minecraft.network.play.client.C07PacketPlayerDigging;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement;
|
import net.minecraft.network.play.client.*;
|
||||||
import net.minecraft.util.BlockPos;
|
import net.minecraft.util.BlockPos;
|
||||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||||
|
|
@ -33,9 +34,61 @@ public class ModuleUtils {
|
||||||
public static int fadeEdge;
|
public static int fadeEdge;
|
||||||
public static int lastFaceDifference;
|
public static int lastFaceDifference;
|
||||||
private int lastFace;
|
private int lastFace;
|
||||||
|
public static float offsetValue = 1E-13F;
|
||||||
|
|
||||||
|
|
||||||
|
public static boolean isBlocked;
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void onSendPacketNoEvent(NoEventPacketEvent e) {
|
||||||
|
if (!Utils.nullCheck()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// isBlocked
|
||||||
|
EntityLivingBase g = Utils.raytrace(3);
|
||||||
|
|
||||||
|
if (e.getPacket() instanceof C08PacketPlayerBlockPlacement && Utils.holdingSword() && !BlockUtils.isInteractable(mc.objectMouseOver) && !isBlocked) {
|
||||||
|
isBlocked = true;
|
||||||
|
}
|
||||||
|
else if (e.getPacket() instanceof C07PacketPlayerDigging && isBlocked) {
|
||||||
|
isBlocked = false;
|
||||||
|
}
|
||||||
|
else if (e.getPacket() instanceof C09PacketHeldItemChange && isBlocked) {
|
||||||
|
isBlocked = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onSendPacket(SendPacketEvent e) {
|
public void onSendPacket(SendPacketEvent e) {
|
||||||
|
if (!Utils.nullCheck()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// isBlocked
|
||||||
|
EntityLivingBase g = Utils.raytrace(3);
|
||||||
|
|
||||||
|
if (e.getPacket() instanceof C08PacketPlayerBlockPlacement && Utils.holdingSword() && !BlockUtils.isInteractable(mc.objectMouseOver) && !isBlocked) {
|
||||||
|
isBlocked = true;
|
||||||
|
}
|
||||||
|
else if (e.getPacket() instanceof C07PacketPlayerDigging && isBlocked) {
|
||||||
|
isBlocked = false;
|
||||||
|
}
|
||||||
|
else if (e.getPacket() instanceof C09PacketHeldItemChange && isBlocked) {
|
||||||
|
isBlocked = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (e.getPacket() instanceof C07PacketPlayerDigging) {
|
if (e.getPacket() instanceof C07PacketPlayerDigging) {
|
||||||
isBreaking = true;
|
isBreaking = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue