Skip to content

Commit

Permalink
Release 7
Browse files Browse the repository at this point in the history
additions
+ new Float NoSlow mode
+ added more settings to AntiKnockback
+ added more settings for InvMove
+ new "Low" tower mode
+ added "Fade in" to BreakProgress
+ added more options to AntiKnockback
+ added "Disable bhop" to BedAura

fixes, removals, misc
+ fixed Swap autoblock being limited, should now perform as well as Interact B and against other clients
+ fixed KillAura & BedAura rotations being delayed
+ fixed TargetHUD excedding the bar
+ Improved ClickGUI (added scroll, icons, smoothed animations & more)
+ improved the scripting api (fixed creating new entity objects every call)
+ fixed scaffold placing on interactable blocks
+ improved scaffold block placements
+ AutoSwap settings now affect Scaffold AutoSwap
+ now can enable unsaved modules
+ optimized & improved performanec
+ dead players on TargetHUD will now show up with 0 health
+ fixed failing to load profiles
  • Loading branch information
Strangerrrs committed Aug 11, 2024
1 parent 7df7fb4 commit c0c5a6b
Show file tree
Hide file tree
Showing 56 changed files with 1,300 additions and 583 deletions.
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
99 changes: 60 additions & 39 deletions src/main/java/keystrokesmod/clickgui/ClickGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import keystrokesmod.module.Module;
import keystrokesmod.module.impl.client.CommandLine;
import keystrokesmod.module.impl.client.Gui;
import keystrokesmod.module.setting.Setting;
import keystrokesmod.utility.Commands;
import keystrokesmod.utility.Timer;
import keystrokesmod.utility.Utils;
Expand All @@ -17,8 +16,10 @@
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.gui.inventory.GuiInventory;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraftforge.fml.client.config.GuiButtonExt;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;

