Skip to content

Commit

Permalink
Release 3
Browse files Browse the repository at this point in the history
additions
+ Trajectories module
+ added 'traditional health color' to TargetHUD
+ added arrows and a scuffed distance to indicators
+ added inventory wrappers to scripting api
+ added armor settings to Nametags
+ added 'show distance' & 'show hits to kill' to Nametags
+ added 'ignore slow' to BedAura
+ added 'disable in creative' to FastMine
+ added module info to Hitbox and FastMine
+ new rotation modes and fast mode for Scaffold
+ added 'disable while scaffold' to AntiFireball

changes
+ 'Render block outline' will use HUD theme if BedESP is not enabled
+ BedESP will render the bed at the same height as a normal bed
+ changed 'disable in water' to 'disable in liquid' in BHop
+ changed how modules visibility is handled by the profiles manager (all hidden modules will become unhidden upon first load)
+ further improved raven b4 script compatibility
+ improved Scaffold block placements
+ fixed xray
+ improved InvManager, will now clean worse tools, worse rods, worse bows, and bad potions, now sorts speed potions properly,
  • Loading branch information
Strangerrrs committed May 19, 2024
1 parent 258ea76 commit 3a375df
Show file tree
Hide file tree
Showing 54 changed files with 1,321 additions and 543 deletions.
105 changes: 49 additions & 56 deletions src/main/java/keystrokesmod/clickgui/ClickGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

import keystrokesmod.Raven;
import keystrokesmod.clickgui.components.Component;
import keystrokesmod.clickgui.components.impl.BindComponent;
import keystrokesmod.clickgui.components.impl.CategoryComponent;
import keystrokesmod.clickgui.components.impl.ModuleComponent;
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 @@ -15,6 +18,7 @@
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.gui.inventory.GuiInventory;
import net.minecraftforge.fml.client.config.GuiButtonExt;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;

