diff --git a/.gradle/8.8/checksums/checksums.lock b/.gradle/8.8/checksums/checksums.lock
index 542c275..56a5a06 100644
Binary files a/.gradle/8.8/checksums/checksums.lock and b/.gradle/8.8/checksums/checksums.lock differ
diff --git a/.gradle/8.8/executionHistory/executionHistory.bin b/.gradle/8.8/executionHistory/executionHistory.bin
index 63da980..7f04cc1 100644
Binary files a/.gradle/8.8/executionHistory/executionHistory.bin and b/.gradle/8.8/executionHistory/executionHistory.bin differ
diff --git a/.gradle/8.8/executionHistory/executionHistory.lock b/.gradle/8.8/executionHistory/executionHistory.lock
index a7b41e1..284b108 100644
Binary files a/.gradle/8.8/executionHistory/executionHistory.lock and b/.gradle/8.8/executionHistory/executionHistory.lock differ
diff --git a/.gradle/8.8/fileHashes/fileHashes.bin b/.gradle/8.8/fileHashes/fileHashes.bin
index 3248354..9526806 100644
Binary files a/.gradle/8.8/fileHashes/fileHashes.bin and b/.gradle/8.8/fileHashes/fileHashes.bin differ
diff --git a/.gradle/8.8/fileHashes/fileHashes.lock b/.gradle/8.8/fileHashes/fileHashes.lock
index 5153027..f99b2f0 100644
Binary files a/.gradle/8.8/fileHashes/fileHashes.lock and b/.gradle/8.8/fileHashes/fileHashes.lock differ
diff --git a/.gradle/8.8/fileHashes/resourceHashesCache.bin b/.gradle/8.8/fileHashes/resourceHashesCache.bin
index 3f0f7a3..3212fa7 100644
Binary files a/.gradle/8.8/fileHashes/resourceHashesCache.bin and b/.gradle/8.8/fileHashes/resourceHashesCache.bin differ
diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock
index 6ae0612..ee28ada 100644
Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ
diff --git a/.gradle/file-system.probe b/.gradle/file-system.probe
index 8e68085..e06fabe 100644
Binary files a/.gradle/file-system.probe and b/.gradle/file-system.probe differ
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 35d2398..b4497ad 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -14,17 +14,35 @@
-
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
-
-
+
+
+
+
+
+
-
+
+
+
+
+
@@ -183,14 +201,6 @@
1736536952705
-
-
- 1737438432192
-
-
-
- 1737438432192
-
1737438489541
@@ -575,7 +585,15 @@
1746241615818
-
+
+
+ 1746426910094
+
+
+
+ 1746426910094
+
+
diff --git a/build/classes/java/main/keystrokesmod/module/impl/combat/Velocity.class b/build/classes/java/main/keystrokesmod/module/impl/combat/Velocity.class
index 1c30f61..9a52bc4 100644
Binary files a/build/classes/java/main/keystrokesmod/module/impl/combat/Velocity.class and b/build/classes/java/main/keystrokesmod/module/impl/combat/Velocity.class differ
diff --git a/build/classes/java/main/keystrokesmod/module/impl/movement/TargetStrafe.class b/build/classes/java/main/keystrokesmod/module/impl/movement/TargetStrafe.class
index 24cbeab..779fc14 100644
Binary files a/build/classes/java/main/keystrokesmod/module/impl/movement/TargetStrafe.class and b/build/classes/java/main/keystrokesmod/module/impl/movement/TargetStrafe.class differ
diff --git a/build/classes/java/main/keystrokesmod/module/impl/player/AntiVoid.class b/build/classes/java/main/keystrokesmod/module/impl/player/AntiVoid.class
index a119db4..d395217 100644
Binary files a/build/classes/java/main/keystrokesmod/module/impl/player/AntiVoid.class and b/build/classes/java/main/keystrokesmod/module/impl/player/AntiVoid.class differ
diff --git a/build/classes/java/main/keystrokesmod/module/impl/player/BedAura.class b/build/classes/java/main/keystrokesmod/module/impl/player/BedAura.class
index cd5d8c1..884ec9f 100644
Binary files a/build/classes/java/main/keystrokesmod/module/impl/player/BedAura.class and b/build/classes/java/main/keystrokesmod/module/impl/player/BedAura.class differ
diff --git a/build/classes/java/main/keystrokesmod/module/impl/player/Disabler.class b/build/classes/java/main/keystrokesmod/module/impl/player/Disabler.class
index 5276ba7..97330a0 100644
Binary files a/build/classes/java/main/keystrokesmod/module/impl/player/Disabler.class and b/build/classes/java/main/keystrokesmod/module/impl/player/Disabler.class differ
diff --git a/build/classes/java/main/keystrokesmod/module/impl/player/NoFall.class b/build/classes/java/main/keystrokesmod/module/impl/player/NoFall.class
index a84ac32..996a184 100644
Binary files a/build/classes/java/main/keystrokesmod/module/impl/player/NoFall.class and b/build/classes/java/main/keystrokesmod/module/impl/player/NoFall.class differ
diff --git a/build/classes/java/main/keystrokesmod/module/impl/player/Scaffold$1.class b/build/classes/java/main/keystrokesmod/module/impl/player/Scaffold$1.class
index 6097243..8a90db0 100644
Binary files a/build/classes/java/main/keystrokesmod/module/impl/player/Scaffold$1.class and b/build/classes/java/main/keystrokesmod/module/impl/player/Scaffold$1.class differ
diff --git a/build/classes/java/main/keystrokesmod/module/impl/player/Scaffold$PlaceData.class b/build/classes/java/main/keystrokesmod/module/impl/player/Scaffold$PlaceData.class
index 7e8058c..c403f94 100644
Binary files a/build/classes/java/main/keystrokesmod/module/impl/player/Scaffold$PlaceData.class and b/build/classes/java/main/keystrokesmod/module/impl/player/Scaffold$PlaceData.class differ
diff --git a/build/classes/java/main/keystrokesmod/module/impl/player/Scaffold.class b/build/classes/java/main/keystrokesmod/module/impl/player/Scaffold.class
index 2b69173..7e7daf4 100644
Binary files a/build/classes/java/main/keystrokesmod/module/impl/player/Scaffold.class and b/build/classes/java/main/keystrokesmod/module/impl/player/Scaffold.class differ
diff --git a/build/classes/java/main/keystrokesmod/module/impl/player/WaterBucket.class b/build/classes/java/main/keystrokesmod/module/impl/player/WaterBucket.class
index 9fbb5c0..2cee150 100644
Binary files a/build/classes/java/main/keystrokesmod/module/impl/player/WaterBucket.class and b/build/classes/java/main/keystrokesmod/module/impl/player/WaterBucket.class differ
diff --git a/build/classes/java/main/keystrokesmod/module/impl/render/Shaders.class b/build/classes/java/main/keystrokesmod/module/impl/render/Shaders.class
index ac58339..580045c 100644
Binary files a/build/classes/java/main/keystrokesmod/module/impl/render/Shaders.class and b/build/classes/java/main/keystrokesmod/module/impl/render/Shaders.class differ
diff --git a/build/classes/java/main/keystrokesmod/module/impl/render/Trajectories.class b/build/classes/java/main/keystrokesmod/module/impl/render/Trajectories.class
index 159d3ab..9d77785 100644
Binary files a/build/classes/java/main/keystrokesmod/module/impl/render/Trajectories.class and b/build/classes/java/main/keystrokesmod/module/impl/render/Trajectories.class differ
diff --git a/build/classes/java/main/keystrokesmod/utility/ModuleUtils.class b/build/classes/java/main/keystrokesmod/utility/ModuleUtils.class
index f2dc36e..f21b588 100644
Binary files a/build/classes/java/main/keystrokesmod/utility/ModuleUtils.class and b/build/classes/java/main/keystrokesmod/utility/ModuleUtils.class differ
diff --git a/build/classes/java/main/keystrokesmod/utility/Utils.class b/build/classes/java/main/keystrokesmod/utility/Utils.class
index 2d7b335..661829a 100644
Binary files a/build/classes/java/main/keystrokesmod/utility/Utils.class and b/build/classes/java/main/keystrokesmod/utility/Utils.class differ
diff --git a/build/intermediates/raven-bS-13-non-obfuscated-with-deps.jar b/build/intermediates/raven-bS-13-non-obfuscated-with-deps.jar
index 782d455..9d6c1bd 100644
Binary files a/build/intermediates/raven-bS-13-non-obfuscated-with-deps.jar and b/build/intermediates/raven-bS-13-non-obfuscated-with-deps.jar differ
diff --git a/build/intermediates/raven-bS-13-without-deps.jar b/build/intermediates/raven-bS-13-without-deps.jar
index 145e2f2..8bf61bd 100644
Binary files a/build/intermediates/raven-bS-13-without-deps.jar and b/build/intermediates/raven-bS-13-without-deps.jar differ
diff --git a/build/tmp/compileJava/previous-compilation-data.bin b/build/tmp/compileJava/previous-compilation-data.bin
index f165252..dcdb685 100644
Binary files a/build/tmp/compileJava/previous-compilation-data.bin and b/build/tmp/compileJava/previous-compilation-data.bin differ
diff --git a/src/main/java/keystrokesmod/module/impl/combat/Velocity.java b/src/main/java/keystrokesmod/module/impl/combat/Velocity.java
index 746b496..578714d 100644
--- a/src/main/java/keystrokesmod/module/impl/combat/Velocity.java
+++ b/src/main/java/keystrokesmod/module/impl/combat/Velocity.java
@@ -26,7 +26,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
public class Velocity extends Module {
public SliderSetting velocityModes;
- public static SliderSetting vertical, horizontal, reverseHorizontal, explosionsHorizontal, explosionsVertical;
+ public static SliderSetting vertical, horizontal, reverseHorizontal, explosionsHorizontal, explosionsVertical, verticalM;
public static SliderSetting minExtraSpeed, extraSpeedBoost;
private SliderSetting chance;
private ButtonSetting onlyWhileAttacking;
@@ -49,6 +49,7 @@ public class Velocity extends Module {
this.registerSetting(velocityModes = new SliderSetting("Mode", 0, velocityModesString));
this.registerSetting(horizontal = new SliderSetting("Horizontal", 0.0, 0.0, 100.0, 1.0));
this.registerSetting(vertical = new SliderSetting("Vertical", 0.0, 0.0, 100.0, 1.0));
+ this.registerSetting(verticalM = new SliderSetting("Vertical Motion Limit", 1.0, -1.0, 1, 0.1));
this.registerSetting(reverseHorizontal = new SliderSetting("-Horizontal", 0.0, 0.0, 100.0, 1.0));
@@ -87,6 +88,7 @@ public class Velocity extends Module {
this.horizontal.setVisible(velocityModes.getInput() != 2, this);
this.vertical.setVisible(velocityModes.getInput() != 2, this);
+ this.verticalM.setVisible(velocityModes.getInput() == 1, this);
this.chance.setVisible(velocityModes.getInput() != 2, this);
this.reverseHorizontal.setVisible(velocityModes.getInput() == 2, this);
@@ -242,8 +244,8 @@ public class Velocity extends Module {
}
}
- private boolean dontEditMotion() {
- if (velocityModes.getInput() == 1 && zzWhileNotTargeting.isToggled() && KillAura.attackingEntity != null || ModuleManager.noFall.start || ModuleManager.blink.isEnabled() && ModuleManager.blink.cancelKnockback.isToggled() || ModuleManager.bedAura.cancelKnockback() || ModuleManager.tower.cancelKnockback()) {
+ public boolean dontEditMotion() {
+ if (mc.thePlayer.motionY >= verticalM.getInput() && !mc.thePlayer.onGround || velocityModes.getInput() == 1 && zzWhileNotTargeting.isToggled() && KillAura.attackingEntity != null || ModuleManager.noFall.start || ModuleManager.blink.isEnabled() && ModuleManager.blink.cancelKnockback.isToggled() || ModuleManager.bedAura.cancelKnockback() || ModuleManager.tower.cancelKnockback()) {
return true;
}
return false;
diff --git a/src/main/java/keystrokesmod/module/impl/movement/TargetStrafe.java b/src/main/java/keystrokesmod/module/impl/movement/TargetStrafe.java
index 70c6fff..8de83f3 100644
--- a/src/main/java/keystrokesmod/module/impl/movement/TargetStrafe.java
+++ b/src/main/java/keystrokesmod/module/impl/movement/TargetStrafe.java
@@ -16,18 +16,22 @@ import keystrokesmod.utility.Utils;
import net.minecraft.entity.EntityLivingBase;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+import org.lwjgl.input.Mouse;
public class TargetStrafe extends Module {
private ButtonSetting requireBhop;
private ButtonSetting requireJump;
+ private ButtonSetting requireRMB;
+ private SliderSetting radius;
private double angle;
- private float radius = 0.6f;
public TargetStrafe() {
super("TargetStrafe", category.movement);
this.registerSetting(requireBhop = new ButtonSetting("Require bhop", false));
this.registerSetting(requireJump = new ButtonSetting("Require jump key", false));
+ this.registerSetting(requireRMB = new ButtonSetting("Require RMB", false));
+ this.registerSetting(radius = new SliderSetting("Radius", 0.6, 0, 3, 0.1));
}
public void guiUpdate() {
@@ -47,6 +51,9 @@ public class TargetStrafe extends Module {
if (requireJump.isToggled() && !Utils.jumpDown()) {
return;
}
+ if (requireRMB.isToggled() && !Mouse.isButtonDown(1)) {
+ return;
+ }
if (ModuleManager.scaffold.isEnabled) {
return;
}
@@ -56,8 +63,8 @@ public class TargetStrafe extends Module {
EntityLivingBase targetPosition = KillAura.target;
angle += 1;
- double offsetX = radius * Math.cos(angle);
- double offsetZ = radius * Math.sin(angle);
+ double offsetX = ((float) radius.getInput()) * Math.cos(angle);
+ double offsetZ = ((float) radius.getInput()) * Math.sin(angle);
double directionX = targetPosition.getPosition().getX() + offsetX - mc.thePlayer.posX;
double directionZ = targetPosition.getPosition().getZ() + offsetZ - mc.thePlayer.posZ;
double magnitude = Math.sqrt(directionX * directionX + directionZ * directionZ);
diff --git a/src/main/java/keystrokesmod/module/impl/player/AntiVoid.java b/src/main/java/keystrokesmod/module/impl/player/AntiVoid.java
index c475488..a75cfe0 100644
--- a/src/main/java/keystrokesmod/module/impl/player/AntiVoid.java
+++ b/src/main/java/keystrokesmod/module/impl/player/AntiVoid.java
@@ -165,7 +165,7 @@ public class AntiVoid extends Module {
}
public boolean dist() {
- double minMotion = 0.08;
+ double minMotion = 0.1;
int dist1 = 4;
int dist2 = 6;
int dist3 = 7;
diff --git a/src/main/java/keystrokesmod/module/impl/player/BedAura.java b/src/main/java/keystrokesmod/module/impl/player/BedAura.java
index 2748db9..68e49a1 100644
--- a/src/main/java/keystrokesmod/module/impl/player/BedAura.java
+++ b/src/main/java/keystrokesmod/module/impl/player/BedAura.java
@@ -186,6 +186,13 @@ public class BedAura extends Module {
}
}
+ if (groundSpoof.isToggled() && !mc.thePlayer.isInWater() && spoofGround) {
+ e.setOnGround(true);
+ if (Raven.debug) {
+ Utils.sendModuleMessage(this, "&7ground spoof (&3" + mc.thePlayer.ticksExisted + "&7).");
+ }
+ }
+
if (startPacket) {
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.START_DESTROY_BLOCK, packetPos, EnumFacing.UP));
swing();
@@ -204,13 +211,6 @@ public class BedAura extends Module {
swing();
}
- if (groundSpoof.isToggled() && !mc.thePlayer.isInWater() && spoofGround) {
- e.setOnGround(true);
- if (Raven.debug) {
- Utils.sendModuleMessage(this, "&7ground spoof (&3" + mc.thePlayer.ticksExisted + "&7).");
- }
- }
-
startPacket = stopPacket = spoofGround = false;
}
@@ -392,10 +392,8 @@ public class BedAura extends Module {
startPacket = true;
isBreaking = true;
breakTick = true;
- if (mc.thePlayer.motionY > -0.5) {
- ignoreSlow = true;
- spoofGround = true;
- }
+
+ ignoreSlow = true;
}
private void stopBreak(ClientRotationEvent e, BlockPos blockPos) {
diff --git a/src/main/java/keystrokesmod/module/impl/player/Disabler.java b/src/main/java/keystrokesmod/module/impl/player/Disabler.java
index 9d8abf0..bfc960c 100644
--- a/src/main/java/keystrokesmod/module/impl/player/Disabler.java
+++ b/src/main/java/keystrokesmod/module/impl/player/Disabler.java
@@ -25,6 +25,7 @@ import java.util.Objects;
public class Disabler extends Module {
private SliderSetting disablerTicks;
private SliderSetting activationDelay;
+ private ButtonSetting resetDisabler;
int tickCounter = 0;
boolean waitingForGround = false;
@@ -48,6 +49,7 @@ public class Disabler extends Module {
private boolean reset;
private float savedYaw, savedPitch;
private boolean worldJoin;
+ private int wDelay;
public boolean disablerLoaded, running;
@@ -55,6 +57,7 @@ public class Disabler extends Module {
super("Disabler", category.player);
this.registerSetting(disablerTicks = new SliderSetting("Ticks", "", 100, 85, 150, 5));
this.registerSetting(activationDelay = new SliderSetting("Activation delay", " seconds", 0, 0, 4, 0.5));
+ this.registerSetting(resetDisabler = new ButtonSetting("§cReset", false));
}
public void onEnable() {
@@ -96,6 +99,12 @@ public class Disabler extends Module {
@SubscribeEvent(priority = EventPriority.LOWEST)
public void onPreMotion(PreMotionEvent e) {
+ if (resetDisabler.isToggled()) {
+ Utils.print("&7[&dR&7] &cdisabler resetting...");
+ resetState();
+ disablerLoaded = false;
+ resetDisabler.disable();
+ }
if (Utils.getLobbyStatus() == 1 || Utils.hypixelStatus() != 1 || Utils.isReplay()) {
return;
}
@@ -114,12 +123,13 @@ public class Disabler extends Module {
return;
}
running = true;
- e.setRotations(savedYaw, savedPitch);
+ e.setRotations(0, savedPitch);
if (waitingForGround) {
/*if (mc.thePlayer.ticksExisted <= 3) {
waitingForGround = false;
worldJoin = true;
+ wDelay = 0;
}
else */if (mc.thePlayer.onGround) {
mc.thePlayer.motionY = 0.42f;
@@ -129,7 +139,7 @@ public class Disabler extends Module {
return;
}
- if (ModuleUtils.inAirTicks >= 10 || worldJoin) {
+ if (ModuleUtils.inAirTicks >= 10 || worldJoin && ++wDelay >= 3) {
if (!applyingMotion) {
applyingMotion = true;
firstY = mc.thePlayer.posY;
@@ -145,9 +155,9 @@ public class Disabler extends Module {
if (mc.thePlayer.posY != firstY) {
if (!reset) {
resetState();
- activationDelayMillis = 5000;
+ activationDelayMillis = 2000;
reset = true;
- Utils.print("&7[&dR&7] &adisabler reset, wait 5s");
+ Utils.print("&7[&dR&7] &adisabler reset, wait 2s");
}
else {
shouldRun = false;
diff --git a/src/main/java/keystrokesmod/module/impl/player/NoFall.java b/src/main/java/keystrokesmod/module/impl/player/NoFall.java
index d49c4c4..5767d22 100644
--- a/src/main/java/keystrokesmod/module/impl/player/NoFall.java
+++ b/src/main/java/keystrokesmod/module/impl/player/NoFall.java
@@ -385,7 +385,7 @@ public class NoFall extends Module {
public boolean dist() {
- double minMotion = 0.08;
+ double minMotion = 0.1;
int dist1 = 4;
int dist2 = 6;
int dist3 = 7;
diff --git a/src/main/java/keystrokesmod/module/impl/player/Scaffold.java b/src/main/java/keystrokesmod/module/impl/player/Scaffold.java
index 37645cd..db59260 100644
--- a/src/main/java/keystrokesmod/module/impl/player/Scaffold.java
+++ b/src/main/java/keystrokesmod/module/impl/player/Scaffold.java
@@ -125,6 +125,7 @@ public class Scaffold extends Module {
private float VTRY;
private float normalYaw, normalPitch;
private int switchvl;
+ private int dt;
//fake rotations
private float fakeYaw, fakePitch;
private float fakeYaw1, fakeYaw2;
@@ -174,6 +175,7 @@ public class Scaffold extends Module {
}
public void onEnable() {
+ dt = 0;
isEnabled = true;
moduleEnabled = true;
ModuleUtils.fadeEdge = 0;
@@ -206,7 +208,56 @@ public class Scaffold extends Module {
}
normalYaw = mc.thePlayer.rotationYaw;
normalPitch = mc.thePlayer.rotationPitch;
+ if (dt > 0) {
+ return;
+ }
+ //Fake rotations
+ if (fakeRotation.getInput() > 0) {
+ if (fakeRotation.getInput() == 1) {
+ fakeYaw = normalYaw;
+ fakePitch = normalPitch;
+ } else if (fakeRotation.getInput() == 2) {
+ fakeYaw = fakeYaw1;
+ if (blockRotations != null) {
+ fakePitch = blockRotations[1] + 5;
+ } else {
+ fakePitch = 80f;
+ }
+ } else if (fakeRotation.getInput() == 3) {
+ fakeYaw2 = mc.thePlayer.rotationYaw - hardcodedYaw();
+ float yawDifference = getAngleDifference(lastEdge2, fakeYaw2);
+ float smoothingFactor = (1.0f - (65.0f / 100.0f));
+ fakeYaw2 = (lastEdge2 + yawDifference * smoothingFactor);
+ lastEdge2 = fakeYaw2;
+
+ fakeYaw = fakeYaw2;
+ if (blockRotations != null) {
+ fakePitch = blockRotations[1] + 5;
+ } else {
+ fakePitch = 80f;
+ }
+ } else if (fakeRotation.getInput() == 4) {
+ fakeYaw += 25.71428571428571F;
+ fakePitch = 90F;
+ } else if (fakeRotation.getInput() == 5) {
+ if (blockRotations != null) {
+ fakeYaw2 = blockRotations[0];
+ fakePitch = blockRotations[1];
+ } else {
+ fakeYaw2 = mc.thePlayer.rotationYaw - hardcodedYaw() - 180;
+ fakePitch = 88F;
+ }
+ float yawDifference = getAngleDifference(lastEdge2, fakeYaw2);
+ float smoothingFactor = (1.0f - (65.0f / 100.0f));
+ fakeYaw2 = (lastEdge2 + yawDifference * smoothingFactor);
+ lastEdge2 = fakeYaw2;
+
+ fakeYaw = fakeYaw2;
+ }
+ RotationUtils.setFakeRotations(fakeYaw, fakePitch);
+ }
if (!isEnabled) {
+ dt++;
return;
}
if (Utils.isMoving()) {
@@ -319,50 +370,6 @@ public class Scaffold extends Module {
dynamic++;
}
randomF = 0;
-
- //Fake rotations
- if (fakeRotation.getInput() > 0) {
- if (fakeRotation.getInput() == 1) {
- RotationUtils.setFakeRotations(normalYaw, normalPitch);
- }
- else if (fakeRotation.getInput() == 2) {
- fakeYaw = fakeYaw1;
- if (blockRotations != null) {
- fakePitch = blockRotations[1] + 5;
- } else {
- fakePitch = 80f;
- }
- }
- else if (fakeRotation.getInput() == 3) {
- fakeYaw2 = mc.thePlayer.rotationYaw - hardcodedYaw();
- float yawDifference = getAngleDifference(lastEdge2, fakeYaw2);
- float smoothingFactor = (1.0f - (65.0f / 100.0f));
- fakeYaw2 = (lastEdge2 + yawDifference * smoothingFactor);
- lastEdge2 = fakeYaw2;
-
- fakeYaw = fakeYaw2;
- if (blockRotations != null) {
- fakePitch = blockRotations[1] + 5;
- } else {
- fakePitch = 80f;
- }
- }
- else if (fakeRotation.getInput() == 4) {
- fakeYaw += 25.71428571428571F;
- fakePitch = 90F;
- }
- else if (fakeRotation.getInput() == 5) {
- if (blockRotations != null) {
- fakeYaw = blockRotations[0];
- fakePitch = blockRotations[1];
- }
- else {
- fakeYaw = mc.thePlayer.rotationYaw - hardcodedYaw() - 45;
- fakePitch = 80F;
- }
- }
- RotationUtils.setFakeRotations(fakeYaw, fakePitch);
- }
}
@SubscribeEvent
@@ -408,7 +415,7 @@ public class Scaffold extends Module {
long strokeDelay = 250;
- float first = 73.5F;
+ float first = 77.5F;
float sec = 77.5F;
if (quad <= 5 || quad >= 85) {
@@ -1040,10 +1047,13 @@ public class Scaffold extends Module {
int x = (int) Math.floor(mc.thePlayer.posX + xOffset);
int y = (int) Math.floor(((startYPos != -1) ? startYPos : mc.thePlayer.posY) + yOffset);
int z = (int) Math.floor(mc.thePlayer.posZ);
+
BlockPos base = new BlockPos(x, y - 1, z);
+
if (!BlockUtils.replaceable(base)) {
return null;
}
+
EnumFacing[] allFacings = getFacingsSorted();
List validFacings = new ArrayList<>(5);
for (EnumFacing facing : allFacings) {
@@ -1051,11 +1061,9 @@ public class Scaffold extends Module {
validFacings.add(facing);
}
}
+ int maxLayer = 1;
List possibleBlocks = new ArrayList<>();
- int maxLayer = 2;
-
- main:
for (int dy = 1; dy <= maxLayer; dy++) {
BlockPos layerBase = new BlockPos(x, y - dy, z);
if (dy == 1) {
@@ -1077,6 +1085,22 @@ public class Scaffold extends Module {
}
}
}
+ for (EnumFacing facing : validFacings) {
+ BlockPos adjacent = layerBase.offset(facing);
+ if (BlockUtils.replaceable(adjacent)) {
+ for (EnumFacing nestedFacing : validFacings) {
+ BlockPos nestedNeighbor = adjacent.offset(nestedFacing);
+ if (BlockUtils.replaceable(nestedNeighbor)) {
+ for (EnumFacing thirdFacing : validFacings) {
+ BlockPos thirdNeighbor = nestedNeighbor.offset(thirdFacing);
+ if (!BlockUtils.replaceable(thirdNeighbor) && !BlockUtils.isInteractable(BlockUtils.getBlock(thirdNeighbor))) {
+ possibleBlocks.add(new PlaceData(thirdNeighbor, thirdFacing.getOpposite()));
+ }
+ }
+ }
+ }
+ }
+ }
}
return possibleBlocks.isEmpty() ? null : possibleBlocks;
diff --git a/src/main/java/keystrokesmod/module/impl/player/WaterBucket.java b/src/main/java/keystrokesmod/module/impl/player/WaterBucket.java
index d33e8e0..f2970ac 100644
--- a/src/main/java/keystrokesmod/module/impl/player/WaterBucket.java
+++ b/src/main/java/keystrokesmod/module/impl/player/WaterBucket.java
@@ -1,72 +1,127 @@
package keystrokesmod.module.impl.player;
-import keystrokesmod.event.PreMotionEvent;
+import keystrokesmod.Raven;
+import keystrokesmod.event.ClientRotationEvent;
import keystrokesmod.module.Module;
import keystrokesmod.module.setting.impl.ButtonSetting;
-import keystrokesmod.utility.RotationUtils;
import keystrokesmod.utility.Utils;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement;
+import net.minecraft.util.EnumFacing;
import net.minecraft.util.MovingObjectPosition;
+import net.minecraftforge.client.event.RenderWorldLastEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
public class WaterBucket extends Module {
- //private ButtonSetting pickup;
- private ButtonSetting silentAim;
- private ButtonSetting switchToItem;
+ public ButtonSetting pickupWater;
+ public ButtonSetting silentAim;
+ public ButtonSetting switchToItem;
+
+ private final long PLACE_DELAY = 500L;
+ private final long PICKUP_WAIT = 150L;
+
+ private long lastPlace = 0L;
+ private boolean shouldPickup = false;
+ private int lastSlot = -1;
public WaterBucket() {
- super("Water bucket", category.player, 0);
- //this.registerSetting(pickup = new ButtonSetting("Pickup water", true));
+ super("Water Bucket", category.player);
+ this.registerSetting(pickupWater = new ButtonSetting("Pickup water", true));
this.registerSetting(silentAim = new ButtonSetting("Silent aim", true));
this.registerSetting(switchToItem = new ButtonSetting("Switch to item", true));
}
+ @Override
+ public void onDisable() {
+ this.lastPlace = 0L;
+ this.shouldPickup = false;
+ this.lastSlot = -1;
+ }
+
@SubscribeEvent
- public void onPreMotion(PreMotionEvent e) {
- MovingObjectPosition rayCast = RotationUtils.rayCast(mc.playerController.getBlockReachDistance(), e.getYaw(), 90, true);
- if (inPosition() && rayCast != null && rayCast.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && holdWaterBucket(switchToItem.isToggled())) {
- if (silentAim.isToggled()) {
- e.setPitch(90);
- }
- else {
- mc.thePlayer.rotationPitch = 90;
- }
- sendPlace();
+ public void onRenderWorld(RenderWorldLastEvent e) {
+ if (!Utils.nullCheck() || mc.isGamePaused() || mc.thePlayer.capabilities.isFlying || mc.thePlayer.capabilities.isCreativeMode) {
+ return;
+ }
+ if (!fallCheck()) {
+ return;
+ }
+ MovingObjectPosition mop = Utils.getTarget(mc.playerController.getBlockReachDistance(), mc.thePlayer.rotationYaw, silentAim.isToggled() ? 90.0f : mc.thePlayer.rotationPitch);
+ if (mop == null || mop.typeOfHit != MovingObjectPosition.MovingObjectType.BLOCK || mop.sideHit != EnumFacing.UP) {
+ return;
+ }
+ long now = System.currentTimeMillis();
+ if (Utils.timeBetween(lastPlace, now) < PLACE_DELAY) {
+ return;
+ }
+ if (!isItem(mc.thePlayer.getHeldItem(), Items.water_bucket) && switchToItem.isToggled()) {
+ this.attemptSwitch();
+ }
+ if (!silentAim.isToggled() && mc.thePlayer.rotationPitch < 80.0f) {
+ return;
+ }
+ lastPlace = now;
+ this.useCurrentItem();
+ if (!(shouldPickup = pickupWater.isToggled())) {
+ this.lastSlot = -1;
+ }
+ if (Raven.debug) {
+ Utils.sendModuleMessage(this, "&7Placed with motionY &d" + Utils.round(mc.thePlayer.motionY, 2) + " &7and fall distance &d" + Utils.round(mc.thePlayer.fallDistance, 2));
}
}
- private boolean inPosition() {
- return !mc.thePlayer.capabilities.isFlying && !mc.thePlayer.capabilities.isCreativeMode && !mc.thePlayer.onGround && mc.thePlayer.motionY < -0.6D && !mc.thePlayer.isInWater() && fallDistance() <= 2;
- }
-
- private boolean holdWaterBucket(boolean setSlot) {
- if (this.containsItem(mc.thePlayer.getHeldItem(), Items.water_bucket)) {
- return true;
- } else {
- for (int i = 0; i < InventoryPlayer.getHotbarSize(); ++i) {
- if (this.containsItem(mc.thePlayer.inventory.mainInventory[i], Items.water_bucket) && setSlot) {
- mc.thePlayer.inventory.currentItem = i;
- return true;
- }
+ @Override
+ public void onUpdate() {
+ if (mc.isGamePaused()) {
+ return;
+ }
+ if (shouldPickup && Utils.timeBetween(lastPlace, System.currentTimeMillis()) > PICKUP_WAIT && isItem(mc.thePlayer.getHeldItem(), Items.bucket)) {
+ shouldPickup = false;
+ this.useCurrentItem();
+ if (this.lastSlot != -1) {
+ Utils.switchSlot(this.lastSlot, true);
+ this.lastSlot = -1;
}
-
- return false;
}
}
- private boolean containsItem(ItemStack itemStack, Item item) {
- return itemStack != null && itemStack.getItem() == item;
+ @SubscribeEvent
+ public void onClientRotation(ClientRotationEvent e) {
+ if (silentAim.isToggled() && (fallCheck() || Utils.timeBetween(lastPlace, System.currentTimeMillis()) < PLACE_DELAY) && getWaterBucketSlot() != -1) {
+ e.setYaw(mc.thePlayer.rotationYaw);
+ e.setPitch(90.0f);
+ }
}
- private void sendPlace() {
+ private void attemptSwitch() {
+ int slot = getWaterBucketSlot();
+ if (slot != -1) {
+ this.lastSlot = mc.thePlayer.inventory.currentItem;
+ Utils.switchSlot(slot, true);
+ }
+ }
+
+ private int getWaterBucketSlot() {
+ for (int slot = 0; slot < InventoryPlayer.getHotbarSize(); ++slot) {
+ if (isItem(mc.thePlayer.inventory.getStackInSlot(slot), Items.water_bucket)) {
+ return slot;
+ }
+ }
+ return -1;
+ }
+
+ private void useCurrentItem() {
mc.getNetHandler().addToSendQueue(new C08PacketPlayerBlockPlacement(mc.thePlayer.getHeldItem()));
}
- private double fallDistance() {
- return (int) Utils.distanceToGround(mc.thePlayer);
+ private boolean isItem(final ItemStack itemStack, final Item item) {
+ return itemStack != null && itemStack.getItem() == item;
}
-}
+
+ private boolean fallCheck() {
+ return !mc.thePlayer.onGround && mc.thePlayer.fallDistance >= 3.3;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/keystrokesmod/module/impl/render/Shaders.java b/src/main/java/keystrokesmod/module/impl/render/Shaders.java
index e42f18a..df92960 100644
--- a/src/main/java/keystrokesmod/module/impl/render/Shaders.java
+++ b/src/main/java/keystrokesmod/module/impl/render/Shaders.java
@@ -1,16 +1,20 @@
package keystrokesmod.module.impl.render;
+import keystrokesmod.event.ReceivePacketEvent;
import keystrokesmod.mixin.impl.accessor.IAccessorEntityRenderer;
import keystrokesmod.module.Module;
import keystrokesmod.module.setting.impl.SliderSetting;
import keystrokesmod.utility.Utils;
import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.network.play.server.S08PacketPlayerPosLook;
import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
public class Shaders extends Module {
private SliderSetting shader;
private String[] shaderNames;
private ResourceLocation[] shaderLocations;
+ private boolean resetShader;
public Shaders() {
super("Shaders", category.render);
@@ -25,7 +29,18 @@ public class Shaders extends Module {
this.registerSetting(shader = new SliderSetting("Shader", 0, shaderNames));
}
+ @SubscribeEvent
+ public void onReceivePacket(ReceivePacketEvent e) {
+ if (mc.thePlayer != null && e.getPacket() instanceof S08PacketPlayerPosLook) {
+ resetShader = true;
+ }
+ }
+
public void onUpdate() {
+ if (resetShader) {
+ mc.entityRenderer.stopUseShader();
+ resetShader = false;
+ }
if (!Utils.nullCheck() || mc.entityRenderer == null || shaderLocations == null) {
return;
}
@@ -55,4 +70,4 @@ public class Shaders extends Module {
this.disable();
}
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/keystrokesmod/module/impl/render/Trajectories.java b/src/main/java/keystrokesmod/module/impl/render/Trajectories.java
index e6beef4..65d80eb 100644
--- a/src/main/java/keystrokesmod/module/impl/render/Trajectories.java
+++ b/src/main/java/keystrokesmod/module/impl/render/Trajectories.java
@@ -3,10 +3,11 @@ package keystrokesmod.module.impl.render;
import keystrokesmod.module.Module;
import keystrokesmod.module.impl.world.AntiBot;
import keystrokesmod.module.setting.impl.ButtonSetting;
-import keystrokesmod.utility.RenderUtils;
import keystrokesmod.utility.Utils;
+import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.item.EntityArmorStand;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.*;
import net.minecraft.util.*;
@@ -14,207 +15,217 @@ import net.minecraftforge.client.event.RenderWorldLastEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import org.lwjgl.opengl.GL11;
-import java.awt.*;
+import java.util.ArrayList;
+import java.util.List;
public class Trajectories extends Module {
private ButtonSetting autoScale;
- private ButtonSetting disableUncharged;
- private ButtonSetting highlightOnEntity;
- private int highlightColor = new Color(234, 38, 38).getRGB();
- private int topColor = new Color(46, 255, 22).getRGB();
+ private ButtonSetting disableUnchargedBow;
+ private ButtonSetting highlightEntities;
+ private ButtonSetting shortenLine;
+
public Trajectories() {
super("Trajectories", category.render);
this.registerSetting(autoScale = new ButtonSetting("Auto-scale", true));
- this.registerSetting(disableUncharged = new ButtonSetting("Disable uncharged bow", true));
- this.registerSetting(highlightOnEntity = new ButtonSetting("Highlight on entity", true));
+ this.registerSetting(disableUnchargedBow = new ButtonSetting("Disable uncharged bow", true));
+ this.registerSetting(highlightEntities = new ButtonSetting("Highlight on entity", true));
+ this.registerSetting(shortenLine = new ButtonSetting("Shorten line", false));
}
@SubscribeEvent
- public void onRenderWorldLast(RenderWorldLastEvent e) {
+ public void onRenderWorld(RenderWorldLastEvent e) {
if (!Utils.nullCheck() || mc.thePlayer.getHeldItem() == null) {
return;
}
- ItemStack heldItem = mc.thePlayer.getHeldItem();
- if (!(heldItem.getItem() instanceof ItemBow) && !(heldItem.getItem() instanceof ItemSnowball) && !(heldItem.getItem() instanceof ItemEgg) && !(heldItem.getItem() instanceof ItemEnderPearl)) {
+ Item item = mc.thePlayer.getHeldItem().getItem();
+ boolean usingBow = item instanceof ItemBow;
+ if (!usingBow && !(item instanceof ItemSnowball) && !(item instanceof ItemEgg) && !(item instanceof ItemEnderPearl)) {
return;
}
- if (heldItem.getItem() instanceof ItemBow && !mc.thePlayer.isUsingItem() && disableUncharged.isToggled()) {
+ if (usingBow && disableUnchargedBow.isToggled() && !mc.thePlayer.isUsingItem()) {
return;
}
- boolean bow = heldItem.getItem() instanceof ItemBow;
-
- float playerYaw = mc.thePlayer.rotationYaw;
- float playerPitch = mc.thePlayer.rotationPitch;
-
- double posX = mc.getRenderManager().viewerPosX - (double)(MathHelper.cos(playerYaw / 180.0f * (float)Math.PI) * 0.16f);
- double posY = mc.getRenderManager().viewerPosY + (double)mc.thePlayer.getEyeHeight() - (double)0.1f;
- double posZ = mc.getRenderManager().viewerPosZ - (double)(MathHelper.sin(playerYaw / 180.0f * (float)Math.PI) * 0.16f);
-
- double motionX = (double)(-MathHelper.sin(playerYaw / 180.0f * (float)Math.PI) * MathHelper.cos(playerPitch / 180.0f * (float)Math.PI)) * (bow ? 1.0 : 0.4);
- double motionY = (double)(-MathHelper.sin(playerPitch / 180.0f * (float)Math.PI)) * (bow ? 1.0 : 0.4);
- double motionZ = (double)(MathHelper.cos(playerYaw / 180.0f * (float)Math.PI) * MathHelper.cos(playerPitch / 180.0f * (float)Math.PI)) * (bow ? 1.0 : 0.4);
-
- int itemInUse = 40;
- if (mc.thePlayer.getItemInUseCount() > 0 && bow) {
- itemInUse = mc.thePlayer.getItemInUseCount();
+ float yaw = (float)Math.toRadians(mc.thePlayer.rotationYaw);
+ float pitch = (float)Math.toRadians(mc.thePlayer.rotationPitch);
+ double arrowPosX = mc.thePlayer.lastTickPosX + (mc.thePlayer.posX - mc.thePlayer.lastTickPosX) * e.partialTicks - MathHelper.cos(yaw) * 0.16f;
+ double arrowPosY = mc.thePlayer.lastTickPosY + (mc.thePlayer.posY - mc.thePlayer.lastTickPosY) * e.partialTicks + mc.thePlayer.getEyeHeight() - 0.1;
+ double arrowPosZ = mc.thePlayer.lastTickPosZ + (mc.thePlayer.posZ - mc.thePlayer.lastTickPosZ) * e.partialTicks - MathHelper.sin(yaw) * 0.16f;
+ float arrowMotionFactor = usingBow ? 1.0f : 0.4f;
+ float arrowMotionX = -MathHelper.sin(yaw) * MathHelper.cos(pitch) * arrowMotionFactor;
+ float arrowMotionY = -MathHelper.sin(pitch) * arrowMotionFactor;
+ float arrowMotionZ = MathHelper.cos(yaw) * MathHelper.cos(pitch) * arrowMotionFactor;
+ double arrowMotion = Math.sqrt(arrowMotionX * arrowMotionX + arrowMotionY * arrowMotionY + arrowMotionZ * arrowMotionZ);
+ arrowMotionX /= arrowMotion;
+ arrowMotionY /= arrowMotion;
+ arrowMotionZ /= arrowMotion;
+ if (usingBow) {
+ float bowPower = (72000 - mc.thePlayer.getItemInUseCount()) / 20.0f;
+ bowPower = (bowPower * bowPower + bowPower * 2.0f) / 3.0f;
+ if (bowPower > 1.0f) {
+ bowPower = 1.0f;
+ }
+ bowPower *= 3.0f;
+ arrowMotionX *= bowPower;
+ arrowMotionY *= bowPower;
+ arrowMotionZ *= bowPower;
}
- int timeInUse = 72000 - itemInUse;
- float strength = (float)timeInUse / 20.0f;
- if ((double)(strength = (strength * strength + strength * 2.0f) / 3.0f) < 0.1) {
- return;
+ else {
+ arrowMotionX *= 1.5;
+ arrowMotionY *= 1.5;
+ arrowMotionZ *= 1.5;
}
- if (strength > 1.0f) {
- strength = 1.0f;
- }
-
- RenderUtils.glColor(-1);
GL11.glPushMatrix();
-
- boolean depthTest = GL11.glIsEnabled(GL11.GL_DEPTH_TEST);
- boolean textureTwoD = GL11.glIsEnabled(GL11.GL_TEXTURE_2D);
- boolean blend = GL11.glIsEnabled(GL11.GL_BLEND);
-
- if (depthTest) {
- GL11.glDisable(GL11.GL_DEPTH_TEST);
- }
- if (textureTwoD) {
- GL11.glDisable(GL11.GL_TEXTURE_2D);
- }
- if (!blend) {
- GL11.glEnable(GL11.GL_BLEND);
- }
- GL11.glEnable(GL11.GL_LINE_SMOOTH);
- GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
-
- float velocity = MathHelper.sqrt_double(motionX * motionX + motionY * motionY + motionZ * motionZ);
- motionX /= velocity;
- motionY /= velocity;
- motionZ /= velocity;
- motionX *= (double)(bow ? strength * 2.0f : 1.0f) * 1.5;
- motionY *= (double)(bow ? strength * 2.0f : 1.0f) * 1.5;
- motionZ *= (double)(bow ? strength * 2.0f : 1.0f) * 1.5;
-
- GL11.glLineWidth(1.5f);
- GL11.glBegin(GL11.GL_LINE_STRIP);
-
- boolean ground = false;
- MovingObjectPosition target = null;
- boolean highlight = false;
- boolean isTop = false;
- double[] transform = new double[]{posX, posY, posZ, motionX, motionY, motionZ};
-
- for (int k = 0; k <= 100 && !ground; ++k) {
- Vec3 start = new Vec3(transform[0], transform[1], transform[2]);
- Vec3 predicted = new Vec3(transform[0] + transform[3], transform[1] + transform[4], transform[2] + transform[5]);
- MovingObjectPosition rayTraced = mc.theWorld.rayTraceBlocks(start, predicted, false, true, false);
- if (rayTraced == null) {
- rayTraced = getEntityHit(start, predicted);
- if (rayTraced != null) {
- highlight = true;
- break;
+ GL11.glEnable(2848);
+ GL11.glBlendFunc(770, 771);
+ GL11.glEnable(3042);
+ GL11.glDisable(3553);
+ GL11.glDisable(2929);
+ GL11.glEnable(32925);
+ GL11.glDepthMask(false);
+ RenderManager renderManager = mc.getRenderManager();
+ double gravity = usingBow ? 0.05 : 0.03;
+ List posList = new ArrayList<>();
+ MovingObjectPosition block = null;
+ Entity entity = null;
+ EnumFacing facingEntity = null;
+ EnumFacing facingBlock = null;
+ for (int i = 0; i < 750; ++i) {
+ posList.add(new double[] { arrowPosX - renderManager.viewerPosX, arrowPosY - renderManager.viewerPosY, arrowPosZ - renderManager.viewerPosZ });
+ Vec3 arrowVec = new Vec3(arrowPosX, arrowPosY, arrowPosZ);
+ Vec3 arrowVecNext = new Vec3(arrowPosX + arrowMotionX, arrowPosY + arrowMotionY, arrowPosZ + arrowMotionZ);
+ arrowPosX = arrowVecNext.xCoord;
+ arrowPosY = arrowVecNext.yCoord;
+ arrowPosZ = arrowVecNext.zCoord;
+ arrowMotionX *= 0.99;
+ arrowMotionY *= 0.99;
+ arrowMotionZ *= 0.99;
+ arrowMotionY -= gravity;
+ double size = 0.5;
+ AxisAlignedBB arrowBox = new AxisAlignedBB(arrowPosX - size, arrowPosY - size, arrowPosZ - size, arrowPosX + size, arrowPosY + size, arrowPosZ + size).addCoord((double)arrowMotionX, (double)arrowMotionY, (double)arrowMotionZ).expand(1.0, 1.0, 1.0);
+ List list = mc.theWorld.getEntitiesWithinAABBExcludingEntity(mc.getRenderViewEntity(), arrowBox);
+ double minDistSq = 0.0;
+ for (final Entity en : list) {
+ if (en instanceof EntityLivingBase && !(en instanceof EntityArmorStand) && en.canBeCollidedWith()) {
+ if (((EntityLivingBase)en).deathTime != 0) {
+ continue;
+ }
+ if (en instanceof EntityPlayer && AntiBot.isBot(en)) {
+ continue;
+ }
+ AxisAlignedBB axis = en.getEntityBoundingBox().expand(0.30000001192092896, 0.30000001192092896, 0.30000001192092896);
+ MovingObjectPosition mop = axis.calculateIntercept(arrowVec, arrowVecNext);
+ if (mop == null) {
+ continue;
+ }
+ if (minDistSq == 0.0) {
+ entity = en;
+ facingEntity = mop.sideHit;
+ }
+ else {
+ double distSq = arrowVec.squareDistanceTo(mop.hitVec);
+ if (distSq >= minDistSq) {
+ continue;
+ }
+ entity = en;
+ facingEntity = mop.sideHit;
+ minDistSq = distSq;
+ }
}
-
- float f14 = 0.99f;
- transform[4] *= f14;
- transform[0] += (transform[3] *= f14);
- transform[1] += (transform[4] -= bow ? 0.05 : 0.03);
- transform[2] += (transform[5] *= f14);
- }
- else if (rayTraced.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && rayTraced.sideHit == EnumFacing.UP) {
- isTop = true;
+ }
+ block = mc.theWorld.rayTraceBlocks(arrowVec, arrowVecNext);
+ if (block != null) {
+ facingBlock = block.sideHit;
+ }
+ if (entity != null) {
+ break;
+ }
+ if (block != null) {
+ break;
}
}
-
- for (int k = 0; k <= 100 && !ground; ++k) {
- Vec3 start = new Vec3(posX, posY, posZ);
- Vec3 predicted = new Vec3(posX + motionX, posY + motionY, posZ + motionZ);
- MovingObjectPosition rayTraced = mc.theWorld.rayTraceBlocks(start, predicted, false, true, false);
- if (rayTraced != null) {
- ground = true;
- target = rayTraced;
- }
+ if (entity != null && block != null) {
+ if (mc.thePlayer.getDistanceSqToEntity(entity) >= mc.thePlayer.getDistanceSqToCenter(block.getBlockPos())) {
+ entity = null;
+ facingEntity = null;
+ }
else {
- MovingObjectPosition entityHit = getEntityHit(start, predicted);
- if (entityHit != null) {
- target = entityHit;
- ground = true;
+ block = null;
+ facingBlock = null;
+ }
+ }
+ EnumFacing facing = (facingEntity == null) ? facingBlock : facingEntity;
+ if (entity != null && highlightEntities.isToggled()) {
+ GL11.glColor3d(1.0, 0.0, 0.0);
+ GL11.glLineWidth(2.5f);
+ }
+ else {
+ if (facingBlock == EnumFacing.UP) {
+ GL11.glColor3d(0, 1.0, 0);
+ }
+ else {
+ GL11.glColor3d(1.0, 1.0, 1.0);
+ }
+ GL11.glLineWidth(1.8f);
+ }
+ GL11.glBegin(3);
+ for (int j = 0; j < posList.size(); ++j) {
+ if (j != 0 || !shortenLine.isToggled()) {
+ double[] pos = posList.get(j);
+ GL11.glVertex3d(pos[0], pos[1], pos[2]);
+ }
+ }
+ double renderX = arrowPosX - renderManager.viewerPosX;
+ double renderY = arrowPosY - renderManager.viewerPosY;
+ double renderZ = arrowPosZ - renderManager.viewerPosZ;
+ double distSq2 = 0.0;
+ if (entity != null) {
+ distSq2 = mc.thePlayer.getDistanceSq(entity.getPosition());
+ }
+ else if (block != null) {
+ distSq2 = mc.thePlayer.getDistanceSq(block.getBlockPos());
+ }
+ if (facing != null) {
+ double size2 = autoScale.isToggled() ? Math.min(0.1 * (1.0 + distSq2 / 500.0), 0.5) : 0.1;
+ switch (facing) {
+ case WEST:
+ case EAST: {
+ GL11.glVertex3d(renderX, renderY, renderZ);
+ GL11.glVertex3d(renderX, renderY - size2, renderZ - size2);
+ GL11.glVertex3d(renderX, renderY + size2, renderZ + size2);
+ GL11.glVertex3d(renderX, renderY, renderZ);
+ GL11.glVertex3d(renderX, renderY - size2, renderZ + size2);
+ GL11.glVertex3d(renderX, renderY + size2, renderZ - size2);
+ break;
}
- }
-
- if (highlight && highlightOnEntity.isToggled()) {
- RenderUtils.glColor(highlightColor);
- }
- else if (isTop) {
- RenderUtils.glColor(topColor);
- }
-
- float airResistance = 0.99f;
- motionY *= airResistance;
- GL11.glVertex3d((posX += (motionX *= airResistance)) - mc.getRenderManager().viewerPosX, (posY += (motionY -= bow ? 0.05 : 0.03)) - mc.getRenderManager().viewerPosY, (posZ += (motionZ *= airResistance)) - mc.getRenderManager().viewerPosZ);
- }
- GL11.glEnd();
-
- GL11.glTranslated(posX - mc.getRenderManager().viewerPosX, posY - mc.getRenderManager().viewerPosY, posZ - mc.getRenderManager().viewerPosZ);
- if (target != null && target.sideHit != null) {
- switch (target.sideHit.getIndex()) {
- case 2:
- case 3:
- GL11.glRotatef(90.0f, 1.0f, 0.0f, 0.0f);
+ case NORTH:
+ case SOUTH: {
+ GL11.glVertex3d(renderX, renderY, renderZ);
+ GL11.glVertex3d(renderX - size2, renderY - size2, renderZ);
+ GL11.glVertex3d(renderX + size2, renderY + size2, renderZ);
+ GL11.glVertex3d(renderX, renderY, renderZ);
+ GL11.glVertex3d(renderX + size2, renderY - size2, renderZ);
+ GL11.glVertex3d(renderX - size2, renderY + size2, renderZ);
break;
- case 4:
- case 5:
- GL11.glRotatef(90.0f, 0.0f, 0.0f, 1.0f);
+ }
+ case DOWN:
+ case UP: {
+ GL11.glVertex3d(renderX, renderY, renderZ);
+ GL11.glVertex3d(renderX - size2, renderY, renderZ - size2);
+ GL11.glVertex3d(renderX + size2, renderY, renderZ + size2);
+ GL11.glVertex3d(renderX, renderY, renderZ);
+ GL11.glVertex3d(renderX + size2, renderY, renderZ - size2);
+ GL11.glVertex3d(renderX - size2, renderY, renderZ + size2);
break;
- }
- }
- if (autoScale.isToggled()) {
- double distance = Math.max(mc.thePlayer.getDistance(posX + motionX, posY + motionY, posZ + motionZ) * 0.042830285, 1);
- GL11.glScaled(distance, distance, distance);
- }
- this.drawX();
-
- GL11.glDisable(GL11.GL_LINE_SMOOTH);
- if (depthTest) {
- GL11.glEnable(GL11.GL_DEPTH_TEST);
- }
- if (textureTwoD) {
- GL11.glEnable(GL11.GL_TEXTURE_2D);
- }
- if (!blend) {
- GL11.glDisable(GL11.GL_BLEND);
- }
- GL11.glPopMatrix();
- }
-
- public MovingObjectPosition getEntityHit(Vec3 origin, Vec3 destination) {
- for (Entity e : mc.theWorld.loadedEntityList) {
- if (!(e instanceof EntityLivingBase)) {
- continue;
- }
- if (e instanceof EntityPlayer && AntiBot.isBot(e)) {
- continue;
- }
- if (e != mc.thePlayer) {
- float expand = 0.3f;
- AxisAlignedBB boundingBox = e.getEntityBoundingBox().expand(expand, expand, expand);
- MovingObjectPosition possibleHit = boundingBox.calculateIntercept(origin, destination);
- if (possibleHit != null) {
- return possibleHit;
}
}
}
- return null;
- }
-
- public void drawX() {
- GL11.glPushMatrix();
- GL11.glScalef(0.95f, 0.95f, 0.95f);
- GL11.glBegin(GL11.GL_LINES);
- GL11.glVertex3d(-0.25, 0.0, 0.25);
- GL11.glVertex3d(0.25, 0.0, -0.25);
- GL11.glVertex3d(-0.25, 0.0, -0.25);
- GL11.glVertex3d(0.25, 0.0, 0.25);
GL11.glEnd();
+ GL11.glDisable(3042);
+ GL11.glEnable(3553);
+ GL11.glEnable(2929);
+ GL11.glDisable(32925);
+ GL11.glDepthMask(true);
+ GL11.glDisable(2848);
GL11.glPopMatrix();
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/keystrokesmod/utility/ModuleUtils.java b/src/main/java/keystrokesmod/utility/ModuleUtils.java
index 1373386..944d083 100644
--- a/src/main/java/keystrokesmod/utility/ModuleUtils.java
+++ b/src/main/java/keystrokesmod/utility/ModuleUtils.java
@@ -66,6 +66,8 @@ public class ModuleUtils {
private float yaw;
+ private boolean ldmg;
+
@SubscribeEvent
public void onWorldJoin(EntityJoinWorldEvent e) {
if (e.entity == mc.thePlayer) {
@@ -156,31 +158,15 @@ public class ModuleUtils {
}
dontCheckFD = false;
+ ldmg = true;
+
}
}
}
@SubscribeEvent
public void onPostMotion(PostMotionEvent e) {
- if (bhopBoostConditions()) {
- if (firstDamage) {
- Utils.setSpeed(Utils.getHorizontalSpeed());
- firstDamage = false;
- }
- }
- if (veloBoostConditions()) {
- if (firstDamage) {
- double added = 0;
- if (Utils.getHorizontalSpeed() <= Velocity.minExtraSpeed.getInput()) {
- added = Velocity.extraSpeedBoost.getInput() / 100;
- if (Velocity.reverseDebug.isToggled()) {
- Utils.print("&7[&dR&7] Applied extra boost | Original speed: " + Utils.getHorizontalSpeed());
- }
- }
- Utils.setSpeed((Utils.getHorizontalSpeed() * (Velocity.reverseHorizontal.getInput() / 100)) * (1 + added));
- firstDamage = false;
- }
- }
+
}
private boolean bhopBoostConditions() {
@@ -200,8 +186,30 @@ public class ModuleUtils {
@SubscribeEvent
public void onPreUpdate(PreUpdateEvent e) {
+ if (bhopBoostConditions()) {
+ if (firstDamage) {
+ Utils.setSpeed(Utils.getHorizontalSpeed());
+ firstDamage = false;
+ }
+ }
+ if (veloBoostConditions()) {
+ if (firstDamage) {
+ double added = 0;
+ if (Utils.getHorizontalSpeed() <= Velocity.minExtraSpeed.getInput()) {
+ added = Velocity.extraSpeedBoost.getInput() / 100;
+ if (Velocity.reverseDebug.isToggled()) {
+ Utils.print("&7[&dR&7] Applied extra boost | Original speed: " + Utils.getHorizontalSpeed());
+ }
+ }
+ Utils.setSpeed((Utils.getHorizontalSpeed() * (Velocity.reverseHorizontal.getInput() / 100)) * (1 + added));
+ firstDamage = false;
+ }
+ }
+
//-0.0784000015258789 = ground value
+ //§
+
double ed = Math.toDegrees(Math.atan2(mc.thePlayer.motionZ, mc.thePlayer.motionX));
//Utils.print("" + ed);
@@ -312,123 +320,7 @@ public class ModuleUtils {
groundTicks = !mc.thePlayer.onGround ? 0 : ++groundTicks;
stillTicks = Utils.isMoving() ? 0 : ++stillTicks;
- Block blockAbove = BlockUtils.getBlock(new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY + 2, mc.thePlayer.posZ));
- Block blockBelow = BlockUtils.getBlock(new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY - 1, mc.thePlayer.posZ));
- Block blockBelow2 = BlockUtils.getBlock(new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY - 2, mc.thePlayer.posZ));
- Block block = BlockUtils.getBlock(new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ));
-
-
- if ((ModuleManager.bhop.didMove || ModuleManager.scaffold.lowhop) && (!ModuleManager.bhop.disablerOnly.isToggled() || ModuleManager.bhop.disablerOnly.isToggled() && ModuleManager.disabler.disablerLoaded)) {
- if (ModuleUtils.damage && Velocity.vertical.getInput() != 0 || block instanceof BlockSlab) {
- resetLowhop();
- }
- if (!ModuleUtils.damage || Velocity.vertical.getInput() == 0) {
-
- if (ModuleManager.scaffold.lowhop) {
- switch (simpleY) {
- case 4200:
- mc.thePlayer.motionY = 0.39;
- break;
- case 1138:
- mc.thePlayer.motionY = mc.thePlayer.motionY - 0.13;
- break;
- case 2031:
- mc.thePlayer.motionY = mc.thePlayer.motionY - 0.2;
- resetLowhop();
- break;
- }
- }
- else if (ModuleManager.bhop.didMove) {
- if (mc.thePlayer.isCollidedVertically || ModuleUtils.damage && Velocity.vertical.getInput() != 0) {// || !ModuleManager.bhop.lowhop && (!(block instanceof BlockAir) || !(blockAbove instanceof BlockAir) || blockBelow instanceof BlockSlab || (blockBelow instanceof BlockAir && blockBelow2 instanceof BlockAir))) {
- resetLowhop();
- }
- switch ((int) ModuleManager.bhop.mode.getInput()) {
- case 2: // 9 tick
- switch (simpleY) {
- case 13:
- mc.thePlayer.motionY = mc.thePlayer.motionY - 0.02483;
- ModuleManager.bhop.lowhop = true;
- break;
- case 2000:
- mc.thePlayer.motionY = mc.thePlayer.motionY - 0.1913;
- break;
- case 7016:
- mc.thePlayer.motionY = mc.thePlayer.motionY + 0.08;
- break;
- }
- if (ModuleUtils.inAirTicks >= 7 && Utils.isMoving()) {
- Utils.setSpeed(Utils.getHorizontalSpeed(mc.thePlayer));
- }
- if (ModuleUtils.inAirTicks >= 9) {
- resetLowhop();
- }
- break;
- case 3: // 8 tick
- if (!ModuleManager.bhop.isNormalPos || (block instanceof BlockStairs)) {
- resetLowhop();
- break;
- }
- boolean g1 = Utils.distanceToGround(mc.thePlayer) <= 1.2;
- //disable
- if (inAirTicks >= 9 || inAirTicks >= 5 && !g1) {
- resetLowhop();
- break;
- }
- if (inAirTicks == 1) {
- mc.thePlayer.motionY = 0.38999998569488;
- ModuleManager.bhop.lowhop = true;
- }
- if (inAirTicks == 2) {
- mc.thePlayer.motionY = 0.30379999189377;
- }
- if (inAirTicks == 3) {
- mc.thePlayer.motionY = 0.08842400075912;
- }
- if (inAirTicks == 4) {
- mc.thePlayer.motionY = -0.19174457909538;
- }
- if (inAirTicks == 5 && g1) {
- mc.thePlayer.motionY = -0.26630949469659;
- }
- if (inAirTicks == 6 && g1) {
- mc.thePlayer.motionY = -0.26438340940798;
- }
- if (inAirTicks == 7 && g1) {
- mc.thePlayer.motionY = -0.33749574778843;
- }
- //strafe
- if (inAirTicks >= 6 && Utils.isMoving()) {
- Utils.setSpeed(Utils.getHorizontalSpeed(mc.thePlayer));
- }
- break;
- case 4: // 7 tick
- switch (simpleY) {
- case 4200:
- mc.thePlayer.motionY = 0.39;
- ModuleManager.bhop.lowhop = true;
- break;
- case 1138:
- mc.thePlayer.motionY = mc.thePlayer.motionY - 0.13;
- break;
- case 2031:
- mc.thePlayer.motionY = mc.thePlayer.motionY - 0.2;
- resetLowhop();
- break;
- }
- break;
- }
- }
- }
- }
- if (!mc.thePlayer.onGround) {
- lowhopAir = true;
- }
- else if (lowhopAir) {
- resetLowhop();
- if (!ModuleManager.bhop.isEnabled()) {
- ModuleManager.bhop.isNormalPos = false;
- }
- }
+ handleLowhop();
if (ModuleManager.bhop.setRotation) {
if (!ModuleManager.killAura.rotating && !ModuleManager.scaffold.isEnabled) {
@@ -448,6 +340,8 @@ public class ModuleUtils {
fadeEdge = 0;
ModuleManager.scaffold.highlight.clear();
}
+
+ ldmg = false;
}
private void resetLowhop() {
@@ -543,4 +437,120 @@ public class ModuleUtils {
e.setCanceled(true);
}
}
+
+ private void handleLowhop() {
+ Block blockAbove = BlockUtils.getBlock(new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY + 2, mc.thePlayer.posZ));
+ Block blockBelow = BlockUtils.getBlock(new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY - 1, mc.thePlayer.posZ));
+ Block blockBelow2 = BlockUtils.getBlock(new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY - 2, mc.thePlayer.posZ));
+ Block block = BlockUtils.getBlock(new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ));
+ int simpleY = (int) Math.round((mc.thePlayer.posY % 1) * 10000);
+
+ if ((ModuleManager.bhop.didMove || ModuleManager.scaffold.lowhop) && (!ModuleManager.bhop.disablerOnly.isToggled() || ModuleManager.bhop.disablerOnly.isToggled() && ModuleManager.disabler.disablerLoaded)) {
+ if (ModuleManager.scaffold.lowhop) {
+ switch (simpleY) {
+ case 4200:
+ mc.thePlayer.motionY = 0.39;
+ break;
+ case 1138:
+ mc.thePlayer.motionY = mc.thePlayer.motionY - 0.13;
+ break;
+ case 2031:
+ mc.thePlayer.motionY = mc.thePlayer.motionY - 0.2;
+ resetLowhop();
+ break;
+ }
+ }
+ else if (ModuleManager.bhop.didMove) {
+ if (mc.thePlayer.isCollidedVertically || ldmg && Velocity.vertical.getInput() != 0 && !ModuleManager.velocity.dontEditMotion() || block instanceof BlockSlab) {// || !ModuleManager.bhop.lowhop && (!(block instanceof BlockAir) || !(blockAbove instanceof BlockAir) || blockBelow instanceof BlockSlab || (blockBelow instanceof BlockAir && blockBelow2 instanceof BlockAir))) {
+ resetLowhop();
+ return;
+ }
+ switch ((int) ModuleManager.bhop.mode.getInput()) {
+ case 2: // 9 tick
+ switch (simpleY) {
+ case 13:
+ mc.thePlayer.motionY = mc.thePlayer.motionY - 0.02483;
+ ModuleManager.bhop.lowhop = true;
+ break;
+ case 2000:
+ mc.thePlayer.motionY = mc.thePlayer.motionY - 0.1913;
+ break;
+ case 7016:
+ mc.thePlayer.motionY = mc.thePlayer.motionY + 0.08;
+ break;
+ }
+ if (ModuleUtils.inAirTicks >= 7 && Utils.isMoving()) {
+ Utils.setSpeed(Utils.getHorizontalSpeed(mc.thePlayer));
+ }
+ if (ModuleUtils.inAirTicks >= 9) {
+ resetLowhop();
+ }
+ break;
+ case 3: // 8 tick
+ if (!ModuleManager.bhop.isNormalPos || (block instanceof BlockStairs)) {
+ resetLowhop();
+ break;
+ }
+ boolean g1 = Utils.distanceToGround(mc.thePlayer) <= 1.2;
+ //disable
+ if (inAirTicks >= 9 || inAirTicks >= 5 && !g1) {
+ resetLowhop();
+ break;
+ }
+ if (inAirTicks == 1) {
+ mc.thePlayer.motionY = 0.38999998569488;
+ ModuleManager.bhop.lowhop = true;
+ }
+ if (inAirTicks == 2) {
+ mc.thePlayer.motionY = 0.30379999189377;
+ }
+ if (inAirTicks == 3) {
+ mc.thePlayer.motionY = 0.08842400075912;
+ }
+ if (inAirTicks == 4) {
+ mc.thePlayer.motionY = -0.19174457909538;
+ }
+ if (inAirTicks == 5 && g1) {
+ mc.thePlayer.motionY = -0.26630949469659;
+ }
+ if (inAirTicks == 6 && g1) {
+ mc.thePlayer.motionY = -0.26438340940798;
+ }
+ if (inAirTicks == 7 && g1) {
+ mc.thePlayer.motionY = -0.33749574778843;
+ }
+ //strafe
+ if (inAirTicks >= 6 && Utils.isMoving()) {
+ Utils.setSpeed(Utils.getHorizontalSpeed(mc.thePlayer));
+ }
+ break;
+ case 4: // 7 tick
+ switch (simpleY) {
+ case 4200:
+ mc.thePlayer.motionY = 0.39;
+ ModuleManager.bhop.lowhop = true;
+ break;
+ case 1138:
+ mc.thePlayer.motionY = mc.thePlayer.motionY - 0.13;
+ break;
+ case 2031:
+ mc.thePlayer.motionY = mc.thePlayer.motionY - 0.2;
+ resetLowhop();
+ break;
+ }
+ break;
+ }
+ }
+ }
+ if (!mc.thePlayer.onGround) {
+ lowhopAir = true;
+ }
+ else if (lowhopAir) {
+ resetLowhop();
+ if (!ModuleManager.bhop.isEnabled()) {
+ ModuleManager.bhop.isNormalPos = false;
+ }
+ }
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/keystrokesmod/utility/Utils.java b/src/main/java/keystrokesmod/utility/Utils.java
index 57affd3..da03281 100644
--- a/src/main/java/keystrokesmod/utility/Utils.java
+++ b/src/main/java/keystrokesmod/utility/Utils.java
@@ -692,7 +692,7 @@ public class Utils {
}
public static boolean isHypixel() {
- return !mc.isSingleplayer() && mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains("hypixel.net");
+ return !mc.isSingleplayer() && mc.getCurrentServerData() != null && (mc.getCurrentServerData().serverIP.equals("hypixel.net") || mc.getCurrentServerData().serverIP.contains(".hypixel.net"));
}
public static String getHitsToKillStr(final EntityPlayer entityPlayer, final ItemStack itemStack) {