import java.awt.*;
Expand All @@ -35,8 +36,8 @@ public class ClickGui extends GuiScreen {
private Timer aE;
private Timer aR;
private ScaledResolution sr;
private GuiButtonExt s;
private GuiTextField c;
private GuiButtonExt commandLineSend;
private GuiTextField commandLineInput;
public static ArrayList<CategoryComponent> categories;

public ClickGui() {
Expand All @@ -47,9 +48,9 @@ public ClickGui() {

for (int i = 0; i < length; ++i) {
Module.category c = values[i];
CategoryComponent f = new CategoryComponent(c);
f.y(y);
categories.add(f);
CategoryComponent categoryComponent = new CategoryComponent(c);
categoryComponent.setY(y);
categories.add(categoryComponent);
y += 20;
}

Expand All @@ -61,14 +62,17 @@ public void initMain() {
this.sf = Raven.getExecutor().schedule(() -> {
(this.aL = new Timer(650.0F)).start();
}, 650L, TimeUnit.MILLISECONDS);
for (CategoryComponent categoryComponent : categories) {
categoryComponent.setScreenHeight(this.height);
}
}

public void initGui() {
super.initGui();
this.sr = new ScaledResolution(this.mc);
(this.c = new GuiTextField(1, this.mc.fontRendererObj, 22, this.height - 100, 150, 20)).setMaxStringLength(256);
this.buttonList.add(this.s = new GuiButtonExt(2, 22, this.height - 70, 150, 20, "Send"));
this.s.visible = CommandLine.a;
(this.commandLineInput = new GuiTextField(1, this.mc.fontRendererObj, 22, this.height - 100, 150, 20)).setMaxStringLength(256);
this.buttonList.add(this.commandLineSend = new GuiButtonExt(2, 22, this.height - 70, 150, 20, "Send"));
this.commandLineSend.visible = CommandLine.a;
}

public void drawScreen(int x, int y, float p) {
Expand All @@ -95,8 +99,8 @@ public void drawScreen(int x, int y, float p) {
}

for (CategoryComponent c : categories) {
c.rf(this.fontRendererObj);
c.up(x, y);
c.render(this.fontRendererObj);
c.mousePosition(x, y);

for (Component m : c.getModules()) {
m.drawScreen(x, y);
Expand All @@ -105,13 +109,17 @@ public void drawScreen(int x, int y, float p) {

GL11.glColor3f(1.0f, 1.0f, 1.0f);
if (!Gui.removePlayerModel.isToggled()) {
GlStateManager.pushMatrix();
GlStateManager.disableBlend();
GuiInventory.drawEntityOnScreen(this.width + 15 - this.aE.getValueInt(0, 40, 2), this.height - 10, 40, (float) (this.width - 25 - x), (float) (this.height - 50 - y), this.mc.thePlayer);
GlStateManager.enableBlend();
GlStateManager.popMatrix();
}


if (CommandLine.a) {
if (!this.s.visible) {
this.s.visible = true;
if (!this.commandLineSend.visible) {
this.commandLineSend.visible = true;
}

r = CommandLine.animate.isToggled() ? CommandLine.an.getValueInt(0, 200, 2) : 200;
Expand All @@ -120,24 +128,23 @@ public void drawScreen(int x, int y, float p) {
if (r == 0) {
CommandLine.b = false;
CommandLine.a = false;
this.s.visible = false;
this.commandLineSend.visible = false;
}
}

drawRect(0, 0, r, this.height, -1089466352);
this.drawHorizontalLine(0, r - 1, this.height - 345, -1);
this.drawHorizontalLine(0, r - 1, this.height - 115, -1);
this.drawHorizontalLine(0, r - 1, (this.height - 345), -1);
this.drawHorizontalLine(0, r - 1, (this.height - 115), -1);
drawRect(r - 1, 0, r, this.height, -1);
Commands.rc(this.fontRendererObj, this.height, r, this.sr.getScaleFactor());
int x2 = r - 178;
this.c.xPosition = x2;
this.s.xPosition = x2;
this.c.drawTextBox();
this.commandLineInput.xPosition = x2;
this.commandLineSend.xPosition = x2;
this.commandLineInput.drawTextBox();
super.drawScreen(x, y, p);
} else if (CommandLine.b) {
}
else if (CommandLine.b) {
CommandLine.b = false;
}

}

public void mouseClicked(int x, int y, int m) throws IOException {
Expand All @@ -149,32 +156,34 @@ public void mouseClicked(int x, int y, int m) throws IOException {
do {
if (!var4.hasNext()) {
if (CommandLine.a) {
this.c.mouseClicked(x, y, m);
this.commandLineInput.mouseClicked(x, y, m);
super.mouseClicked(x, y, m);
}

return;
}

category = (CategoryComponent) var4.next();
if (category.v(x, y) && !category.i(x, y) && !category.d(x, y) && m == 0) {
category.d(true);
if (category.v(x, y) && !category.i(x, y) && m == 0) {
category.overTitle(true);
category.xx = x - category.getX();
category.yy = y - category.getY();
}

if (category.d(x, y) && m == 0) {
category.mouseClicked(!category.fv());
if (category.overTitle(x, y) && m == 1) {
category.mouseClicked(!category.isOpened());
}

if (category.i(x, y) && m == 0) {
category.cv(!category.p());
}
} while (!category.fv());
} while (!category.isOpened());
} while (category.getModules().isEmpty());

for (Component c : category.getModules()) {
c.onClick(x, y, m);
if (c.onClick(x, y, m) && c instanceof ModuleComponent) {
category.openModule((ModuleComponent) c);
}
}

}
Expand All @@ -185,8 +194,8 @@ public void mouseReleased(int x, int y, int s) {
Iterator<CategoryComponent> iterator = categories.iterator();
while (iterator.hasNext()) {
CategoryComponent category = iterator.next();
category.d(false);
if (category.fv() && !category.getModules().isEmpty()) {
category.overTitle(false);
if (category.isOpened() && !category.getModules().isEmpty()) {
for (Component module : category.getModules()) {
module.mouseReleased(x, y, s);
}
Expand All @@ -195,6 +204,18 @@ public void mouseReleased(int x, int y, int s) {
}
}

@Override
public void handleMouseInput() throws IOException {
super.handleMouseInput();
int wheelInput = Mouse.getDWheel();
if (wheelInput != 0) {
for (CategoryComponent category : categories) {
category.onScroll(wheelInput);
}
}
}


@Override
public void keyTyped(char t, int k) {
if (k == Keyboard.KEY_ESCAPE && !binding()) {
Expand All @@ -204,28 +225,28 @@ public void keyTyped(char t, int k) {
while (iterator.hasNext()) {
CategoryComponent category = iterator.next();

if (category.fv() && !category.getModules().isEmpty()) {
if (category.isOpened() && !category.getModules().isEmpty()) {
for (Component module : category.getModules()) {
module.keyTyped(t, k);
}
}
}
if (CommandLine.a) {
String cm = this.c.getText();
String cm = this.commandLineInput.getText();
if (k == 28 && !cm.isEmpty()) {
Commands.rCMD(this.c.getText());
this.c.setText("");
Commands.rCMD(this.commandLineInput.getText());
this.commandLineInput.setText("");
return;
}
this.c.textboxKeyTyped(t, k);
this.commandLineInput.textboxKeyTyped(t, k);
}
}
}

public void actionPerformed(GuiButton b) {
if (b == this.s) {
Commands.rCMD(this.c.getText());
this.c.setText("");
if (b == this.commandLineSend) {
Commands.rCMD(this.commandLineInput.getText());
this.commandLineInput.setText("");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ public void render() {
public void drawScreen(int x, int y) {
}

public void onClick(int x, int y, int b) {
public boolean onClick(int x, int y, int b) {
return false;
}

public void mouseReleased(int x, int y, int m) {
Expand All @@ -19,7 +20,7 @@ public void keyTyped(char t, int k) {
public void so(int n) {
}

public int gh() {
public int getHeight() {
return 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;

import java.awt.*;

public class BindComponent extends Component {
public boolean isBinding;
private ModuleComponent moduleComponent;
Expand All @@ -21,7 +19,7 @@ public class BindComponent extends Component {

public BindComponent(ModuleComponent moduleComponent, int bind) {
this.moduleComponent = moduleComponent;
this.x = moduleComponent.categoryComponent.getX() + moduleComponent.categoryComponent.gw();
this.x = moduleComponent.categoryComponent.getX() + moduleComponent.categoryComponent.getWidth();
this.y = moduleComponent.categoryComponent.getY() + moduleComponent.o;
this.bind = bind;
}
Expand All @@ -38,12 +36,12 @@ public void render() {
}

public void drawScreen(int x, int y) {
this.y = this.moduleComponent.categoryComponent.getY() + this.bind;
this.y = this.moduleComponent.categoryComponent.getModuleY() + this.bind;
this.x = this.moduleComponent.categoryComponent.getX();
}

public void onClick(int x, int y, int b) {
if (this.i(x, y) && this.moduleComponent.po && this.moduleComponent.mod.canBeEnabled()) {
public boolean onClick(int x, int y, int b) {
if (this.i(x, y) && this.moduleComponent.isOpened && this.moduleComponent.mod.canBeEnabled()) {
if (b == 0) {
this.isBinding = !this.isBinding;
}
Expand All @@ -63,6 +61,7 @@ else if (b > 1) {
}
}
}
return false;
}

public void keyTyped(char t, int keybind) {
Expand All @@ -76,7 +75,8 @@ public void keyTyped(char t, int keybind) {
if (Raven.currentProfile != null) {
((ProfileModule) Raven.currentProfile.getModule()).saved = false;
}
} else {
}
else {
if (Raven.currentProfile != null) {
((ProfileModule) Raven.currentProfile.getModule()).saved = false;
}
Expand All @@ -88,10 +88,10 @@ public void keyTyped(char t, int keybind) {
}

public boolean i(int x, int y) {
return x > this.x && x < this.x + this.moduleComponent.categoryComponent.gw() && y > this.y - 1 && y < this.y + 12;
return x > this.x && x < this.x + this.moduleComponent.categoryComponent.getWidth() && y > this.y - 1 && y < this.y + 12;
}

public int gh() {
public int getHeight() {
return 16;
}

Expand Down
Loading

0 comments on commit c0c5a6b

Please sign in to comment.