import java.awt.*;
Expand Down Expand Up @@ -178,67 +182,43 @@ public void mouseClicked(int x, int y, int m) throws IOException {

public void mouseReleased(int x, int y, int s) {
if (s == 0) {
Iterator var4 = categories.iterator();

CategoryComponent c4t;
while (var4.hasNext()) {
c4t = (CategoryComponent) var4.next();
c4t.d(false);
}

var4 = categories.iterator();

while (true) {
do {
do {
if (!var4.hasNext()) {
return;
}

c4t = (CategoryComponent) var4.next();
} while (!c4t.fv());
} while (c4t.getModules().isEmpty());

for (Component c : c4t.getModules()) {
c.mouseReleased(x, y, s);
Iterator<CategoryComponent> iterator = categories.iterator();
while (iterator.hasNext()) {
CategoryComponent category = iterator.next();
category.d(false);
if (category.fv() && !category.getModules().isEmpty()) {
for (Component module : category.getModules()) {
module.mouseReleased(x, y, s);
}
}
}
}
}

@Override
public void keyTyped(char t, int k) {
if (k == 1) {
if (k == Keyboard.KEY_ESCAPE && !binding()) {
this.mc.displayGuiScreen(null);
} else {
Iterator var3 = categories.iterator();
Iterator<CategoryComponent> iterator = categories.iterator();
while (iterator.hasNext()) {
CategoryComponent category = iterator.next();

while (true) {
CategoryComponent c4t;
do {
do {
if (!var3.hasNext()) {
if (CommandLine.a) {
String cm = this.c.getText();
if (k == 28 && !cm.isEmpty()) {
Commands.rCMD(this.c.getText());
this.c.setText("");
return;
}

this.c.textboxKeyTyped(t, k);
}

return;
}

c4t = (CategoryComponent) var3.next();
} while (!c4t.fv());
} while (c4t.getModules().isEmpty());

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

Expand All @@ -247,11 +227,6 @@ public void actionPerformed(GuiButton b) {
Commands.rCMD(this.c.getText());
this.c.setText("");
}
for (CategoryComponent c : categories) {
for (Component m : c.getModules()) {
m.onGuiClosed();
}
}
}

public void onGuiClosed() {
Expand All @@ -260,10 +235,28 @@ public void onGuiClosed() {
this.sf.cancel(true);
this.sf = null;
}

for (CategoryComponent c : categories) {
c.dragging = false;
for (Component m : c.getModules()) {
m.onGuiClosed();
}
}
}

public boolean doesGuiPauseGame() {
return false;
}

private boolean binding() {
for (CategoryComponent c : categories) {
for (ModuleComponent m : c.getModules()) {
for (Component component : m.settings) {
if (component instanceof BindComponent && ((BindComponent) component).isBinding) {
return true;
}
}
}
}
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import org.lwjgl.opengl.GL11;

public class BindComponent extends Component {
private boolean isBinding;
public boolean isBinding;
private ModuleComponent moduleComponent;
private int bind;
private int x;
Expand Down Expand Up @@ -46,7 +46,7 @@ public void onClick(int x, int y, int b) {
this.isBinding = !this.isBinding;
}
else if (b == 1 && this.moduleComponent.mod.moduleCategory() != Module.category.profiles) {
this.moduleComponent.mod.setVisibility(!this.moduleComponent.mod.isVisible());
this.moduleComponent.mod.setHidden(!this.moduleComponent.mod.isHidden());
if (Raven.currentProfile != null) {
((ProfileModule) Raven.currentProfile.getModule()).saved = false;
}
Expand All @@ -65,7 +65,7 @@ else if (b > 1) {

public void keyTyped(char t, int keybind) {
if (this.isBinding) {
if (keybind == 11) {
if (keybind == Keyboard.KEY_0 || keybind == Keyboard.KEY_ESCAPE) {
if (this.moduleComponent.mod instanceof Gui) {
this.moduleComponent.mod.setBind(54);
} else {
Expand Down Expand Up @@ -94,7 +94,7 @@ public int gh() {
}

private void drawString(String s) {
Minecraft.getMinecraft().fontRendererObj.drawStringWithShadow(s, (float) ((this.moduleComponent.categoryComponent.getX() + 4) * 2), (float) ((this.moduleComponent.categoryComponent.getY() + this.bind + 3) * 2), this.moduleComponent.mod.visible ? Theme.getGradient(10, 0) : Theme.getGradient(11, 0));
Minecraft.getMinecraft().fontRendererObj.drawStringWithShadow(s, (float) ((this.moduleComponent.categoryComponent.getX() + 4) * 2), (float) ((this.moduleComponent.categoryComponent.getY() + this.bind + 3) * 2), !this.moduleComponent.mod.hidden ? Theme.getGradient(10, 0) : Theme.getGradient(11, 0));
}

public void onGuiClosed() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class CategoryComponent {
private int y;
private int x;
private int bh;
private boolean id;
public boolean dragging;
public int xx;
public int yy;
public boolean n4m = false;
Expand All @@ -54,7 +54,7 @@ public CategoryComponent(Module.category category) {
this.smoothTimer = null;
this.xx = 0;
this.categoryOpened = false;
this.id = false;
this.dragging = false;
int tY = this.bh + 3;
this.scale = new ScaledResolution(Minecraft.getMinecraft()).getScaleFactor();

Expand Down Expand Up @@ -108,7 +108,7 @@ public void y(int y) {
}

public void d(boolean d) {
this.id = d;
this.dragging = d;
}

public boolean p() {
Expand Down Expand Up @@ -194,7 +194,7 @@ public int gw() {
}

public void up(int x, int y) {
if (this.id) {
if (this.dragging) {
this.x(x - this.xx);
this.y(y - this.yy);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class ModuleComponent extends Component {
public Module mod;
public CategoryComponent categoryComponent;
public int o;
private ArrayList<Component> settings;
public ArrayList<Component> settings;
public boolean po;
private boolean hovering;

Expand Down
23 changes: 0 additions & 23 deletions src/main/java/keystrokesmod/mixins/impl/entity/MixinEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -429,29 +429,6 @@ public void moveFlying(float p_moveFlying_1_, float p_moveFlying_2_, float p_mov
p_moveFlying_2_ = prePlayerInput.getForward();
p_moveFlying_3_ = prePlayerInput.getFriction();
yaw = prePlayerInput.getYaw();
if (Settings.movementFix != null && Settings.movementFix.isToggled() && PreMotionEvent.setRenderYaw()) {
if (Minecraft.getMinecraft().thePlayer.movementInput.moveForward == 0.0f && Minecraft.getMinecraft().thePlayer.movementInput.moveStrafe == 0.0f) {
return;
}
final double wrapAngleTo180_double = MathHelper.wrapAngleTo180_double(Math.toDegrees(Utils.getHorizontalSpeed()));
double n = 0.0;
double n2 = 0.0;
double n3 = -1.0;
for (float n4 = -1.0f; n4 <= 1.0f; ++n4) {
for (float n5 = -1.0f; n5 <= 1.0f; ++n5) {
if (n4 != 0.0f || n5 != 0.0f) {
final double abs = Math.abs(wrapAngleTo180_double - MathHelper.wrapAngleTo180_double(Math.toDegrees(Utils.ae(RotationUtils.renderYaw, n4, n5))));
if (n3 == -1.0 || abs < n3) {
n3 = abs;
n = n4;
n2 = n5;
}
}
}
}
p_moveFlying_2_ = (float)n;
p_moveFlying_1_ = (float)n2;
}
}

float f = p_moveFlying_1_ * p_moveFlying_1_ + p_moveFlying_2_ * p_moveFlying_2_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ protected void jump() {
return;
}

if (Settings.movementFix != null && Settings.movementFix.isToggled() && PreMotionEvent.setRenderYaw()) {
jumpEvent.setYaw(RotationUtils.renderYaw);
}

this.motionY = jumpEvent.getMotionY();

if (this.isPotionActive(Potion.jump)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ else if (ModuleManager.keepSprint != null && ModuleManager.keepSprint.isEnabled(

@Overwrite
public boolean isBlocking() {
if (ModuleManager.killAura != null && ModuleManager.killAura.isEnabled() && ModuleManager.killAura.block.get() && ((Object) this) == Minecraft.getMinecraft().thePlayer && ModuleManager.killAura.manualBlock.isToggled()) {
if (ModuleManager.killAura != null && ModuleManager.killAura.isEnabled() && ModuleManager.killAura.block.get() && ((Object) this) == Minecraft.getMinecraft().thePlayer && (!ModuleManager.killAura.manualBlock.isToggled() || ModuleManager.killAura.rmbDown)) {
return true;
}
return this.isUsingItem() && this.itemInUse.getItem().getItemUseAction(this.itemInUse) == EnumAction.BLOCK;
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/keystrokesmod/module/Module.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class Module {
private boolean isToggled = false;
public boolean canBeEnabled = true;
public boolean ignoreOnSave = false;
public boolean visible = true;
public boolean hidden = false;
public Script script = null;

public Module(String moduleName, Module.category moduleCategory, int keycode) {
Expand Down Expand Up @@ -94,12 +94,12 @@ public boolean canBeEnabled() {
return this.canBeEnabled;
}

public boolean isVisible() {
return visible;
public boolean isHidden() {
return hidden;
}

public void setVisibility(boolean visible) {
this.visible = visible;
public void setHidden(boolean hidden) {
this.hidden = hidden;
}

public void enable() {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/keystrokesmod/module/ModuleManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class ModuleManager {
public static Module hitBox;
public static Module reach;
public static BedESP bedESP;
public static Module hud;
public static HUD hud;
public static Module timer;
public static Module fly;
public static Module wTap;
Expand Down Expand Up @@ -74,6 +74,7 @@ public void register() {
this.addModule(new AutoTool());
this.addModule(fly = new Fly());
this.addModule(new InvMove());
this.addModule(new Trajectories());
this.addModule(potions = new Potions());
this.addModule(new AutoSwap());
this.addModule(keepSprint = new KeepSprint());
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/keystrokesmod/module/impl/client/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public class Settings extends Module {
private DescriptionSetting rotations;
public static ButtonSetting rotateBody;
public static ButtonSetting fullBody;
public static ButtonSetting movementFix;
public static SliderSetting randomYawFactor;
private DescriptionSetting themeColors;
public static SliderSetting timeMultiplier;
Expand All @@ -45,7 +44,6 @@ public Settings() {
this.registerSetting(rotations = new DescriptionSetting("Rotations"));
this.registerSetting(rotateBody = new ButtonSetting("Rotate body", true));
this.registerSetting(fullBody = new ButtonSetting("Full body", false));
//this.registerSetting(movementFix = new ButtonSetting("Movement fix", false));
this.registerSetting(randomYawFactor = new SliderSetting("Random yaw factor", 1.0, 0.0, 10.0, 1.0));
this.registerSetting(profiles = new DescriptionSetting("Profiles"));
this.registerSetting(sendMessage = new ButtonSetting("Send message on enable", true));
Expand Down
Loading

0 comments on commit 3a375df

Please sign in to comment.