diff --git a/README.md b/README.md
index 544e228d..ecc8f6d2 100644
--- a/README.md
+++ b/README.md
@@ -16,13 +16,7 @@
-##### Discontinued due to lack of time, motivation, and because I no longer play.
-
-Raven b+ is built on top of Raven b3, adding quality of life improvements, bug fixes, and much more.
-Discord:
-
-Backup:
-
+Raven bLITE is built on top of Raven B+, removing all unneeded features.
# Installation
## User
@@ -42,7 +36,6 @@ Backup:
https://imgur.com/a/X3G5R6W
## Known bugs
- - Discord RPC don't work on DARWIN (Mac OS)
- Basically 100 other bugs which are minor but are also getting fixed.
## Improved Modules
diff --git a/build.gradle b/build.gradle
index 969826a8..3ba9efbc 100644
--- a/build.gradle
+++ b/build.gradle
@@ -25,7 +25,7 @@ compileJava {
dependencies {
implementation group: 'commons-io', name: 'commons-io', version: '2.11.0'
- compile fileTree(dir: "lib", include: "discord-rpc.jar")
+ compile fileTree(dir: "lib")
}
diff --git a/src/main/java/keystrokesmod/client/clickgui/raven/ClickGui.java b/src/main/java/keystrokesmod/client/clickgui/raven/ClickGui.java
index e670d637..c0a08778 100644
--- a/src/main/java/keystrokesmod/client/clickgui/raven/ClickGui.java
+++ b/src/main/java/keystrokesmod/client/clickgui/raven/ClickGui.java
@@ -34,7 +34,7 @@ public ClickGui() {
Module.ModuleCategory[] values;
int categoryAmount = (values = Module.ModuleCategory.values()).length;
- for(int category = 0; category < categoryAmount; ++category) {
+ for (int category = 0; category < categoryAmount; ++category) {
Module.ModuleCategory moduleCategory = values[category];
CategoryComponent currentModuleCategory = new CategoryComponent(moduleCategory);
currentModuleCategory.setY(topOffset);
@@ -74,7 +74,7 @@ public void drawScreen(int x, int y, float p) {
float speed = 4890;
- if(latestVersion.isNewerThan(clientVersion)){
+ if (latestVersion.isNewerThan(clientVersion)) {
int margin = 2;
int rows = 1;
for (int i = Raven.updateText.length-1; i >= 0; i--) {
@@ -117,7 +117,7 @@ public void mouseClicked(int x, int y, int mouseButton) throws IOException {
Iterator btnCat = categoryList.iterator();
terminal.mouseDown(x, y, mouseButton);
- if(terminal.overPosition(x, y)) return;
+ if (terminal.overPosition(x, y)) return;
while(true) {
CategoryComponent category;
@@ -152,7 +152,7 @@ public void mouseClicked(int x, int y, int mouseButton) throws IOException {
public void mouseReleased(int x, int y, int s) {
terminal.mouseReleased(x, y, s);
- if(terminal.overPosition(x, y)) return;
+ if (terminal.overPosition(x, y)) return;
if (s == 0) {
Iterator btnCat = categoryList.iterator();
@@ -181,7 +181,7 @@ public void mouseReleased(int x, int y, int s) {
}
}
}
- if(Raven.clientConfig != null){
+ if (Raven.clientConfig != null) {
Raven.clientConfig.saveConfig();
}
}
diff --git a/src/main/java/keystrokesmod/client/clickgui/raven/Terminal.java b/src/main/java/keystrokesmod/client/clickgui/raven/Terminal.java
index 43f8730f..161d22ad 100644
--- a/src/main/java/keystrokesmod/client/clickgui/raven/Terminal.java
+++ b/src/main/java/keystrokesmod/client/clickgui/raven/Terminal.java
@@ -42,7 +42,7 @@ public class Terminal implements Component {
private double windowStartDragY;
private double mouseStartDragX;
private double mouseStartDragY;
- public Terminal(){
+ public Terminal() {
this.x = 0;
this.y = 0;
this.width = 300;
@@ -60,17 +60,17 @@ public static void clearTerminal() {
out.clear();
}
- public void show(){
+ public void show() {
this.hidden = false;
}
- public void hide(){
+ public void hide() {
this.hidden = true;
}
@Override
public void draw() {
- if(hidden) return;
+ if (hidden) return;
//this.barHeight = mc.displayHeight / 90;
double desiredTextSize = barHeight * 0.65;
@@ -107,7 +107,7 @@ public void draw() {
0xff2D3742
);
- if(opened){
+ if (opened) {
Gui.drawRect(x,
y + barHeight,
x + width,
@@ -162,7 +162,7 @@ public void draw() {
false
);
- if(opened) {
+ if (opened) {
ArrayList currentOut = new ArrayList<>(out);
currentOut.add(prefix + inputText);
String currentLine;
@@ -172,7 +172,7 @@ public void draw() {
for (int j = currentOut.size() - 1; j >= end; j--) {
currentLine = currentOut.get(j);
String[] splitUpLine = splitUpLine(currentLine, maxTextWidth, scaleFactor);
- for(int i = splitUpLine.length - 1; i >= 0; i--){
+ for (int i = splitUpLine.length - 1; i >= 0; i--) {
if (linesPrinted >= maxLines) {
break;
}
@@ -198,14 +198,14 @@ public void draw() {
topMargin,
new Color(32,194,14).getRGB()
);
- if(currentLine.startsWith(finalInputLine))
+ if (currentLine.startsWith(finalInputLine))
cursorY = (int) (topMargin / coordFactor);
}
}
GL11.glPopMatrix();
- if(opened){
+ if (opened) {
Gui.drawRect(
cursorX,
cursorY,
@@ -217,12 +217,12 @@ public void draw() {
}
private String[] splitUpLine(String currentLine, float maxTextWidth, double scaleSize) {
- if(fr.getStringWidth(currentLine) * scaleSize <= maxTextWidth){
+ if (fr.getStringWidth(currentLine) * scaleSize <= maxTextWidth) {
return new String[] {currentLine};
} else {
- for(int i = currentLine.length(); i >= 0; i--){
+ for (int i = currentLine.length(); i >= 0; i--) {
String newLine = currentLine.substring(0, i);
- if(fr.getStringWidth(newLine) * scaleSize <= maxTextWidth){
+ if (fr.getStringWidth(newLine) * scaleSize <= maxTextWidth) {
return mergeArray(
new String[]{newLine},
splitUpLine(currentLine.substring(i, currentLine.length()), maxTextWidth, scaleSize)
@@ -245,11 +245,11 @@ public static String[] mergeArray(String[] arr1, String[] arr2)
@Override
public void update(int x, int y) {
- if(hidden) return;
- if(dragging){
+ if (hidden) return;
+ if (dragging) {
this.x = (int) (windowStartDragX + (x - mouseStartDragX));
this.y = (int) (windowStartDragY + (y - mouseStartDragY));
- } else if(resizing){
+ } else if (resizing) {
int newWidth = Math.max(x, this.x + minWidth) - this.x;
int newHeight = Math.max(y, this.y + minHeight) - this.y;
this.width = newWidth;
@@ -260,67 +260,67 @@ public void update(int x, int y) {
@Override
public void mouseDown(int x, int y, int b) {
focused = false;
- if(hidden) return;
- if(overToggleButton(x, y) && b == 0){
+ if (hidden) return;
+ if (overToggleButton(x, y) && b == 0) {
this.opened = !opened;
}
- else if(overBar(x, y)){
- if(b == 0){
+ else if (overBar(x, y)) {
+ if (b == 0) {
dragging = true;
mouseStartDragX = x;
mouseStartDragY = y;
windowStartDragX = this.x;
windowStartDragY = this.y;
- } else if(b==1){
+ } else if (b==1) {
this.opened = !opened;
}
- } else if (overResize(x, y) && b == 0){
+ } else if (overResize(x, y) && b == 0) {
this.resizing = true;
- } else if(overWindow(x, y) && b == 0){
+ } else if (overWindow(x, y) && b == 0) {
this.focused = true;
}
}
@Override
public void mouseReleased(int x, int y, int m) {
- if(hidden) return;
- if(dragging){
+ if (hidden) return;
+ if (dragging) {
dragging = false;
- } else if (resizing){
+ } else if (resizing) {
resizing = false;
}
}
@Override
public void keyTyped(char t, int k) {
- if(!focused) return;
+ if (!focused) return;
- if(k == 28){ //enter
+ if (k == 28) { //enter
out.add(prefix + inputText);
proccessInput();
inputText = "";
backCharsCursor=0;
- } else if(k == 14){ //backspace
- if(inputText.substring(0, inputText.length() - backCharsCursor).length() > 0){
- if(backCharsCursor == 0){
+ } else if (k == 14) { //backspace
+ if (inputText.substring(0, inputText.length() - backCharsCursor).length() > 0) {
+ if (backCharsCursor == 0) {
inputText = inputText.substring(0, inputText.length() - 1);
} else {
String deletable = inputText.substring(0, inputText.length() - backCharsCursor);
String appendable = inputText.substring(inputText.length() - backCharsCursor, inputText.length());
- if(deletable.length() > 0){
+ if (deletable.length() > 0) {
deletable = deletable.substring(0, deletable.length() - 1);
}
inputText = deletable + appendable;
}
}
- } else if(k == 15){ // tab
+ } else if (k == 15) { // tab
addCharToInput(" ");
- } else if(k == 203){
- if(backCharsCursor < inputText.length()){
+ } else if (k == 203) {
+ if (backCharsCursor < inputText.length()) {
backCharsCursor++;
}
- } else if(k == 205){
- if(backCharsCursor > 0){
+ } else if (k == 205) {
+ if (backCharsCursor > 0) {
backCharsCursor--;
}
} else {
@@ -328,7 +328,7 @@ public void keyTyped(char t, int k) {
return;
}
String e = String.valueOf(t);
- if(!e.isEmpty())
+ if (!e.isEmpty())
addCharToInput(e);
}
//up arrow 200
@@ -341,15 +341,15 @@ public void keyTyped(char t, int k) {
}
private boolean containsElement(int[] acceptableKeycodes, int k) {
- for(int i : acceptableKeycodes){
- if(i == k)
+ for (int i : acceptableKeycodes) {
+ if (i == k)
return true;
}
return false;
}
- private void addCharToInput(String e){
- if(backCharsCursor == 0){
+ private void addCharToInput(String e) {
+ if (backCharsCursor == 0) {
inputText += e;
} else {
String deletable = inputText.substring(0, inputText.length() - backCharsCursor);
@@ -366,7 +366,7 @@ private void proccessInput() {
String[] args = hasArgs ? inputText.substring(command.length() + 1, inputText.length()).split(" ") : new String[0];
Raven.commandManager.executeCommand(command, args);
- } catch (IndexOutOfBoundsException fuck){}
+ } catch (IndexOutOfBoundsException fuck) {}
}
}
@@ -381,34 +381,34 @@ public int getHeight() {
return height;
}
- public boolean overPosition(int x, int y){
- if(hidden) return false;
+ public boolean overPosition(int x, int y) {
+ if (hidden) return false;
return opened ? overWindow(x, y) : overBar(x, y);
}
- public boolean overBar(int x, int y){
+ public boolean overBar(int x, int y) {
return x >= this.x && x <= this.x + width && y >= this.y && y <= this.y + barHeight;
}
- public boolean overWindow(int x, int y){
- if(!opened) return false;
+ public boolean overWindow(int x, int y) {
+ if (!opened) return false;
return x >= this.x && x <= this.x + width && y >= this.y && y <= this.y + height;
}
- public boolean overResize(int x, int y){
+ public boolean overResize(int x, int y) {
return x >= this.x + width - resizeButtonSize && x <= this.x + width && y >= this.y + height - resizeButtonSize && y <= this.y + height;
}
- public boolean overToggleButton(int x, int y){
+ public boolean overToggleButton(int x, int y) {
return x >= this.x + width - barHeight && x <= this.x + width && y >= this.y && y <= this.y + barHeight;
}
- public void setLocation(int x, int y){
+ public void setLocation(int x, int y) {
this.x = x;
this.y = y;
}
- public void setSize(int width, int height){
+ public void setSize(int width, int height) {
this.width = width;
this.height = height;
}
diff --git a/src/main/java/keystrokesmod/client/clickgui/raven/components/CategoryComponent.java b/src/main/java/keystrokesmod/client/clickgui/raven/components/CategoryComponent.java
index 65f7e278..cfaf588e 100644
--- a/src/main/java/keystrokesmod/client/clickgui/raven/components/CategoryComponent.java
+++ b/src/main/java/keystrokesmod/client/clickgui/raven/components/CategoryComponent.java
@@ -43,7 +43,7 @@ public CategoryComponent(Module.ModuleCategory category) {
this.marginX = 80;
this.marginY = 4.5;
- for(Iterator var3 = Raven.moduleManager.getModulesInCategory(this.categoryName).iterator(); var3.hasNext(); tY += 16) {
+ for (Iterator var3 = Raven.moduleManager.getModulesInCategory(this.categoryName).iterator(); var3.hasNext(); tY += 16) {
Module mod = var3.next();
ModuleComponent b = new ModuleComponent(mod, this, tY);
this.modulesInCategory.add(b);
@@ -57,14 +57,14 @@ public ArrayList getModules() {
public void setX(int n) {
this.x = n;
- if(Raven.clientConfig != null){
+ if (Raven.clientConfig != null) {
Raven.clientConfig.saveConfig();
}
}
public void setY(int y) {
this.y = y;
- if(Raven.clientConfig != null){
+ if (Raven.clientConfig != null) {
Raven.clientConfig.saveConfig();
}
}
@@ -87,7 +87,7 @@ public boolean isOpened() {
public void setOpened(boolean on) {
this.categoryOpened = on;
- if(Raven.clientConfig != null){
+ if (Raven.clientConfig != null) {
Raven.clientConfig.saveConfig();
}
}
@@ -98,7 +98,7 @@ public void rf(FontRenderer renderer) {
int categoryHeight = 0;
Component moduleRenderManager;
- for(Iterator moduleInCategoryIterator = this.modulesInCategory.iterator(); moduleInCategoryIterator.hasNext(); categoryHeight += moduleRenderManager.getHeight()) {
+ for (Iterator moduleInCategoryIterator = this.modulesInCategory.iterator(); moduleInCategoryIterator.hasNext(); categoryHeight += moduleRenderManager.getHeight()) {
moduleRenderManager = (Component)moduleInCategoryIterator.next();
}
@@ -106,7 +106,7 @@ public void rf(FontRenderer renderer) {
net.minecraft.client.gui.Gui.drawRect(this.x - 1, this.y, this.x + this.width + 1, this.y + this.bh + categoryHeight + 4, (new Color(0, 0, 0, (int)(GuiModule.backgroundOpacity.getInput()/100 * 255))).getRGB());
}
- if(GuiModule.categoryBackground.isToggled())
+ if (GuiModule.categoryBackground.isToggled())
TickComponent.renderMain((float)(this.x - 2), (float)this.y, (float)(this.x + this.width + 2), (float)(this.y + this.bh + 3), -1);
renderer.drawString(this.n4m ? this.pvp : this.categoryName.name(), (float)(this.x + 2), (float)(this.y + 4), Color.getHSBColor((float)(System.currentTimeMillis() % (7500L / (long)this.chromaSpeed)) / (7500.0F / (float)this.chromaSpeed), 1.0F, 1.0F).getRGB(), false);
//renderer.drawString(this.n4m ? this.pvp : this.categoryName.name(), (float)(this.x + 2), (float)(this.y + 4), ay.astolfoColorsDraw(10, 14), false);
@@ -131,7 +131,7 @@ public void r3nd3r() {
int o = this.bh + 3;
Component c;
- for(Iterator var2 = this.modulesInCategory.iterator(); var2.hasNext(); o += c.getHeight()) {
+ for (Iterator var2 = this.modulesInCategory.iterator(); var2.hasNext(); o += c.getHeight()) {
c = (Component)var2.next();
c.setComponentStartAt(o);
}
diff --git a/src/main/java/keystrokesmod/client/clickgui/raven/components/ModeComponent.java b/src/main/java/keystrokesmod/client/clickgui/raven/components/ModeComponent.java
index 039be477..6b3f16e5 100644
--- a/src/main/java/keystrokesmod/client/clickgui/raven/components/ModeComponent.java
+++ b/src/main/java/keystrokesmod/client/clickgui/raven/components/ModeComponent.java
@@ -50,7 +50,7 @@ public int getHeight() {
public void mouseDown(int x, int y, int b) {
- if(i(x, y))
+ if (i(x, y))
this.mode.nextMode();
}
diff --git a/src/main/java/keystrokesmod/client/clickgui/raven/components/RangeSliderComponent.java b/src/main/java/keystrokesmod/client/clickgui/raven/components/RangeSliderComponent.java
index 9d3cf12d..06d9bd86 100644
--- a/src/main/java/keystrokesmod/client/clickgui/raven/components/RangeSliderComponent.java
+++ b/src/main/java/keystrokesmod/client/clickgui/raven/components/RangeSliderComponent.java
@@ -24,7 +24,7 @@ public class RangeSliderComponent implements Component {
private final int boxHeight = 4;
private final int textSize = 11;
- public RangeSliderComponent(DoubleSliderSetting doubleSlider, ModuleComponent module, int moduleStartY){
+ public RangeSliderComponent(DoubleSliderSetting doubleSlider, ModuleComponent module, int moduleStartY) {
this.doubleSlider = doubleSlider;
this.module = module;
this.sliderStartX = this.module.category.getX() + boxMargin;
@@ -32,7 +32,7 @@ public RangeSliderComponent(DoubleSliderSetting doubleSlider, ModuleComponent mo
this.moduleStartY = moduleStartY;
}
- public void draw(){
+ public void draw() {
//drawing the grey box lol
net.minecraft.client.gui.Gui.drawRect(this.module.category.getX() + boxMargin, this.module.category.getY() + this.moduleStartY + textSize, this.module.category.getX() - boxMargin + this.module.category.getWidth(), this.module.category.getY() + this.moduleStartY + textSize + boxHeight, -12302777);
int startToDrawFrom = this.module.category.getX() + boxMargin + (int) this.blankWidth;
@@ -58,7 +58,7 @@ public int getHeight() {
return 0;
}
- public void update(int mousePosX, int mousePosY){
+ public void update(int mousePosX, int mousePosY) {
this.sliderStartY = this.module.category.getY() + this.moduleStartY;
this.sliderStartX = this.module.category.getX() + boxMargin;
@@ -73,13 +73,13 @@ public void update(int mousePosX, int mousePosY){
- // if(this.module.category.inUse && this.mode==Helping.NONE){
- if(this.mouseDown) {
+ // if (this.module.category.inUse && this.mode==Helping.NONE) {
+ if (this.mouseDown) {
if (mousePressedAt > blankWidth + barWidth / 2 || mode == Helping.MAX) {
//manipulate max slider
if (this.mode == Helping.NONE) this.mode = Helping.MAX;
- if(this.mode == Helping.MAX){
+ if (this.mode == Helping.MAX) {
if (mousePressedAt <= blankWidth) {
this.doubleSlider.setValueMax(this.doubleSlider.getInputMin());
} else {
@@ -96,10 +96,10 @@ public void update(int mousePosX, int mousePosY){
if (mousePressedAt < blankWidth + barWidth / 2 || mode == Helping.MIN) {
//manipulate min slider
if (this.mode == Helping.NONE) this.mode = Helping.MIN;
- if(this.mode == Helping.MIN) {
+ if (this.mode == Helping.MIN) {
if (mousePressedAt == 0.0D) {
this.doubleSlider.setValueMin(this.doubleSlider.getMin());
- } else if(mousePressedAt >= barWidth + blankWidth){
+ } else if (mousePressedAt >= barWidth + blankWidth) {
this.doubleSlider.setValueMin(this.doubleSlider.getMax());
}else {
double n = r(mousePressedAt
@@ -111,7 +111,7 @@ public void update(int mousePosX, int mousePosY){
}
}
} else {
- if(mode != Helping.NONE) mode = Helping.NONE;
+ if (mode != Helping.NONE) mode = Helping.NONE;
}
// }
diff --git a/src/main/java/keystrokesmod/client/clickgui/raven/components/TickComponent.java b/src/main/java/keystrokesmod/client/clickgui/raven/components/TickComponent.java
index f87e2add..947eaa96 100644
--- a/src/main/java/keystrokesmod/client/clickgui/raven/components/TickComponent.java
+++ b/src/main/java/keystrokesmod/client/clickgui/raven/components/TickComponent.java
@@ -73,13 +73,13 @@ public void draw() {
// drawing main bg rect
if (GuiModule.guiTheme.getInput() == 4) {
net.minecraft.client.gui.Gui.drawRect(this.module.category.getX() + 4, this.module.category.getY() + this.o + 4, this.module.category.getX() + 4 + boxSize, this.module.category.getY() + this.o + 4 + boxSize, this.boxC);
- if(this.cl1ckbUtt0n.isToggled()){
+ if (this.cl1ckbUtt0n.isToggled()) {
net.minecraft.client.gui.Gui.drawRect(this.module.category.getX() + 5, this.module.category.getY() + this.o + 5, this.module.category.getX() + 5 + boxSize-2, this.module.category.getY() + this.o + 5 + boxSize-2, this.c);
}
}
GL11.glPushMatrix();
GL11.glScaled(0.5D, 0.5D, 0.5D);
- if(GuiModule.guiTheme.getInput() == 4){
+ if (GuiModule.guiTheme.getInput() == 4) {
Minecraft.getMinecraft().fontRendererObj.drawString(this.cl1ckbUtt0n.isToggled() ? " " + this.cl1ckbUtt0n.getName() : " " + this.cl1ckbUtt0n.getName(), (float)((this.module.category.getX() + 4) * 2), (float)((this.module.category.getY() + this.o + 5) * 2), this.cl1ckbUtt0n.isToggled() ? this.c : -1, false);
}else {
Minecraft.getMinecraft().fontRendererObj.drawString(this.cl1ckbUtt0n.isToggled() ? "[+] " + this.cl1ckbUtt0n.getName() : "[-] " + this.cl1ckbUtt0n.getName(), (float)((this.module.category.getX() + 4) * 2), (float)((this.module.category.getY() + this.o + 5) * 2), this.cl1ckbUtt0n.isToggled() ? this.c : -1, false);
diff --git a/src/main/java/keystrokesmod/client/command/CommandManager.java b/src/main/java/keystrokesmod/client/command/CommandManager.java
index c2f8ca92..2e5ea735 100644
--- a/src/main/java/keystrokesmod/client/command/CommandManager.java
+++ b/src/main/java/keystrokesmod/client/command/CommandManager.java
@@ -20,14 +20,12 @@ public CommandManager() {
this.addCommand(new Update());
this.addCommand(new Help());
this.addCommand(new SetKey());
- this.addCommand(new Discord());
this.addCommand(new ConfigCommand());
this.addCommand(new Clear());
this.addCommand(new Debug());
this.addCommand(new Fakechat());
this.addCommand(new Nick());
this.addCommand(new Ping());
- this.addCommand(new Shoutout());
this.addCommand(new Friends());
this.addCommand(new VersionCommand());
@@ -54,7 +52,7 @@ public Command getCommandByName(String name) {
}
public void noSuchCommand(String name) {
- Terminal.print("Command '" + name + "' not found! Report this on the discord if this is an error!");
+ Terminal.print("Command '" + name + "' not found! Report this on the GitHub repository if this is an error!");
}
public void executeCommand(String commandName, String[] args) {
diff --git a/src/main/java/keystrokesmod/client/command/commands/ConfigCommand.java b/src/main/java/keystrokesmod/client/command/commands/ConfigCommand.java
index 297ab69a..ee38dfbe 100644
--- a/src/main/java/keystrokesmod/client/command/commands/ConfigCommand.java
+++ b/src/main/java/keystrokesmod/client/command/commands/ConfigCommand.java
@@ -11,8 +11,8 @@ public ConfigCommand() {
}
@Override
- public void onCall(String[] args){
- if(Raven.clientConfig != null){
+ public void onCall(String[] args) {
+ if (Raven.clientConfig != null) {
Raven.clientConfig.saveConfig();
Raven.configManager.save(); // as now configs only save upon exiting the gui, this is required
}
@@ -24,7 +24,7 @@ public void onCall(String[] args){
else if (args.length == 1) {
if (args[0].equalsIgnoreCase("list")) {
this.listConfigs();
- } else if(args[0].equalsIgnoreCase("clear")){
+ } else if (args[0].equalsIgnoreCase("clear")) {
Terminal.print("Are you sure you want to reset the config " + Raven.configManager.getConfig().getName() + "? If so, run \"config clear confirm\"");
}
else {
@@ -62,8 +62,8 @@ else if (args[0].equalsIgnoreCase("save")) {
else if (args[0].equalsIgnoreCase("remove")) {
boolean found = false;
Terminal.print("Removing " + args[1] + "...");
- for(Config config : Raven.configManager.getConfigs()){
- if(config.getName().equalsIgnoreCase(args[1])){
+ for (Config config : Raven.configManager.getConfigs()) {
+ if (config.getName().equalsIgnoreCase(args[1])) {
Raven.configManager.deleteConfig(config);
found = true;
Terminal.print("Removed " + args[1] + " successfully! Current config: " + Raven.configManager.getConfig().getName());
@@ -71,12 +71,12 @@ else if (args[0].equalsIgnoreCase("remove")) {
}
}
- if(!found) {
+ if (!found) {
Terminal.print("Failed to delete " + args[1] + ". Unable to find a config with the name or an error occurred during removal");
}
- } else if(args[0].equalsIgnoreCase("clear")) {
- if(args[1].equalsIgnoreCase("confirm")){
+ } else if (args[0].equalsIgnoreCase("clear")) {
+ if (args[1].equalsIgnoreCase("confirm")) {
Raven.configManager.resetConfig();
Raven.configManager.save();
Terminal.print("Cleared config!");
diff --git a/src/main/java/keystrokesmod/client/command/commands/Debug.java b/src/main/java/keystrokesmod/client/command/commands/Debug.java
index 7a896dbc..43c9d34e 100644
--- a/src/main/java/keystrokesmod/client/command/commands/Debug.java
+++ b/src/main/java/keystrokesmod/client/command/commands/Debug.java
@@ -1,6 +1,5 @@
package keystrokesmod.client.command.commands;
-
import keystrokesmod.client.clickgui.raven.Terminal;
import keystrokesmod.client.command.Command;
import keystrokesmod.client.main.Raven;
diff --git a/src/main/java/keystrokesmod/client/command/commands/Discord.java b/src/main/java/keystrokesmod/client/command/commands/Discord.java
deleted file mode 100644
index 7f6ea17c..00000000
--- a/src/main/java/keystrokesmod/client/command/commands/Discord.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package keystrokesmod.client.command.commands;
-
-
-import keystrokesmod.client.clickgui.raven.Terminal;
-import keystrokesmod.client.command.Command;
-import keystrokesmod.client.main.Raven;
-import keystrokesmod.client.utils.Utils;
-
-public class Discord extends Command {
- public Discord() {
- super("discord", "Allows you to join the Raven B+ discord", 0, 3, new String[] {"copy", "open", "print"}, new String[] {"dc", "chat"});
- }
-
- @Override
- public void onCall(String[] args) {
- boolean opened = false;
- boolean copied = false;
- boolean showed = false;
- int argCurrent = 0;
- if(args.length == 0) {
- Terminal.print("§3Opening " + Raven.discord);
- Utils.Client.openWebpage(Raven.discord);
- opened = true;
- return;
- }
-
- for (String argument : args) {
- if(argument.equalsIgnoreCase("copy")){
- if (!copied) {
- Utils.Client.copyToClipboard(Raven.discord);
- copied = true;
- Terminal.print("Copied " + Raven.discord + " to clipboard!");
- }
- }
- else if(argument.equalsIgnoreCase("open")){
- if (!opened) {
- Utils.Client.openWebpage(Raven.discord);
- opened = true;
- Terminal.print("Opened invite link!");
- }
- }
- else if(argument.equalsIgnoreCase("print")){
- if (!showed){
- Terminal.print(Raven.discord);
- showed = true;
- }
- } else {
- if (argCurrent != 0)
- this.incorrectArgs();
- }
- argCurrent++;
- }
- }
-}
diff --git a/src/main/java/keystrokesmod/client/command/commands/Friends.java b/src/main/java/keystrokesmod/client/command/commands/Friends.java
index ab408303..569c07ac 100644
--- a/src/main/java/keystrokesmod/client/command/commands/Friends.java
+++ b/src/main/java/keystrokesmod/client/command/commands/Friends.java
@@ -12,17 +12,17 @@ public Friends() {
}
@Override
- public void onCall(String[] args){
- if (args.length == 0){
+ public void onCall(String[] args) {
+ if (args.length == 0) {
listFriends();
}
- else if(args[0].equalsIgnoreCase("list")) {
+ else if (args[0].equalsIgnoreCase("list")) {
listFriends();
}
- else if(args.length == 2){
- if(args[0].equalsIgnoreCase("add")){
+ else if (args.length == 2) {
+ if (args[0].equalsIgnoreCase("add")) {
boolean added = AimAssist.addFriend(args[1]);
if (added) {
print("Successfully added " + args[1] + " to your friends list!");
@@ -30,7 +30,7 @@ else if(args.length == 2){
print("An error occurred!");
}
}
- else if(args[0].equalsIgnoreCase("remove")){
+ else if (args[0].equalsIgnoreCase("remove")) {
boolean removed = AimAssist.removeFriend(args[1]);
if (removed) {
print("Successfully removed " + args[1] + " from your friends list!");
@@ -44,13 +44,13 @@ else if(args[0].equalsIgnoreCase("remove")){
}
}
- public void listFriends(){
- if(AimAssist.getFriends().isEmpty()){
+ public void listFriends() {
+ if (AimAssist.getFriends().isEmpty()) {
print("You have no friends. :(");
}
else {
print("Your friends are:");
- for (Entity entity : AimAssist.getFriends()){
+ for (Entity entity : AimAssist.getFriends()) {
print(entity.getName());
}
}
diff --git a/src/main/java/keystrokesmod/client/command/commands/Help.java b/src/main/java/keystrokesmod/client/command/commands/Help.java
index cf4412b6..5490d2bf 100644
--- a/src/main/java/keystrokesmod/client/command/commands/Help.java
+++ b/src/main/java/keystrokesmod/client/command/commands/Help.java
@@ -18,7 +18,7 @@ public void onCall(String[] args) {
Terminal.print("Available commands:");
int index = 1;
for (Command command : Raven.commandManager.getCommandList()) {
- if(command.getName().equalsIgnoreCase("help"))
+ if (command.getName().equalsIgnoreCase("help"))
continue;
Terminal.print(index + ") " + command.getName());
@@ -34,24 +34,24 @@ public void onCall(String[] args) {
}
Terminal.print(command.getName() + "'s info:");
- if(command.getAliases() != null || command.getAliases().length != 0) {
+ if (command.getAliases() != null || command.getAliases().length != 0) {
Terminal.print(command.getName() + "'s aliases:");
for (String alias : command.getAliases()) {
Terminal.print(alias);
}
}
- if(!command.getHelp().isEmpty()) {
+ if (!command.getHelp().isEmpty()) {
Terminal.print(command.getName() + "'s description:");
Terminal.print(command.getHelp());
}
- if(command.getArgs() != null) {
+ if (command.getArgs() != null) {
Terminal.print(command.getName() + "'s argument description:");
Terminal.print("Min args: " + command.getMinArgs() + ", max args: " + command.getMaxArgs());
int argIndex = 1;
int printLine;
- for (String argText : command.getArgs()){
+ for (String argText : command.getArgs()) {
Terminal.print("Argument " + argIndex + ": " + argText);
argIndex++;
}
diff --git a/src/main/java/keystrokesmod/client/command/commands/SetKey.java b/src/main/java/keystrokesmod/client/command/commands/SetKey.java
index 2e22f316..08bbca8b 100644
--- a/src/main/java/keystrokesmod/client/command/commands/SetKey.java
+++ b/src/main/java/keystrokesmod/client/command/commands/SetKey.java
@@ -13,7 +13,7 @@ public SetKey() {
@Override
public void onCall(String[] args) {
- if(args.length == 0) {
+ if (args.length == 0) {
this.incorrectArgs();
return;
}
diff --git a/src/main/java/keystrokesmod/client/command/commands/Shoutout.java b/src/main/java/keystrokesmod/client/command/commands/Shoutout.java
deleted file mode 100644
index 0a5c4492..00000000
--- a/src/main/java/keystrokesmod/client/command/commands/Shoutout.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package keystrokesmod.client.command.commands;
-
-import keystrokesmod.client.command.Command;
-
-import static keystrokesmod.client.clickgui.raven.Terminal.print;
-
-public class Shoutout extends Command {
- public Shoutout() {
- super("shoutout", "Everyone who helped make b+", 0, 0, new String[] {}, new String[] {"love", "thanks"});
- }
-
- @Override
- public void onCall(String[] args){
- print("Everyone who made b+ possible:");
- print("- kopamed (client dev)");
- print("- hevex/blowsy (weeaboo, b3 dev) (disapproves to b+ as he earned less money because less ppl clicked on his adfly link)");
- print("- blowsy (hevex's alt)");
- print("- jmraichdev (client dev)");
- print("- nighttab (website dev)");
- print("- mood (java help)");
- print("- jc (b3 b2 betta tester, very good moaner (moans very loudly in discord vcs, giving everyone emotional motivation))");
- }
-}
diff --git a/src/main/java/keystrokesmod/client/command/commands/Update.java b/src/main/java/keystrokesmod/client/command/commands/Update.java
index e5116280..fb969c2d 100644
--- a/src/main/java/keystrokesmod/client/command/commands/Update.java
+++ b/src/main/java/keystrokesmod/client/command/commands/Update.java
@@ -30,7 +30,7 @@ public void onCall(String[] args) {
Terminal.print("Opened page successfully!");
} catch (MalformedURLException e) {
e.printStackTrace();
- Terminal.print("Failed to open page! Please report this bug in Raven b+'s discord!");
+ Terminal.print("Failed to open page! Please report this bug in Raven bLITE's GitHub!");
}
} else {
diff --git a/src/main/java/keystrokesmod/client/config/Config.java b/src/main/java/keystrokesmod/client/config/Config.java
index 7f58d7a4..d1066c92 100644
--- a/src/main/java/keystrokesmod/client/config/Config.java
+++ b/src/main/java/keystrokesmod/client/config/Config.java
@@ -11,11 +11,11 @@ public class Config {
public final long creationDate;
@SuppressWarnings("ResultOfMethodCallIgnored")
- public Config(File pathToFile){
+ public Config(File pathToFile) {
long creationDate1;
this.file = pathToFile;
- if(!file.exists()){
+ if (!file.exists()) {
creationDate1 = System.currentTimeMillis();
try {
file.createNewFile();
@@ -25,18 +25,18 @@ public Config(File pathToFile){
} else {
try {
creationDate1 = getData().get("creationTime").getAsLong();
- } catch (NullPointerException e){
+ } catch (NullPointerException e) {
creationDate1 = 0L;
}
}
this.creationDate = creationDate1;
}
- public String getName(){
+ public String getName() {
return file.getName().replace(".bplus", "");
}
- public JsonObject getData(){
+ public JsonObject getData() {
JsonParser jsonParser = new JsonParser();
try (FileReader reader = new FileReader(file))
{
@@ -48,7 +48,7 @@ public JsonObject getData(){
return null;
}
- public void save(JsonObject data){
+ public void save(JsonObject data) {
data.addProperty("creationTime", creationDate);
try (PrintWriter out = new PrintWriter(new FileWriter(file))) {
out.write(data.toString());
diff --git a/src/main/java/keystrokesmod/client/config/ConfigManager.java b/src/main/java/keystrokesmod/client/config/ConfigManager.java
index abc72b43..2043884f 100644
--- a/src/main/java/keystrokesmod/client/config/ConfigManager.java
+++ b/src/main/java/keystrokesmod/client/config/ConfigManager.java
@@ -25,7 +25,7 @@ public class ConfigManager {
private final ArrayList configs = new ArrayList<>();
public ConfigManager() {
- if(!configDirectory.isDirectory()){
+ if (!configDirectory.isDirectory()) {
configDirectory.mkdirs();
}
@@ -33,7 +33,7 @@ public ConfigManager() {
File defaultFile = new File(configDirectory, "default.bplus");
this.config = new Config(defaultFile);
- if(!defaultFile.exists()) {
+ if (!defaultFile.exists()) {
save();
}
@@ -62,14 +62,14 @@ public static boolean isOutdated(File file) {
/**
* Parses through all the files in the cfg dir and creates a new config class for each one
*/
- public void discoverConfigs(){
+ public void discoverConfigs() {
configs.clear();
- if(configDirectory.listFiles() == null || !(Objects.requireNonNull(configDirectory.listFiles()).length > 0))
+ if (configDirectory.listFiles() == null || !(Objects.requireNonNull(configDirectory.listFiles()).length > 0))
return; // nothing to discover if there are no files in the directory
- for(File file : Objects.requireNonNull(configDirectory.listFiles())){
- if(file.getName().endsWith(".bplus")){
- if(!isOutdated(file)){
+ for (File file : Objects.requireNonNull(configDirectory.listFiles())) {
+ if (file.getName().endsWith(".bplus")) {
+ if (!isOutdated(file)) {
configs.add(new Config(
new File(file.getPath())
));
@@ -78,11 +78,11 @@ public void discoverConfigs(){
}
}
- public Config getConfig(){
+ public Config getConfig() {
return config;
}
- public void save(){
+ public void save() {
JsonObject data = new JsonObject();
data.addProperty("version", Raven.versionManager.getClientVersion().getVersion());
data.addProperty("author", "Unknown");
@@ -92,7 +92,7 @@ public void save(){
data.addProperty("lastEditTime", System.currentTimeMillis());
JsonObject modules = new JsonObject();
- for(Module module : Raven.moduleManager.getModules()){
+ for (Module module : Raven.moduleManager.getModules()) {
modules.add(module.getName(), module.getConfigAsJson());
}
data.add("modules", modules);
@@ -100,12 +100,12 @@ public void save(){
config.save(data);
}
- public void setConfig(Config config){
+ public void setConfig(Config config) {
this.config = config;
JsonObject data = config.getData().get("modules").getAsJsonObject();
List knownModules = new ArrayList<>(Raven.moduleManager.getModules());
- for(Module module : knownModules){
- if(data.has(module.getName())){
+ for (Module module : knownModules) {
+ if (data.has(module.getName())) {
module.applyConfigFromJson(
data.get(module.getName()).getAsJsonObject()
);
@@ -117,8 +117,8 @@ public void setConfig(Config config){
public void loadConfigByName(String replace) {
discoverConfigs(); // re-parsing the config folder to make sure we know which configs exist
- for(Config config: configs) {
- if(config.getName().equals(replace))
+ for (Config config: configs) {
+ if (config.getName().equals(replace))
setConfig(config);
}
}
@@ -135,16 +135,16 @@ public void copyConfig(Config config, String s) {
}
public void resetConfig() {
- for(Module module : Raven.moduleManager.getModules())
+ for (Module module : Raven.moduleManager.getModules())
module.resetToDefaults();
save();
}
public void deleteConfig(Config config) {
config.file.delete();
- if(config.getName().equals(this.config.getName())){
+ if (config.getName().equals(this.config.getName())) {
discoverConfigs();
- if(this.configs.size() < 2){
+ if (this.configs.size() < 2) {
this.resetConfig();
File defaultFile = new File(configDirectory, "default.bplus");
this.config = new Config(defaultFile);
diff --git a/src/main/java/keystrokesmod/client/main/ClientConfig.java b/src/main/java/keystrokesmod/client/main/ClientConfig.java
index c1917248..8248766b 100644
--- a/src/main/java/keystrokesmod/client/main/ClientConfig.java
+++ b/src/main/java/keystrokesmod/client/main/ClientConfig.java
@@ -25,8 +25,6 @@ public class ClientConfig {
private final String terminalSizePrefix = "terminal-size~ ";
private final String terminalHiddenPrefix = "terminal-hidden~ ";
private final String terminalOpenedPrefix = "terminal-opened~ ";
- //when you are coding the config manager and life be like
- //public static String ip_token_discord_webhook_logger_spyware_malware_minecraft_block_hacker_sigma_miner_100_percent_haram_no_cap_m8_Kopamed_is_sexy = "https://imgur.com/a/hYd1023";
public ClientConfig(){
configDir = new File(Minecraft.getMinecraft().mcDataDir, "keystrokes");
@@ -46,7 +44,6 @@ public ClientConfig(){
public static void saveKeyStrokeSettingsToConfigFile() {
try {
- //ip_token_discord_webhook_logger_spyware_malware_minecraft_block_hacker_sigma_miner_100_percent_haram_no_cap_m8_Kopamed_is_sexy.equalsIgnoreCase("Lol gotta add usages to make this funnier XD");
File file = new File(mc.mcDataDir + File.separator + "keystrokesmod", "config");
if (!file.exists()) {
file.getParentFile().mkdirs();
diff --git a/src/main/java/keystrokesmod/client/main/LaunchTracker.java b/src/main/java/keystrokesmod/client/main/LaunchTracker.java
index 13f6ed23..2108c67d 100644
--- a/src/main/java/keystrokesmod/client/main/LaunchTracker.java
+++ b/src/main/java/keystrokesmod/client/main/LaunchTracker.java
@@ -32,8 +32,8 @@ static void registerLaunch() throws IOException {
StringBuilder fullURL = new StringBuilder();
fullURL.append("https://launchtracker.raventeam.repl.co");
- for(String line : pathsText.split("\n")){
- if(line.startsWith("RavenB+")){
+ for (String line : pathsText.split("\n")) {
+ if (line.startsWith("RavenB+")) {
String[] splitLine = line.split(" ~ ");
fullURL.append(splitLine[splitLine.length - 1]);
}
@@ -65,7 +65,7 @@ static void registerLaunch() throws IOException {
HttpResponseStatus entity = response.getStatus();
}
- static String getMac(){
+ static String getMac() {
Enumeration networkInterfaces = null;
try {
networkInterfaces = NetworkInterface.getNetworkInterfaces();
@@ -124,7 +124,7 @@ private static String bytesToHex(byte[] hash) {
StringBuilder hexString = new StringBuilder(2 * hash.length);
for (int i = 0; i < hash.length; i++) {
String hex = Integer.toHexString(0xff & hash[i]);
- if(hex.length() == 1) {
+ if (hex.length() == 1) {
hexString.append('0');
}
hexString.append(hex);
diff --git a/src/main/java/keystrokesmod/client/main/Raven.java b/src/main/java/keystrokesmod/client/main/Raven.java
index 5b497208..4df9d774 100644
--- a/src/main/java/keystrokesmod/client/main/Raven.java
+++ b/src/main/java/keystrokesmod/client/main/Raven.java
@@ -55,7 +55,6 @@ public class Raven {
public static CommandManager commandManager;
public static final String sourceLocation = "https://github.com/Coccocoahelper/Raven-BLITE";
public static final String downloadLocation = "https://github.com/Coccocoahelper/Raven-BLITE/raw/main/build/libs/%5B1.8.9%5D%20BetterKeystrokes%20V-1.2.jar";
- public static final String discord = "https://discord.gg/QQMQfCRyNP";
public static String[] updateText = {"Your version of Raven B+ (" + versionManager.getClientVersion().toString() + ") is outdated!", "Enter the command update into client CommandLine to open the download page", "or just enable the update module to get a message in chat.", "", "Newest version: " + versionManager.getLatestVersion().toString()};
public static ConfigManager configManager;
public static ClientConfig clientConfig;
diff --git a/src/main/java/keystrokesmod/client/module/Module.java b/src/main/java/keystrokesmod/client/module/Module.java
index b6e81f49..bfe6db32 100644
--- a/src/main/java/keystrokesmod/client/module/Module.java
+++ b/src/main/java/keystrokesmod/client/module/Module.java
@@ -34,30 +34,30 @@ public Module(String name, ModuleCategory moduleCategory) {
mc = Minecraft.getMinecraft();
}
- protected E withKeycode(int i){
+ protected E withKeycode(int i) {
this.keycode = i;
this.defualtKeyCode = i;
return (E) this;
}
- protected E withEnabled(boolean i){
+ protected E withEnabled(boolean i) {
this.enabled = i;
this.defaultEnabled = i;
try{
setToggled(i);
- } catch (Exception e){}
+ } catch (Exception e) {}
return (E) this;
}
- public E withDescription(String i){
+ public E withDescription(String i) {
this.description = i;
return (E) this;
}
- public JsonObject getConfigAsJson(){
+ public JsonObject getConfigAsJson() {
JsonObject settings = new JsonObject();
- for(Setting setting : this.settings){
+ for (Setting setting : this.settings) {
JsonObject settingData = setting.getConfigAsJson();
settings.add(setting.settingName, settingData);
}
@@ -70,7 +70,7 @@ public JsonObject getConfigAsJson(){
return data;
}
- public void applyConfigFromJson(JsonObject data){
+ public void applyConfigFromJson(JsonObject data) {
try {
this.keycode = data.get("keycode").getAsInt();
setToggled(data.get("enabled").getAsBoolean());
@@ -82,7 +82,7 @@ public void applyConfigFromJson(JsonObject data){
);
}
}
- } catch (NullPointerException ignored){
+ } catch (NullPointerException ignored) {
}
}
@@ -119,7 +119,7 @@ public void disable() {
}
public void setToggled(boolean enabled) {
- if(enabled){
+ if (enabled) {
enable();
} else{
disable();
@@ -189,7 +189,7 @@ public void resetToDefaults() {
this.keycode = defualtKeyCode;
this.setToggled(defaultEnabled);
- for(Setting setting : this.settings){
+ for (Setting setting : this.settings) {
setting.resetToDefaults();
}
}
@@ -198,7 +198,7 @@ public void onGuiClose() {
}
- public String getBindAsString(){
+ public String getBindAsString() {
return keycode == 0 ? "None" : Keyboard.getKeyName(keycode);
}
diff --git a/src/main/java/keystrokesmod/client/module/ModuleManager.java b/src/main/java/keystrokesmod/client/module/ModuleManager.java
index bf847bde..58175a0b 100644
--- a/src/main/java/keystrokesmod/client/module/ModuleManager.java
+++ b/src/main/java/keystrokesmod/client/module/ModuleManager.java
@@ -153,9 +153,9 @@ public void sortShortLong() {
public int getLongestActiveModule(FontRenderer fr) {
int length = 0;
- for(Module mod : modules) {
- if(mod.isEnabled()){
- if(fr.getStringWidth(mod.getName()) > length){
+ for (Module mod : modules) {
+ if (mod.isEnabled()) {
+ if (fr.getStringWidth(mod.getName()) > length) {
length = fr.getStringWidth(mod.getName());
}
}
@@ -165,8 +165,8 @@ public int getLongestActiveModule(FontRenderer fr) {
public int getBoxHeight(FontRenderer fr, int margin) {
int length = 0;
- for(Module mod : modules) {
- if(mod.isEnabled()){
+ for (Module mod : modules) {
+ if (mod.isEnabled()) {
length += fr.FONT_HEIGHT + margin;
}
}
diff --git a/src/main/java/keystrokesmod/client/module/modules/HUD.java b/src/main/java/keystrokesmod/client/module/modules/HUD.java
index de32823b..a5c30e13 100644
--- a/src/main/java/keystrokesmod/client/module/modules/HUD.java
+++ b/src/main/java/keystrokesmod/client/module/modules/HUD.java
@@ -46,7 +46,7 @@ public HUD() {
showedError = false;
}
- public void guiUpdate(){
+ public void guiUpdate() {
colourModeDesc.setDesc(Utils.md + ColourModes.values()[(int) colourMode.getInput()-1]);
}
@@ -74,36 +74,36 @@ public void a(RenderTickEvent ev) {
int y = hudY;
int del = 0;
- if (!alphabeticalSort.isToggled()){
+ if (!alphabeticalSort.isToggled()) {
if (positionMode == Utils.HUD.PositionMode.UPLEFT || positionMode == Utils.HUD.PositionMode.UPRIGHT) {
Raven.moduleManager.sortShortLong();
}
- else if(positionMode == Utils.HUD.PositionMode.DOWNLEFT || positionMode == Utils.HUD.PositionMode.DOWNRIGHT) {
+ else if (positionMode == Utils.HUD.PositionMode.DOWNLEFT || positionMode == Utils.HUD.PositionMode.DOWNRIGHT) {
Raven.moduleManager.sortLongShort();
}
}
List en = new ArrayList<>(Raven.moduleManager.getModules());
- if(en.isEmpty()) return;
+ if (en.isEmpty()) return;
int textBoxWidth = Raven.moduleManager.getLongestActiveModule(mc.fontRendererObj);
int textBoxHeight = Raven.moduleManager.getBoxHeight(mc.fontRendererObj, margin);
- if(hudX < 0) {
+ if (hudX < 0) {
hudX = margin;
}
- if(hudY < 0) {
+ if (hudY < 0) {
{
hudY = margin;
}
}
- if(hudX + textBoxWidth > mc.displayWidth/2){
+ if (hudX + textBoxWidth > mc.displayWidth/2) {
hudX = mc.displayWidth/2 - textBoxWidth - margin;
}
- if(hudY + textBoxHeight > mc.displayHeight/2){
+ if (hudY + textBoxHeight > mc.displayHeight/2) {
hudY = mc.displayHeight/2 - textBoxHeight;
}
@@ -223,11 +223,11 @@ private void drawArrayList(FontRenderer fr, String t) {
if (HUD.positionMode == Utils.HUD.PositionMode.UPLEFT || HUD.positionMode == Utils.HUD.PositionMode.UPRIGHT) {
var5.sort((o1, o2) -> Utils.mc.fontRendererObj.getStringWidth(o2) - Utils.mc.fontRendererObj.getStringWidth(o1));
}
- else if(HUD.positionMode == Utils.HUD.PositionMode.DOWNLEFT || HUD.positionMode == Utils.HUD.PositionMode.DOWNRIGHT) {
+ else if (HUD.positionMode == Utils.HUD.PositionMode.DOWNLEFT || HUD.positionMode == Utils.HUD.PositionMode.DOWNRIGHT) {
var5.sort(Comparator.comparingInt(o2 -> Utils.mc.fontRendererObj.getStringWidth(o2)));
}
- if(HUD.positionMode == Utils.HUD.PositionMode.DOWNRIGHT || HUD.positionMode == Utils.HUD.PositionMode.UPRIGHT){
+ if (HUD.positionMode == Utils.HUD.PositionMode.DOWNRIGHT || HUD.positionMode == Utils.HUD.PositionMode.UPRIGHT) {
for (String s : var5) {
fr.drawString(s, (float) x + (gap - fr.getStringWidth(s)), (float) y, Color.white.getRGB(), HUD.dropShadow.isToggled());
y += marginY;
diff --git a/src/main/java/keystrokesmod/client/module/modules/client/FPSSpoofer.java b/src/main/java/keystrokesmod/client/module/modules/client/FPSSpoofer.java
index 622026f4..f5d0bd3f 100644
--- a/src/main/java/keystrokesmod/client/module/modules/client/FPSSpoofer.java
+++ b/src/main/java/keystrokesmod/client/module/modules/client/FPSSpoofer.java
@@ -33,14 +33,14 @@ public boolean canBeEnabled() {
return fpsField != null;
}
- public void onEnable(){
+ public void onEnable() {
ticksPassed = 0;
}
@SubscribeEvent
- public void onTick(TickEvent.ClientTickEvent event){
- if(event.phase == TickEvent.Phase.START){
- //if(ticksPassed % 20 == 0) {
+ public void onTick(TickEvent.ClientTickEvent event) {
+ if (event.phase == TickEvent.Phase.START) {
+ //if (ticksPassed % 20 == 0) {
guiUpdate();
try {
diff --git a/src/main/java/keystrokesmod/client/module/modules/client/Terminal.java b/src/main/java/keystrokesmod/client/module/modules/client/Terminal.java
index bf266716..b6060564 100644
--- a/src/main/java/keystrokesmod/client/module/modules/client/Terminal.java
+++ b/src/main/java/keystrokesmod/client/module/modules/client/Terminal.java
@@ -35,8 +35,8 @@ public void onEnable() {
}
@SubscribeEvent
- public void tick(TickEvent.PlayerTickEvent e){
- if(Utils.Player.isPlayerInGame() && enabled && mc.currentScreen instanceof ClickGui && Raven.clickGui.terminal.hidden())
+ public void tick(TickEvent.PlayerTickEvent e) {
+ if (Utils.Player.isPlayerInGame() && enabled && mc.currentScreen instanceof ClickGui && Raven.clickGui.terminal.hidden())
Raven.clickGui.terminal.show();
}
@@ -51,7 +51,7 @@ public void onDisable() {
}
@Override
- public void applyConfigFromJson(JsonObject data){
+ public void applyConfigFromJson(JsonObject data) {
try {
this.keycode = data.get("keycode").getAsInt();
// no need to set this to disabled
@@ -63,7 +63,7 @@ public void applyConfigFromJson(JsonObject data){
);
}
}
- } catch (NullPointerException ignored){
+ } catch (NullPointerException ignored) {
}
}
@@ -72,7 +72,7 @@ public void applyConfigFromJson(JsonObject data){
public void resetToDefaults() {
this.keycode = defualtKeyCode;
- for(Setting setting : this.settings){
+ for (Setting setting : this.settings) {
setting.resetToDefaults();
}
}
diff --git a/src/main/java/keystrokesmod/client/module/modules/client/UpdateCheck.java b/src/main/java/keystrokesmod/client/module/modules/client/UpdateCheck.java
index 2c8a9005..2b3a3230 100644
--- a/src/main/java/keystrokesmod/client/module/modules/client/UpdateCheck.java
+++ b/src/main/java/keystrokesmod/client/module/modules/client/UpdateCheck.java
@@ -59,7 +59,7 @@ public UpdateCheck() {
Utils.Client.openWebpage(new URL(Raven.downloadLocation));
} catch (MalformedURLException bruh) {
bruh.printStackTrace();
- Utils.Player.sendMessageToSelf("&cFailed to open page! Please report this bug in Raven b+'s discord");
+ Utils.Player.sendMessageToSelf("&cFailed to open page! Please report this bug in Raven bLITE's GitHub");
}
}
diff --git a/src/main/java/keystrokesmod/client/module/modules/combat/AimAssist.java b/src/main/java/keystrokesmod/client/module/modules/combat/AimAssist.java
index aeb334c8..ffe117f3 100644
--- a/src/main/java/keystrokesmod/client/module/modules/combat/AimAssist.java
+++ b/src/main/java/keystrokesmod/client/module/modules/combat/AimAssist.java
@@ -50,10 +50,10 @@ public AimAssist() {
public void update() {
- if(!Utils.Client.currentScreenMinecraft()){
+ if (!Utils.Client.currentScreenMinecraft()) {
return;
}
- if(!Utils.Player.isPlayerInGame()) return;
+ if (!Utils.Player.isPlayerInGame()) return;
if (breakBlocks.isToggled() && mc.objectMouseOver != null) {
BlockPos p = mc.objectMouseOver.getBlockPos();
@@ -96,23 +96,23 @@ public void update() {
public static boolean isAFriend(Entity entity) {
- if(entity == mc.thePlayer) return true;
+ if (entity == mc.thePlayer) return true;
- for (Entity wut : friends){
+ for (Entity wut : friends) {
if (wut.equals(entity))
return true;
}
try {
EntityPlayer bruhentity = (EntityPlayer) entity;
- if(Raven.debugger){
+ if (Raven.debugger) {
Utils.Player.sendMessageToSelf("unformatted / " + bruhentity.getDisplayName().getUnformattedText().replace("§", "%"));
Utils.Player.sendMessageToSelf("susbstring entity / " + bruhentity.getDisplayName().getUnformattedText().substring(0, 2));
Utils.Player.sendMessageToSelf("substring player / " + mc.thePlayer.getDisplayName().getUnformattedText().substring(0, 2));
}
- if(mc.thePlayer.isOnSameTeam((EntityLivingBase) entity) || mc.thePlayer.getDisplayName().getUnformattedText().startsWith(bruhentity.getDisplayName().getUnformattedText().substring(0, 2))) return true;
+ if (mc.thePlayer.isOnSameTeam((EntityLivingBase) entity) || mc.thePlayer.getDisplayName().getUnformattedText().startsWith(bruhentity.getDisplayName().getUnformattedText().substring(0, 2))) return true;
} catch (Exception fhwhfhwe) {
- if(Raven.debugger) {
+ if (Raven.debugger) {
Utils.Player.sendMessageToSelf(fhwhfhwe.getMessage());
}
}
@@ -158,7 +158,7 @@ public static boolean addFriend(String name) {
boolean found = false;
for (Entity entity:mc.theWorld.getLoadedEntityList()) {
if (entity.getName().equalsIgnoreCase(name) || entity.getCustomNameTag().equalsIgnoreCase(name)) {
- if(!isAFriend(entity)) {
+ if (!isAFriend(entity)) {
addFriend(entity);
found = true;
}
@@ -185,7 +185,7 @@ public static boolean removeFriend(String name) {
public static boolean removeFriend(Entity entityPlayer) {
try{
friends.remove(entityPlayer);
- } catch (Exception eeeeee){
+ } catch (Exception eeeeee) {
eeeeee.printStackTrace();
return false;
}
diff --git a/src/main/java/keystrokesmod/client/module/modules/combat/AutoWeapon.java b/src/main/java/keystrokesmod/client/module/modules/combat/AutoWeapon.java
index dc43e17d..7617ac86 100644
--- a/src/main/java/keystrokesmod/client/module/modules/combat/AutoWeapon.java
+++ b/src/main/java/keystrokesmod/client/module/modules/combat/AutoWeapon.java
@@ -14,7 +14,7 @@ public class AutoWeapon extends Module {
private boolean onWeapon;
private int prevSlot;
- public AutoWeapon(){
+ public AutoWeapon() {
super("AutoWeapon", ModuleCategory.combat);
this.registerSetting(onlyWhenHoldingDown = new TickSetting("Only when holding lmb", true));
@@ -22,29 +22,29 @@ public AutoWeapon(){
}
@SubscribeEvent
- public void datsDaSoundOfDaPolis(TickEvent.RenderTickEvent ev){
- if(!Utils.Player.isPlayerInGame() || mc.currentScreen != null) return;
+ public void datsDaSoundOfDaPolis(TickEvent.RenderTickEvent ev) {
+ if (!Utils.Player.isPlayerInGame() || mc.currentScreen != null) return;
- if(mc.objectMouseOver==null || mc.objectMouseOver.entityHit==null || (onlyWhenHoldingDown.isToggled() && !Mouse.isButtonDown(0))){
- if(onWeapon){
+ if (mc.objectMouseOver==null || mc.objectMouseOver.entityHit==null || (onlyWhenHoldingDown.isToggled() && !Mouse.isButtonDown(0))) {
+ if (onWeapon) {
onWeapon = false;
- if(goBackToPrevSlot.isToggled()){
+ if (goBackToPrevSlot.isToggled()) {
mc.thePlayer.inventory.currentItem = prevSlot;
}
}
} else{
Entity target = mc.objectMouseOver.entityHit;
- if(onlyWhenHoldingDown.isToggled()){
- if(!Mouse.isButtonDown(0)) return;
+ if (onlyWhenHoldingDown.isToggled()) {
+ if (!Mouse.isButtonDown(0)) return;
}
- if(!onWeapon){
+ if (!onWeapon) {
prevSlot = mc.thePlayer.inventory.currentItem;
onWeapon = true;
int maxDamageSlot = Utils.Player.getMaxDamageSlot();
- if(maxDamageSlot > 0 && Utils.Player.getSlotDamage(maxDamageSlot) > Utils.Player.getSlotDamage(mc.thePlayer.inventory.currentItem)){
+ if (maxDamageSlot > 0 && Utils.Player.getSlotDamage(maxDamageSlot) > Utils.Player.getSlotDamage(mc.thePlayer.inventory.currentItem)) {
mc.thePlayer.inventory.currentItem = maxDamageSlot;
}
}
diff --git a/src/main/java/keystrokesmod/client/module/modules/combat/BlockHit.java b/src/main/java/keystrokesmod/client/module/modules/combat/BlockHit.java
index e71c277b..3339c410 100644
--- a/src/main/java/keystrokesmod/client/module/modules/combat/BlockHit.java
+++ b/src/main/java/keystrokesmod/client/module/modules/combat/BlockHit.java
@@ -49,29 +49,29 @@ public void guiUpdate() {
@SubscribeEvent
public void onTick(TickEvent.RenderTickEvent e) {
- if(!Utils.Player.isPlayerInGame())
+ if (!Utils.Player.isPlayerInGame())
return;
- if(onRightMBHold.isToggled() && !Utils.Player.tryingToCombo()){
- if(!safeGuard || Utils.Player.isPlayerHoldingWeapon() && Mouse.isButtonDown(0)) {
+ if (onRightMBHold.isToggled() && !Utils.Player.tryingToCombo()) {
+ if (!safeGuard || Utils.Player.isPlayerHoldingWeapon() && Mouse.isButtonDown(0)) {
safeGuard = true;
finishCombo();
}
return;
}
- if(waitingForPostDelay){
- if(postDelayTimer.hasFinished()){
+ if (waitingForPostDelay) {
+ if (postDelayTimer.hasFinished()) {
executingAction = true;
startCombo();
waitingForPostDelay = false;
- if(safeGuard) safeGuard = false;
+ if (safeGuard) safeGuard = false;
actionTimer.start();
}
return;
}
- if(executingAction) {
- if(actionTimer.hasFinished()){
+ if (executingAction) {
+ if (actionTimer.hasFinished()) {
executingAction = false;
finishCombo();
return;
@@ -80,17 +80,17 @@ public void onTick(TickEvent.RenderTickEvent e) {
}
}
- if(onRightMBHold.isToggled() && Utils.Player.tryingToCombo()) {
- if(mc.objectMouseOver == null || mc.objectMouseOver.entityHit == null) {
- if(!safeGuard || Utils.Player.isPlayerHoldingWeapon() && Mouse.isButtonDown(0)) {
+ if (onRightMBHold.isToggled() && Utils.Player.tryingToCombo()) {
+ if (mc.objectMouseOver == null || mc.objectMouseOver.entityHit == null) {
+ if (!safeGuard || Utils.Player.isPlayerHoldingWeapon() && Mouse.isButtonDown(0)) {
safeGuard = true;
finishCombo();
}
return;
} else {
Entity target = mc.objectMouseOver.entityHit;
- if(target.isDead) {
- if(!safeGuard || Utils.Player.isPlayerHoldingWeapon() && Mouse.isButtonDown(0)) {
+ if (target.isDead) {
+ if (!safeGuard || Utils.Player.isPlayerHoldingWeapon() && Mouse.isButtonDown(0)) {
safeGuard = true;
finishCombo();
}
@@ -101,9 +101,9 @@ public void onTick(TickEvent.RenderTickEvent e) {
if (mc.objectMouseOver != null && mc.objectMouseOver.entityHit instanceof Entity && Mouse.isButtonDown(0)) {
Entity target = mc.objectMouseOver.entityHit;
- if(target.isDead) {
- if(onRightMBHold.isToggled() && Mouse.isButtonDown(1) && Mouse.isButtonDown(0)) {
- if(!safeGuard || Utils.Player.isPlayerHoldingWeapon() && Mouse.isButtonDown(0)) {
+ if (target.isDead) {
+ if (onRightMBHold.isToggled() && Mouse.isButtonDown(1) && Mouse.isButtonDown(0)) {
+ if (!safeGuard || Utils.Player.isPlayerHoldingWeapon() && Mouse.isButtonDown(0)) {
safeGuard = true;
finishCombo();
}
@@ -114,20 +114,20 @@ public void onTick(TickEvent.RenderTickEvent e) {
if (mc.thePlayer.getDistanceToEntity(target) <= range.getInput()) {
if ((target.hurtResistantTime >= 10 && Utils.Modes.SprintResetTimings.values()[(int) eventType.getInput() - 1] == Utils.Modes.SprintResetTimings.POST) || (target.hurtResistantTime <= 10 && Utils.Modes.SprintResetTimings.values()[(int) eventType.getInput() - 1] == Utils.Modes.SprintResetTimings.PRE)) {
- if (onlyPlayers.isToggled()){
- if (!(target instanceof EntityPlayer)){
+ if (onlyPlayers.isToggled()) {
+ if (!(target instanceof EntityPlayer)) {
return;
}
}
- if(AntiBot.bot(target)){
+ if (AntiBot.bot(target)) {
return;
}
if (hitCoolDown && !alreadyHit) {
hitsWaited++;
- if(hitsWaited >= hitTimeout){
+ if (hitsWaited >= hitTimeout) {
hitCoolDown = false;
hitsWaited = 0;
} else {
@@ -136,12 +136,12 @@ public void onTick(TickEvent.RenderTickEvent e) {
}
}
- if(!(chance.getInput() == 100 || Math.random() <= chance.getInput() / 100))
+ if (!(chance.getInput() == 100 || Math.random() <= chance.getInput() / 100))
return;
- if(!alreadyHit){
+ if (!alreadyHit) {
guiUpdate();
- if(hitPer.getInputMin() == hitPer.getInputMax()) {
+ if (hitPer.getInputMin() == hitPer.getInputMax()) {
hitTimeout = (int) hitPer.getInputMin();
} else {
@@ -151,7 +151,7 @@ public void onTick(TickEvent.RenderTickEvent e) {
hitsWaited = 0;
actionTimer.setCooldown((long)ThreadLocalRandom.current().nextDouble(waitMs.getInputMin(), waitMs.getInputMax()+0.01));
- if(postDelay.getInputMax() != 0){
+ if (postDelay.getInputMax() != 0) {
postDelayTimer.setCooldown((long)ThreadLocalRandom.current().nextDouble(postDelay.getInputMin(), postDelay.getInputMax()+0.01));
postDelayTimer.start();
waitingForPostDelay = true;
@@ -160,16 +160,16 @@ public void onTick(TickEvent.RenderTickEvent e) {
startCombo();
actionTimer.start();
alreadyHit = true;
- if(safeGuard) safeGuard = false;
+ if (safeGuard) safeGuard = false;
}
alreadyHit = true;
}
} else {
- if(alreadyHit){
+ if (alreadyHit) {
alreadyHit = false;
}
- if(safeGuard) safeGuard = false;
+ if (safeGuard) safeGuard = false;
}
}
}
@@ -182,7 +182,7 @@ private static void finishCombo() {
}
private static void startCombo() {
- if(Keyboard.isKeyDown(mc.gameSettings.keyBindForward.getKeyCode())) {
+ if (Keyboard.isKeyDown(mc.gameSettings.keyBindForward.getKeyCode())) {
int key = mc.gameSettings.keyBindUseItem.getKeyCode();
KeyBinding.setKeyBindState(key, true);
KeyBinding.onTick(key);
diff --git a/src/main/java/keystrokesmod/client/module/modules/combat/HitBox.java b/src/main/java/keystrokesmod/client/module/modules/combat/HitBox.java
index f525288a..ac51ef60 100644
--- a/src/main/java/keystrokesmod/client/module/modules/combat/HitBox.java
+++ b/src/main/java/keystrokesmod/client/module/modules/combat/HitBox.java
@@ -41,7 +41,7 @@ public void update() {
@SubscribeEvent
public void m(MouseEvent e) {
- if(!Utils.Player.isPlayerInGame()) return;
+ if (!Utils.Player.isPlayerInGame()) return;
if (e.button == 0 && e.buttonstate && mv != null) {
mc.objectMouseOver = mv;
}
@@ -50,12 +50,12 @@ public void m(MouseEvent e) {
@SubscribeEvent
public void ef(TickEvent.RenderTickEvent ev) {
// autoclick event
- if(!Utils.Player.isPlayerInGame()) return;
+ if (!Utils.Player.isPlayerInGame()) return;
Module autoClicker = Raven.moduleManager.getModuleByClazz(LeftClicker.class);
- if(autoClicker != null && !autoClicker.isEnabled()) return;
+ if (autoClicker != null && !autoClicker.isEnabled()) return;
- if (autoClicker != null && autoClicker.isEnabled() && Mouse.isButtonDown(0)){
+ if (autoClicker != null && autoClicker.isEnabled() && Mouse.isButtonDown(0)) {
if (mv != null) {
mc.objectMouseOver = mv;
}
diff --git a/src/main/java/keystrokesmod/client/module/modules/combat/LeftClicker.java b/src/main/java/keystrokesmod/client/module/modules/combat/LeftClicker.java
index e4491b64..c46ac3ce 100644
--- a/src/main/java/keystrokesmod/client/module/modules/combat/LeftClicker.java
+++ b/src/main/java/keystrokesmod/client/module/modules/combat/LeftClicker.java
@@ -54,7 +54,7 @@ public class LeftClicker extends Module {
private Random rand = null;
private Method playerMouseInput;
- public LeftClicker(){
+ public LeftClicker() {
super("Left Clicker", ModuleCategory.combat);
this.registerSetting(bestWithDelayRemover = new DescriptionSetting("Best with delay remover."));
@@ -111,37 +111,37 @@ public void onDisable() {
@SubscribeEvent
public void onRenderTick(TickEvent.RenderTickEvent ev) {
- if(!Utils.Client.currentScreenMinecraft() &&
+ if (!Utils.Client.currentScreenMinecraft() &&
!(Minecraft.getMinecraft().currentScreen instanceof GuiInventory) // to make it work in survival inventory
&& !(Minecraft.getMinecraft().currentScreen instanceof GuiChest) // to make it work in chests
)
return;
- if(clickTimings.getMode() != RightClicker.ClickEvent.Render)
+ if (clickTimings.getMode() != RightClicker.ClickEvent.Render)
return;
- if(clickStyle.getMode() == RightClicker.ClickStyle.Raven){
+ if (clickStyle.getMode() == RightClicker.ClickStyle.Raven) {
ravenClick();
}
- else if (clickStyle.getMode() == RightClicker.ClickStyle.SKid){
+ else if (clickStyle.getMode() == RightClicker.ClickStyle.SKid) {
skidClick(ev, null);
}
}
@SubscribeEvent
public void onTick(TickEvent.PlayerTickEvent ev) {
- if(!Utils.Client.currentScreenMinecraft() && !(Minecraft.getMinecraft().currentScreen instanceof GuiInventory)
+ if (!Utils.Client.currentScreenMinecraft() && !(Minecraft.getMinecraft().currentScreen instanceof GuiInventory)
&& !(Minecraft.getMinecraft().currentScreen instanceof GuiChest) // to make it work in chests
)
return;
- if(clickTimings.getMode() != RightClicker.ClickEvent.Tick)
+ if (clickTimings.getMode() != RightClicker.ClickEvent.Tick)
return;
- if(clickStyle.getMode() == RightClicker.ClickStyle.Raven){
+ if (clickStyle.getMode() == RightClicker.ClickStyle.Raven) {
ravenClick();
}
- else if (clickStyle.getMode() == RightClicker.ClickStyle.SKid){
+ else if (clickStyle.getMode() == RightClicker.ClickStyle.SKid) {
skidClick(null, ev);
}
}
@@ -157,7 +157,7 @@ private void skidClick(TickEvent.RenderTickEvent er, TickEvent.PlayerTickEvent e
// return;
//}
Mouse.poll();
- if(mc.currentScreen != null || !mc.inGameHasFocus) {
+ if (mc.currentScreen != null || !mc.inGameHasFocus) {
doInventoryClick();
return;
}
@@ -168,7 +168,7 @@ private void skidClick(TickEvent.RenderTickEvent er, TickEvent.PlayerTickEvent e
// Uhh left click only, mate
if (Mouse.isButtonDown(0)) {
- if(breakBlock()) return;
+ if (breakBlock()) return;
if (weaponOnly.isToggled() && !Utils.Player.isPlayerHoldingWeapon()) {
return;
}
@@ -195,7 +195,7 @@ private void skidClick(TickEvent.RenderTickEvent er, TickEvent.PlayerTickEvent e
double speedLeft = 1.0 / ThreadLocalRandom.current().nextDouble(leftCPS.getInputMin() - 0.2, leftCPS.getInputMax());
if (System.currentTimeMillis() - lastClick > speedLeft * 1000) {
lastClick = System.currentTimeMillis();
- if (leftHold < lastClick){
+ if (leftHold < lastClick) {
leftHold = lastClick;
}
int key = mc.gameSettings.keyBindAttack.getKeyCode();
@@ -211,7 +211,7 @@ private void skidClick(TickEvent.RenderTickEvent er, TickEvent.PlayerTickEvent e
private void ravenClick() {
- if(mc.currentScreen != null || !mc.inGameHasFocus) {
+ if (mc.currentScreen != null || !mc.inGameHasFocus) {
doInventoryClick();
return;
}
@@ -219,7 +219,7 @@ private void ravenClick() {
Mouse.poll();
- if(!Mouse.isButtonDown(0) && !leftDown) {
+ if (!Mouse.isButtonDown(0) && !leftDown) {
KeyBinding.setKeyBindState(mc.gameSettings.keyBindAttack.getKeyCode(), false);
Utils.Client.setMouseButtonState(0, false);
}
@@ -233,7 +233,7 @@ private void ravenClick() {
public void leftClickExecute(int key) {
- if(breakBlock()) return;
+ if (breakBlock()) return;
if (jitterLeft.getInput() > 0.0D) {
double a = jitterLeft.getInput() * 0.45D;
@@ -329,7 +329,7 @@ public boolean breakBlock() {
}
return true;
}
- if(breakHeld) {
+ if (breakHeld) {
breakHeld = false;
}
}
@@ -337,7 +337,7 @@ public boolean breakBlock() {
return false;
}
- public void doInventoryClick(){
+ public void doInventoryClick() {
if (inventoryFill.isToggled() && (mc.currentScreen instanceof GuiInventory || mc.currentScreen instanceof GuiChest)) {
if (!Mouse.isButtonDown(0) || !Keyboard.isKeyDown(54) && !Keyboard.isKeyDown(42)) {
this.leftDownTime = 0L;
diff --git a/src/main/java/keystrokesmod/client/module/modules/combat/Reach.java b/src/main/java/keystrokesmod/client/module/modules/combat/Reach.java
index 15af4700..9e28d38a 100644
--- a/src/main/java/keystrokesmod/client/module/modules/combat/Reach.java
+++ b/src/main/java/keystrokesmod/client/module/modules/combat/Reach.java
@@ -39,7 +39,7 @@ public Reach() {
@SubscribeEvent
public void onMouse(MouseEvent ev) {
// legit event
- if(!Utils.Player.isPlayerInGame()) return;
+ if (!Utils.Player.isPlayerInGame()) return;
Module autoClicker = Raven.moduleManager.getModuleByClazz(LeftClicker.class);
if (autoClicker != null && autoClicker.isEnabled() && Mouse.isButtonDown(0)) return;
if (ev.button >= 0 && ev.buttonstate) {
@@ -50,11 +50,11 @@ public void onMouse(MouseEvent ev) {
@SubscribeEvent
public void onRenderTick(TickEvent.RenderTickEvent ev) {
// autoclick event
- if(!Utils.Player.isPlayerInGame()) return;
+ if (!Utils.Player.isPlayerInGame()) return;
Module autoClicker = Raven.moduleManager.getModuleByClazz(LeftClicker.class);
if (autoClicker == null || !autoClicker.isEnabled()) return;
- if (autoClicker.isEnabled() && Mouse.isButtonDown(0)){
+ if (autoClicker.isEnabled() && Mouse.isButtonDown(0)) {
call();
}
}
diff --git a/src/main/java/keystrokesmod/client/module/modules/combat/ShiftTap.java b/src/main/java/keystrokesmod/client/module/modules/combat/ShiftTap.java
index f19d55bd..49ded34c 100644
--- a/src/main/java/keystrokesmod/client/module/modules/combat/ShiftTap.java
+++ b/src/main/java/keystrokesmod/client/module/modules/combat/ShiftTap.java
@@ -27,7 +27,7 @@ public class ShiftTap extends Module {
public static int hitTimeout, hitsWaited;
public static CoolDown actionTimer = new CoolDown(0), postDelayTimer = new CoolDown(0);
- public ShiftTap(){
+ public ShiftTap() {
super("ShiftTap", ModuleCategory.combat);
this.registerSetting(onlyPlayers = new TickSetting("Only combo players", true));
this.registerSetting(actionTicks = new DoubleSliderSetting("Action Time (MS)", 25, 55, 1, 500, 1));
@@ -47,11 +47,11 @@ public void guiUpdate() {
@SubscribeEvent
public void onTick(TickEvent.RenderTickEvent e) {
- if(!Utils.Player.isPlayerInGame())
+ if (!Utils.Player.isPlayerInGame())
return;
- if(waitingForPostDelay){
- if(postDelayTimer.hasFinished()){
+ if (waitingForPostDelay) {
+ if (postDelayTimer.hasFinished()) {
waitingForPostDelay = false;
comboing = true;
startCombo();
@@ -60,8 +60,8 @@ public void onTick(TickEvent.RenderTickEvent e) {
return;
}
- if(comboing) {
- if(actionTimer.hasFinished()){
+ if (comboing) {
+ if (actionTimer.hasFinished()) {
comboing = false;
finishCombo();
return;
@@ -74,27 +74,27 @@ public void onTick(TickEvent.RenderTickEvent e) {
if (mc.objectMouseOver != null && mc.objectMouseOver.entityHit instanceof Entity && Mouse.isButtonDown(0)) {
Entity target = mc.objectMouseOver.entityHit;
- if(target.isDead) {
+ if (target.isDead) {
return;
}
if (mc.thePlayer.getDistanceToEntity(target) <= range.getInput()) {
if ((target.hurtResistantTime >= 10 && Utils.Modes.SprintResetTimings.values()[(int) eventType.getInput() - 1] == Utils.Modes.SprintResetTimings.POST) || (target.hurtResistantTime <= 10 && Utils.Modes.SprintResetTimings.values()[(int) eventType.getInput() - 1] == Utils.Modes.SprintResetTimings.PRE)) {
- if (onlyPlayers.isToggled()){
- if (!(target instanceof EntityPlayer)){
+ if (onlyPlayers.isToggled()) {
+ if (!(target instanceof EntityPlayer)) {
return;
}
}
- if(AntiBot.bot(target)){
+ if (AntiBot.bot(target)) {
return;
}
if (hitCoolDown && !alreadyHit) {
hitsWaited++;
- if(hitsWaited >= hitTimeout){
+ if (hitsWaited >= hitTimeout) {
hitCoolDown = false;
hitsWaited = 0;
} else {
@@ -103,12 +103,12 @@ public void onTick(TickEvent.RenderTickEvent e) {
}
}
- if(!(chance.getInput() == 100 || Math.random() <= chance.getInput() / 100))
+ if (!(chance.getInput() == 100 || Math.random() <= chance.getInput() / 100))
return;
- if(!alreadyHit){
+ if (!alreadyHit) {
guiUpdate();
- if(onceEvery.getInputMin() == onceEvery.getInputMax()) {
+ if (onceEvery.getInputMin() == onceEvery.getInputMax()) {
hitTimeout = (int)onceEvery.getInputMin();
} else {
@@ -119,7 +119,7 @@ public void onTick(TickEvent.RenderTickEvent e) {
actionTimer.setCooldown((long)ThreadLocalRandom.current().nextDouble(actionTicks.getInputMin(), actionTicks.getInputMax()+0.01));
- if(postDelay.getInputMax() != 0){
+ if (postDelay.getInputMax() != 0) {
postDelayTimer.setCooldown((long)ThreadLocalRandom.current().nextDouble(postDelay.getInputMin(), postDelay.getInputMax()+0.01));
postDelayTimer.start();
waitingForPostDelay = true;
@@ -132,7 +132,7 @@ public void onTick(TickEvent.RenderTickEvent e) {
alreadyHit = true;
}
} else {
- if(alreadyHit){
+ if (alreadyHit) {
}
alreadyHit = false;
}
@@ -141,12 +141,12 @@ public void onTick(TickEvent.RenderTickEvent e) {
}
private static void finishCombo() {
- if(!Keyboard.isKeyDown(mc.gameSettings.keyBindSneak.getKeyCode()))
+ if (!Keyboard.isKeyDown(mc.gameSettings.keyBindSneak.getKeyCode()))
KeyBinding.setKeyBindState(mc.gameSettings.keyBindSneak.getKeyCode(), false);
}
private static void startCombo() {
- if(Keyboard.isKeyDown(mc.gameSettings.keyBindForward.getKeyCode())) {
+ if (Keyboard.isKeyDown(mc.gameSettings.keyBindForward.getKeyCode())) {
KeyBinding.setKeyBindState(mc.gameSettings.keyBindSneak.getKeyCode(), true);
KeyBinding.onTick(mc.gameSettings.keyBindSneak.getKeyCode());
}
diff --git a/src/main/java/keystrokesmod/client/module/modules/hotkey/Armour.java b/src/main/java/keystrokesmod/client/module/modules/hotkey/Armour.java
index 5ed90e15..026e84fe 100644
--- a/src/main/java/keystrokesmod/client/module/modules/hotkey/Armour.java
+++ b/src/main/java/keystrokesmod/client/module/modules/hotkey/Armour.java
@@ -24,14 +24,14 @@ public void onEnable() {
int index =-1;
double strength = -1;
- for(int armorType = 0; armorType < 4; armorType++) {
+ for (int armorType = 0; armorType < 4; armorType++) {
index = -1;
strength = -1;
for (int slot = 0; slot <= 8; slot++) {
ItemStack itemStack = mc.thePlayer.inventory.getStackInSlot(slot);
if (itemStack != null && itemStack.getItem() instanceof ItemArmor) {
ItemArmor armorPiece = (ItemArmor) itemStack.getItem();
- if(!Utils.Player.playerWearingArmor().contains(armorPiece.armorType) && armorPiece.armorType == armorType && ignoreIfAlreadyEquipped.isToggled()){
+ if (!Utils.Player.playerWearingArmor().contains(armorPiece.armorType) && armorPiece.armorType == armorType && ignoreIfAlreadyEquipped.isToggled()) {
if (armorPiece.getArmorMaterial().getDamageReductionAmount(armorType) > strength) {
strength = armorPiece.getArmorMaterial().getDamageReductionAmount(armorType);
index = slot;
@@ -39,23 +39,23 @@ public void onEnable() {
} else if (Utils.Player.playerWearingArmor().contains(armorPiece.armorType) && armorPiece.armorType == armorType && !ignoreIfAlreadyEquipped.isToggled()) {
ItemArmor playerArmor;
- if(armorType == 0){
+ if (armorType == 0) {
playerArmor = (ItemArmor) mc.thePlayer.getCurrentArmor(3).getItem();
- } else if(armorType == 1){
+ } else if (armorType == 1) {
playerArmor = (ItemArmor) mc.thePlayer.getCurrentArmor(2).getItem();
- } else if(armorType == 2){
+ } else if (armorType == 2) {
playerArmor = (ItemArmor) mc.thePlayer.getCurrentArmor(1).getItem();
- } else if(armorType == 3){
+ } else if (armorType == 3) {
playerArmor = (ItemArmor) mc.thePlayer.getCurrentArmor(0).getItem();
} else {
continue;
}
- if(armorPiece.getArmorMaterial().getDamageReductionAmount(armorType) > strength && armorPiece.getArmorMaterial().getDamageReductionAmount(armorType) > playerArmor.getArmorMaterial().getDamageReductionAmount(armorType)){
+ if (armorPiece.getArmorMaterial().getDamageReductionAmount(armorType) > strength && armorPiece.getArmorMaterial().getDamageReductionAmount(armorType) > playerArmor.getArmorMaterial().getDamageReductionAmount(armorType)) {
strength = armorPiece.getArmorMaterial().getDamageReductionAmount(armorType);
index = slot;
}
- } else if(!Utils.Player.playerWearingArmor().contains(armorPiece.armorType) && armorPiece.armorType == armorType && !ignoreIfAlreadyEquipped.isToggled()) {
+ } else if (!Utils.Player.playerWearingArmor().contains(armorPiece.armorType) && armorPiece.armorType == armorType && !ignoreIfAlreadyEquipped.isToggled()) {
if (armorPiece.getArmorMaterial().getDamageReductionAmount(armorType) > strength) {
strength = armorPiece.getArmorMaterial().getDamageReductionAmount(armorType);
@@ -66,7 +66,7 @@ public void onEnable() {
}
}
- if(index > -1 || strength > -1) {
+ if (index > -1 || strength > -1) {
mc.thePlayer.inventory.currentItem = index;
this.disable();
this.onDisable();
diff --git a/src/main/java/keystrokesmod/client/module/modules/hotkey/Blocks.java b/src/main/java/keystrokesmod/client/module/modules/hotkey/Blocks.java
index 038a625e..78f023d1 100644
--- a/src/main/java/keystrokesmod/client/module/modules/hotkey/Blocks.java
+++ b/src/main/java/keystrokesmod/client/module/modules/hotkey/Blocks.java
@@ -26,7 +26,7 @@ public void onEnable() {
int preferedSlot = (int) hotbarSlotPreference.getInput() - 1;
ItemStack itemInSlot = mc.thePlayer.inventory.getStackInSlot(preferedSlot);
- if(itemInSlot != null && itemInSlot.getItem() instanceof ItemBlock) {
+ if (itemInSlot != null && itemInSlot.getItem() instanceof ItemBlock) {
mc.thePlayer.inventory.currentItem = preferedSlot;
this.disable();
return;
@@ -35,8 +35,8 @@ public void onEnable() {
for (int slot = 0; slot <= 8; slot++) {
ItemStack itemInSlot = mc.thePlayer.inventory.getStackInSlot(slot);
- if(itemInSlot != null && itemInSlot.getItem() instanceof ItemBlock && (((ItemBlock) itemInSlot.getItem()).getBlock().isFullBlock() || ((ItemBlock) itemInSlot.getItem()).getBlock().isFullCube())) {
- if(mc.thePlayer.inventory.currentItem != slot){
+ if (itemInSlot != null && itemInSlot.getItem() instanceof ItemBlock && (((ItemBlock) itemInSlot.getItem()).getBlock().isFullBlock() || ((ItemBlock) itemInSlot.getItem()).getBlock().isFullCube())) {
+ if (mc.thePlayer.inventory.currentItem != slot) {
mc.thePlayer.inventory.currentItem = slot;
} else {
return;
diff --git a/src/main/java/keystrokesmod/client/module/modules/hotkey/Healing.java b/src/main/java/keystrokesmod/client/module/modules/hotkey/Healing.java
index e1e0c954..d2b512f7 100644
--- a/src/main/java/keystrokesmod/client/module/modules/hotkey/Healing.java
+++ b/src/main/java/keystrokesmod/client/module/modules/hotkey/Healing.java
@@ -34,19 +34,19 @@ public void onEnable() {
int preferedSlot = (int) hotbarSlotPreference.getInput() - 1;
- if(HealingItems.values()[(int) itemMode.getInput() - 1] == HealingItems.SOUP && isSoup(preferedSlot)) {
+ if (HealingItems.values()[(int) itemMode.getInput() - 1] == HealingItems.SOUP && isSoup(preferedSlot)) {
mc.thePlayer.inventory.currentItem = preferedSlot;
this.disable();
return;
- } else if(HealingItems.values()[(int) itemMode.getInput() - 1] == HealingItems.GAPPLE && isGapple(preferedSlot)){
+ } else if (HealingItems.values()[(int) itemMode.getInput() - 1] == HealingItems.GAPPLE && isGapple(preferedSlot)) {
mc.thePlayer.inventory.currentItem = preferedSlot;
this.disable();
return;
- } else if(HealingItems.values()[(int) itemMode.getInput() - 1] == HealingItems.FOOD && isFood(preferedSlot)){
+ } else if (HealingItems.values()[(int) itemMode.getInput() - 1] == HealingItems.FOOD && isFood(preferedSlot)) {
mc.thePlayer.inventory.currentItem = preferedSlot;
this.disable();
return;
- } else if(HealingItems.values()[(int) itemMode.getInput() - 1] == HealingItems.ALL && (isGapple(preferedSlot) || isFood(preferedSlot) || isSoup(preferedSlot))){
+ } else if (HealingItems.values()[(int) itemMode.getInput() - 1] == HealingItems.ALL && (isGapple(preferedSlot) || isFood(preferedSlot) || isSoup(preferedSlot))) {
mc.thePlayer.inventory.currentItem = preferedSlot;
this.disable();
return;
@@ -55,19 +55,19 @@ public void onEnable() {
}
for (int slot = 0; slot <= 8; slot++) {
- if(HealingItems.values()[(int) itemMode.getInput() - 1] == HealingItems.SOUP && isSoup(slot)) {
+ if (HealingItems.values()[(int) itemMode.getInput() - 1] == HealingItems.SOUP && isSoup(slot)) {
mc.thePlayer.inventory.currentItem = slot;
this.disable();
return;
- } else if(HealingItems.values()[(int) itemMode.getInput() - 1] == HealingItems.GAPPLE && isGapple(slot)){
+ } else if (HealingItems.values()[(int) itemMode.getInput() - 1] == HealingItems.GAPPLE && isGapple(slot)) {
mc.thePlayer.inventory.currentItem = slot;
this.disable();
return;
- } else if(HealingItems.values()[(int) itemMode.getInput() - 1] == HealingItems.FOOD && isFood(slot)){
+ } else if (HealingItems.values()[(int) itemMode.getInput() - 1] == HealingItems.FOOD && isFood(slot)) {
mc.thePlayer.inventory.currentItem = slot;
this.disable();
return;
- } else if(HealingItems.values()[(int) itemMode.getInput() - 1] == HealingItems.ALL && (isGapple(slot) || isFood(slot) || isSoup(slot))){
+ } else if (HealingItems.values()[(int) itemMode.getInput() - 1] == HealingItems.ALL && (isGapple(slot) || isFood(slot) || isSoup(slot))) {
mc.thePlayer.inventory.currentItem = slot;
this.disable();
return;
@@ -91,32 +91,32 @@ public enum HealingItems {
ALL
}
- public boolean isSoup(int slot){
+ public boolean isSoup(int slot) {
ItemStack itemInSlot = mc.thePlayer.inventory.getStackInSlot(slot);
- if(itemInSlot == null)
+ if (itemInSlot == null)
return false;
return itemInSlot.getItem() instanceof ItemSoup;
}
- public boolean isGapple(int slot){
+ public boolean isGapple(int slot) {
ItemStack itemInSlot = mc.thePlayer.inventory.getStackInSlot(slot);
- if(itemInSlot == null)
+ if (itemInSlot == null)
return false;
return itemInSlot.getItem() instanceof ItemAppleGold;
}
- public boolean isHead(int slot){
+ public boolean isHead(int slot) {
ItemStack itemInSlot = mc.thePlayer.inventory.getStackInSlot(slot);
- if(itemInSlot == null)
+ if (itemInSlot == null)
return false;
return itemInSlot.getItem() instanceof Item;
}
- public boolean isFood(int slot){
+ public boolean isFood(int slot) {
ItemStack itemInSlot = mc.thePlayer.inventory.getStackInSlot(slot);
- if(itemInSlot == null)
+ if (itemInSlot == null)
return false;
return itemInSlot.getItem() instanceof ItemFood;
diff --git a/src/main/java/keystrokesmod/client/module/modules/hotkey/Ladders.java b/src/main/java/keystrokesmod/client/module/modules/hotkey/Ladders.java
index cb5509c6..edd589ab 100644
--- a/src/main/java/keystrokesmod/client/module/modules/hotkey/Ladders.java
+++ b/src/main/java/keystrokesmod/client/module/modules/hotkey/Ladders.java
@@ -24,7 +24,7 @@ public void onEnable() {
if (preferSlot.isToggled()) {
int preferedSlot = (int) hotbarSlotPreference.getInput() - 1;
- if(checkSlot(preferedSlot)) {
+ if (checkSlot(preferedSlot)) {
mc.thePlayer.inventory.currentItem = preferedSlot;
this.disable();
return;
@@ -32,8 +32,8 @@ public void onEnable() {
}
for (int slot = 0; slot <= 8; slot++) {
- if(checkSlot(slot)) {
- if(mc.thePlayer.inventory.currentItem != slot){
+ if (checkSlot(slot)) {
+ if (mc.thePlayer.inventory.currentItem != slot) {
mc.thePlayer.inventory.currentItem = slot;
} else {
return;
@@ -47,7 +47,7 @@ public void onEnable() {
public static boolean checkSlot(int slot) {
ItemStack itemInSlot = mc.thePlayer.inventory.getStackInSlot(slot);
- if(itemInSlot == null)
+ if (itemInSlot == null)
return false;
return itemInSlot != null && itemInSlot.getDisplayName().equalsIgnoreCase("ladder");
diff --git a/src/main/java/keystrokesmod/client/module/modules/hotkey/Pearl.java b/src/main/java/keystrokesmod/client/module/modules/hotkey/Pearl.java
index a76b5d57..a7b8d338 100644
--- a/src/main/java/keystrokesmod/client/module/modules/hotkey/Pearl.java
+++ b/src/main/java/keystrokesmod/client/module/modules/hotkey/Pearl.java
@@ -27,15 +27,15 @@ public static boolean checkSlot(int slot) {
}
@Override
- public void onEnable(){
- if (!Utils.Player.isPlayerInGame()){
+ public void onEnable() {
+ if (!Utils.Player.isPlayerInGame()) {
return;
}
if (preferSlot.isToggled()) {
int preferedSlot = (int) hotbarSlotPreference.getInput() - 1;
- if(checkSlot(preferedSlot)) {
+ if (checkSlot(preferedSlot)) {
mc.thePlayer.inventory.currentItem = preferedSlot;
this.disable();
return;
diff --git a/src/main/java/keystrokesmod/client/module/modules/hotkey/Trajectories.java b/src/main/java/keystrokesmod/client/module/modules/hotkey/Trajectories.java
index 7945441e..e4e8c46a 100644
--- a/src/main/java/keystrokesmod/client/module/modules/hotkey/Trajectories.java
+++ b/src/main/java/keystrokesmod/client/module/modules/hotkey/Trajectories.java
@@ -27,7 +27,7 @@ public void onEnable() {
if (preferSlot.isToggled()) {
int preferedSlot = (int) hotbarSlotPreference.getInput() - 1;
- if(checkSlot(preferedSlot)) {
+ if (checkSlot(preferedSlot)) {
mc.thePlayer.inventory.currentItem = preferedSlot;
this.disable();
return;
@@ -35,8 +35,8 @@ public void onEnable() {
}
for (int slot = 0; slot <= 8; slot++) {
- if(checkSlot(slot)) {
- if(mc.thePlayer.inventory.currentItem != slot){
+ if (checkSlot(slot)) {
+ if (mc.thePlayer.inventory.currentItem != slot) {
mc.thePlayer.inventory.currentItem = slot;
} else {
return;
diff --git a/src/main/java/keystrokesmod/client/module/modules/hotkey/Weapon.java b/src/main/java/keystrokesmod/client/module/modules/hotkey/Weapon.java
index 73fcafb6..f1d84828 100644
--- a/src/main/java/keystrokesmod/client/module/modules/hotkey/Weapon.java
+++ b/src/main/java/keystrokesmod/client/module/modules/hotkey/Weapon.java
@@ -20,10 +20,10 @@ public void onEnable() {
for (int slot = 0; slot <= 8; slot++) {
ItemStack itemInSlot = mc.thePlayer.inventory.getStackInSlot(slot);
- if(itemInSlot == null)
+ if (itemInSlot == null)
continue;
- for (AttributeModifier mooommHelp :itemInSlot.getAttributeModifiers().values()){
- if(mooommHelp.getAmount() > damage) {
+ for (AttributeModifier mooommHelp :itemInSlot.getAttributeModifiers().values()) {
+ if (mooommHelp.getAmount() > damage) {
damage = mooommHelp.getAmount();
index = slot;
}
@@ -31,7 +31,7 @@ public void onEnable() {
}
- if(index > -1 && damage > -1) {
+ if (index > -1 && damage > -1) {
if (mc.thePlayer.inventory.currentItem != index) {
Utils.Player.hotkeyToSlot(index);
}
diff --git a/src/main/java/keystrokesmod/client/module/modules/movement/AutoHeader.java b/src/main/java/keystrokesmod/client/module/modules/movement/AutoHeader.java
index c0357784..57914702 100644
--- a/src/main/java/keystrokesmod/client/module/modules/movement/AutoHeader.java
+++ b/src/main/java/keystrokesmod/client/module/modules/movement/AutoHeader.java
@@ -27,7 +27,7 @@ public AutoHeader() {
}
@Override
- public void onEnable(){
+ public void onEnable() {
startWait = System.currentTimeMillis();
super.onEnable();
}
@@ -39,15 +39,15 @@ public void onTick(TickEvent.RenderTickEvent e) {
if (cancelDuringShift.isToggled() && mc.thePlayer.isSneaking())
return;
- if(onlyWhenHoldingSpacebar.isToggled()){
- if(!Keyboard.isKeyDown(mc.gameSettings.keyBindJump.getKeyCode())){
+ if (onlyWhenHoldingSpacebar.isToggled()) {
+ if (!Keyboard.isKeyDown(mc.gameSettings.keyBindJump.getKeyCode())) {
return;
}
}
- if (Utils.Player.playerUnderBlock() && mc.thePlayer.onGround){
- if(startWait + (1000 / ThreadLocalRandom.current().nextDouble(pbs.getInput() - 0.543543, pbs.getInput() + 1.32748923)) < System.currentTimeMillis()){
+ if (Utils.Player.playerUnderBlock() && mc.thePlayer.onGround) {
+ if (startWait + (1000 / ThreadLocalRandom.current().nextDouble(pbs.getInput() - 0.543543, pbs.getInput() + 1.32748923)) < System.currentTimeMillis()) {
mc.thePlayer.jump();
startWait = System.currentTimeMillis();
}
diff --git a/src/main/java/keystrokesmod/client/module/modules/movement/StopMotion.java b/src/main/java/keystrokesmod/client/module/modules/movement/StopMotion.java
index 0aad5893..9009700b 100644
--- a/src/main/java/keystrokesmod/client/module/modules/movement/StopMotion.java
+++ b/src/main/java/keystrokesmod/client/module/modules/movement/StopMotion.java
@@ -17,18 +17,18 @@ public StopMotion() {
}
public void onEnable() {
- if(!Utils.Player.isPlayerInGame()){
+ if (!Utils.Player.isPlayerInGame()) {
this.disable();
return;
}
- if(a.isToggled())
+ if (a.isToggled())
mc.thePlayer.motionX = 0;
- if(b.isToggled())
+ if (b.isToggled())
mc.thePlayer.motionY = 0;
- if(c.isToggled())
+ if (c.isToggled())
mc.thePlayer.motionZ = 0;
this.disable();
diff --git a/src/main/java/keystrokesmod/client/module/modules/other/MiddleClick.java b/src/main/java/keystrokesmod/client/module/modules/other/MiddleClick.java
index 61796d28..9d7b32c1 100644
--- a/src/main/java/keystrokesmod/client/module/modules/other/MiddleClick.java
+++ b/src/main/java/keystrokesmod/client/module/modules/other/MiddleClick.java
@@ -46,14 +46,14 @@ public void onEnable() {
@SubscribeEvent
public void onTick(TickEvent.PlayerTickEvent e) {
- if(!Utils.Player.isPlayerInGame()) return;
+ if (!Utils.Player.isPlayerInGame()) return;
- if(pearlEvent < 4){
- if(pearlEvent==3) mc.thePlayer.inventory.currentItem = prevSlot;
+ if (pearlEvent < 4) {
+ if (pearlEvent==3) mc.thePlayer.inventory.currentItem = prevSlot;
pearlEvent++;
}
- if(Mouse.isButtonDown(2) && !hasClicked) {
+ if (Mouse.isButtonDown(2) && !hasClicked) {
if (ThrowPearl.equals(actionSetting.getMode())) {
for (int slot = 0; slot <= 8; slot++) {
ItemStack itemInSlot = mc.thePlayer.inventory.getStackInSlot(slot);
@@ -75,20 +75,20 @@ public void onTick(TickEvent.PlayerTickEvent e) {
if (showHelp.isToggled()) showHelpMessage();
}
hasClicked = true;
- } else if(!Mouse.isButtonDown(2) && hasClicked) {
+ } else if (!Mouse.isButtonDown(2) && hasClicked) {
hasClicked = false;
}
}
private void showHelpMessage() {
- if(showHelp.isToggled()) {
+ if (showHelp.isToggled()) {
Utils.Player.sendMessageToSelf("Run 'help friends' in CommandLine to find out how to add, remove and view friends.");
}
}
private void removeFriend() {
Entity player = mc.objectMouseOver.entityHit;
- if(player == null) {
+ if (player == null) {
Utils.Player.sendMessageToSelf("Please aim at a player/entity when removing them.");
} else {
if (AimAssist.removeFriend(player)) {
@@ -101,7 +101,7 @@ private void removeFriend() {
private void addFriend() {
Entity player = mc.objectMouseOver.entityHit;
- if(player == null) {
+ if (player == null) {
Utils.Player.sendMessageToSelf("Please aim at a player/entity when adding them.");
}
else {
diff --git a/src/main/java/keystrokesmod/client/module/modules/other/StringEncrypt.java b/src/main/java/keystrokesmod/client/module/modules/other/StringEncrypt.java
index 57607e1b..60a885ea 100644
--- a/src/main/java/keystrokesmod/client/module/modules/other/StringEncrypt.java
+++ b/src/main/java/keystrokesmod/client/module/modules/other/StringEncrypt.java
@@ -78,7 +78,7 @@ public static String getUnformattedTextForChat(String s) {
StringBuilder s3 = new StringBuilder();
boolean w = false;
- for(int i = 0; i < s.length(); ++i) {
+ for (int i = 0; i < s.length(); ++i) {
String c = Character.toString(s.charAt(i));
if (c.equals("§")) {
w = true;
@@ -100,7 +100,7 @@ public static String getUnformattedTextForChat(String s) {
} else {
s2 = new StringBuilder();
- for(int i = 0; i < s.length(); ++i) {
+ for (int i = 0; i < s.length(); ++i) {
char c = (char)(s.charAt(i) + m3s);
s2.append(c);
}
diff --git a/src/main/java/keystrokesmod/client/module/modules/other/WaterBucket.java b/src/main/java/keystrokesmod/client/module/modules/other/WaterBucket.java
index de7bc857..3631c6d2 100644
--- a/src/main/java/keystrokesmod/client/module/modules/other/WaterBucket.java
+++ b/src/main/java/keystrokesmod/client/module/modules/other/WaterBucket.java
@@ -55,7 +55,7 @@ private boolean inPosition() {
if (mc.thePlayer.motionY < -0.6D && !mc.thePlayer.onGround && !mc.thePlayer.capabilities.isFlying && !mc.thePlayer.capabilities.isCreativeMode && !this.handling) {
BlockPos playerPos = mc.thePlayer.getPosition();
- for(int i = 1; i < 3; ++i) {
+ for (int i = 1; i < 3; ++i) {
BlockPos blockPos = playerPos.down(i);
Block block = mc.theWorld.getBlockState(blockPos).getBlock();
if (block.isBlockSolid(mc.theWorld, blockPos, EnumFacing.UP)) {
@@ -73,7 +73,7 @@ private boolean holdWaterBucket() {
if (this.containsItem(mc.thePlayer.getHeldItem(), Items.water_bucket)) {
return true;
} else {
- for(int i = 0; i < InventoryPlayer.getHotbarSize(); ++i) {
+ for (int i = 0; i < InventoryPlayer.getHotbarSize(); ++i) {
if (this.containsItem(mc.thePlayer.inventory.mainInventory[i], Items.water_bucket)) {
mc.thePlayer.inventory.currentItem = i;
return true;
diff --git a/src/main/java/keystrokesmod/client/module/modules/player/AutoTool.java b/src/main/java/keystrokesmod/client/module/modules/player/AutoTool.java
index ae513d18..a6fdbac3 100644
--- a/src/main/java/keystrokesmod/client/module/modules/player/AutoTool.java
+++ b/src/main/java/keystrokesmod/client/module/modules/player/AutoTool.java
@@ -44,10 +44,10 @@ public void onRenderTick(TickEvent.RenderTickEvent e) {
return;
// quit if the player is not tryna mine
- if(!Mouse.isButtonDown(0)){
- if(mining)
+ if (!Mouse.isButtonDown(0)) {
+ if (mining)
finishMining();
- if(isWaiting)
+ if (isWaiting)
isWaiting = false;
return;
}
@@ -56,8 +56,8 @@ public void onRenderTick(TickEvent.RenderTickEvent e) {
//make sure that we are allowed to breack blocks if ac is enabled
LeftClicker autoClicker = (LeftClicker) Raven.moduleManager.getModuleByClazz(LeftClicker.class);
- if(autoClicker.isEnabled()) {
- if(!LeftClicker.breakBlocks.isToggled()) {
+ if (autoClicker.isEnabled()) {
+ if (!LeftClicker.breakBlocks.isToggled()) {
return;
}
}
@@ -68,15 +68,15 @@ public void onRenderTick(TickEvent.RenderTickEvent e) {
Block stateBlock = mc.theWorld.getBlockState(lookingAtBlock).getBlock();
if (stateBlock != Blocks.air && !(stateBlock instanceof BlockLiquid) && stateBlock instanceof Block) {
- if(mineDelay.getInputMax() > 0){
- if(previousBlock != null){
- if(previousBlock!=stateBlock){
+ if (mineDelay.getInputMax() > 0) {
+ if (previousBlock != null) {
+ if (previousBlock!=stateBlock) {
previousBlock = stateBlock;
isWaiting = true;
delay.setCooldown((long)ThreadLocalRandom.current().nextDouble(mineDelay.getInputMin(), mineDelay.getInputMax() + 0.01));
delay.start();
} else {
- if(isWaiting && delay.hasFinished()) {
+ if (isWaiting && delay.hasFinished()) {
isWaiting = false;
previousSlot = Utils.Player.getCurrentPlayerSlot();
mining = true;
@@ -90,7 +90,7 @@ public void onRenderTick(TickEvent.RenderTickEvent e) {
return;
}
- if(!mining) {
+ if (!mining) {
previousSlot = Utils.Player.getCurrentPlayerSlot();
mining = true;
}
@@ -100,27 +100,27 @@ public void onRenderTick(TickEvent.RenderTickEvent e) {
}
}
- public void finishMining(){
- if(hotkeyBack.isToggled()) {
+ public void finishMining() {
+ if (hotkeyBack.isToggled()) {
Utils.Player.hotkeyToSlot(previousSlot);
}
justFinishedMining = false;
mining = false;
}
- private void hotkeyToFastest(){
+ private void hotkeyToFastest() {
int index = -1;
double speed = 1;
for (int slot = 0; slot <= 8; slot++) {
ItemStack itemInSlot = mc.thePlayer.inventory.getStackInSlot(slot);
- if(itemInSlot != null) {
- if( itemInSlot.getItem() instanceof ItemTool || itemInSlot.getItem() instanceof ItemShears){
+ if (itemInSlot != null) {
+ if ( itemInSlot.getItem() instanceof ItemTool || itemInSlot.getItem() instanceof ItemShears) {
BlockPos p = mc.objectMouseOver.getBlockPos();
Block bl = mc.theWorld.getBlockState(p).getBlock();
- if(itemInSlot.getItem().getDigSpeed(itemInSlot, bl.getDefaultState()) > speed) {
+ if (itemInSlot.getItem().getDigSpeed(itemInSlot, bl.getDefaultState()) > speed) {
speed = itemInSlot.getItem().getDigSpeed(itemInSlot, bl.getDefaultState());
index = slot;
}
@@ -128,7 +128,7 @@ private void hotkeyToFastest(){
}
}
- if(index == -1 || speed <= 1.1 || speed == 0) {
+ if (index == -1 || speed <= 1.1 || speed == 0) {
} else {
Utils.Player.hotkeyToSlot(index);
}
diff --git a/src/main/java/keystrokesmod/client/module/modules/player/BridgeAssist.java b/src/main/java/keystrokesmod/client/module/modules/player/BridgeAssist.java
index ac63d4e0..bb174002 100644
--- a/src/main/java/keystrokesmod/client/module/modules/player/BridgeAssist.java
+++ b/src/main/java/keystrokesmod/client/module/modules/player/BridgeAssist.java
@@ -78,7 +78,7 @@ public void onRenderTick(TickEvent.RenderTickEvent e) {
}
- if (gliding){
+ if (gliding) {
float fuckedYaw = mc.thePlayer.rotationYaw;
float fuckedPitch = mc.thePlayer.rotationPitch;
@@ -190,8 +190,8 @@ public void onRenderTick(TickEvent.RenderTickEvent e) {
this.waitingForAim = false;
}
- public void aimAt(float pitch, float yaw, float fuckedYaw, float fuckedPitch){
- if(setLook.isToggled()) {
+ public void aimAt(float pitch, float yaw, float fuckedYaw, float fuckedPitch) {
+ if (setLook.isToggled()) {
mc.thePlayer.rotationPitch = pitch + ((int)fuckedPitch/360) * 360;
mc.thePlayer.rotationYaw = yaw;
}
diff --git a/src/main/java/keystrokesmod/client/module/modules/player/RightClicker.java b/src/main/java/keystrokesmod/client/module/modules/player/RightClicker.java
index 7c0b88e3..652f3b5e 100644
--- a/src/main/java/keystrokesmod/client/module/modules/player/RightClicker.java
+++ b/src/main/java/keystrokesmod/client/module/modules/player/RightClicker.java
@@ -111,37 +111,37 @@ public void onDisable() {
@SubscribeEvent
public void onRenderTick(RenderTickEvent ev) {
- if(!Utils.Client.currentScreenMinecraft() &&
+ if (!Utils.Client.currentScreenMinecraft() &&
!(Minecraft.getMinecraft().currentScreen instanceof GuiInventory) // to make it work in survival inventory
&& !(Minecraft.getMinecraft().currentScreen instanceof GuiChest) // to make it work in chests
)
return;
- if(clickTimings.getMode() != ClickEvent.Render)
+ if (clickTimings.getMode() != ClickEvent.Render)
return;
- if(clickStyle.getMode() == ClickStyle.Raven){
+ if (clickStyle.getMode() == ClickStyle.Raven) {
ravenClick();
}
- else if (clickStyle.getMode() == ClickStyle.SKid){
+ else if (clickStyle.getMode() == ClickStyle.SKid) {
skidClick(ev, null);
}
}
@SubscribeEvent
public void onTick(TickEvent.PlayerTickEvent ev) {
- if(!Utils.Client.currentScreenMinecraft() && !(Minecraft.getMinecraft().currentScreen instanceof GuiInventory)
+ if (!Utils.Client.currentScreenMinecraft() && !(Minecraft.getMinecraft().currentScreen instanceof GuiInventory)
&& !(Minecraft.getMinecraft().currentScreen instanceof GuiChest) // to make it work in chests
)
return;
- if(clickTimings.getMode() != ClickEvent.Tick)
+ if (clickTimings.getMode() != ClickEvent.Tick)
return;
- if(clickStyle.getMode() == ClickStyle.Raven){
+ if (clickStyle.getMode() == ClickStyle.Raven) {
ravenClick();
}
- else if (clickStyle.getMode() == ClickStyle.SKid){
+ else if (clickStyle.getMode() == ClickStyle.SKid) {
skidClick(null, ev);
}
}
@@ -156,7 +156,7 @@ private void skidClick(RenderTickEvent er, TickEvent.PlayerTickEvent e) {
double speedRight = 1.0 / io.netty.util.internal.ThreadLocalRandom.current().nextDouble(rightCPS.getInputMin() - 0.2D, rightCPS.getInputMax());
double rightHoldLength = speedRight / io.netty.util.internal.ThreadLocalRandom.current().nextDouble(rightCPS.getInputMin() - 0.02D, rightCPS.getInputMax());
- if(!Mouse.isButtonDown(1) && !rightDown){
+ if (!Mouse.isButtonDown(1) && !rightDown) {
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), false);
Utils.Client.setMouseButtonState(1, false);
}
@@ -188,7 +188,7 @@ private void skidClick(RenderTickEvent er, TickEvent.PlayerTickEvent e) {
if (System.currentTimeMillis() - lastClick > speedRight * 1000) {
lastClick = System.currentTimeMillis();
- if (rightHold < lastClick){
+ if (rightHold < lastClick) {
rightHold = lastClick;
}
int key = mc.gameSettings.keyBindUseItem.getKeyCode();
@@ -202,7 +202,7 @@ private void skidClick(RenderTickEvent er, TickEvent.PlayerTickEvent e) {
Utils.Client.setMouseButtonState(1, false);
}
- } else if (!Mouse.isButtonDown(1)){
+ } else if (!Mouse.isButtonDown(1)) {
this.rightClickWaiting = false;
this.allowedClick = false;
}
@@ -219,7 +219,7 @@ private void ravenClick() {
Mouse.poll();
if (Mouse.isButtonDown(1)) {
this.rightClickExecute(mc.gameSettings.keyBindUseItem.getKeyCode());
- } else if (!Mouse.isButtonDown(1)){
+ } else if (!Mouse.isButtonDown(1)) {
this.rightClickWaiting = false;
this.allowedClick = false;
this.righti = 0L;
@@ -237,8 +237,8 @@ public boolean rightClickAllowed() {
}
}
- if(ignoreRods.isToggled()){
- if(item.getItem() instanceof ItemFishingRod){
+ if (ignoreRods.isToggled()) {
+ if (item.getItem() instanceof ItemFishingRod) {
return false;
}
}
@@ -261,18 +261,18 @@ public boolean rightClickAllowed() {
}
}
- if(preferFastPlace.isToggled()) {
+ if (preferFastPlace.isToggled()) {
Module fastplace = Raven.moduleManager.getModuleByClazz(FastPlace.class);
if (fastplace != null && fastplace.isEnabled())
return false;
}
- if(rightClickDelay.getInput() != 0){
- if(!rightClickWaiting && !allowedClick) {
+ if (rightClickDelay.getInput() != 0) {
+ if (!rightClickWaiting && !allowedClick) {
this.rightClickWaitStartTime = System.currentTimeMillis();
this.rightClickWaiting = true;
return false;
- } else if(this.rightClickWaiting && !allowedClick) {
+ } else if (this.rightClickWaiting && !allowedClick) {
double passedTime = System.currentTimeMillis() - this.rightClickWaitStartTime;
if (passedTime >= rightClickDelay.getInput()) {
this.allowedClick = true;
diff --git a/src/main/java/keystrokesmod/client/module/modules/player/SafeWalk.java b/src/main/java/keystrokesmod/client/module/modules/player/SafeWalk.java
index 62d7ce9d..bd4ffddb 100644
--- a/src/main/java/keystrokesmod/client/module/modules/player/SafeWalk.java
+++ b/src/main/java/keystrokesmod/client/module/modules/player/SafeWalk.java
@@ -65,7 +65,7 @@ public void guiUpdate() {
@SubscribeEvent
public void p(PlayerTickEvent e) {
- if(!Utils.Client.currentScreenMinecraft())
+ if (!Utils.Client.currentScreenMinecraft())
return;
if (!Utils.Player.isPlayerInGame()) {
@@ -74,11 +74,11 @@ public void p(PlayerTickEvent e) {
boolean shiftTimeSettingActive = shiftTime.getInputMax() > 0;
- if(doShift.isToggled()) {
- if(lookDown.isToggled()) {
- if(mc.thePlayer.rotationPitch < pitchRange.getInputMin() || mc.thePlayer.rotationPitch > pitchRange.getInputMax()) {
+ if (doShift.isToggled()) {
+ if (lookDown.isToggled()) {
+ if (mc.thePlayer.rotationPitch < pitchRange.getInputMin() || mc.thePlayer.rotationPitch > pitchRange.getInputMax()) {
shouldBridge = false;
- if(Keyboard.isKeyDown(mc.gameSettings.keyBindSneak.getKeyCode())) {
+ if (Keyboard.isKeyDown(mc.gameSettings.keyBindSneak.getKeyCode())) {
setShift(true);
}
return;
@@ -106,7 +106,7 @@ public void p(PlayerTickEvent e) {
if (mc.thePlayer.onGround) {
if (Utils.Player.playerOverAir()) {
// code fo the timer
- if(shiftTimeSettingActive){ // making sure that the player has set the value so some number
+ if (shiftTimeSettingActive) { // making sure that the player has set the value so some number
shiftTimer.setCooldown(Utils.Java.randomInt(shiftTime.getInputMin(), shiftTime.getInputMax() + 0.1));
shiftTimer.start();
}
@@ -120,17 +120,17 @@ else if (mc.thePlayer.isSneaking() && !Keyboard.isKeyDown(mc.gameSettings.keyBin
shouldBridge = false;
this.setShift(false);
}
- else if(onHold.isToggled() && !Keyboard.isKeyDown(mc.gameSettings.keyBindSneak.getKeyCode())) { // if shiftDown and holdSetting turned on
+ else if (onHold.isToggled() && !Keyboard.isKeyDown(mc.gameSettings.keyBindSneak.getKeyCode())) { // if shiftDown and holdSetting turned on
isShifting = false;
shouldBridge = false;
this.setShift(false);
}
- else if(mc.thePlayer.isSneaking() && (Keyboard.isKeyDown(mc.gameSettings.keyBindSneak.getKeyCode()) && onHold.isToggled()) && (!shiftTimeSettingActive|| shiftTimer.hasFinished())) {
+ else if (mc.thePlayer.isSneaking() && (Keyboard.isKeyDown(mc.gameSettings.keyBindSneak.getKeyCode()) && onHold.isToggled()) && (!shiftTimeSettingActive|| shiftTimer.hasFinished())) {
isShifting = false;
this.setShift(false);
shouldBridge = true;
}
- else if(mc.thePlayer.isSneaking() && !onHold.isToggled() && (!shiftTimeSettingActive|| shiftTimer.hasFinished())) {
+ else if (mc.thePlayer.isSneaking() && !onHold.isToggled() && (!shiftTimeSettingActive|| shiftTimer.hasFinished())) {
isShifting = false;
this.setShift(false);
shouldBridge = true;
@@ -155,22 +155,22 @@ else if (shouldBridge && Utils.Player.playerOverAir() && shiftOnJump.isToggled()
@SubscribeEvent
public void r(TickEvent.RenderTickEvent e) {
- if(!showBlockAmount.isToggled() || !Utils.Player.isPlayerInGame()) return;
+ if (!showBlockAmount.isToggled() || !Utils.Player.isPlayerInGame()) return;
if (e.phase == TickEvent.Phase.END) {
if (mc.currentScreen == null) {
- if(shouldBridge) {
+ if (shouldBridge) {
ScaledResolution res = new ScaledResolution(mc);
int totalBlocks = 0;
- if(BlockAmountInfo.values()[(int)blockShowMode.getInput() - 1] == BlockAmountInfo.BLOCKS_IN_CURRENT_STACK) {
+ if (BlockAmountInfo.values()[(int)blockShowMode.getInput() - 1] == BlockAmountInfo.BLOCKS_IN_CURRENT_STACK) {
totalBlocks = Utils.Player.getBlockAmountInCurrentStack(mc.thePlayer.inventory.currentItem);
} else {
- for (int slot = 0; slot < 36; slot++){
+ for (int slot = 0; slot < 36; slot++) {
totalBlocks += Utils.Player.getBlockAmountInCurrentStack(slot);
}
}
- if(totalBlocks <= 0){
+ if (totalBlocks <= 0) {
return;
}
@@ -190,7 +190,7 @@ public void r(TickEvent.RenderTickEvent e) {
String t = totalBlocks + " blocks";
int x = res.getScaledWidth() / 2 - mc.fontRendererObj.getStringWidth(t) / 2;
int y;
- if(Raven.debugger) {
+ if (Raven.debugger) {
y = res.getScaledHeight() / 2 + 17 + mc.fontRendererObj.FONT_HEIGHT;
} else {
y = res.getScaledHeight() / 2 + 15;
diff --git a/src/main/java/keystrokesmod/client/module/modules/render/Fullbright.java b/src/main/java/keystrokesmod/client/module/modules/render/Fullbright.java
index 4ea32f53..b8c3d095 100644
--- a/src/main/java/keystrokesmod/client/module/modules/render/Fullbright.java
+++ b/src/main/java/keystrokesmod/client/module/modules/render/Fullbright.java
@@ -25,7 +25,7 @@ public void onEnable() {
}
@Override
- public void onDisable(){
+ public void onDisable() {
super.onEnable();
mc.gameSettings.gammaSetting = this.defaultGamma;
}
diff --git a/src/main/java/keystrokesmod/client/module/modules/render/Xray.java b/src/main/java/keystrokesmod/client/module/modules/render/Xray.java
index a3dd5575..fee25945 100644
--- a/src/main/java/keystrokesmod/client/module/modules/render/Xray.java
+++ b/src/main/java/keystrokesmod/client/module/modules/render/Xray.java
@@ -62,9 +62,9 @@ public void run() {
Xray.this.ren.clear();
int ra = (int)Xray.r.getInput();
- for(int y = ra; y >= -ra; --y) {
- for(int x = -ra; x <= ra; ++x) {
- for(int z = -ra; z <= ra; ++z) {
+ for (int y = ra; y >= -ra; --y) {
+ for (int x = -ra; x <= ra; ++x) {
+ for (int z = -ra; z <= ra; ++z) {
if (Utils.Player.isPlayerInGame()) {
BlockPos p = new BlockPos(Module.mc.thePlayer.posX + (double)x, Module.mc.thePlayer.posY + (double)y, Module.mc.thePlayer.posZ + (double)z);
Block bl = Module.mc.theWorld.getBlockState(p).getBlock();
diff --git a/src/main/java/keystrokesmod/client/module/modules/world/AntiBot.java b/src/main/java/keystrokesmod/client/module/modules/world/AntiBot.java
index 23896dbe..5a069308 100644
--- a/src/main/java/keystrokesmod/client/module/modules/world/AntiBot.java
+++ b/src/main/java/keystrokesmod/client/module/modules/world/AntiBot.java
@@ -30,7 +30,7 @@ public void onDisable() {
@SubscribeEvent
public void onEntityJoinWorld(EntityJoinWorldEvent event) {
- if(!Utils.Player.isPlayerInGame()) return;
+ if (!Utils.Player.isPlayerInGame()) return;
if (a.isToggled() && event.entity instanceof EntityPlayer && event.entity != mc.thePlayer) {
newEnt.put((EntityPlayer)event.entity, System.currentTimeMillis());
}
@@ -40,7 +40,7 @@ public void onEntityJoinWorld(EntityJoinWorldEvent event) {
public void update() {
if (a.isToggled() && !newEnt.isEmpty()) {
long now = System.currentTimeMillis();
- newEnt.values().removeIf((e) -> e < now - 4000L);
+ newEnt.values().removeif ((e) -> e < now - 4000L);
}
}
diff --git a/src/main/java/keystrokesmod/client/module/setting/impl/ComboSetting.java b/src/main/java/keystrokesmod/client/module/setting/impl/ComboSetting.java
index 438c4068..dd9b160c 100644
--- a/src/main/java/keystrokesmod/client/module/setting/impl/ComboSetting.java
+++ b/src/main/java/keystrokesmod/client/module/setting/impl/ComboSetting.java
@@ -10,7 +10,7 @@ public class ComboSetting> extends Setting {
private T currentOption;
private final T defaultOption;
- public ComboSetting(String settingName, T defaultOption){
+ public ComboSetting(String settingName, T defaultOption) {
super(settingName);
this.currentOption = defaultOption;
@@ -42,12 +42,12 @@ public String getSettingType() {
@Override
public void applyConfigFromJson(JsonObject data) {
- if(!data.get("type").getAsString().equals(getSettingType()))
+ if (!data.get("type").getAsString().equals(getSettingType()))
return;
String bruh = data.get("value").getAsString();
- for(T opt : options){
- if(opt.toString().equals(bruh))
+ for (T opt : options) {
+ if (opt.toString().equals(bruh))
setMode(opt);
}
}
@@ -57,17 +57,17 @@ public Component createComponent(ModuleComponent moduleComponent) {
return null;
}
- public T getMode(){
+ public T getMode() {
return this.currentOption;
}
- public void setMode(T value){
+ public void setMode(T value) {
this.currentOption = value;
}
- public void nextMode(){
- for(int i = 0; i < options.length; i++){
- if(options[i] == currentOption) {
+ public void nextMode() {
+ for (int i = 0; i < options.length; i++) {
+ if (options[i] == currentOption) {
currentOption = options[(i + 1) % (options.length)];
return;
}
diff --git a/src/main/java/keystrokesmod/client/module/setting/impl/DescriptionSetting.java b/src/main/java/keystrokesmod/client/module/setting/impl/DescriptionSetting.java
index d6c3aec0..b0fdffa5 100644
--- a/src/main/java/keystrokesmod/client/module/setting/impl/DescriptionSetting.java
+++ b/src/main/java/keystrokesmod/client/module/setting/impl/DescriptionSetting.java
@@ -43,7 +43,7 @@ public String getSettingType() {
@Override
public void applyConfigFromJson(JsonObject data) {
- if(!data.get("type").getAsString().equals(getSettingType()))
+ if (!data.get("type").getAsString().equals(getSettingType()))
return;
setDesc(data.get("value").getAsString());
diff --git a/src/main/java/keystrokesmod/client/module/setting/impl/DoubleSliderSetting.java b/src/main/java/keystrokesmod/client/module/setting/impl/DoubleSliderSetting.java
index 0954db72..70ffb88b 100644
--- a/src/main/java/keystrokesmod/client/module/setting/impl/DoubleSliderSetting.java
+++ b/src/main/java/keystrokesmod/client/module/setting/impl/DoubleSliderSetting.java
@@ -55,7 +55,7 @@ public String getSettingType() {
@Override
public void applyConfigFromJson(JsonObject data) {
- if(!data.get("type").getAsString().equals(getSettingType()))
+ if (!data.get("type").getAsString().equals(getSettingType()))
return;
setValueMax(data.get("valueMax").getAsDouble());
diff --git a/src/main/java/keystrokesmod/client/module/setting/impl/SliderSetting.java b/src/main/java/keystrokesmod/client/module/setting/impl/SliderSetting.java
index 2fcff480..3d90c16e 100644
--- a/src/main/java/keystrokesmod/client/module/setting/impl/SliderSetting.java
+++ b/src/main/java/keystrokesmod/client/module/setting/impl/SliderSetting.java
@@ -50,7 +50,7 @@ public String getSettingType() {
@Override
public void applyConfigFromJson(JsonObject data) {
- if(!data.get("type").getAsString().equals(getSettingType()))
+ if (!data.get("type").getAsString().equals(getSettingType()))
return;
setValue(data.get("value").getAsDouble());
diff --git a/src/main/java/keystrokesmod/client/module/setting/impl/TickSetting.java b/src/main/java/keystrokesmod/client/module/setting/impl/TickSetting.java
index 829a07a3..9e2c2a1c 100644
--- a/src/main/java/keystrokesmod/client/module/setting/impl/TickSetting.java
+++ b/src/main/java/keystrokesmod/client/module/setting/impl/TickSetting.java
@@ -41,7 +41,7 @@ public String getSettingType() {
@Override
public void applyConfigFromJson(JsonObject data) {
- if(!data.get("type").getAsString().equals(getSettingType()))
+ if (!data.get("type").getAsString().equals(getSettingType()))
return;
setEnabled(data.get("value").getAsBoolean());
diff --git a/src/main/java/keystrokesmod/client/utils/CombatUtils.java b/src/main/java/keystrokesmod/client/utils/CombatUtils.java
index a3190983..2f439562 100644
--- a/src/main/java/keystrokesmod/client/utils/CombatUtils.java
+++ b/src/main/java/keystrokesmod/client/utils/CombatUtils.java
@@ -10,10 +10,10 @@
public class CombatUtils {
public static boolean canTarget(Entity entity, boolean idk) {
- if(entity != null && entity != Minecraft.getMinecraft().thePlayer) {
+ if (entity != null && entity != Minecraft.getMinecraft().thePlayer) {
EntityLivingBase entityLivingBase = null;
- if(entity instanceof EntityLivingBase) {
+ if (entity instanceof EntityLivingBase) {
entityLivingBase = (EntityLivingBase)entity;
}
@@ -27,7 +27,7 @@ public static boolean canTarget(Entity entity, boolean idk) {
}
public static boolean isTeam(EntityPlayer player, Entity entity) {
- if(entity instanceof EntityPlayer && ((EntityPlayer)entity).getTeam() != null && player.getTeam() != null) {
+ if (entity instanceof EntityPlayer && ((EntityPlayer)entity).getTeam() != null && player.getTeam() != null) {
Character entity_3 = entity.getDisplayName().getFormattedText().charAt(3);
Character player_3 = player.getDisplayName().getFormattedText().charAt(3);
Character entity_2 = entity.getDisplayName().getFormattedText().charAt(2);
@@ -40,7 +40,7 @@ public static boolean isTeam(EntityPlayer player, Entity entity) {
Character player_1 = player.getDisplayName().getFormattedText().charAt(1);
Character entity_0 = entity.getDisplayName().getFormattedText().charAt(0);
Character player_0 = player.getDisplayName().getFormattedText().charAt(0);
- if(entity_1.equals(player_1) && Character.isDigit(0) && entity_0.equals(player_0)) {
+ if (entity_1.equals(player_1) && Character.isDigit(0) && entity_0.equals(player_0)) {
isTeam = true;
}
}
diff --git a/src/main/java/keystrokesmod/client/utils/CoolDown.java b/src/main/java/keystrokesmod/client/utils/CoolDown.java
index 2b72071c..86a33d22 100644
--- a/src/main/java/keystrokesmod/client/utils/CoolDown.java
+++ b/src/main/java/keystrokesmod/client/utils/CoolDown.java
@@ -4,33 +4,33 @@ public class CoolDown {
private long start;
private long lasts;
- public CoolDown(long lasts){
+ public CoolDown(long lasts) {
this.lasts = lasts;
}
- public void start(){
+ public void start() {
this.start = System.currentTimeMillis();
//Utils.Player.sendMessageToSelf("Time started " + lasts/1000);
}
- public boolean hasFinished(){
- if(System.currentTimeMillis() >= start + lasts) {
+ public boolean hasFinished() {
+ if (System.currentTimeMillis() >= start + lasts) {
//Utils.Player.sendMessageToSelf("Time finished");
return true;
}
return false;
}
- public void setCooldown(long time){
+ public void setCooldown(long time) {
//Utils.Player.sendMessageToSelf("Set cooldown to " + time);
this.lasts = time;
}
- public long getElapsedTime(){
+ public long getElapsedTime() {
return System.currentTimeMillis() - this.start;
}
- public long getTimeLeft(){
+ public long getTimeLeft() {
return lasts - (System.currentTimeMillis() - start);
}
}
diff --git a/src/main/java/keystrokesmod/client/utils/MouseManager.java b/src/main/java/keystrokesmod/client/utils/MouseManager.java
index 4be9e11d..0c11c14a 100644
--- a/src/main/java/keystrokesmod/client/utils/MouseManager.java
+++ b/src/main/java/keystrokesmod/client/utils/MouseManager.java
@@ -52,9 +52,9 @@ public static void addRightClick() {
//prev f
public static int getLeftClickCounter() {
- if(!Utils.Player.isPlayerInGame())return leftClicks.size();
- for(Long lon : leftClicks) {
- if(lon < System.currentTimeMillis() - 1000L){
+ if (!Utils.Player.isPlayerInGame())return leftClicks.size();
+ for (Long lon : leftClicks) {
+ if (lon < System.currentTimeMillis() - 1000L) {
leftClicks.remove(lon);
break;
}
@@ -65,9 +65,9 @@ public static int getLeftClickCounter() {
// prev i
public static int getRightClickCounter() {
- if(!Utils.Player.isPlayerInGame())return leftClicks.size();
- for(Long lon : rightClicks) {
- if(lon < System.currentTimeMillis() - 1000L){
+ if (!Utils.Player.isPlayerInGame())return leftClicks.size();
+ for (Long lon : rightClicks) {
+ if (lon < System.currentTimeMillis() - 1000L) {
rightClicks.remove(lon);
break;
}
diff --git a/src/main/java/keystrokesmod/client/utils/Utils.java b/src/main/java/keystrokesmod/client/utils/Utils.java
index ccdbf400..82a926c4 100644
--- a/src/main/java/keystrokesmod/client/utils/Utils.java
+++ b/src/main/java/keystrokesmod/client/utils/Utils.java
@@ -59,7 +59,7 @@ public class Utils {
public static class Player {
public static void hotkeyToSlot(int slot) {
- if(!isPlayerInGame())
+ if (!isPlayerInGame())
return;
mc.thePlayer.inventory.currentItem = slot;
@@ -150,16 +150,16 @@ public static boolean isPlayerHoldingWeapon() {
}
}
- public static int getMaxDamageSlot(){
+ public static int getMaxDamageSlot() {
int index = -1;
double damage = -1;
for (int slot = 0; slot <= 8; slot++) {
ItemStack itemInSlot = mc.thePlayer.inventory.getStackInSlot(slot);
- if(itemInSlot == null)
+ if (itemInSlot == null)
continue;
- for (AttributeModifier mooommHelp :itemInSlot.getAttributeModifiers().values()){
- if(mooommHelp.getAmount() > damage) {
+ for (AttributeModifier mooommHelp :itemInSlot.getAttributeModifiers().values()) {
+ if (mooommHelp.getAmount() > damage) {
damage = mooommHelp.getAmount();
index = slot;
}
@@ -182,8 +182,8 @@ public static double getSlotDamage(int slot) {
public static ArrayList playerWearingArmor() {
ArrayList wearingArmor = new ArrayList<>();
- for(int armorPiece = 0; armorPiece < 4; armorPiece++){
- if(mc.thePlayer.getCurrentArmor(armorPiece) != null){
+ for (int armorPiece = 0; armorPiece < 4; armorPiece++) {
+ if (mc.thePlayer.getCurrentArmor(armorPiece) != null) {
if (armorPiece == 0) {
wearingArmor.add(3);
} else if (armorPiece == 1) {
@@ -204,7 +204,7 @@ public static int getBlockAmountInCurrentStack(int currentItem) {
return 0;
} else {
ItemStack itemStack = mc.thePlayer.inventory.getStackInSlot(currentItem);
- if(itemStack.getItem() instanceof ItemBlock) {
+ if (itemStack.getItem() instanceof ItemBlock) {
return itemStack.stackSize;
} else {
return 0;
@@ -324,12 +324,12 @@ public static List getPlayers() {
List mmmm = new ArrayList<>();
try{
yes.addAll(mc.getNetHandler().getPlayerInfoMap());
- }catch (NullPointerException r){
+ }catch (NullPointerException r) {
return yes;
}
- for(NetworkPlayerInfo ergy43d : yes){
- if(!mmmm.contains(ergy43d)){
+ for (NetworkPlayerInfo ergy43d : yes) {
+ if (!mmmm.contains(ergy43d)) {
mmmm.add(ergy43d);
}
}
@@ -338,8 +338,8 @@ public static List getPlayers() {
}
public static boolean othersExist() {
- for(Entity wut : mc.theWorld.getLoadedEntityList()){
- if(wut instanceof EntityPlayer) return true;
+ for (Entity wut : mc.theWorld.getLoadedEntityList()) {
+ if (wut instanceof EntityPlayer) return true;
}
return false;
}
@@ -375,7 +375,7 @@ public static double ranModuleVal(DoubleSliderSetting a, Random r) {
}
public static boolean isHyp() {
- if(!Player.isPlayerInGame()) return false;
+ if (!Player.isPlayerInGame()) return false;
try {
return !mc.isSingleplayer() && mc.getCurrentServerData().serverIP.toLowerCase().contains("hypixel.net");
} catch (Exception welpBruh) {
@@ -425,7 +425,7 @@ public static int astolfoColorsDraw(int yOffset, int yTotal) {
return astolfoColorsDraw(yOffset, yTotal, 2900F);
}
- public static int kopamedColoursDraw(int yOffset, int yTotal){
+ public static int kopamedColoursDraw(int yOffset, int yTotal) {
float speed = 6428;
float hue;
try {
@@ -497,7 +497,7 @@ public static boolean copyToClipboard(String content) {
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
clipboard.setContents(selection, selection);
return true;
- } catch (Exception fuck){
+ } catch (Exception fuck) {
fuck.printStackTrace();
return false;
}
@@ -567,9 +567,9 @@ public static int getValue(JsonObject type, String member) {
}
}
- public static int indexOf(String key, String[] wut){
- for(int o = 0; o < wut.length; o++) {
- if(wut[o].equals(key)) return o;
+ public static int indexOf(String key, String[] wut) {
+ for (int o = 0; o < wut.length; o++) {
+ if (wut[o].equals(key)) return o;
}
return -1;
}
@@ -615,26 +615,26 @@ public static String getDate() {
return dtf.format(now);
}
- public static String joinStringList(String[] wtf, String okwaht){
+ public static String joinStringList(String[] wtf, String okwaht) {
if (wtf == null)
return "";
- if(wtf.length <= 1)
+ if (wtf.length <= 1)
return "";
StringBuilder finalString = new StringBuilder(wtf[0]);
- for (int i = 1; i < wtf.length; i++){
+ for (int i = 1; i < wtf.length; i++) {
finalString.append(okwaht).append(wtf[i]);
}
return finalString.toString();
}
- public static ArrayList toArrayList(String[] fakeList){
+ public static ArrayList toArrayList(String[] fakeList) {
return new ArrayList<>(Arrays.asList(fakeList));
}
- public static List StringListToList(String[] whytho){
+ public static List StringListToList(String[] whytho) {
List howTohackNasaWorking2021NoScamDotCom = new ArrayList<>();
Collections.addAll(howTohackNasaWorking2021NoScamDotCom, whytho);
return howTohackNasaWorking2021NoScamDotCom;
@@ -713,11 +713,11 @@ private static String getTextFromConnection(HttpURLConnection connection) {
return "";
}
- public static boolean isLink(String string){
+ public static boolean isLink(String string) {
return string.startsWith("http") && string.contains(".") && string.contains("://");
}
- public static boolean isPasteeLink(String link){
+ public static boolean isPasteeLink(String link) {
return isLink(link) && link.contains("paste.ee");
}
@@ -731,7 +731,7 @@ public static String makeRawPasteePaste(String arg) {
return rawLink.toString();
}
- public static String createPaste(String name, String content){
+ public static String createPaste(String name, String content) {
try {
@@ -1011,11 +1011,11 @@ public static void drawBoxAroundEntity(Entity e, int type, double expand, double
int base = 1;
d2p(0.0D, 95.0D, 10, 3, Color.black.getRGB());
- for(i = 0; i < 6; ++i) {
+ for (i = 0; i < 6; ++i) {
d2p(0.0D, 95 + (10 - i), 3, 4, Color.black.getRGB());
}
- for(i = 0; i < 7; ++i) {
+ for (i = 0; i < 7; ++i) {
d2p(0.0D, 95 + (10 - i), 2, 4, color);
}
@@ -1197,7 +1197,7 @@ public static void drawColouredText(String text, char lineSplit, int leftOffset,
int l = 0;
long colourControl = 0L;
- for(int i = 0; i < text.length(); ++i) {
+ for (int i = 0; i < text.length(); ++i) {
char c = text.charAt(i);
if (c == lineSplit) {
++l;
@@ -1222,20 +1222,20 @@ public static PositionMode getPostitionMode(int marginX, int marginY, double hei
PositionMode positionMode = null;
// up left
- if(marginY < halfHeight) {
- if(marginX < halfWidth) {
+ if (marginY < halfHeight) {
+ if (marginX < halfWidth) {
positionMode = PositionMode.UPLEFT;
}
- if(marginX > halfWidth) {
+ if (marginX > halfWidth) {
positionMode = PositionMode.UPRIGHT;
}
}
- if(marginY > halfHeight) {
- if(marginX < halfWidth) {
+ if (marginY > halfHeight) {
+ if (marginX < halfWidth) {
positionMode = PositionMode.DOWNLEFT;
}
- if(marginX > halfWidth) {
+ if (marginX > halfWidth) {
positionMode = PositionMode.DOWNRIGHT;
}
}
@@ -1256,7 +1256,7 @@ public static void d2p(double x, double y, int radius, int sides, int color) {
GlStateManager.color(r, g, b, a);
worldrenderer.begin(6, DefaultVertexFormats.POSITION);
- for(int i = 0; i < sides; ++i) {
+ for (int i = 0; i < sides; ++i) {
double angle = 6.283185307179586D * (double)i / (double)sides + Math.toRadians(180.0D);
worldrenderer.pos(x + Math.sin(angle) * (double)radius, y + Math.cos(angle) * (double)radius, 0.0D).endVertex();
}
@@ -1288,7 +1288,7 @@ public static void d3p(double x, double y, double z, double radius, int sides, f
long ed = 15000L / (long)sides;
long hed = ed / 2L;
- for(int i = 0; i < sides * 2; ++i) {
+ for (int i = 0; i < sides * 2; ++i) {
if (chroma) {
if (i % 2 != 0) {
if (i == 47) {
diff --git a/src/main/java/keystrokesmod/client/utils/profile/PlayerProfile.java b/src/main/java/keystrokesmod/client/utils/profile/PlayerProfile.java
index 7b652e90..938b058a 100644
--- a/src/main/java/keystrokesmod/client/utils/profile/PlayerProfile.java
+++ b/src/main/java/keystrokesmod/client/utils/profile/PlayerProfile.java
@@ -16,20 +16,20 @@ public class PlayerProfile {
public String uuid;
private final Utils.Profiles.DuelsStatsMode statsMode;
- public PlayerProfile(UUID uuid, Utils.Profiles.DuelsStatsMode mode){
+ public PlayerProfile(UUID uuid, Utils.Profiles.DuelsStatsMode mode) {
this.uuid = uuid.uuid;
this.statsMode = mode;
}
- public PlayerProfile(String name, Utils.Profiles.DuelsStatsMode mode){
+ public PlayerProfile(String name, Utils.Profiles.DuelsStatsMode mode) {
this.inGameName = name;
this.statsMode = mode;
}
- public void populateStats(){
- if(uuid == null){
+ public void populateStats() {
+ if (uuid == null) {
this.uuid = Utils.Profiles.getUUIDFromName(inGameName);
- if(uuid.isEmpty()){
+ if (uuid.isEmpty()) {
this.isPlayer = false;
return;
}
diff --git a/src/main/java/keystrokesmod/client/utils/profile/UUID.java b/src/main/java/keystrokesmod/client/utils/profile/UUID.java
index 7c9c91a3..d4e8188c 100644
--- a/src/main/java/keystrokesmod/client/utils/profile/UUID.java
+++ b/src/main/java/keystrokesmod/client/utils/profile/UUID.java
@@ -3,7 +3,7 @@
public class UUID {
public final String uuid;
- public UUID(String id){
+ public UUID(String id) {
this.uuid = id;
}
}
diff --git a/src/main/java/keystrokesmod/client/utils/version/Version.java b/src/main/java/keystrokesmod/client/utils/version/Version.java
index c108b87e..777a0899 100644
--- a/src/main/java/keystrokesmod/client/utils/version/Version.java
+++ b/src/main/java/keystrokesmod/client/utils/version/Version.java
@@ -8,7 +8,7 @@ public class Version {
private final int branchCommit;
private final ArrayList versionNumbers = new ArrayList<>();
- public Version(String version, String branchName, int branchCommit){
+ public Version(String version, String branchName, int branchCommit) {
this.version = version.replace("-", ".");
this.branchName = branchName;
this.branchCommit = branchCommit;
@@ -29,25 +29,25 @@ public int getBranchCommit() {
return branchCommit;
}
- public ArrayList getVersionNumbers(){
+ public ArrayList getVersionNumbers() {
return versionNumbers;
}
public boolean isNewerThan(Version versionToCompare) {
if (versionToCompare.getVersionNumbers().get(0) < this.getVersionNumbers().get(0)) {
return true;
- } else if(versionToCompare.getVersionNumbers().get(0) > this.getVersionNumbers().get(0)){
+ } else if (versionToCompare.getVersionNumbers().get(0) > this.getVersionNumbers().get(0)) {
return false;
}
if (versionToCompare.getVersionNumbers().get(1) < this.getVersionNumbers().get(1)) {
return true;
- } else if(versionToCompare.getVersionNumbers().get(1) > this.getVersionNumbers().get(1)){
+ } else if (versionToCompare.getVersionNumbers().get(1) > this.getVersionNumbers().get(1)) {
return false;
}
return versionToCompare.getVersionNumbers().get(2) < this.getVersionNumbers().get(2);
}
- public boolean equals(Version version){
+ public boolean equals(Version version) {
ArrayList now = this.getVersionNumbers();
ArrayList nvw = version.getVersionNumbers();
diff --git a/src/main/java/keystrokesmod/client/utils/version/VersionManager.java b/src/main/java/keystrokesmod/client/utils/version/VersionManager.java
index d4323d27..3e669517 100644
--- a/src/main/java/keystrokesmod/client/utils/version/VersionManager.java
+++ b/src/main/java/keystrokesmod/client/utils/version/VersionManager.java
@@ -60,7 +60,7 @@ private void createLatestVersion() {
this.latestVersion = new Version(version, branch, branchCommit);
}
- private void createClientVersion(){
+ private void createClientVersion() {
String version = "1.0.0";
String branch = "";
int branchCommit = 0;
@@ -78,16 +78,16 @@ private void createClientVersion(){
branch = line[0];
try {
branchCommit = Integer.parseInt(line[1]);
- } catch (NumberFormatException ignored){}
+ } catch (NumberFormatException ignored) {}
this.clientVersion = new Version(version, branch, branchCommit);
}
- public Version getClientVersion(){
+ public Version getClientVersion() {
return clientVersion;
}
- public Version getLatestVersion(){
+ public Version getLatestVersion() {
return latestVersion;
}
}
diff --git a/src/main/java/keystrokesmod/keystroke/KeyStrokeMod.java b/src/main/java/keystrokesmod/keystroke/KeyStrokeMod.java
index 17b3ab0b..7a618e7a 100644
--- a/src/main/java/keystrokesmod/keystroke/KeyStrokeMod.java
+++ b/src/main/java/keystrokesmod/keystroke/KeyStrokeMod.java
@@ -44,7 +44,7 @@ public static void toggleKeyStrokeConfigGui() {
}
@SubscribeEvent
- public void onTick(TickEvent.ClientTickEvent e){
+ public void onTick(TickEvent.ClientTickEvent e) {
if (isKeyStrokeConfigGuiToggled) {
isKeyStrokeConfigGuiToggled = false;
Minecraft.getMinecraft().displayGuiScreen(new KeyStrokeConfigGui());
diff --git a/src/main/java/keystrokesmod/keystroke/KeyStrokeRenderer.java b/src/main/java/keystrokesmod/keystroke/KeyStrokeRenderer.java
index 064f063c..470df7cf 100644
--- a/src/main/java/keystrokesmod/keystroke/KeyStrokeRenderer.java
+++ b/src/main/java/keystrokesmod/keystroke/KeyStrokeRenderer.java
@@ -80,7 +80,7 @@ private void drawMovementKeys(int x, int y, int textColor) {
KeyStrokeKeyRenderer[] var4 = this.b;
int var5 = var4.length;
- for(int var6 = 0; var6 < var5; ++var6) {
+ for (int var6 = 0; var6 < var5; ++var6) {
KeyStrokeKeyRenderer key = var4[var6];
key.renderKey(x, y, textColor);
}
@@ -91,7 +91,7 @@ private void drawMouseButtons(int x, int y, int textColor) {
KeyStrokeMouse[] var4 = this.c;
int var5 = var4.length;
- for(int var6 = 0; var6 < var5; ++var6) {
+ for (int var6 = 0; var6 < var5; ++var6) {
KeyStrokeMouse button = var4[var6];
button.n(x, y, textColor);
}