Skip to content

Commit

Permalink
Release 9
Browse files Browse the repository at this point in the history
additions
- added Chat Bypass, bypass hypixel chat restrictions

fixes, improvements, misc
- improved HUD (added Outline modes & Draw background)
- improved InvMove (added Allow sprinting)
- improved Scaffold
  - added Fast scaffold motion slider
  - fixed placing with bad blocks if manually swapped
- improved Sprint (added Display text)
- improved Latency Alerts (added Ignore limbo)
- improved Nametags (added Only render name & fixed Remove tags)
- made bedwars item alerts not reset on disable
- fixed RodAimbot crash
- optimized & improved performance
+ improved scripting api
  • Loading branch information
Strangerrrs committed Sep 8, 2024
1 parent 7c32515 commit 1f4bff6
Show file tree
Hide file tree
Showing 24 changed files with 488 additions and 167 deletions.
11 changes: 5 additions & 6 deletions src/main/java/keystrokesmod/Raven.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,20 @@ public void onTick(ClientTickEvent e) {
for (Module module : getModuleManager().getModules()) {
if (mc.currentScreen == null && module.canBeEnabled()) {
module.keybind();
} else if (mc.currentScreen instanceof ClickGui) {
}
else if (mc.currentScreen instanceof ClickGui) {
module.guiUpdate();
}

if (module.isEnabled()) {
module.onUpdate();
}
}
for (Profile profile : Raven.profileManager.profiles) {
if (mc.currentScreen == null) {
if (mc.currentScreen == null) {
for (Profile profile : Raven.profileManager.profiles) {
profile.getModule().keybind();
}
}
for (Module module : Raven.scriptManager.scripts.values()) {
if (mc.currentScreen == null) {
for (Module module : Raven.scriptManager.scripts.values()) {
module.keybind();
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/keystrokesmod/module/Module.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ public void keybind() {
if (!this.isToggled && (this.keycode >= 1000 ? Mouse.isButtonDown(this.keycode - 1000) : Keyboard.isKeyDown(this.keycode))) {
this.toggle();
this.isToggled = true;
} else if ((this.keycode >= 1000 ? !Mouse.isButtonDown(this.keycode - 1000) : !Keyboard.isKeyDown(this.keycode))) {
}
else if ((this.keycode >= 1000 ? !Mouse.isButtonDown(this.keycode - 1000) : !Keyboard.isKeyDown(this.keycode))) {
this.isToggled = false;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/keystrokesmod/module/ModuleManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public void register() {
this.addModule(new Velocity());
this.addModule(bHop = new BHop());
this.addModule(invManager = new InvManager());
this.addModule(new ChatBypass());
this.addModule(scaffold = new Scaffold());
this.addModule(new AutoRequeue());
this.addModule(new AntiAFK());
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/keystrokesmod/module/impl/client/Gui.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class Gui extends Module {
public Gui() {
super("Gui", category.client, 54);
this.registerSetting(guiScale = new SliderSetting("Gui scale", 2, new String[]{ "Small", "Normal", "Large" }));
//this.registerSetting(backgroundBlur = new SliderSetting("Background blur", "%", 50, 0, 100, 1));
this.registerSetting(backgroundBlur = new SliderSetting("Background blur", "%", 50, 0, 100, 1));
this.registerSetting(scrollSpeed = new SliderSetting("Scroll speed", 50, 0, 90, 1));
this.registerSetting(darkBackground = new ButtonSetting("Dark background", true));
this.registerSetting(rainBowOutlines = new ButtonSetting("Rainbow outlines", true));
Expand Down
28 changes: 13 additions & 15 deletions src/main/java/keystrokesmod/module/impl/combat/AntiKnockback.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import org.lwjgl.input.Mouse;

import java.util.List;

public class AntiKnockback extends Module {
private SliderSetting horizontal;
private SliderSetting vertical;
Expand Down Expand Up @@ -62,16 +60,16 @@ public void onReceivePacket(ReceivePacketEvent e) {
}
S12PacketEntityVelocity s12PacketEntityVelocity = (S12PacketEntityVelocity) e.getPacket();
if (horizontal.getInput() == 0 && vertical.getInput() > 0) {
mc.thePlayer.motionY = ((double) s12PacketEntityVelocity.getMotionY() / 8000) * vertical.getInput()/100;
mc.thePlayer.motionY = ((double) s12PacketEntityVelocity.getMotionY() / 8000) * vertical.getInput() / 100.0;
}
else if (horizontal.getInput() > 0 && vertical.getInput() == 0) {
mc.thePlayer.motionX = ((double) s12PacketEntityVelocity.getMotionX() / 8000) * horizontal.getInput()/100;
mc.thePlayer.motionZ = ((double) s12PacketEntityVelocity.getMotionZ() / 8000) * horizontal.getInput()/100;
mc.thePlayer.motionX = ((double) s12PacketEntityVelocity.getMotionX() / 8000) * horizontal.getInput() / 100.0;
mc.thePlayer.motionZ = ((double) s12PacketEntityVelocity.getMotionZ() / 8000) * horizontal.getInput() / 100.0;
}
else {
mc.thePlayer.motionX = ((double) s12PacketEntityVelocity.getMotionX() / 8000) * horizontal.getInput()/100;
mc.thePlayer.motionY = ((double) s12PacketEntityVelocity.getMotionY() / 8000) * vertical.getInput()/100;
mc.thePlayer.motionZ = ((double) s12PacketEntityVelocity.getMotionZ() / 8000) * horizontal.getInput()/100;
mc.thePlayer.motionX = ((double) s12PacketEntityVelocity.getMotionX() / 8000) * horizontal.getInput() / 100.0;
mc.thePlayer.motionY = ((double) s12PacketEntityVelocity.getMotionY() / 8000) * vertical.getInput() / 100.0;
mc.thePlayer.motionZ = ((double) s12PacketEntityVelocity.getMotionZ() / 8000) * horizontal.getInput() / 100.0;
}
e.setCanceled(true);
if (boostMultiplier.getInput() != 1) {
Expand All @@ -95,16 +93,16 @@ else if (e.getPacket() instanceof S27PacketExplosion) {
}
S27PacketExplosion s27PacketExplosion = (S27PacketExplosion) e.getPacket();
if (horizontal.getInput() == 0 && vertical.getInput() > 0) {
mc.thePlayer.motionY += s27PacketExplosion.func_149144_d() * vertical.getInput()/100;
mc.thePlayer.motionY += s27PacketExplosion.func_149144_d() * vertical.getInput() / 100.0;
}
else if (horizontal.getInput() > 0 && vertical.getInput() == 0) {
mc.thePlayer.motionX += s27PacketExplosion.func_149149_c() * horizontal.getInput()/100;
mc.thePlayer.motionZ += s27PacketExplosion.func_149147_e() * horizontal.getInput()/100;
mc.thePlayer.motionX += s27PacketExplosion.func_149149_c() * horizontal.getInput() / 100.0;
mc.thePlayer.motionZ += s27PacketExplosion.func_149147_e() * horizontal.getInput() / 100.0;
}
else {
mc.thePlayer.motionX += s27PacketExplosion.func_149149_c() * horizontal.getInput()/100;
mc.thePlayer.motionY += s27PacketExplosion.func_149144_d() * vertical.getInput()/100;
mc.thePlayer.motionZ += s27PacketExplosion.func_149147_e() * horizontal.getInput()/100;
mc.thePlayer.motionX += s27PacketExplosion.func_149149_c() * horizontal.getInput() / 100.0;
mc.thePlayer.motionY += s27PacketExplosion.func_149144_d() * vertical.getInput() / 100.0;
mc.thePlayer.motionZ += s27PacketExplosion.func_149147_e() * horizontal.getInput() / 100.0;
}
e.setCanceled(true);
}
Expand All @@ -116,7 +114,7 @@ private boolean cancel() {

@Override
public String getInfo() {
return (horizontal.getInput() == 100 ? "" : (int) horizontal.getInput() + "h") + (horizontal.getInput() != 100 && vertical.getInput() != 100 ? " " : "") + (vertical.getInput() == 100 ? "" : (int) vertical.getInput() + "v");
return (int) horizontal.getInput() + "%" + " " + (int) vertical.getInput() + "%";
}

@Override
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/keystrokesmod/module/impl/combat/RodAimbot.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ public void onPreMotion(PreMotionEvent event) {
return;
}
float[] rotations = RotationUtils.getRotationsPredicated(entity, (int)predicatedTicks.getInput());
if (rotations == null) {
return;
}
event.setYaw(rotations[0]);
event.setPitch(rotations[1]);
if (!rightClick && rotate) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public Velocity() {

@Override
public String getInfo() {
return (horizontal.getInput() == 100 ? "" : (int) horizontal.getInput() + "h") + (horizontal.getInput() != 100 && vertical.getInput() != 100 ? " " : "") + (vertical.getInput() == 100 ? "" : (int) vertical.getInput() + "v");
return (int) horizontal.getInput() + "%" + " " + (int) vertical.getInput() + "%";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ public BedWars() {
}

public void onEnable() {
armoredPlayer.clear();
lastHeldMap.clear();
obsidianPos.clear();
check = false;
outsideSpawn = true;
}
Expand Down Expand Up @@ -91,6 +88,7 @@ public void onEntityJoinWorld(EntityJoinWorldEvent e) {
if (e.entity == mc.thePlayer) {
armoredPlayer.clear();
lastHeldMap.clear();
obsidianPos.clear();
}
}

Expand Down
20 changes: 12 additions & 8 deletions src/main/java/keystrokesmod/module/impl/movement/InvMove.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,24 @@ public class InvMove extends Module {
private ButtonSetting modifyMotionPost;
private ButtonSetting slowWhenNecessary;
private ButtonSetting allowJumping;
private ButtonSetting allowSprinting;
public ButtonSetting invManagerOnly;
private ButtonSetting allowRotating;
public int ticks;
public boolean setMotion;
//private String[] inventoryModes = new String[] { "Disabled", "Vanilla", "Blink", "Close" };
private String[] chestAndOtherModes = new String[] { "Disabled", "Vanilla", "Blink" };
private String[] modes = new String[] { "Disabled", "Vanilla", "Blink" };
private ConcurrentLinkedQueue<Packet> blinkedPackets = new ConcurrentLinkedQueue<>();

public InvMove() {
super("InvMove", Module.category.movement);
this.registerSetting(inventory = new SliderSetting("Inventory", 1, chestAndOtherModes));
this.registerSetting(chestAndOthers = new SliderSetting("Chest & others", 1, chestAndOtherModes));
this.registerSetting(inventory = new SliderSetting("Inventory", 1, modes));
this.registerSetting(chestAndOthers = new SliderSetting("Chest & others", 1, modes));
this.registerSetting(motion = new SliderSetting("Motion", "x", 1, 0.05, 1, 0.01));
this.registerSetting(modifyMotionPost = new ButtonSetting("Modify motion after click", false));
this.registerSetting(slowWhenNecessary = new ButtonSetting("Slow motion when necessary", false));
this.registerSetting(allowJumping = new ButtonSetting("Allow jumping", true));
this.registerSetting(allowRotating = new ButtonSetting("Allow rotating", false));
this.registerSetting(allowRotating = new ButtonSetting("Allow rotating", true));
this.registerSetting(allowSprinting = new ButtonSetting("Allow sprinting", true));
this.registerSetting(invManagerOnly = new ButtonSetting("Only with inventory manager", false));
}

Expand Down Expand Up @@ -102,9 +103,12 @@ public void onPreUpdate(PreUpdateEvent e) {
KeyBinding.setKeyBindState(mc.gameSettings.keyBindJump.getKeyCode(), Utils.jumpDown());
KeyBinding.setKeyBindState(mc.gameSettings.keyBindSprint.getKeyCode(), Keyboard.isKeyDown(mc.gameSettings.keyBindSprint.getKeyCode()));
boolean foodLvlMet = (float)mc.thePlayer.getFoodStats().getFoodLevel() > 6.0F || mc.thePlayer.capabilities.allowFlying; // from mc
if ((Keyboard.isKeyDown(mc.gameSettings.keyBindSprint.getKeyCode()) || ModuleManager.sprint.isEnabled()) && mc.thePlayer.movementInput.moveForward >= 0.8F && foodLvlMet && !mc.thePlayer.isSprinting()) {
if (((Keyboard.isKeyDown(mc.gameSettings.keyBindSprint.getKeyCode()) || ModuleManager.sprint.isEnabled()) && mc.thePlayer.movementInput.moveForward >= 0.8F && foodLvlMet && !mc.thePlayer.isSprinting()) && allowSprinting.isToggled()) {
mc.thePlayer.setSprinting(true);
}
if (!allowSprinting.isToggled()) {
mc.thePlayer.setSprinting(false);
}
if (allowRotating.isToggled()) {
if (Keyboard.isKeyDown(208) && mc.thePlayer.rotationPitch < 90.0F) {
mc.thePlayer.rotationPitch += 6.0F;
Expand Down Expand Up @@ -171,7 +175,7 @@ private boolean canBlink() {
if (mc.currentScreen == null) {
return false;
}
else if ((mc.currentScreen instanceof GuiInventory && inventory.getInput() == 2)) {
else if (mc.currentScreen instanceof GuiInventory && inventory.getInput() == 2) {
return true;
}
else if (chestAndOthers.getInput() == 2 && !(mc.currentScreen instanceof ClickGui) && !(mc.currentScreen instanceof GuiChat)) {
Expand All @@ -188,4 +192,4 @@ private void releasePackets() {
}
blinkedPackets.clear();
}
}
}
129 changes: 125 additions & 4 deletions src/main/java/keystrokesmod/module/impl/movement/Sprint.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,142 @@
package keystrokesmod.module.impl.movement;

import keystrokesmod.module.Module;
import keystrokesmod.module.ModuleManager;
import keystrokesmod.module.setting.impl.ButtonSetting;
import keystrokesmod.module.setting.impl.DescriptionSetting;
import keystrokesmod.utility.RenderUtils;
import keystrokesmod.utility.Utils;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.settings.KeyBinding;
import net.minecraftforge.fml.client.config.GuiButtonExt;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent.PlayerTickEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;

import java.io.IOException;

public class Sprint extends Module {
private ButtonSetting displayText;
private ButtonSetting rainbow;
public String text = "[Sprint (Toggled)]";
public float posX = 5;
public float posY = 5;

public Sprint() {
super("Sprint", Module.category.movement, 0);
super("Sprint", category.movement, 0);
this.registerSetting(new DescriptionSetting("Command: '§esprint [msg]§r'"));
this.registerSetting(new ButtonSetting("Edit text position", () -> {
mc.displayGuiScreen(new EditScreen());
}));
this.registerSetting(displayText = new ButtonSetting("Display text", false));
this.registerSetting(rainbow = new ButtonSetting("Rainbow", false));
this.closetModule = true;
}

@SubscribeEvent
public void p(PlayerTickEvent e) {
public void onUpdate() {
if (Utils.nullCheck() && mc.inGameHasFocus) {
KeyBinding.setKeyBindState(mc.gameSettings.keyBindSprint.getKeyCode(), true);
}
}

@SubscribeEvent
public void onRenderTick(TickEvent.RenderTickEvent e) {
if (e.phase != TickEvent.Phase.END || !displayText.isToggled() || !Utils.nullCheck()) {
return;
}
if (mc.currentScreen != null || mc.gameSettings.showDebugInfo) {
return;
}
mc.fontRendererObj.drawStringWithShadow(text, posX, posY, rainbow.isToggled() ? Utils.getChroma(2, 0) : -1);
}

static class EditScreen extends GuiScreen {
GuiButtonExt resetPosition;
boolean d = false;
int miX = 0;
int miY = 0;
int maX = 0;
int maY = 0;
float aX = 5;
float aY = 5;
int laX = 0;
int laY = 0;
int lmX = 0;
int lmY = 0;
int clickMinX = 0;

public void initGui() {
super.initGui();
this.buttonList.add(this.resetPosition = new GuiButtonExt(1, this.width - 90, this.height - 25, 85, 20, "Reset position"));
this.aX = ModuleManager.sprint.posX;
this.aY =ModuleManager.sprint.posY;
}

public void drawScreen(int mX, int mY, float pt) {
drawRect(0, 0, this.width, this.height, -1308622848);
int miX = (int) this.aX;
int miY = (int) this.aY;
String text = ModuleManager.sprint.text;
int maX = miX + this.mc.fontRendererObj.getStringWidth(text);
int maY = miY + this.mc.fontRendererObj.FONT_HEIGHT;
this.mc.fontRendererObj.drawStringWithShadow(text, this.aX, this.aY, -1);
this.miX = miX;
this.miY = miY;
this.maX = maX;
this.maY = maY;
this.clickMinX = miX;
ModuleManager.sprint.posX = miX;
ModuleManager.sprint.posY = miY;
ScaledResolution res = new ScaledResolution(this.mc);
int x = res.getScaledWidth() / 2 - 84;
int y = res.getScaledHeight() / 2 - 20;
RenderUtils.drawColoredString("Edit the HUD position by dragging.", '-', x, y, 2L, 0L, true, this.mc.fontRendererObj);

try {
this.handleInput();
}
catch (IOException var12) {
}

super.drawScreen(mX, mY, pt);
}

protected void mouseClickMove(int mX, int mY, int b, long t) {
super.mouseClickMove(mX, mY, b, t);
if (b == 0) {
if (this.d) {
this.aX = this.laX + (mX - this.lmX);
this.aY = this.laY + (mY - this.lmY);
}
else if (mX > this.clickMinX && mX < this.maX && mY > this.miY && mY < this.maY) {
this.d = true;
this.lmX = mX;
this.lmY = mY;
this.laX = (int) this.aX;
this.laY = (int) this.aY;
}

}
}

protected void mouseReleased(int mX, int mY, int s) {
super.mouseReleased(mX, mY, s);
if (s == 0) {
this.d = false;
}
}

public void actionPerformed(GuiButton b) {
if (b == this.resetPosition) {
this.aX = ModuleManager.sprint.posX = 5;
this.aY = ModuleManager.sprint.posY = 5;
}

}

public boolean doesGuiPauseGame() {
return false;
}
}
}
6 changes: 5 additions & 1 deletion src/main/java/keystrokesmod/module/impl/movement/Timer.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ public Timer() {
this.registerSetting(strafeOnly = new ButtonSetting("Strafe only", false));
}

@Override
public String getInfo() {
return Utils.isWholeNumber(speed.getInput()) ? (int) speed.getInput() + "" : speed.getInput() + "";
}

public void onUpdate() {
if (!(mc.currentScreen instanceof ClickGui)) {
if (strafeOnly.isToggled() && mc.thePlayer.moveStrafing == 0) {
Expand All @@ -27,7 +32,6 @@ public void onUpdate() {
else {
Utils.resetTimer();
}

}

public void onDisable() {
Expand Down
Loading

0 comments on commit 1f4bff6

Please sign in to comment.