This commit is contained in:
parent
1e2d518418
commit
bf4bb7d208
|
|
@ -99,7 +99,7 @@ public class Raven {
|
||||||
}
|
}
|
||||||
for (Module module : getModuleManager().getModules()) {
|
for (Module module : getModuleManager().getModules()) {
|
||||||
if (mc.currentScreen == null && module.canBeEnabled()) {
|
if (mc.currentScreen == null && module.canBeEnabled()) {
|
||||||
module.keybind();
|
module.onKeyBind();
|
||||||
}
|
}
|
||||||
else if (mc.currentScreen instanceof ClickGui) {
|
else if (mc.currentScreen instanceof ClickGui) {
|
||||||
module.guiUpdate();
|
module.guiUpdate();
|
||||||
|
|
@ -111,10 +111,10 @@ public class Raven {
|
||||||
}
|
}
|
||||||
if (mc.currentScreen == null) {
|
if (mc.currentScreen == null) {
|
||||||
for (Profile profile : Raven.profileManager.profiles) {
|
for (Profile profile : Raven.profileManager.profiles) {
|
||||||
profile.getModule().keybind();
|
profile.getModule().onKeyBind();
|
||||||
}
|
}
|
||||||
for (Module module : Raven.scriptManager.scripts.values()) {
|
for (Module module : Raven.scriptManager.scripts.values()) {
|
||||||
module.keybind();
|
module.onKeyBind();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,8 @@ public class ClickGui extends GuiScreen {
|
||||||
private GuiTextField commandLineInput;
|
private GuiTextField commandLineInput;
|
||||||
public static ArrayList<CategoryComponent> categories;
|
public static ArrayList<CategoryComponent> categories;
|
||||||
public int originalScale;
|
public int originalScale;
|
||||||
|
public int previousScale;
|
||||||
|
private static boolean isNotFirstOpen;
|
||||||
|
|
||||||
public ClickGui() {
|
public ClickGui() {
|
||||||
categories = new ArrayList();
|
categories = new ArrayList();
|
||||||
|
|
@ -56,7 +58,7 @@ public class ClickGui extends GuiScreen {
|
||||||
for (int i = 0; i < length; ++i) {
|
for (int i = 0; i < length; ++i) {
|
||||||
Module.category c = values[i];
|
Module.category c = values[i];
|
||||||
CategoryComponent categoryComponent = new CategoryComponent(c);
|
CategoryComponent categoryComponent = new CategoryComponent(c);
|
||||||
categoryComponent.setY(y);
|
categoryComponent.setY(y, false);
|
||||||
categories.add(categoryComponent);
|
categories.add(categoryComponent);
|
||||||
y += 20;
|
y += 20;
|
||||||
}
|
}
|
||||||
|
|
@ -72,6 +74,15 @@ public class ClickGui extends GuiScreen {
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void initGui() {
|
||||||
super.initGui();
|
super.initGui();
|
||||||
|
if (!isNotFirstOpen) {
|
||||||
|
isNotFirstOpen = true;
|
||||||
|
this.previousScale = (int) Gui.guiScale.getInput();
|
||||||
|
}
|
||||||
|
if (this.previousScale != Gui.guiScale.getInput()) {
|
||||||
|
for (CategoryComponent categoryComponent : categories) {
|
||||||
|
categoryComponent.limitPositions();
|
||||||
|
}
|
||||||
|
}
|
||||||
this.sr = new ScaledResolution(this.mc);
|
this.sr = new ScaledResolution(this.mc);
|
||||||
for (CategoryComponent categoryComponent : categories) {
|
for (CategoryComponent categoryComponent : categories) {
|
||||||
categoryComponent.setScreenHeight(this.sr.getScaledHeight());
|
categoryComponent.setScreenHeight(this.sr.getScaledHeight());
|
||||||
|
|
@ -79,6 +90,7 @@ public class ClickGui extends GuiScreen {
|
||||||
(this.commandLineInput = new GuiTextField(1, this.mc.fontRendererObj, 22, this.height - 100, 150, 20)).setMaxStringLength(256);
|
(this.commandLineInput = new GuiTextField(1, this.mc.fontRendererObj, 22, this.height - 100, 150, 20)).setMaxStringLength(256);
|
||||||
this.buttonList.add(this.commandLineSend = new GuiButtonExt(2, 22, this.height - 70, 150, 20, "Send"));
|
this.buttonList.add(this.commandLineSend = new GuiButtonExt(2, 22, this.height - 70, 150, 20, "Send"));
|
||||||
this.commandLineSend.visible = CommandLine.a;
|
this.commandLineSend.visible = CommandLine.a;
|
||||||
|
this.previousScale = (int) Gui.guiScale.getInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawScreen(int x, int y, float p) {
|
public void drawScreen(int x, int y, float p) {
|
||||||
|
|
@ -86,7 +98,7 @@ public class ClickGui extends GuiScreen {
|
||||||
BlurUtils.prepareBlur();
|
BlurUtils.prepareBlur();
|
||||||
RoundedUtils.drawRound(0, 0, this.width, this.height, 0.0f, true, Color.black);
|
RoundedUtils.drawRound(0, 0, this.width, this.height, 0.0f, true, Color.black);
|
||||||
float inputToRange = (float) (3 * ((Gui.backgroundBlur.getInput() + 35) / 100));
|
float inputToRange = (float) (3 * ((Gui.backgroundBlur.getInput() + 35) / 100));
|
||||||
BlurUtils.blurEnd(2, this.blurSmooth.getValueFloat(1, inputToRange, 1));
|
BlurUtils.blurEnd(2, this.blurSmooth.getValueFloat(0, inputToRange, 1));
|
||||||
}
|
}
|
||||||
if (Gui.darkBackground.isToggled()) {
|
if (Gui.darkBackground.isToggled()) {
|
||||||
drawRect(0, 0, this.width, this.height, (int) (this.backgroundFade.getValueFloat(0.0F, 0.7F, 2) * 255.0F) << 24);
|
drawRect(0, 0, this.width, this.height, (int) (this.backgroundFade.getValueFloat(0.0F, 0.7F, 2) * 255.0F) << 24);
|
||||||
|
|
@ -311,11 +323,4 @@ public class ClickGui extends GuiScreen {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int[] calculateBlur(int setting) {
|
|
||||||
int passes = (int) (setting * 6.0 / 100.0 + 1.0);
|
|
||||||
int offset = (int) (setting * 3.0 / 100.0);
|
|
||||||
|
|
||||||
return new int[]{passes, offset};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,4 +28,6 @@ public class Component {
|
||||||
|
|
||||||
public void onGuiClosed() {
|
public void onGuiClosed() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onScroll(int scroll) {}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,10 @@ public class BindComponent extends Component {
|
||||||
public boolean isBinding;
|
public boolean isBinding;
|
||||||
public ModuleComponent moduleComponent;
|
public ModuleComponent moduleComponent;
|
||||||
public int o;
|
public int o;
|
||||||
private int x;
|
public int x;
|
||||||
private int y;
|
private int y;
|
||||||
public KeySetting keySetting;
|
public KeySetting keySetting;
|
||||||
|
public int xOffset;
|
||||||
|
|
||||||
public BindComponent(ModuleComponent moduleComponent, int o) {
|
public BindComponent(ModuleComponent moduleComponent, int o) {
|
||||||
this.moduleComponent = moduleComponent;
|
this.moduleComponent = moduleComponent;
|
||||||
|
|
@ -42,10 +43,10 @@ public class BindComponent extends Component {
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glScaled(0.5D, 0.5D, 0.5D);
|
GL11.glScaled(0.5D, 0.5D, 0.5D);
|
||||||
if (keySetting == null) {
|
if (keySetting == null) {
|
||||||
this.drawString(!this.moduleComponent.mod.canBeEnabled() && this.moduleComponent.mod.script == null ? "Module cannot be bound." : this.isBinding ? "Press a key..." : "Current bind: '§e" + (this.moduleComponent.mod.getKeycode() >= 1000 ? "M" + (this.moduleComponent.mod.getKeycode() - 1000) : Keyboard.getKeyName(this.moduleComponent.mod.getKeycode())) + "§r'");
|
this.drawString(!this.moduleComponent.mod.canBeEnabled() && this.moduleComponent.mod.script == null ? "Module cannot be bound." : this.isBinding ? "Press a key..." : "Current bind: '§e" + getKeyAsStr(false) + "§r'");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.drawString(this.isBinding ? "Press a key..." : this.keySetting.getName() + ": '§e" + (this.keySetting.getKey() >= 1000 ? "M" + (this.keySetting.getKey() - 1000) : Keyboard.getKeyName(this.keySetting.getKey())) + "§r'");
|
this.drawString(this.isBinding ? "Press a key..." : this.keySetting.getName() + ": '§e" + getKeyAsStr(true) + "§r'");
|
||||||
}
|
}
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
@ -56,11 +57,11 @@ public class BindComponent extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onClick(int x, int y, int button) {
|
public boolean onClick(int x, int y, int button) {
|
||||||
if (this.i(x, y) && this.moduleComponent.isOpened && this.moduleComponent.mod.canBeEnabled()) {
|
if (this.overSetting(x, y) && this.moduleComponent.isOpened && this.moduleComponent.mod.canBeEnabled()) {
|
||||||
if (button == 0) {
|
if (button == 0) {
|
||||||
this.isBinding = !this.isBinding;
|
this.isBinding = !this.isBinding;
|
||||||
}
|
}
|
||||||
else if (button == 1 && this.moduleComponent.mod.moduleCategory() != Module.category.profiles) {
|
else if (button == 1 && this.moduleComponent.mod.moduleCategory() != Module.category.profiles && this.keySetting == null) {
|
||||||
this.moduleComponent.mod.setHidden(!this.moduleComponent.mod.isHidden());
|
this.moduleComponent.mod.setHidden(!this.moduleComponent.mod.isHidden());
|
||||||
if (Raven.currentProfile != null) {
|
if (Raven.currentProfile != null) {
|
||||||
((ProfileModule) Raven.currentProfile.getModule()).saved = false;
|
((ProfileModule) Raven.currentProfile.getModule()).saved = false;
|
||||||
|
|
@ -84,6 +85,21 @@ public class BindComponent extends Component {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onScroll(int scroll) {
|
||||||
|
if (this.isBinding && scroll != 0) {
|
||||||
|
if (this.keySetting != null) {
|
||||||
|
this.keySetting.setKey(scroll > 0 ? 1069 : 1070); // 1069 for up, 1070 for down
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.moduleComponent.mod.setBind(scroll > 0 ? 1069 : 1070); // might cause issues if your mouse has more than 69 buttons for some reason???
|
||||||
|
}
|
||||||
|
if (Raven.currentProfile != null) {
|
||||||
|
((ProfileModule) Raven.currentProfile.getModule()).saved = false;
|
||||||
|
}
|
||||||
|
this.isBinding = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void keyTyped(char t, int keybind) {
|
public void keyTyped(char t, int keybind) {
|
||||||
if (this.isBinding) {
|
if (this.isBinding) {
|
||||||
if (keybind == Keyboard.KEY_0 || keybind == Keyboard.KEY_ESCAPE) {
|
if (keybind == Keyboard.KEY_0 || keybind == Keyboard.KEY_ESCAPE) {
|
||||||
|
|
@ -118,10 +134,25 @@ public class BindComponent extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean i(int x, int y) {
|
public boolean overSetting(int x, int y) {
|
||||||
return x > this.x && x < this.x + this.moduleComponent.categoryComponent.getWidth() && y > this.y - 1 && y < this.y + 12;
|
return x > this.x && x < this.x + this.moduleComponent.categoryComponent.getWidth() && y > this.y - 1 && y < this.y + 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getKeyAsStr(boolean isKey) {
|
||||||
|
int key = isKey ? this.keySetting.getKey() : this.moduleComponent.mod.getKeycode();;
|
||||||
|
return (key >= 1000 ? ((key == 1069 || key == 1070) ? getScroll(key) : "M" + (key - 1000)) : Keyboard.getKeyName(key));
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getScroll(int key) {
|
||||||
|
if (key == 1069) {
|
||||||
|
return "MScrollUp";
|
||||||
|
}
|
||||||
|
else if (key == 1070) {
|
||||||
|
return "MScrollDown";
|
||||||
|
}
|
||||||
|
return "&cERROR";
|
||||||
|
}
|
||||||
|
|
||||||
public int getHeight() {
|
public int getHeight() {
|
||||||
if (this.keySetting != null) {
|
if (this.keySetting != null) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -130,7 +161,7 @@ public class BindComponent extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawString(String s) {
|
private void drawString(String s) {
|
||||||
Minecraft.getMinecraft().fontRendererObj.drawStringWithShadow(s, (float) ((this.moduleComponent.categoryComponent.getX() + 4) * 2), (float) ((this.moduleComponent.categoryComponent.getY() + this.o + (this.keySetting == null ? 3 : 4)) * 2), !this.moduleComponent.mod.hidden ? Theme.getGradient(Theme.descriptor[0], Theme.descriptor[1], 0) : Theme.getGradient(Theme.hiddenBind[0], Theme.hiddenBind[1], 0));
|
Minecraft.getMinecraft().fontRendererObj.drawStringWithShadow(s, (float) ((this.moduleComponent.categoryComponent.getX() + 4) * 2) + xOffset, (float) ((this.moduleComponent.categoryComponent.getY() + this.o + (this.keySetting == null ? 3 : 4)) * 2), !this.moduleComponent.mod.hidden ? Theme.getGradient(Theme.descriptor[0], Theme.descriptor[1], 0) : Theme.getGradient(Theme.hiddenBind[0], Theme.hiddenBind[1], 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onGuiClosed() {
|
public void onGuiClosed() {
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import keystrokesmod.Raven;
|
||||||
import keystrokesmod.clickgui.components.Component;
|
import keystrokesmod.clickgui.components.Component;
|
||||||
import keystrokesmod.module.Module;
|
import keystrokesmod.module.Module;
|
||||||
import keystrokesmod.module.setting.impl.ButtonSetting;
|
import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||||
|
import keystrokesmod.utility.RenderUtils;
|
||||||
import keystrokesmod.utility.profile.ProfileModule;
|
import keystrokesmod.utility.profile.ProfileModule;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
@ -11,13 +12,15 @@ import org.lwjgl.opengl.GL11;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|
||||||
public class ButtonComponent extends Component {
|
public class ButtonComponent extends Component {
|
||||||
private final int c = (new Color(20, 255, 0)).getRGB();
|
private final int enabledColor = (new Color(20, 255, 0)).getRGB();
|
||||||
private Module mod;
|
private Module mod;
|
||||||
public ButtonSetting buttonSetting;
|
public ButtonSetting buttonSetting;
|
||||||
private ModuleComponent p;
|
private ModuleComponent p;
|
||||||
public int o;
|
public int o;
|
||||||
private int x;
|
public int x;
|
||||||
private int y;
|
private int y;
|
||||||
|
public int xOffset;
|
||||||
|
public boolean renderLine;
|
||||||
|
|
||||||
public ButtonComponent(Module mod, ButtonSetting op, ModuleComponent b, int o) {
|
public ButtonComponent(Module mod, ButtonSetting op, ModuleComponent b, int o) {
|
||||||
this.mod = mod;
|
this.mod = mod;
|
||||||
|
|
@ -31,7 +34,11 @@ public class ButtonComponent extends Component {
|
||||||
public void render() {
|
public void render() {
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glScaled(0.5D, 0.5D, 0.5D);
|
GL11.glScaled(0.5D, 0.5D, 0.5D);
|
||||||
Minecraft.getMinecraft().fontRendererObj.drawString((this.buttonSetting.isMethodButton ? "[=] " : (this.buttonSetting.isToggled() ? "[+] " : "[-] ")) + this.buttonSetting.getName(), (float) ((this.p.categoryComponent.getX() + 4) * 2), (float) ((this.p.categoryComponent.getY() + this.o + 4) * 2), this.buttonSetting.isToggled() ? this.c : -1, false);
|
Minecraft.getMinecraft().fontRendererObj.drawString((this.buttonSetting.isMethodButton ? "[=] " : (this.buttonSetting.isToggled() ? "[+] " : "[-] ")) + this.buttonSetting.getName(), (float) ((this.p.categoryComponent.getX() + 4) * 2) + xOffset, (float) ((this.p.categoryComponent.getY() + this.o + 4) * 2), this.buttonSetting.isToggled() ? this.enabledColor : -1, false);
|
||||||
|
GL11.glScaled(1, 1, 1);
|
||||||
|
if (renderLine) {
|
||||||
|
//RenderUtils.drawRectangleGL((float) ((this.p.categoryComponent.getX() + 4) * 2), (float) ((this.p.categoryComponent.getY() + this.o) * 2), (float) ((this.p.categoryComponent.getX() + 4) * 2) + 1, (float) ((this.p.categoryComponent.getY() + this.o + 4) * 2) + 16, new Color(192, 192, 192).getRGB());
|
||||||
|
}
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class CategoryComponent {
|
public class CategoryComponent {
|
||||||
public List<ModuleComponent> modules = new CopyOnWriteArrayList<>();
|
public List<ModuleComponent> modules = new CopyOnWriteArrayList<>();
|
||||||
public Module.category categoryName;
|
public Module.category category;
|
||||||
public boolean opened;
|
public boolean opened;
|
||||||
public int width;
|
public int width;
|
||||||
public int y;
|
public int y;
|
||||||
|
|
@ -38,8 +38,6 @@ public class CategoryComponent {
|
||||||
public boolean dragging;
|
public boolean dragging;
|
||||||
public int xx;
|
public int xx;
|
||||||
public int yy;
|
public int yy;
|
||||||
public boolean n4m = false;
|
|
||||||
public String pvp;
|
|
||||||
public boolean pin = false;
|
public boolean pin = false;
|
||||||
public boolean hovering = false;
|
public boolean hovering = false;
|
||||||
public boolean hoveringOverCategory = false;
|
public boolean hoveringOverCategory = false;
|
||||||
|
|
@ -62,7 +60,7 @@ public class CategoryComponent {
|
||||||
private float closedHeight;
|
private float closedHeight;
|
||||||
|
|
||||||
public CategoryComponent(Module.category category) {
|
public CategoryComponent(Module.category category) {
|
||||||
this.categoryName = category;
|
this.category = category;
|
||||||
this.width = 92;
|
this.width = 92;
|
||||||
this.x = 5;
|
this.x = 5;
|
||||||
this.moduleY = this.y = 5;
|
this.moduleY = this.y = 5;
|
||||||
|
|
@ -76,7 +74,7 @@ public class CategoryComponent {
|
||||||
this.scale = new ScaledResolution(Minecraft.getMinecraft());
|
this.scale = new ScaledResolution(Minecraft.getMinecraft());
|
||||||
this.targetModuleY = this.moduleY;
|
this.targetModuleY = this.moduleY;
|
||||||
|
|
||||||
for (Module mod : Raven.getModuleManager().inCategory(this.categoryName)) {
|
for (Module mod : Raven.getModuleManager().inCategory(this.category)) {
|
||||||
ModuleComponent b = new ModuleComponent(mod, this, moduleRenderY);
|
ModuleComponent b = new ModuleComponent(mod, this, moduleRenderY);
|
||||||
this.modules.add(b);
|
this.modules.add(b);
|
||||||
moduleRenderY += 16;
|
moduleRenderY += 16;
|
||||||
|
|
@ -92,7 +90,7 @@ public class CategoryComponent {
|
||||||
this.titleHeight = 13;
|
this.titleHeight = 13;
|
||||||
int moduleRenderY = this.titleHeight + 3;
|
int moduleRenderY = this.titleHeight + 3;
|
||||||
|
|
||||||
if ((this.categoryName == Module.category.profiles && isProfile) || (this.categoryName == Module.category.scripts && !isProfile)) {
|
if ((this.category == Module.category.profiles && isProfile) || (this.category == Module.category.scripts && !isProfile)) {
|
||||||
ModuleComponent manager = new ModuleComponent(isProfile ? new Manager() : new keystrokesmod.script.Manager(), this, moduleRenderY);
|
ModuleComponent manager = new ModuleComponent(isProfile ? new Manager() : new keystrokesmod.script.Manager(), this, moduleRenderY);
|
||||||
this.modules.add(manager);
|
this.modules.add(manager);
|
||||||
|
|
||||||
|
|
@ -119,11 +117,26 @@ public class CategoryComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setX(int n) {
|
public void setX(int n, boolean limit) {
|
||||||
|
if (limit) {
|
||||||
|
ScaledResolution sr = new ScaledResolution(Minecraft.getMinecraft());
|
||||||
|
int screenW = sr.getScaledWidth();
|
||||||
|
n = Math.max(n, 2);
|
||||||
|
n = Math.min(n, screenW - this.width - 4);
|
||||||
|
}
|
||||||
this.x = n;
|
this.x = n;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setY(int y) {
|
public void setY(int y, boolean limit) {
|
||||||
|
if (limit) {
|
||||||
|
ScaledResolution sr = new ScaledResolution(Minecraft.getMinecraft());
|
||||||
|
int screenH = sr.getScaledHeight();
|
||||||
|
float catHeight = this.titleHeight;
|
||||||
|
|
||||||
|
y = Math.max(y, 1);
|
||||||
|
int maxY = (int) (screenH - catHeight - 5);
|
||||||
|
y = Math.min(y, maxY);
|
||||||
|
}
|
||||||
this.moduleY = this.y = y;
|
this.moduleY = this.y = y;
|
||||||
this.targetModuleY = y;
|
this.targetModuleY = y;
|
||||||
}
|
}
|
||||||
|
|
@ -158,6 +171,9 @@ public class CategoryComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onScroll(int mouseScrollInput) {
|
public void onScroll(int mouseScrollInput) {
|
||||||
|
for (Component component : this.modules) {
|
||||||
|
component.onScroll(mouseScrollInput);
|
||||||
|
}
|
||||||
if (!hoveringOverCategory || !this.opened) {
|
if (!hoveringOverCategory || !this.opened) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -195,7 +211,7 @@ public class CategoryComponent {
|
||||||
bigSettings = settingsHeight;
|
bigSettings = settingsHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
float middlePos = (float) (this.x + this.width / 2 - Minecraft.getMinecraft().fontRendererObj.getStringWidth(this.categoryName.name()) / 2);
|
float middlePos = (float) (this.x + this.width / 2 - Minecraft.getMinecraft().fontRendererObj.getStringWidth(this.category.name()) / 2);
|
||||||
float xPos = opened ? middlePos : this.x + 12;
|
float xPos = opened ? middlePos : this.x + 12;
|
||||||
float extra = this.y + this.titleHeight + modulesHeight + 4;
|
float extra = this.y + this.titleHeight + modulesHeight + 4;
|
||||||
|
|
||||||
|
|
@ -215,7 +231,7 @@ public class CategoryComponent {
|
||||||
|
|
||||||
float namePos = textTimer == null ? xPos : textTimer.getValueFloat(this.x + 12, middlePos, 1);
|
float namePos = textTimer == null ? xPos : textTimer.getValueFloat(this.x + 12, middlePos, 1);
|
||||||
if (!this.opened) {
|
if (!this.opened) {
|
||||||
namePos = textTimer == null ? xPos : middlePos - textTimer.getValueFloat(0, this.width / 2 - Minecraft.getMinecraft().fontRendererObj.getStringWidth(this.categoryName.name()) / 2 - 12, 1);
|
namePos = textTimer == null ? xPos : middlePos - textTimer.getValueFloat(0, this.width / 2 - Minecraft.getMinecraft().fontRendererObj.getStringWidth(this.category.name()) / 2 - 12, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scrolled && smoothScrollTimer != null) {
|
if (scrolled && smoothScrollTimer != null) {
|
||||||
|
|
@ -240,11 +256,10 @@ public class CategoryComponent {
|
||||||
RenderUtils.scissor(0, this.y - 2, this.x + this.width + 4, extra - this.y + 4);
|
RenderUtils.scissor(0, this.y - 2, this.x + this.width + 4, extra - this.y + 4);
|
||||||
RenderUtils.drawRoundedGradientOutlinedRectangle(this.x - 2, this.y, this.x + this.width + 2, extra, 10, translucentBackground,
|
RenderUtils.drawRoundedGradientOutlinedRectangle(this.x - 2, this.y, this.x + this.width + 2, extra, 10, translucentBackground,
|
||||||
((opened || hovering) && Gui.rainBowOutlines.isToggled()) ? RenderUtils.setAlpha(Utils.getChroma(2, 0), 0.5) : regularOutline, ((opened || hovering) && Gui.rainBowOutlines.isToggled()) ? RenderUtils.setAlpha(Utils.getChroma(2, 700), 0.5) : regularOutline2);
|
((opened || hovering) && Gui.rainBowOutlines.isToggled()) ? RenderUtils.setAlpha(Utils.getChroma(2, 0), 0.5) : regularOutline, ((opened || hovering) && Gui.rainBowOutlines.isToggled()) ? RenderUtils.setAlpha(Utils.getChroma(2, 700), 0.5) : regularOutline2);
|
||||||
renderItemForCategory(this.categoryName, this.x + 1, this.y + 4, opened || hovering);
|
renderItemForCategory(this.category, this.x + 1, this.y + 4, opened || hovering);
|
||||||
renderer.drawString(this.n4m ? this.pvp : this.categoryName.name(), namePos, (float) (this.y + 4), categoryNameColor, false);
|
renderer.drawString(this.category.name(), namePos, (float) (this.y + 4), categoryNameColor, false);
|
||||||
RenderUtils.scissor(0, this.y + this.titleHeight + 3, this.x + this.width + 4, extra - this.y - 4 - this.titleHeight);
|
RenderUtils.scissor(0, this.y + this.titleHeight + 3, this.x + this.width + 4, extra - this.y - 4 - this.titleHeight);
|
||||||
|
|
||||||
if (!this.n4m) {
|
|
||||||
int prevY = this.y;
|
int prevY = this.y;
|
||||||
this.y = this.moduleY;
|
this.y = this.moduleY;
|
||||||
|
|
||||||
|
|
@ -254,7 +269,6 @@ public class CategoryComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.y = prevY;
|
this.y = prevY;
|
||||||
}
|
|
||||||
GL11.glDisable(GL11.GL_SCISSOR_TEST);
|
GL11.glDisable(GL11.GL_SCISSOR_TEST);
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
@ -284,13 +298,32 @@ public class CategoryComponent {
|
||||||
return this.width;
|
return this.width;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void mousePosition(int x, int y) {
|
public void mousePosition(int mouseX, int mouseY) {
|
||||||
if (this.dragging) {
|
if (this.dragging) {
|
||||||
this.setX(x - this.xx);
|
int newX = mouseX - this.xx;
|
||||||
this.setY(y - this.yy);
|
int newY = mouseY - this.yy;
|
||||||
|
|
||||||
|
if (Gui.limitToScreen.isToggled()) {
|
||||||
|
ScaledResolution sr = new ScaledResolution(Minecraft.getMinecraft());
|
||||||
|
int screenW = sr.getScaledWidth();
|
||||||
|
int screenH = sr.getScaledHeight();
|
||||||
|
|
||||||
|
float catHeight = this.titleHeight;
|
||||||
|
|
||||||
|
newX = Math.max(newX, 2);
|
||||||
|
newX = Math.min(newX, screenW - this.width - 4);
|
||||||
|
|
||||||
|
newY = Math.max(newY, 1);
|
||||||
|
int maxY = (int) (screenH - catHeight - 5);
|
||||||
|
newY = Math.min(newY, maxY);
|
||||||
}
|
}
|
||||||
hoveringOverCategory = overCategory(x, y);
|
|
||||||
hovering = overTitle(x, y);
|
this.setX(newX, false);
|
||||||
|
this.setY(newY, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
hoveringOverCategory = overCategory(mouseX, mouseY);
|
||||||
|
hovering = overTitle(mouseX, mouseY);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean i(int x, int y) {
|
public boolean i(int x, int y) {
|
||||||
|
|
@ -371,4 +404,9 @@ public class CategoryComponent {
|
||||||
public void setScreenHeight(int screenHeight) {
|
public void setScreenHeight(int screenHeight) {
|
||||||
this.screenHeight = screenHeight;
|
this.screenHeight = screenHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void limitPositions() {
|
||||||
|
setX(this.x, true);
|
||||||
|
setY(this.y, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ public class DescriptionComponent extends Component {
|
||||||
public DescriptionSetting desc;
|
public DescriptionSetting desc;
|
||||||
private ModuleComponent p;
|
private ModuleComponent p;
|
||||||
public int o;
|
public int o;
|
||||||
private int x;
|
public int x;
|
||||||
private int y;
|
public int y;
|
||||||
|
|
||||||
public DescriptionComponent(DescriptionSetting desc, ModuleComponent b, int o) {
|
public DescriptionComponent(DescriptionSetting desc, ModuleComponent b, int o) {
|
||||||
this.desc = desc;
|
this.desc = desc;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,91 @@
|
||||||
|
package keystrokesmod.clickgui.components.impl;
|
||||||
|
|
||||||
|
import keystrokesmod.Raven;
|
||||||
|
import keystrokesmod.clickgui.components.Component;
|
||||||
|
import keystrokesmod.module.setting.impl.GroupSetting;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
public class GroupComponent extends Component {
|
||||||
|
public GroupSetting setting;
|
||||||
|
private ModuleComponent component;
|
||||||
|
public int o;
|
||||||
|
private int x;
|
||||||
|
private int y;
|
||||||
|
public boolean opened;
|
||||||
|
|
||||||
|
public GroupComponent(GroupSetting setting, ModuleComponent moduleComponent, int o) {
|
||||||
|
this.setting = setting;
|
||||||
|
this.component = moduleComponent;
|
||||||
|
this.o = o;
|
||||||
|
this.x = moduleComponent.categoryComponent.getX() + moduleComponent.categoryComponent.getWidth();
|
||||||
|
this.y = moduleComponent.categoryComponent.getY() + moduleComponent.yPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void render() {
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glScaled(0.5D, 0.5D, 0.5D);
|
||||||
|
float strX = (float) ((this.component.categoryComponent.getX() + 4) * 2) + 1;
|
||||||
|
float strY = (float) ((this.component.categoryComponent.getY() + this.o + 4) * 2);
|
||||||
|
if (!this.opened) {
|
||||||
|
drawString("[", strX, strY);
|
||||||
|
|
||||||
|
int firstBracketWidth = Minecraft.getMinecraft().fontRendererObj.getStringWidth("[");
|
||||||
|
int arrowWidth = Minecraft.getMinecraft().fontRendererObj.getCharWidth('>');
|
||||||
|
int fontHeight = Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT;
|
||||||
|
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glTranslatef(strX, strY, 0F);
|
||||||
|
|
||||||
|
float arrowX = firstBracketWidth - 2;
|
||||||
|
GL11.glTranslatef(arrowX + (arrowWidth / 2F), (fontHeight / 2F), 0F);
|
||||||
|
|
||||||
|
GL11.glRotatef(90F, 0F, 0F, 1F);
|
||||||
|
|
||||||
|
GL11.glTranslatef(-(arrowWidth / 2F), -(fontHeight / 2F), 0F);
|
||||||
|
|
||||||
|
drawString(">", 0, 0);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
drawString("] " + this.setting.getName(),
|
||||||
|
strX + firstBracketWidth + arrowWidth,
|
||||||
|
strY);
|
||||||
|
} else {
|
||||||
|
drawString("[>] " + this.setting.getName(), strX, strY);
|
||||||
|
}
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateHeight(int n) {
|
||||||
|
this.o = n;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void drawScreen(int x, int y) {
|
||||||
|
this.y = this.component.categoryComponent.getModuleY() + this.o;
|
||||||
|
this.x = this.component.categoryComponent.getX();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean onClick(int x, int y, int b) {
|
||||||
|
if (this.i(x, y) && b == 1 && this.component.isOpened) {
|
||||||
|
this.opened = !this.opened;
|
||||||
|
for (CategoryComponent categoryComponent : Raven.clickGui.categories) {
|
||||||
|
if (categoryComponent.category == this.component.mod.moduleCategory()) {
|
||||||
|
for (ModuleComponent moduleComponent : categoryComponent.modules) {
|
||||||
|
if (moduleComponent.mod.getName().equals(this.component.mod.getName())) {
|
||||||
|
moduleComponent.updateSettingPositions(7);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean i(int x, int y) {
|
||||||
|
return x > this.x && x < this.x + this.component.categoryComponent.getWidth() && y > this.y && y < this.y + 11;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void drawString(String text, float x, float y) {
|
||||||
|
Minecraft.getMinecraft().fontRendererObj.drawString(text, x, y, -1, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -4,10 +4,7 @@ import keystrokesmod.Raven;
|
||||||
import keystrokesmod.clickgui.components.Component;
|
import keystrokesmod.clickgui.components.Component;
|
||||||
import keystrokesmod.module.Module;
|
import keystrokesmod.module.Module;
|
||||||
import keystrokesmod.module.setting.Setting;
|
import keystrokesmod.module.setting.Setting;
|
||||||
import keystrokesmod.module.setting.impl.ButtonSetting;
|
import keystrokesmod.module.setting.impl.*;
|
||||||
import keystrokesmod.module.setting.impl.DescriptionSetting;
|
|
||||||
import keystrokesmod.module.setting.impl.KeySetting;
|
|
||||||
import keystrokesmod.module.setting.impl.SliderSetting;
|
|
||||||
import keystrokesmod.utility.RenderUtils;
|
import keystrokesmod.utility.RenderUtils;
|
||||||
import keystrokesmod.utility.Timer;
|
import keystrokesmod.utility.Timer;
|
||||||
import keystrokesmod.utility.Utils;
|
import keystrokesmod.utility.Utils;
|
||||||
|
|
@ -74,6 +71,12 @@ public class ModuleComponent extends Component {
|
||||||
this.settings.add(keyComponent);
|
this.settings.add(keyComponent);
|
||||||
y += 12;
|
y += 12;
|
||||||
}
|
}
|
||||||
|
else if (v instanceof GroupSetting) {
|
||||||
|
GroupSetting b = (GroupSetting) v;
|
||||||
|
GroupComponent c = new GroupComponent(b, this, y);
|
||||||
|
this.settings.add(c);
|
||||||
|
y += 12;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.settings.add(new BindComponent(this, y));
|
this.settings.add(new BindComponent(this, y));
|
||||||
|
|
@ -94,7 +97,7 @@ public class ModuleComponent extends Component {
|
||||||
if (co instanceof SliderComponent) {
|
if (co instanceof SliderComponent) {
|
||||||
y += 16;
|
y += 16;
|
||||||
}
|
}
|
||||||
else if (co instanceof ButtonComponent || co instanceof BindComponent || co instanceof DescriptionComponent) {
|
else if (co instanceof ButtonComponent || co instanceof BindComponent || co instanceof DescriptionComponent || co instanceof GroupComponent) {
|
||||||
y += 12;
|
y += 12;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -187,7 +190,7 @@ public class ModuleComponent extends Component {
|
||||||
if (c instanceof SliderComponent) {
|
if (c instanceof SliderComponent) {
|
||||||
h += 16;
|
h += 16;
|
||||||
}
|
}
|
||||||
else if (c instanceof ButtonComponent || c instanceof BindComponent || c instanceof DescriptionComponent) {
|
else if (c instanceof ButtonComponent || c instanceof BindComponent || c instanceof DescriptionComponent || c instanceof GroupComponent) {
|
||||||
h += 12;
|
h += 12;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -210,7 +213,7 @@ public class ModuleComponent extends Component {
|
||||||
if (c instanceof SliderComponent) {
|
if (c instanceof SliderComponent) {
|
||||||
h += 16;
|
h += 16;
|
||||||
}
|
}
|
||||||
else if (c instanceof ButtonComponent || c instanceof BindComponent || c instanceof DescriptionComponent) {
|
else if (c instanceof ButtonComponent || c instanceof BindComponent || c instanceof DescriptionComponent || c instanceof GroupComponent) {
|
||||||
h += 12;
|
h += 12;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -281,6 +284,12 @@ public class ModuleComponent extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onScroll(int scroll) {
|
||||||
|
for (Component component : this.settings) {
|
||||||
|
component.onScroll(scroll);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void onGuiClosed() {
|
public void onGuiClosed() {
|
||||||
for (Component c : this.settings) {
|
for (Component c : this.settings) {
|
||||||
c.onGuiClosed();
|
c.onGuiClosed();
|
||||||
|
|
@ -294,7 +303,7 @@ public class ModuleComponent extends Component {
|
||||||
return x > this.categoryComponent.getX() && x < this.categoryComponent.getX() + this.categoryComponent.getWidth() && y > this.categoryComponent.getModuleY() + this.yPos && y < this.categoryComponent.getModuleY() + 16 + this.yPos;
|
return x > this.categoryComponent.getX() && x < this.categoryComponent.getX() + this.categoryComponent.getWidth() && y > this.categoryComponent.getModuleY() + this.yPos && y < this.categoryComponent.getModuleY() + 16 + this.yPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateSettingPositions() {
|
public void updateSettingPositions(int xOffset) {
|
||||||
int y = this.yPos + 12;
|
int y = this.yPos + 12;
|
||||||
for (Component c : this.settings) {
|
for (Component c : this.settings) {
|
||||||
if (!isVisible(c)) {
|
if (!isVisible(c)) {
|
||||||
|
|
@ -307,15 +316,35 @@ public class ModuleComponent extends Component {
|
||||||
else if (c instanceof BindComponent) {
|
else if (c instanceof BindComponent) {
|
||||||
((BindComponent) c).o = y;
|
((BindComponent) c).o = y;
|
||||||
if (((BindComponent) c).keySetting != null) { // not the bind for the module
|
if (((BindComponent) c).keySetting != null) { // not the bind for the module
|
||||||
|
if (xOffset != 0 & isGroupOpened(c, false)) {
|
||||||
|
((BindComponent) c).x += xOffset;
|
||||||
|
((BindComponent) c).xOffset = xOffset;
|
||||||
|
}
|
||||||
y += 12;
|
y += 12;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (c instanceof SliderComponent) {
|
else if (c instanceof SliderComponent) {
|
||||||
((SliderComponent) c).o = y;
|
((SliderComponent) c).o = y;
|
||||||
y += 12;
|
if (xOffset != 0 & isGroupOpened(c, false)) {
|
||||||
|
((SliderComponent) c).x += xOffset;
|
||||||
|
((SliderComponent) c).xOffset = xOffset;
|
||||||
|
((SliderComponent) c).renderLine = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
((SliderComponent) c).renderLine = false;
|
||||||
|
}
|
||||||
|
y += 16;
|
||||||
}
|
}
|
||||||
else if (c instanceof ButtonComponent) {
|
else if (c instanceof ButtonComponent) {
|
||||||
((ButtonComponent) c).o = y;
|
((ButtonComponent) c).o = y;
|
||||||
|
if (xOffset != 0 & isGroupOpened(c, false)) {
|
||||||
|
((ButtonComponent) c).x += xOffset;
|
||||||
|
((ButtonComponent) c).xOffset = xOffset;
|
||||||
|
((ButtonComponent) c).renderLine = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
((ButtonComponent) c).renderLine = false;
|
||||||
|
}
|
||||||
y += 12;
|
y += 12;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -324,19 +353,43 @@ public class ModuleComponent extends Component {
|
||||||
|
|
||||||
public boolean isVisible(Component component) {
|
public boolean isVisible(Component component) {
|
||||||
if (component instanceof SliderComponent) {
|
if (component instanceof SliderComponent) {
|
||||||
return ((SliderComponent) component).sliderSetting.visible;
|
return isGroupOpened(component, ((SliderComponent) component).sliderSetting.visible);
|
||||||
}
|
}
|
||||||
if (component instanceof ButtonComponent) {
|
if (component instanceof ButtonComponent) {
|
||||||
return ((ButtonComponent) component).buttonSetting.visible;
|
return isGroupOpened(component, ((ButtonComponent) component).buttonSetting.visible);
|
||||||
}
|
}
|
||||||
if (component instanceof DescriptionComponent) {
|
if (component instanceof DescriptionComponent) {
|
||||||
return ((DescriptionComponent) component).desc.visible;
|
return ((DescriptionComponent) component).desc.visible;
|
||||||
}
|
}
|
||||||
if (component instanceof BindComponent) {
|
if (component instanceof BindComponent) {
|
||||||
if (((BindComponent) component).keySetting != null) {
|
if (((BindComponent) component).keySetting != null) {
|
||||||
return ((BindComponent) component).keySetting.visible;
|
return isGroupOpened(component, ((BindComponent) component).keySetting.visible);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isGroupOpened(Component component, boolean defaultBool) {
|
||||||
|
String groupName = "";
|
||||||
|
if (component instanceof SliderComponent && ((SliderComponent) component).sliderSetting.groupSetting != null) {
|
||||||
|
groupName = ((SliderComponent) component).sliderSetting.groupSetting.getName();
|
||||||
|
}
|
||||||
|
if (component instanceof ButtonComponent && ((ButtonComponent) component).buttonSetting.group != null) {
|
||||||
|
groupName = ((ButtonComponent) component).buttonSetting.group.getName();
|
||||||
|
}
|
||||||
|
if (component instanceof BindComponent && ((BindComponent) component).keySetting != null && ((BindComponent) component).keySetting.group != null) {
|
||||||
|
groupName = ((BindComponent) component).keySetting.group.getName();
|
||||||
|
}
|
||||||
|
if (groupName.isEmpty()) { // no group exists for component, returning default
|
||||||
|
return defaultBool;
|
||||||
|
}
|
||||||
|
for (Component c : this.settings) {
|
||||||
|
if (c instanceof GroupComponent) {
|
||||||
|
if (((GroupComponent) c).setting.getName().equals(groupName)) { // group exsits
|
||||||
|
return ((GroupComponent) c).opened;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return defaultBool;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -19,10 +19,12 @@ public class SliderComponent extends Component {
|
||||||
public SliderSetting sliderSetting;
|
public SliderSetting sliderSetting;
|
||||||
private ModuleComponent moduleComponent;
|
private ModuleComponent moduleComponent;
|
||||||
public int o;
|
public int o;
|
||||||
private int x;
|
public int x;
|
||||||
private int y;
|
private int y;
|
||||||
private boolean heldDown = false;
|
private boolean heldDown = false;
|
||||||
private double w;
|
private double w;
|
||||||
|
public int xOffset;
|
||||||
|
public boolean renderLine;
|
||||||
|
|
||||||
public SliderComponent(SliderSetting sliderSetting, ModuleComponent moduleComponent, int o) {
|
public SliderComponent(SliderSetting sliderSetting, ModuleComponent moduleComponent, int o) {
|
||||||
this.sliderSetting = sliderSetting;
|
this.sliderSetting = sliderSetting;
|
||||||
|
|
@ -33,14 +35,14 @@ public class SliderComponent extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void render() {
|
public void render() {
|
||||||
RenderUtils.drawRoundedRectangle(this.moduleComponent.categoryComponent.getX() + 4, this.moduleComponent.categoryComponent.getY() + this.o + 11, this.moduleComponent.categoryComponent.getX() + 4 + this.moduleComponent.categoryComponent.getWidth() - 8, this.moduleComponent.categoryComponent.getY() + this.o + 15, 4, -12302777);
|
RenderUtils.drawRoundedRectangle(this.moduleComponent.categoryComponent.getX() + 4 + (xOffset / 2), this.moduleComponent.categoryComponent.getY() + this.o + 11, this.moduleComponent.categoryComponent.getX() + 4 + this.moduleComponent.categoryComponent.getWidth() - 8, this.moduleComponent.categoryComponent.getY() + this.o + 15, 4, -12302777);
|
||||||
int l = this.moduleComponent.categoryComponent.getX() + 4;
|
int l = this.moduleComponent.categoryComponent.getX() + 4;
|
||||||
int r = this.moduleComponent.categoryComponent.getX() + 4 + (int) this.w;
|
int r = this.moduleComponent.categoryComponent.getX() + 4 + (int) this.w;
|
||||||
if (r - l > 84) {
|
if (r - l > 84) {
|
||||||
r = l + 84;
|
r = l + 84;
|
||||||
}
|
}
|
||||||
|
|
||||||
RenderUtils.drawRoundedRectangle(l, this.moduleComponent.categoryComponent.getY() + this.o + 11, r, this.moduleComponent.categoryComponent.getY() + this.o + 15, 4, Color.getHSBColor((float) (System.currentTimeMillis() % 11000L) / 11000.0F, 0.75F, 0.9F).getRGB());
|
RenderUtils.drawRoundedRectangle(l + (xOffset / 2), this.moduleComponent.categoryComponent.getY() + this.o + 11, r, this.moduleComponent.categoryComponent.getY() + this.o + 15, 4, Color.getHSBColor((float) (System.currentTimeMillis() % 11000L) / 11000.0F, 0.75F, 0.9F).getRGB());
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glScaled(0.5D, 0.5D, 0.5D);
|
GL11.glScaled(0.5D, 0.5D, 0.5D);
|
||||||
String value;
|
String value;
|
||||||
|
|
@ -61,7 +63,11 @@ public class SliderComponent extends Component {
|
||||||
value = Utils.asWholeNum(input);
|
value = Utils.asWholeNum(input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Minecraft.getMinecraft().fontRendererObj.drawStringWithShadow(this.sliderSetting.getName() + ": " + (this.sliderSetting.isString ? "§e" : "§b") +value + suffix, (float) ((int) ((float) (this.moduleComponent.categoryComponent.getX() + 4) * 2.0F)), (float) ((int) ((float) (this.moduleComponent.categoryComponent.getY() + this.o + 3) * 2.0F)), -1);
|
Minecraft.getMinecraft().fontRendererObj.drawStringWithShadow(this.sliderSetting.getName() + ": " + (this.sliderSetting.isString ? "§e" : "§b") +value + suffix, (float) ((int) ((float) (this.moduleComponent.categoryComponent.getX() + 4) * 2.0F)) + xOffset, (float) ((int) ((float) (this.moduleComponent.categoryComponent.getY() + this.o + 3) * 2.0F)), -1);
|
||||||
|
GL11.glScaled(1, 1, 1);
|
||||||
|
if (renderLine) {
|
||||||
|
//RenderUtils.drawRectangleGL((float) ((this.moduleComponent.categoryComponent.getX() + 4) * 2), (float) ((this.moduleComponent.categoryComponent.getY() + this.o) * 2), (float) ((this.moduleComponent.categoryComponent.getX() + 4) * 2) + 1, (float) ((this.moduleComponent.categoryComponent.getY() + this.o + 4) * 2) + 22, new Color(192, 192, 192).getRGB());
|
||||||
|
}
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package keystrokesmod.event;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||||
|
|
||||||
|
public class UseItemEvent extends Event {
|
||||||
|
public ItemStack usedItemStack;
|
||||||
|
|
||||||
|
public UseItemEvent(ItemStack usedItemStack) {
|
||||||
|
this.usedItemStack = usedItemStack;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
package keystrokesmod.mixin.impl.client;
|
||||||
|
|
||||||
|
import keystrokesmod.event.UseItemEvent;
|
||||||
|
import net.minecraft.client.multiplayer.PlayerControllerMP;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
|
@Mixin(PlayerControllerMP.class)
|
||||||
|
public class MixinPlayerControllerMP {
|
||||||
|
@Inject(method = "sendUseItem(Lnet/minecraft/entity/player/EntityPlayer;Lnet/minecraft/world/World;Lnet/minecraft/item/ItemStack;)Z", at = @At("HEAD"))
|
||||||
|
public void injectUseItemEvent(EntityPlayer p_sendUseItem_1_, World p_sendUseItem_2_, ItemStack p_sendUseItem_3_, CallbackInfoReturnable<Boolean> ci) {
|
||||||
|
MinecraftForge.EVENT_BUS.post(new UseItemEvent(p_sendUseItem_3_));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -282,11 +282,11 @@ public abstract class MixinEntityPlayerSP extends AbstractClientPlayer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.isSprinting() && this.mc.gameSettings.keyBindSprint.isKeyDown() && (ModuleManager.sprint.omniSprint() || NoSlow.groundSpeed() || this.movementInput.moveForward >= f && flag3) && (!(this.isUsingItem() || mc.thePlayer.isBlocking()) || !stopSprint) && !this.isPotionActive(Potion.blindness)) {
|
if (!this.isSprinting() && this.mc.gameSettings.keyBindSprint.isKeyDown() && (ModuleManager.sprint.omniSprint() || ModuleManager.scaffold.sprint() || NoSlow.groundSpeed() || this.movementInput.moveForward >= f && flag3) && (!(this.isUsingItem() || mc.thePlayer.isBlocking()) || !stopSprint) && !this.isPotionActive(Potion.blindness)) {
|
||||||
this.setSprinting(true);
|
this.setSprinting(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isSprinting() && (!ModuleManager.sprint.omniSprint() && !NoSlow.groundSpeed() && (this.movementInput.moveForward < f || !flag3)) || this.isCollidedHorizontally || ModuleManager.sprint.disableBackwards() || this.mc.gameSettings.keyBindSneak.isKeyDown() || (ModuleManager.scaffold != null && ModuleManager.scaffold.isEnabled && (!ModuleManager.scaffold.sprint() || ModuleManager.tower.canTower())) || (ModuleManager.wTap.isEnabled() && WTap.stopSprint)) {
|
if (this.isSprinting() && (!ModuleManager.sprint.omniSprint() && !NoSlow.groundSpeed() && !ModuleManager.scaffold.sprint() && (this.movementInput.moveForward < f || !flag3)) || this.isCollidedHorizontally || ModuleManager.sprint.disableBackwards() || this.mc.gameSettings.keyBindSneak.isKeyDown() || (ModuleManager.scaffold != null && ModuleManager.scaffold.isEnabled && (!ModuleManager.scaffold.sprint() || ModuleManager.tower.canTower())) || (ModuleManager.wTap.isEnabled() && WTap.stopSprint)) {
|
||||||
this.setSprinting(false);
|
this.setSprinting(false);
|
||||||
WTap.stopSprint = false;
|
WTap.stopSprint = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,15 +8,16 @@ import keystrokesmod.script.Script;
|
||||||
import keystrokesmod.utility.Utils;
|
import keystrokesmod.utility.Utils;
|
||||||
import keystrokesmod.utility.profile.ProfileModule;
|
import keystrokesmod.utility.profile.ProfileModule;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
import org.lwjgl.input.Mouse;
|
import org.lwjgl.input.Mouse;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class Module {
|
public class Module {
|
||||||
public boolean alwaysOn;
|
|
||||||
protected ArrayList<Setting> settings;
|
protected ArrayList<Setting> settings;
|
||||||
private String moduleName;
|
private String moduleName;
|
||||||
private Module.category moduleCategory;
|
private Module.category moduleCategory;
|
||||||
|
|
@ -29,6 +30,16 @@ public class Module {
|
||||||
public boolean hidden = false;
|
public boolean hidden = false;
|
||||||
public Script script = null;
|
public Script script = null;
|
||||||
public boolean closetModule = false;
|
public boolean closetModule = false;
|
||||||
|
public boolean alwaysOn = false;
|
||||||
|
public String lastInfo;
|
||||||
|
public static boolean sort; // global boolean in charge of sorting upon info change
|
||||||
|
public static List<String> categoriesString = new ArrayList<>();
|
||||||
|
|
||||||
|
static { // loads the categories
|
||||||
|
for (category cat : category.values()) {
|
||||||
|
categoriesString.add(cat.name());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Module(String moduleName, Module.category moduleCategory, int keycode) {
|
public Module(String moduleName, Module.category moduleCategory, int keycode) {
|
||||||
this.moduleName = moduleName;
|
this.moduleName = moduleName;
|
||||||
|
|
@ -73,14 +84,14 @@ public class Module {
|
||||||
this.settings = new ArrayList<>();
|
this.settings = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void keybind() {
|
public void onKeyBind() {
|
||||||
if (this.keycode != 0) {
|
if (this.keycode != 0) {
|
||||||
try {
|
try {
|
||||||
if (!this.isToggled && (this.keycode >= 1000 ? Mouse.isButtonDown(this.keycode - 1000) : Keyboard.isKeyDown(this.keycode))) {
|
if (!this.isToggled && (this.keycode >= 1000 ? ((this.keycode == 1069 || this.keycode == 1070) ? isScrollDown(this.keycode) : Mouse.isButtonDown(this.keycode - 1000)) : Keyboard.isKeyDown(this.keycode))) {
|
||||||
this.toggle();
|
this.toggle();
|
||||||
this.isToggled = true;
|
this.isToggled = true;
|
||||||
}
|
}
|
||||||
else if ((this.keycode >= 1000 ? !Mouse.isButtonDown(this.keycode - 1000) : !Keyboard.isKeyDown(this.keycode))) {
|
else if ((this.keycode >= 1000 ? ((this.keycode == 1069 || this.keycode == 1070) ? !isScrollDown(this.keycode) : !Mouse.isButtonDown(this.keycode - 1000)) : !Keyboard.isKeyDown(this.keycode))) {
|
||||||
this.isToggled = false;
|
this.isToggled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -92,6 +103,16 @@ public class Module {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isScrollDown(int key) {
|
||||||
|
if (key == 1069) {
|
||||||
|
return Mouse.getDWheel() > 0;
|
||||||
|
}
|
||||||
|
else if (key == 1070) {
|
||||||
|
return Mouse.getDWheel() < 0;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean canBeEnabled() {
|
public boolean canBeEnabled() {
|
||||||
if (this.script != null && script.error) {
|
if (this.script != null && script.error) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -122,7 +143,7 @@ public class Module {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!alwaysOn) {
|
if (!alwaysOn) {
|
||||||
FMLCommonHandler.instance().bus().register(this);
|
MinecraftForge.EVENT_BUS.register(this);
|
||||||
}
|
}
|
||||||
this.onEnable();
|
this.onEnable();
|
||||||
}
|
}
|
||||||
|
|
@ -139,7 +160,7 @@ public class Module {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!alwaysOn) {
|
if (!alwaysOn) {
|
||||||
FMLCommonHandler.instance().bus().unregister(this);
|
MinecraftForge.EVENT_BUS.unregister(this);
|
||||||
}
|
}
|
||||||
this.onDisable();
|
this.onDisable();
|
||||||
}
|
}
|
||||||
|
|
@ -149,8 +170,13 @@ public class Module {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getInfoType() {
|
public String getInfoUpdate() { // when called updates the modules info, and sorts if necessary
|
||||||
return 0;
|
String info = getInfo();
|
||||||
|
if (info != lastInfo) {
|
||||||
|
sort = true;
|
||||||
|
}
|
||||||
|
lastInfo = info;
|
||||||
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEnabled(boolean enabled) {
|
public void setEnabled(boolean enabled) {
|
||||||
|
|
@ -161,6 +187,10 @@ public class Module {
|
||||||
return this.moduleName;
|
return this.moduleName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getNameInHud() {
|
||||||
|
return this.moduleName;
|
||||||
|
}
|
||||||
|
|
||||||
public ArrayList<Setting> getSettings() {
|
public ArrayList<Setting> getSettings() {
|
||||||
return this.settings;
|
return this.settings;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ public class ModuleManager {
|
||||||
public static NoFall noFall;
|
public static NoFall noFall;
|
||||||
public static Disabler disabler;
|
public static Disabler disabler;
|
||||||
public static NoRotate noRotate;
|
public static NoRotate noRotate;
|
||||||
|
public static AntiObby antiObby;
|
||||||
public static PlayerESP playerESP;
|
public static PlayerESP playerESP;
|
||||||
public static Module reduce;
|
public static Module reduce;
|
||||||
public static Safewalk safeWalk;
|
public static Safewalk safeWalk;
|
||||||
|
|
@ -67,6 +68,7 @@ public class ModuleManager {
|
||||||
public static AutoTool autoTool;
|
public static AutoTool autoTool;
|
||||||
public static Sprint sprint;
|
public static Sprint sprint;
|
||||||
public static Weather weather;
|
public static Weather weather;
|
||||||
|
public static Arrows arrows;
|
||||||
public static ChatCommands chatCommands;
|
public static ChatCommands chatCommands;
|
||||||
public static LongJump LongJump;
|
public static LongJump LongJump;
|
||||||
public static Blink blink;
|
public static Blink blink;
|
||||||
|
|
@ -152,6 +154,7 @@ public class ModuleManager {
|
||||||
this.addModule(new MobESP());
|
this.addModule(new MobESP());
|
||||||
this.addModule(new Fun.Spin());
|
this.addModule(new Fun.Spin());
|
||||||
this.addModule(noRotate = new NoRotate());
|
this.addModule(noRotate = new NoRotate());
|
||||||
|
this.addModule(antiObby = new AntiObby());
|
||||||
this.addModule(new FakeChat());
|
this.addModule(new FakeChat());
|
||||||
this.addModule(nameHider = new NameHider());
|
this.addModule(nameHider = new NameHider());
|
||||||
this.addModule(new FakeLag());
|
this.addModule(new FakeLag());
|
||||||
|
|
@ -160,6 +163,7 @@ public class ModuleManager {
|
||||||
this.addModule(commandLine = new CommandLine());
|
this.addModule(commandLine = new CommandLine());
|
||||||
this.addModule(bedwars = new BedWars());
|
this.addModule(bedwars = new BedWars());
|
||||||
this.addModule(fastMine = new FastMine());
|
this.addModule(fastMine = new FastMine());
|
||||||
|
this.addModule(arrows = new Arrows());
|
||||||
this.addModule(new JumpReset());
|
this.addModule(new JumpReset());
|
||||||
this.addModule(new Manager());
|
this.addModule(new Manager());
|
||||||
this.addModule(new ViewPackets());
|
this.addModule(new ViewPackets());
|
||||||
|
|
@ -210,12 +214,12 @@ public class ModuleManager {
|
||||||
|
|
||||||
public static void sort() {
|
public static void sort() {
|
||||||
if (HUD.alphabeticalSort.isToggled()) {
|
if (HUD.alphabeticalSort.isToggled()) {
|
||||||
Collections.sort(organizedModules, Comparator.comparing(Module::getName));
|
Collections.sort(organizedModules, Comparator.comparing(Module::getNameInHud));
|
||||||
} else {
|
}
|
||||||
organizedModules.sort((o1, o2) -> Utils.mc.fontRendererObj.getStringWidth(o2.getName() + ((HUD.showInfo.isToggled() && !o2.getInfo().isEmpty()) ? " " + o2.getInfo() : "")) - Utils.mc.fontRendererObj.getStringWidth(o1.getName() + (HUD.showInfo.isToggled() && !o1.getInfo().isEmpty() ? " " + o1.getInfo() : "")));
|
else {
|
||||||
|
organizedModules.sort((o1, o2) -> Utils.mc.fontRendererObj.getStringWidth(o2.getNameInHud() + ((HUD.showInfo.isToggled() && !o2.getInfo().isEmpty()) ? " " + o2.getInfo() : "")) - Utils.mc.fontRendererObj.getStringWidth(o1.getNameInHud() + (HUD.showInfo.isToggled() && !o1.getInfo().isEmpty() ? " " + o1.getInfo() : "")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean canExecuteChatCommand() {
|
public static boolean canExecuteChatCommand() {
|
||||||
return ModuleManager.chatCommands != null && ModuleManager.chatCommands.isEnabled();
|
return ModuleManager.chatCommands != null && ModuleManager.chatCommands.isEnabled();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ public class Gui extends Module {
|
||||||
public static SliderSetting scrollSpeed;
|
public static SliderSetting scrollSpeed;
|
||||||
public static ButtonSetting removePlayerModel;
|
public static ButtonSetting removePlayerModel;
|
||||||
public static ButtonSetting darkBackground;
|
public static ButtonSetting darkBackground;
|
||||||
|
public static ButtonSetting limitToScreen;
|
||||||
public static ButtonSetting removeWatermark;
|
public static ButtonSetting removeWatermark;
|
||||||
public static ButtonSetting rainBowOutlines;
|
public static ButtonSetting rainBowOutlines;
|
||||||
|
|
||||||
|
|
@ -21,6 +22,7 @@ public class Gui extends Module {
|
||||||
this.registerSetting(backgroundBlur = new SliderSetting("Background blur", "%", 0, 0, 100, 1));
|
this.registerSetting(backgroundBlur = new SliderSetting("Background blur", "%", 0, 0, 100, 1));
|
||||||
this.registerSetting(scrollSpeed = new SliderSetting("Scroll speed", 50, 2, 90, 1));
|
this.registerSetting(scrollSpeed = new SliderSetting("Scroll speed", 50, 2, 90, 1));
|
||||||
this.registerSetting(darkBackground = new ButtonSetting("Dark background", true));
|
this.registerSetting(darkBackground = new ButtonSetting("Dark background", true));
|
||||||
|
this.registerSetting(limitToScreen = new ButtonSetting("Limit to screen", false));
|
||||||
this.registerSetting(rainBowOutlines = new ButtonSetting("Rainbow outlines", true));
|
this.registerSetting(rainBowOutlines = new ButtonSetting("Rainbow outlines", true));
|
||||||
this.registerSetting(removePlayerModel = new ButtonSetting("Remove player model", false));
|
this.registerSetting(removePlayerModel = new ButtonSetting("Remove player model", false));
|
||||||
this.registerSetting(removeWatermark = new ButtonSetting("Remove watermark", false));
|
this.registerSetting(removeWatermark = new ButtonSetting("Remove watermark", false));
|
||||||
|
|
|
||||||
|
|
@ -23,14 +23,20 @@ public class Settings extends Module {
|
||||||
public static ButtonSetting weaponStick;
|
public static ButtonSetting weaponStick;
|
||||||
public static ButtonSetting middleClickFriends;
|
public static ButtonSetting middleClickFriends;
|
||||||
public static ButtonSetting setChatAsInventory;
|
public static ButtonSetting setChatAsInventory;
|
||||||
|
|
||||||
public static ButtonSetting rotateBody;
|
public static ButtonSetting rotateBody;
|
||||||
public static ButtonSetting fullBody;
|
public static ButtonSetting fullBody;
|
||||||
public static ButtonSetting movementFix;
|
public static ButtonSetting movementFix;
|
||||||
public static SliderSetting randomYawFactor;
|
public static SliderSetting randomYawFactor;
|
||||||
|
|
||||||
|
public static ButtonSetting loadGuiPositions;
|
||||||
|
public static ButtonSetting sendMessage;
|
||||||
|
|
||||||
public static SliderSetting offset;
|
public static SliderSetting offset;
|
||||||
public static SliderSetting timeMultiplier;
|
public static SliderSetting timeMultiplier;
|
||||||
public static ButtonSetting sendMessage;
|
|
||||||
private String[] capes = new String[] { "None", "Anime", "Aqua", "Green", "Purple", "Red", "White", "Yellow" };
|
private String[] capes = new String[] { "None", "Anime", "Aqua", "Green", "Purple", "Red", "White", "Yellow" };
|
||||||
|
|
||||||
public static List<ResourceLocation> loadedCapes = new ArrayList<>();
|
public static List<ResourceLocation> loadedCapes = new ArrayList<>();
|
||||||
|
|
||||||
public Settings() {
|
public Settings() {
|
||||||
|
|
@ -48,6 +54,7 @@ public class Settings extends Module {
|
||||||
this.registerSetting(movementFix = new ButtonSetting("Movement fix", false));
|
this.registerSetting(movementFix = new ButtonSetting("Movement fix", false));
|
||||||
this.registerSetting(randomYawFactor = new SliderSetting("Random yaw factor", 1.0, 0.0, 10.0, 1.0));
|
this.registerSetting(randomYawFactor = new SliderSetting("Random yaw factor", 1.0, 0.0, 10.0, 1.0));
|
||||||
this.registerSetting(new DescriptionSetting("Profiles"));
|
this.registerSetting(new DescriptionSetting("Profiles"));
|
||||||
|
this.registerSetting(loadGuiPositions = new ButtonSetting("Load gui states", false));
|
||||||
this.registerSetting(sendMessage = new ButtonSetting("Send message on enable", true));
|
this.registerSetting(sendMessage = new ButtonSetting("Send message on enable", true));
|
||||||
this.registerSetting(new DescriptionSetting("Theme colors"));
|
this.registerSetting(new DescriptionSetting("Theme colors"));
|
||||||
this.registerSetting(offset = new SliderSetting("Offset", 0.5, -3.0, 3.0, 0.1));
|
this.registerSetting(offset = new SliderSetting("Offset", 0.5, -3.0, 3.0, 0.1));
|
||||||
|
|
|
||||||
|
|
@ -44,11 +44,6 @@ public class HitBox extends Module {
|
||||||
return ((int) multiplier.getInput() == multiplier.getInput() ? (int) multiplier.getInput() + "" : multiplier.getInput()) + multiplier.getSuffix();
|
return ((int) multiplier.getInput() == multiplier.getInput() ? (int) multiplier.getInput() + "" : multiplier.getInput()) + multiplier.getSuffix();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getInfoType() {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onMouse(MouseEvent e) {
|
public void onMouse(MouseEvent e) {
|
||||||
if (e.button != 0 || !e.buttonstate || !Utils.nullCheck() || multiplier.getInput() == 1 || mc.thePlayer.isBlocking() || mc.currentScreen != null) {
|
if (e.button != 0 || !e.buttonstate || !Utils.nullCheck() || multiplier.getInput() == 1 || mc.thePlayer.isBlocking() || mc.currentScreen != null) {
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import keystrokesmod.mixin.impl.accessor.IAccessorMinecraft;
|
||||||
import keystrokesmod.module.Module;
|
import keystrokesmod.module.Module;
|
||||||
import keystrokesmod.module.ModuleManager;
|
import keystrokesmod.module.ModuleManager;
|
||||||
import keystrokesmod.module.impl.client.Settings;
|
import keystrokesmod.module.impl.client.Settings;
|
||||||
|
import keystrokesmod.module.impl.minigames.SkyWars;
|
||||||
import keystrokesmod.module.impl.movement.LongJump;
|
import keystrokesmod.module.impl.movement.LongJump;
|
||||||
import keystrokesmod.module.impl.world.AntiBot;
|
import keystrokesmod.module.impl.world.AntiBot;
|
||||||
import keystrokesmod.module.setting.impl.ButtonSetting;
|
import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||||
|
|
@ -16,6 +17,7 @@ import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityCreature;
|
import net.minecraft.entity.EntityCreature;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.item.EntityArmorStand;
|
import net.minecraft.entity.item.EntityArmorStand;
|
||||||
|
import net.minecraft.entity.monster.EntityGiantZombie;
|
||||||
import net.minecraft.entity.monster.EntityIronGolem;
|
import net.minecraft.entity.monster.EntityIronGolem;
|
||||||
import net.minecraft.entity.monster.EntitySilverfish;
|
import net.minecraft.entity.monster.EntitySilverfish;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
|
@ -79,7 +81,6 @@ public class KillAura extends Module {
|
||||||
private List<Entity> hostileMobs = new ArrayList<>();
|
private List<Entity> hostileMobs = new ArrayList<>();
|
||||||
private Map<Integer, Boolean> golems = new HashMap<>(); // entity id, is teammate
|
private Map<Integer, Boolean> golems = new HashMap<>(); // entity id, is teammate
|
||||||
public boolean justUnTargeted;
|
public boolean justUnTargeted;
|
||||||
public int unTargetTicks;
|
|
||||||
|
|
||||||
// blocking related
|
// blocking related
|
||||||
public boolean blockingClient;
|
public boolean blockingClient;
|
||||||
|
|
@ -171,7 +172,7 @@ public class KillAura extends Module {
|
||||||
if (rotated || reset) {
|
if (rotated || reset) {
|
||||||
resetYaw();
|
resetYaw();
|
||||||
}
|
}
|
||||||
rotated = false;
|
rotated = checkUsing = sendUnBlock = false;
|
||||||
partialTicks = 0;
|
partialTicks = 0;
|
||||||
delayTicks = 0;
|
delayTicks = 0;
|
||||||
if (isTargeting) {
|
if (isTargeting) {
|
||||||
|
|
@ -226,7 +227,7 @@ public class KillAura extends Module {
|
||||||
if (checkUsing && disableCheckUsing && ++disableCTicks >= 2) {
|
if (checkUsing && disableCheckUsing && ++disableCTicks >= 2) {
|
||||||
checkUsing = false;
|
checkUsing = false;
|
||||||
}
|
}
|
||||||
if (target == null) {
|
if (target == null && Utils.tabbedIn()) {
|
||||||
if (checkUsing && !sendUnBlock && Mouse.isButtonDown(1) && !blinkAutoBlock()) {
|
if (checkUsing && !sendUnBlock && Mouse.isButtonDown(1) && !blinkAutoBlock()) {
|
||||||
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), true);
|
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), true);
|
||||||
checkUsing = false;
|
checkUsing = false;
|
||||||
|
|
@ -320,7 +321,7 @@ public class KillAura extends Module {
|
||||||
setTarget(null);
|
setTarget(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ModuleManager.scaffold.isEnabled || LongJump.stopKillAura) {
|
if (ModuleManager.scaffold.isEnabled || LongJump.stopModules) {
|
||||||
if (blinking.get() || lag) {
|
if (blinking.get() || lag) {
|
||||||
resetBlinkState(false);
|
resetBlinkState(false);
|
||||||
}
|
}
|
||||||
|
|
@ -965,7 +966,15 @@ public class KillAura extends Module {
|
||||||
case 1:
|
case 1:
|
||||||
blinking.set(true);
|
blinking.set(true);
|
||||||
if (ModuleUtils.isBlocked) {
|
if (ModuleUtils.isBlocked) {
|
||||||
|
if (firstEdge <= 1) {
|
||||||
|
setSwapSlot();
|
||||||
|
swapped = true;
|
||||||
|
firstEdge++;
|
||||||
|
}
|
||||||
|
else {
|
||||||
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
||||||
|
firstEdge = 0;
|
||||||
|
}
|
||||||
lag = false;
|
lag = false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -976,6 +985,10 @@ public class KillAura extends Module {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
if (swapped) {
|
||||||
|
setCurrentSlot();
|
||||||
|
swapped = false;
|
||||||
|
}
|
||||||
if (!lag) {
|
if (!lag) {
|
||||||
handleInteractAndAttack(distance, true, true, swung);
|
handleInteractAndAttack(distance, true, true, swung);
|
||||||
sendBlockPacket();
|
sendBlockPacket();
|
||||||
|
|
@ -1285,15 +1298,24 @@ public class KillAura extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isHostile(EntityCreature entityCreature) {
|
private boolean isHostile(EntityCreature entityCreature) {
|
||||||
if (entityCreature instanceof EntitySilverfish) {
|
if (SkyWars.onlyAuraHostiles()) {
|
||||||
|
if (entityCreature instanceof EntityGiantZombie) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return !ModuleManager.skyWars.spawnedMobs.contains(entityCreature.getEntityId());
|
||||||
|
}
|
||||||
|
else if (entityCreature instanceof EntitySilverfish) {
|
||||||
String teamColor = Utils.getFirstColorCode(entityCreature.getCustomNameTag());
|
String teamColor = Utils.getFirstColorCode(entityCreature.getCustomNameTag());
|
||||||
String teamColorSelf = Utils.getFirstColorCode(mc.thePlayer.getDisplayName().getFormattedText());
|
String teamColorSelf = Utils.getFirstColorCode(mc.thePlayer.getDisplayName().getFormattedText());
|
||||||
if (!teamColor.isEmpty() && teamColorSelf.equals(teamColor)) { // same team
|
if (!teamColor.isEmpty() && (teamColorSelf.equals(teamColor) || Utils.isTeamMate(entityCreature))) { // same team
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (entityCreature instanceof EntityIronGolem) {
|
else if (entityCreature instanceof EntityIronGolem) {
|
||||||
|
if (Utils.getBedwarsStatus() != 2) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (!golems.containsKey(entityCreature.getEntityId())) {
|
if (!golems.containsKey(entityCreature.getEntityId())) {
|
||||||
double nearestDistance = -1;
|
double nearestDistance = -1;
|
||||||
EntityArmorStand nearestArmorStand = null;
|
EntityArmorStand nearestArmorStand = null;
|
||||||
|
|
@ -1314,7 +1336,7 @@ public class KillAura extends Module {
|
||||||
String teamColor = Utils.getFirstColorCode(nearestArmorStand.getDisplayName().getFormattedText());
|
String teamColor = Utils.getFirstColorCode(nearestArmorStand.getDisplayName().getFormattedText());
|
||||||
String teamColorSelf = Utils.getFirstColorCode(mc.thePlayer.getDisplayName().getFormattedText());
|
String teamColorSelf = Utils.getFirstColorCode(mc.thePlayer.getDisplayName().getFormattedText());
|
||||||
boolean isTeam = false;
|
boolean isTeam = false;
|
||||||
if (!teamColor.isEmpty() && teamColorSelf.equals(teamColor)) { // same team
|
if (!teamColor.isEmpty() && (teamColorSelf.equals(teamColor) || Utils.isTeamMate(nearestArmorStand))) { // same team
|
||||||
isTeam = true;
|
isTeam = true;
|
||||||
}
|
}
|
||||||
golems.put(entityCreature.getEntityId(), isTeam);
|
golems.put(entityCreature.getEntityId(), isTeam);
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@ import org.lwjgl.input.Keyboard;
|
||||||
|
|
||||||
public class Velocity extends Module {
|
public class Velocity extends Module {
|
||||||
private SliderSetting velocityModes;
|
private SliderSetting velocityModes;
|
||||||
private SliderSetting horizontal;
|
public static SliderSetting horizontal;
|
||||||
private SliderSetting vertical;
|
public static SliderSetting vertical;
|
||||||
private SliderSetting chance;
|
private SliderSetting chance;
|
||||||
private ButtonSetting onlyWhileAttacking;
|
private ButtonSetting onlyWhileAttacking;
|
||||||
private ButtonSetting onlyWhileTargeting;
|
private ButtonSetting onlyWhileTargeting;
|
||||||
|
|
@ -123,11 +123,6 @@ public class Velocity extends Module {
|
||||||
return (int) horizontal.getInput() + "%" + " " + (int) vertical.getInput() + "%";
|
return (int) horizontal.getInput() + "%" + " " + (int) vertical.getInput() + "%";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getInfoType() {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onLivingUpdate(LivingUpdateEvent ev) {
|
public void onLivingUpdate(LivingUpdateEvent ev) {
|
||||||
if (velocityModes.getInput() == 0) {
|
if (velocityModes.getInput() == 0) {
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1,59 @@
|
||||||
package keystrokesmod.module.impl.minigames;
|
package keystrokesmod.module.impl.minigames;
|
||||||
|
|
||||||
import keystrokesmod.event.PreUpdateEvent;
|
import keystrokesmod.event.PreUpdateEvent;
|
||||||
|
import keystrokesmod.event.SendPacketEvent;
|
||||||
|
import keystrokesmod.event.UseItemEvent;
|
||||||
import keystrokesmod.module.Module;
|
import keystrokesmod.module.Module;
|
||||||
|
import keystrokesmod.module.ModuleManager;
|
||||||
import keystrokesmod.module.impl.world.AntiBot;
|
import keystrokesmod.module.impl.world.AntiBot;
|
||||||
import keystrokesmod.module.setting.impl.ButtonSetting;
|
import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||||
import keystrokesmod.utility.RenderUtils;
|
import keystrokesmod.utility.RenderUtils;
|
||||||
import keystrokesmod.utility.Utils;
|
import keystrokesmod.utility.Utils;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.EntityList;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemEnderPearl;
|
||||||
|
import net.minecraft.item.ItemMonsterPlacer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement;
|
||||||
|
import net.minecraft.util.BlockPos;
|
||||||
|
import net.minecraft.util.Vec3;
|
||||||
import net.minecraftforge.client.event.ClientChatReceivedEvent;
|
import net.minecraftforge.client.event.ClientChatReceivedEvent;
|
||||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||||
|
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class SkyWars extends Module {
|
public class SkyWars extends Module {
|
||||||
public ButtonSetting strengthIndicator;
|
public ButtonSetting strengthIndicator;
|
||||||
|
public ButtonSetting onlyAuraHostileMobs;
|
||||||
|
public ButtonSetting renderTimeWarp;
|
||||||
|
|
||||||
public Map<EntityPlayer, Long> strengthPlayers = new HashMap<>();
|
public Map<EntityPlayer, Long> strengthPlayers = new HashMap<>();
|
||||||
private int strengthColor = new Color(255, 0, 0).getRGB();
|
private Map<String, SpawnEggInfo> entitySpawnQueue = new LinkedHashMap<>(); // type name, spawn info
|
||||||
|
private Map<Vec3, Long> timeWarpPositions = new LinkedHashMap<>(); // position when thrown, time when thrown
|
||||||
|
public List<Integer> spawnedMobs = new ArrayList<>(); // entity id
|
||||||
|
|
||||||
|
private final int strengthColor = new Color(255, 0, 0).getRGB();
|
||||||
|
private final int timeWarpColor = new Color(210, 0, 255, 64).getRGB();
|
||||||
|
|
||||||
private String[] killMessages = new String[] {" by ", " to ", " with ", " of ", " from ", " knight ", " for "};
|
private String[] killMessages = new String[] {" by ", " to ", " with ", " of ", " from ", " knight ", " for "};
|
||||||
|
private boolean thrownPearl;
|
||||||
|
public static boolean isSkyWarsTeams = false;
|
||||||
|
|
||||||
public SkyWars() {
|
public SkyWars() {
|
||||||
super("Sky Wars", category.minigames);
|
super("Sky Wars", category.minigames);
|
||||||
|
this.registerSetting(onlyAuraHostileMobs = new ButtonSetting("Only aura hostile mobs", true));
|
||||||
|
this.registerSetting(renderTimeWarp = new ButtonSetting("Render time warp", true));
|
||||||
this.registerSetting(strengthIndicator = new ButtonSetting("Strength indicator", true));
|
this.registerSetting(strengthIndicator = new ButtonSetting("Strength indicator", true));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
strengthPlayers.clear();
|
clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
|
|
@ -34,11 +61,17 @@ public class SkyWars extends Module {
|
||||||
if (!strengthIndicator.isToggled() || !Utils.nullCheck() || strengthPlayers.isEmpty() || Utils.getSkyWarsStatus() != 2) {
|
if (!strengthIndicator.isToggled() || !Utils.nullCheck() || strengthPlayers.isEmpty() || Utils.getSkyWarsStatus() != 2) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
int customMode = getCustomMode();
|
||||||
|
if (customMode == 2) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
isSkyWarsTeams = customMode == 1;
|
||||||
|
long duration = isSkyWarsTeams ? 2000 : 5000;
|
||||||
ArrayList<EntityPlayer> keysList = new ArrayList<>(strengthPlayers.keySet());
|
ArrayList<EntityPlayer> keysList = new ArrayList<>(strengthPlayers.keySet());
|
||||||
for (EntityPlayer entityPlayer : keysList) {
|
for (EntityPlayer entityPlayer : keysList) {
|
||||||
long storedTime = strengthPlayers.get(entityPlayer);
|
long storedTime = strengthPlayers.get(entityPlayer);
|
||||||
long timePassed = System.currentTimeMillis() - storedTime;
|
long timePassed = System.currentTimeMillis() - storedTime;
|
||||||
if (timePassed < 5000 && !AntiBot.isBot(entityPlayer)) {
|
if (timePassed < duration && !AntiBot.isBot(entityPlayer)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
strengthPlayers.remove(entityPlayer);
|
strengthPlayers.remove(entityPlayer);
|
||||||
|
|
@ -47,13 +80,22 @@ public class SkyWars extends Module {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onChat(ClientChatReceivedEvent e) {
|
public void onChat(ClientChatReceivedEvent e) {
|
||||||
if (e.type == 2 || !Utils.nullCheck() || !strengthIndicator.isToggled() || Utils.getSkyWarsStatus() != 2) {
|
if (e.type == 2 || !Utils.nullCheck()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String stripped = Utils.stripColor(e.message.getUnformattedText());
|
String stripped = Utils.stripColor(e.message.getUnformattedText());
|
||||||
if (stripped.isEmpty()) {
|
if (stripped.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (stripped.equals("You will be warped back in 3 seconds!") && thrownPearl) {
|
||||||
|
timeWarpPositions.put(new Vec3(mc.thePlayer.lastTickPosX, mc.thePlayer.lastTickPosY, mc.thePlayer.lastTickPosZ), System.currentTimeMillis());
|
||||||
|
thrownPearl = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (strengthIndicator.isToggled() && Utils.getSkyWarsStatus() == 2) {
|
||||||
|
if (getCustomMode() == 2) { // lab, then no
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (stripped.endsWith(".") && Arrays.stream(killMessages).anyMatch(stripped::contains)) {
|
if (stripped.endsWith(".") && Arrays.stream(killMessages).anyMatch(stripped::contains)) {
|
||||||
String[] parts = stripped.split(" ");
|
String[] parts = stripped.split(" ");
|
||||||
for (String part : parts) {
|
for (String part : parts) {
|
||||||
|
|
@ -71,12 +113,14 @@ public class SkyWars extends Module {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onRenderWorld(RenderWorldLastEvent renderWorldLastEvent) {
|
public void onRenderWorld(RenderWorldLastEvent e) {
|
||||||
if (!strengthIndicator.isToggled() || !Utils.nullCheck() || strengthPlayers.isEmpty() || Utils.getSkyWarsStatus() != 2) {
|
if (!Utils.nullCheck() || Utils.getSkyWarsStatus() != 2) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (strengthIndicator.isToggled()) {
|
||||||
for (EntityPlayer entityPlayer : strengthPlayers.keySet()) {
|
for (EntityPlayer entityPlayer : strengthPlayers.keySet()) {
|
||||||
if (AntiBot.isBot(entityPlayer)) {
|
if (AntiBot.isBot(entityPlayer)) {
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -84,4 +128,119 @@ public class SkyWars extends Module {
|
||||||
RenderUtils.renderEntity(entityPlayer, 2, 0, 0, strengthColor, false);
|
RenderUtils.renderEntity(entityPlayer, 2, 0, 0, strengthColor, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (renderTimeWarp.isToggled()) {
|
||||||
|
Iterator<Map.Entry<Vec3, Long>> iterator = this.timeWarpPositions.entrySet().iterator();
|
||||||
|
long currentTime = System.currentTimeMillis();
|
||||||
|
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
Map.Entry<Vec3, Long> entry = iterator.next();
|
||||||
|
Vec3 position = entry.getKey();
|
||||||
|
long timeThrown = entry.getValue();
|
||||||
|
|
||||||
|
if (currentTime - timeThrown >= 3050) {
|
||||||
|
iterator.remove();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
RenderUtils.drawPlayerBoundingBox(position, timeWarpColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void onWorldJoin(EntityJoinWorldEvent e) {
|
||||||
|
if (e.entity == mc.thePlayer) {
|
||||||
|
clear();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (e.entity != null) {
|
||||||
|
if (Utils.getSkyWarsStatus() != 2) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String entityClassName = e.entity.getClass().getSimpleName();
|
||||||
|
if (entitySpawnQueue.containsKey(entityClassName)) {
|
||||||
|
Vec3 spawnPosition = new Vec3(e.entity.posX, e.entity.posY, e.entity.posZ);
|
||||||
|
SpawnEggInfo eggInfo = entitySpawnQueue.get(entityClassName);
|
||||||
|
if (eggInfo.spawnPos.distanceTo(spawnPosition) > 3 || Utils.timeBetween(mc.thePlayer.ticksExisted, eggInfo.tickSpawned) > 60) { // 3 seconds or not at spawn point then not own mob
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!entitySpawnQueue.remove(entityClassName, eggInfo)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
spawnedMobs.add(e.entity.getEntityId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void onSendPacket(SendPacketEvent e) {
|
||||||
|
if (e.getPacket() instanceof C08PacketPlayerBlockPlacement) {
|
||||||
|
C08PacketPlayerBlockPlacement p = (C08PacketPlayerBlockPlacement) e.getPacket();
|
||||||
|
if (p.getPlacedBlockDirection() != 255 && p.getStack() != null && p.getStack().getItem() != null) {
|
||||||
|
if (!(p.getStack().getItem() instanceof ItemMonsterPlacer)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Class<? extends Entity> oclass = EntityList.stringToClassMapping.get(ItemMonsterPlacer.getEntityName(p.getStack()));
|
||||||
|
entitySpawnQueue.put(oclass.getSimpleName(), new SpawnEggInfo(p.getPosition(), mc.thePlayer.ticksExisted));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void onUseItem(UseItemEvent e) {
|
||||||
|
if (e.usedItemStack != null && e.usedItemStack.getItem() instanceof ItemEnderPearl && Utils.getSkyWarsStatus() == 2) {
|
||||||
|
ItemStack stack = e.usedItemStack;
|
||||||
|
if (Utils.stripString(stack.getDisplayName()).equals("Time Warp Pearl")) {
|
||||||
|
thrownPearl = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (stack.getDisplayName().startsWith("§b§l")) {
|
||||||
|
List<String> toolTip = stack.getTooltip(mc.thePlayer, true);
|
||||||
|
if (toolTip != null && toolTip.size() > 1 && Utils.stripString(toolTip.get(1)).contains("Teleports you back to your")) {
|
||||||
|
thrownPearl = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void clear() {
|
||||||
|
strengthPlayers.clear();
|
||||||
|
spawnedMobs.clear();
|
||||||
|
entitySpawnQueue.clear();
|
||||||
|
timeWarpPositions.clear();
|
||||||
|
thrownPearl = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean onlyAuraHostiles() {
|
||||||
|
return ModuleManager.skyWars != null && ModuleManager.skyWars.isEnabled() && ModuleManager.skyWars.onlyAuraHostileMobs.isToggled() && Utils.getSkyWarsStatus() == 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCustomMode() {
|
||||||
|
List<String> sidebar = Utils.getSidebarLines();
|
||||||
|
if (sidebar == null || sidebar.isEmpty()) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
for (String line : sidebar) {
|
||||||
|
line = Utils.stripColor(line);
|
||||||
|
if (line.startsWith("Teams left: ")) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else if (line.startsWith("Lab: ")) {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class SpawnEggInfo {
|
||||||
|
Vec3 spawnPos;
|
||||||
|
int tickSpawned;
|
||||||
|
|
||||||
|
public SpawnEggInfo(BlockPos spawnPos, int tickSpawned) {
|
||||||
|
this.spawnPos = new Vec3(spawnPos.getX(), spawnPos.getY(), spawnPos.getZ());
|
||||||
|
this.tickSpawned = tickSpawned;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -6,10 +6,9 @@ import keystrokesmod.mixin.impl.accessor.IAccessorMinecraft;
|
||||||
import keystrokesmod.module.Module;
|
import keystrokesmod.module.Module;
|
||||||
import keystrokesmod.module.ModuleManager;
|
import keystrokesmod.module.ModuleManager;
|
||||||
import keystrokesmod.module.setting.impl.ButtonSetting;
|
import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||||
import keystrokesmod.module.setting.impl.DescriptionSetting;
|
|
||||||
import keystrokesmod.module.setting.impl.KeySetting;
|
import keystrokesmod.module.setting.impl.KeySetting;
|
||||||
import keystrokesmod.module.setting.impl.SliderSetting;
|
import keystrokesmod.module.setting.impl.SliderSetting;
|
||||||
import keystrokesmod.utility.Reflection;
|
import keystrokesmod.utility.ModuleUtils;
|
||||||
import keystrokesmod.utility.Utils;
|
import keystrokesmod.utility.Utils;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
@ -18,7 +17,6 @@ import net.minecraft.network.play.server.*;
|
||||||
import net.minecraft.potion.PotionEffect;
|
import net.minecraft.potion.PotionEffect;
|
||||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
|
||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
|
|
||||||
public class LongJump extends Module {
|
public class LongJump extends Module {
|
||||||
|
|
@ -29,6 +27,10 @@ public class LongJump extends Module {
|
||||||
private SliderSetting verticalMotion;
|
private SliderSetting verticalMotion;
|
||||||
private SliderSetting motionDecay;
|
private SliderSetting motionDecay;
|
||||||
|
|
||||||
|
private ButtonSetting manual;
|
||||||
|
private ButtonSetting onlyWithVelocity;
|
||||||
|
private KeySetting disableKey;
|
||||||
|
|
||||||
private ButtonSetting allowStrafe;
|
private ButtonSetting allowStrafe;
|
||||||
private ButtonSetting invertYaw;
|
private ButtonSetting invertYaw;
|
||||||
private ButtonSetting stopMovement;
|
private ButtonSetting stopMovement;
|
||||||
|
|
@ -39,11 +41,14 @@ public class LongJump extends Module {
|
||||||
|
|
||||||
public String[] modes = new String[]{"Floyd", "Boost"};
|
public String[] modes = new String[]{"Floyd", "Boost"};
|
||||||
|
|
||||||
|
private boolean manualWasOn;
|
||||||
|
|
||||||
private float yaw;
|
private float yaw;
|
||||||
private float pitch;
|
private float pitch;
|
||||||
|
|
||||||
private boolean notMoving;
|
private boolean notMoving;
|
||||||
private boolean enabled;
|
private boolean enabled;
|
||||||
|
public boolean function;
|
||||||
|
|
||||||
private int boostTicks;
|
private int boostTicks;
|
||||||
private int lastSlot = -1;
|
private int lastSlot = -1;
|
||||||
|
|
@ -56,8 +61,7 @@ public class LongJump extends Module {
|
||||||
private long FIREBALL_TIMEOUT = 750L;
|
private long FIREBALL_TIMEOUT = 750L;
|
||||||
|
|
||||||
public static boolean stopVelocity;
|
public static boolean stopVelocity;
|
||||||
public static boolean stopKillAura;
|
public static boolean stopModules;
|
||||||
public static boolean stopScaffold;
|
|
||||||
public static boolean slotReset;
|
public static boolean slotReset;
|
||||||
public static int slotResetTicks;
|
public static int slotResetTicks;
|
||||||
|
|
||||||
|
|
@ -65,8 +69,11 @@ public class LongJump extends Module {
|
||||||
super("Long Jump", category.movement);
|
super("Long Jump", category.movement);
|
||||||
this.registerSetting(mode = new SliderSetting("Mode", 0, modes));
|
this.registerSetting(mode = new SliderSetting("Mode", 0, modes));
|
||||||
|
|
||||||
this.registerSetting(boostSetting = new SliderSetting("Horizontal boost", 1.7, 0.0, 2.0, 0.05));
|
this.registerSetting(manual = new ButtonSetting("Manual", false));
|
||||||
|
this.registerSetting(onlyWithVelocity = new ButtonSetting("Only while velocity enabled", false));
|
||||||
|
this.registerSetting(disableKey = new KeySetting("Disable key", Keyboard.KEY_SPACE));
|
||||||
|
|
||||||
|
this.registerSetting(boostSetting = new SliderSetting("Horizontal boost", 1.7, 0.0, 2.0, 0.05));
|
||||||
this.registerSetting(verticalMotion = new SliderSetting("Vertical motion", 0, 0.4, 0.9, 0.01));
|
this.registerSetting(verticalMotion = new SliderSetting("Vertical motion", 0, 0.4, 0.9, 0.01));
|
||||||
this.registerSetting(motionDecay = new SliderSetting("Motion decay", 17, 1, 40, 1));
|
this.registerSetting(motionDecay = new SliderSetting("Motion decay", 17, 1, 40, 1));
|
||||||
this.registerSetting(allowStrafe = new ButtonSetting("Allow strafe", false));
|
this.registerSetting(allowStrafe = new ButtonSetting("Allow strafe", false));
|
||||||
|
|
@ -78,26 +85,25 @@ public class LongJump extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void guiUpdate() {
|
public void guiUpdate() {
|
||||||
|
this.onlyWithVelocity.setVisible(manual.isToggled(), this);
|
||||||
|
this.disableKey.setVisible(manual.isToggled(), this);
|
||||||
|
|
||||||
this.verticalMotion.setVisible(mode.getInput() == 0, this);
|
this.verticalMotion.setVisible(mode.getInput() == 0, this);
|
||||||
this.motionDecay.setVisible(mode.getInput() == 0, this);
|
this.motionDecay.setVisible(mode.getInput() == 0, this);
|
||||||
this.allowStrafe.setVisible(mode.getInput() == 0, this);
|
|
||||||
this.temporaryFlightKey.setVisible(mode.getInput() == 0, this);
|
this.temporaryFlightKey.setVisible(mode.getInput() == 0, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
slotReset = false;
|
if (ModuleUtils.profileTicks <= 1) {
|
||||||
slotResetTicks = 0;
|
return;
|
||||||
enabled = true;
|
}
|
||||||
ModuleManager.bhop.disable();
|
if (!manual.isToggled()) {
|
||||||
stopKillAura = true;
|
enabled();
|
||||||
stopScaffold = true;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
fireballTime = rotateTick = stopTime = 0;
|
disabled();
|
||||||
boostTicks = -1;
|
|
||||||
resetSlot();
|
|
||||||
enabled = notMoving = stopVelocity = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*public boolean onChat(String chatMessage) {
|
/*public boolean onChat(String chatMessage) {
|
||||||
|
|
@ -113,17 +119,44 @@ public class LongJump extends Module {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onPreUpdate(PreUpdateEvent e) {
|
public void onPreUpdate(PreUpdateEvent e) {
|
||||||
|
if (manual.isToggled()) {
|
||||||
|
manualWasOn = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (manualWasOn) {
|
||||||
|
disabled();
|
||||||
|
}
|
||||||
|
manualWasOn = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (manual.isToggled() && disableKey.isPressed() && Utils.jumpDown()) {
|
||||||
|
function = false;
|
||||||
|
disabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!function) {
|
||||||
|
if (manual.isToggled() && !enabled && (!onlyWithVelocity.isToggled() || onlyWithVelocity.isToggled() && ModuleManager.velocity.isEnabled())) {
|
||||||
|
if (ModuleUtils.threwFireballLow) {
|
||||||
|
ModuleManager.velocity.disableVelo = true;
|
||||||
|
enabled();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
if (!Utils.isMoving()) notMoving = true;
|
if (!Utils.isMoving()) notMoving = true;
|
||||||
if (boostSetting.getInput() == 0 && verticalMotion.getInput() == 0) {
|
if (boostSetting.getInput() == 0 && verticalMotion.getInput() == 0) {
|
||||||
Utils.print("&cValues are set to 0!");
|
Utils.print("&cValues are set to 0!");
|
||||||
disable();
|
disabled();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int fireballSlot = setupFireballSlot(true);
|
int fireballSlot = setupFireballSlot(true);
|
||||||
if (fireballSlot != -1) {
|
if (fireballSlot != -1) {
|
||||||
|
if (!manual.isToggled()) {
|
||||||
lastSlot = mc.thePlayer.inventory.currentItem;
|
lastSlot = mc.thePlayer.inventory.currentItem;
|
||||||
mc.thePlayer.inventory.currentItem = fireballSlot;
|
mc.thePlayer.inventory.currentItem = fireballSlot;
|
||||||
|
}
|
||||||
//("Set fireball slot");
|
//("Set fireball slot");
|
||||||
rotateTick = 1;
|
rotateTick = 1;
|
||||||
if (stopMovement.isToggled()) {
|
if (stopMovement.isToggled()) {
|
||||||
|
|
@ -139,31 +172,35 @@ public class LongJump extends Module {
|
||||||
motionDecayVal = (int) motionDecay.getInput();
|
motionDecayVal = (int) motionDecay.getInput();
|
||||||
}
|
}
|
||||||
if (stopTime == -1 && ++boostTicks > (!temporaryFlightKey() ? 33/*flat motion ticks*/ : (!notMoving ? 32/*normal motion ticks*/ : 33/*vertical motion ticks*/))) {
|
if (stopTime == -1 && ++boostTicks > (!temporaryFlightKey() ? 33/*flat motion ticks*/ : (!notMoving ? 32/*normal motion ticks*/ : 33/*vertical motion ticks*/))) {
|
||||||
disable();
|
disabled();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fireballTime > 0 && (System.currentTimeMillis() - fireballTime) > FIREBALL_TIMEOUT) {
|
if (fireballTime > 0 && (System.currentTimeMillis() - fireballTime) > FIREBALL_TIMEOUT) {
|
||||||
Utils.print("&cFireball timed out.");
|
Utils.print("&cFireball timed out.");
|
||||||
disable();
|
disabled();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mode.getInput() == 0) {
|
|
||||||
if (boostTicks > 0) {
|
if (boostTicks > 0) {
|
||||||
|
if (mode.getInput() == 0) {
|
||||||
modifyVertical(); // has to be onPreUpdate
|
modifyVertical(); // has to be onPreUpdate
|
||||||
|
}
|
||||||
//Utils.print("Modifying vertical");
|
//Utils.print("Modifying vertical");
|
||||||
if (allowStrafe.isToggled()) {
|
if (allowStrafe.isToggled() && boostTicks < 32) {
|
||||||
Utils.setSpeed(Utils.getHorizontalSpeed(mc.thePlayer));
|
Utils.setSpeed(Utils.getHorizontalSpeed(mc.thePlayer));
|
||||||
//Utils.print("Speed");
|
//Utils.print("Speed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (stopMovement.isToggled() && !notMoving) {
|
if (stopMovement.isToggled() && !notMoving) {
|
||||||
if (stopTime > 0) {
|
if (stopTime > 0) {
|
||||||
++stopTime;
|
++stopTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mc.thePlayer.onGround && boostTicks > 2) {
|
||||||
|
disabled();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||||
|
|
@ -171,39 +208,30 @@ public class LongJump extends Module {
|
||||||
if (!Utils.nullCheck()) {
|
if (!Utils.nullCheck()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (rotateTick > 0) {
|
if (rotateTick == 1) {
|
||||||
if ((invertYaw.isToggled() || stopMovement.isToggled()) && !notMoving) {
|
if ((invertYaw.isToggled() || stopMovement.isToggled()) && !notMoving) {
|
||||||
if (!stopMovement.isToggled()) {
|
if (!stopMovement.isToggled()) {
|
||||||
if (rotateTick == 1) {
|
|
||||||
yaw = mc.thePlayer.rotationYaw - 180f;
|
yaw = mc.thePlayer.rotationYaw - 180f;
|
||||||
pitch = 90f;
|
pitch = 90f;
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (rotateTick == 1) {
|
|
||||||
yaw = mc.thePlayer.rotationYaw - 180f;
|
yaw = mc.thePlayer.rotationYaw - 180f;
|
||||||
pitch = 66.3f;//(float) pitchVal.getInput();
|
pitch = 66.3f;//(float) pitchVal.getInput();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (rotateTick == 1) {
|
|
||||||
yaw = mc.thePlayer.rotationYaw;
|
yaw = mc.thePlayer.rotationYaw;
|
||||||
pitch = 90f;
|
pitch = 90f;
|
||||||
}
|
}
|
||||||
}
|
e.setRotations(yaw, pitch);
|
||||||
if (rotateTick > 1) {
|
|
||||||
yaw = mc.thePlayer.rotationYaw;
|
|
||||||
pitch = mc.thePlayer.rotationPitch;
|
|
||||||
}
|
|
||||||
e.setYaw(yaw);
|
|
||||||
e.setPitch(pitch);
|
|
||||||
}
|
}
|
||||||
if (rotateTick > 0 && ++rotateTick >= 3) {
|
if (rotateTick > 0 && ++rotateTick >= 3) {
|
||||||
rotateTick = 0;
|
rotateTick = 0;
|
||||||
int fireballSlot = setupFireballSlot(false);
|
int fireballSlot = setupFireballSlot(false);
|
||||||
if (fireballSlot != -1) {
|
if (fireballSlot != -1) {
|
||||||
|
if (!manual.isToggled()) {
|
||||||
mc.thePlayer.inventory.currentItem = fireballSlot; // we are probably already on the slot but make sure
|
mc.thePlayer.inventory.currentItem = fireballSlot; // we are probably already on the slot but make sure
|
||||||
fireballTime = System.currentTimeMillis();
|
fireballTime = System.currentTimeMillis();
|
||||||
((IAccessorMinecraft) mc).callRightClickMouse();
|
((IAccessorMinecraft) mc).callRightClickMouse();
|
||||||
|
}
|
||||||
mc.thePlayer.swingItem();
|
mc.thePlayer.swingItem();
|
||||||
mc.getItemRenderer().resetEquippedProgress();
|
mc.getItemRenderer().resetEquippedProgress();
|
||||||
stopVelocity = true;
|
stopVelocity = true;
|
||||||
|
|
@ -216,12 +244,18 @@ public class LongJump extends Module {
|
||||||
}
|
}
|
||||||
modifyHorizontal();
|
modifyHorizontal();
|
||||||
stopVelocity = false;
|
stopVelocity = false;
|
||||||
|
if (!manual.isToggled() && !allowStrafe.isToggled() && mode.getInput() == 1) {
|
||||||
|
disabled();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent(priority = EventPriority.LOWEST) // called last in order to apply fix
|
@SubscribeEvent(priority = EventPriority.LOWEST) // called last in order to apply fix
|
||||||
public void onMoveInput(PrePlayerInputEvent e) {
|
public void onMoveInput(PrePlayerInputEvent e) {
|
||||||
|
if (!function) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
mc.thePlayer.movementInput.jump = false;
|
mc.thePlayer.movementInput.jump = false;
|
||||||
if (rotateTick > 0 || fireballTime > 0) {
|
if (rotateTick > 0 || fireballTime > 0) {
|
||||||
if (Utils.isMoving()) e.setForward(1);
|
if (Utils.isMoving()) e.setForward(1);
|
||||||
|
|
@ -241,6 +275,9 @@ public class LongJump extends Module {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onReceivePacket(ReceivePacketEvent e) {
|
public void onReceivePacket(ReceivePacketEvent e) {
|
||||||
|
if (!function) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Packet packet = e.getPacket();
|
Packet packet = e.getPacket();
|
||||||
if (packet instanceof S27PacketExplosion) {
|
if (packet instanceof S27PacketExplosion) {
|
||||||
S27PacketExplosion s27 = (S27PacketExplosion) packet;
|
S27PacketExplosion s27 = (S27PacketExplosion) packet;
|
||||||
|
|
@ -258,7 +295,7 @@ public class LongJump extends Module {
|
||||||
//client.print(client.getPlayer().getTicksExisted() + " s27 " + boostTicks + " " + client.getPlayer().getHurtTime() + " " + client.getPlayer().getSpeed());
|
//client.print(client.getPlayer().getTicksExisted() + " s27 " + boostTicks + " " + client.getPlayer().getHurtTime() + " " + client.getPlayer().getSpeed());
|
||||||
} else if (packet instanceof S08PacketPlayerPosLook) {
|
} else if (packet instanceof S08PacketPlayerPosLook) {
|
||||||
Utils.print("&cReceived setback, disabling.");
|
Utils.print("&cReceived setback, disabling.");
|
||||||
disable();
|
disabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hideExplosion.isToggled() && fireballTime != 0 && (packet instanceof S0EPacketSpawnObject || packet instanceof S2APacketParticles || packet instanceof S29PacketSoundEffect)) {
|
if (hideExplosion.isToggled() && fireballTime != 0 && (packet instanceof S0EPacketSpawnObject || packet instanceof S2APacketParticles || packet instanceof S29PacketSoundEffect)) {
|
||||||
|
|
@ -278,22 +315,41 @@ public class LongJump extends Module {
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void enabled() {
|
||||||
|
slotReset = false;
|
||||||
|
slotResetTicks = 0;
|
||||||
|
enabled = function = true;
|
||||||
|
ModuleManager.bhop.disable();
|
||||||
|
|
||||||
|
stopModules = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void disabled() {
|
||||||
|
fireballTime = rotateTick = stopTime = 0;
|
||||||
|
boostTicks = -1;
|
||||||
|
resetSlot();
|
||||||
|
enabled = function = notMoving = stopVelocity = stopModules = false;
|
||||||
|
if (!manual.isToggled()) {
|
||||||
|
disable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private int setupFireballSlot(boolean pre) {
|
private int setupFireballSlot(boolean pre) {
|
||||||
// only cancel bad packet right click on the tick we are sending it
|
// only cancel bad packet right click on the tick we are sending it
|
||||||
int fireballSlot = getFireballSlot();
|
int fireballSlot = getFireballSlot();
|
||||||
if (fireballSlot == -1) {
|
if (fireballSlot == -1) {
|
||||||
Utils.print("&cFireball not found.");
|
Utils.print("&cFireball not found.");
|
||||||
disable();
|
disabled();
|
||||||
} else if (ModuleManager.scaffold.isEnabled || (pre && Utils.distanceToGround(mc.thePlayer) > 3)/* || (!pre && !PacketUtil.canRightClickItem())*/) { //needs porting
|
} else if (ModuleManager.scaffold.isEnabled || (pre && Utils.distanceToGround(mc.thePlayer) > 3)/* || (!pre && !PacketUtil.canRightClickItem())*/) { //needs porting
|
||||||
Utils.print("&cCan't throw fireball right now.");
|
Utils.print("&cCan't throw fireball right now.");
|
||||||
disable();
|
disabled();
|
||||||
fireballSlot = -1;
|
fireballSlot = -1;
|
||||||
}
|
}
|
||||||
return fireballSlot;
|
return fireballSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void resetSlot() {
|
private void resetSlot() {
|
||||||
if (lastSlot != -1) {
|
if (lastSlot != -1 && !manual.isToggled()) {
|
||||||
mc.thePlayer.inventory.currentItem = lastSlot;
|
mc.thePlayer.inventory.currentItem = lastSlot;
|
||||||
lastSlot = -1;
|
lastSlot = -1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,17 @@ import keystrokesmod.module.setting.impl.DescriptionSetting;
|
||||||
import keystrokesmod.module.setting.impl.SliderSetting;
|
import keystrokesmod.module.setting.impl.SliderSetting;
|
||||||
import keystrokesmod.utility.*;
|
import keystrokesmod.utility.*;
|
||||||
import net.minecraft.client.settings.KeyBinding;
|
import net.minecraft.client.settings.KeyBinding;
|
||||||
|
import net.minecraft.enchantment.Enchantment;
|
||||||
|
import net.minecraft.enchantment.EnchantmentHelper;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.*;
|
import net.minecraft.item.*;
|
||||||
|
import net.minecraft.network.play.client.C02PacketUseEntity;
|
||||||
|
import net.minecraft.network.play.client.C07PacketPlayerDigging;
|
||||||
import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement;
|
import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement;
|
||||||
|
import net.minecraft.network.play.client.C09PacketHeldItemChange;
|
||||||
import net.minecraft.util.BlockPos;
|
import net.minecraft.util.BlockPos;
|
||||||
|
import net.minecraftforge.client.event.MouseEvent;
|
||||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
import org.lwjgl.input.Mouse;
|
import org.lwjgl.input.Mouse;
|
||||||
|
|
@ -30,6 +38,8 @@ public class NoSlow extends Module {
|
||||||
private boolean canFloat;
|
private boolean canFloat;
|
||||||
private boolean reSendConsume;
|
private boolean reSendConsume;
|
||||||
public static boolean noSlowing;
|
public static boolean noSlowing;
|
||||||
|
private int offsetDelay;
|
||||||
|
private boolean setCancelled;
|
||||||
|
|
||||||
public NoSlow() {
|
public NoSlow() {
|
||||||
super("NoSlow", category.movement, 0);
|
super("NoSlow", category.movement, 0);
|
||||||
|
|
@ -92,12 +102,62 @@ public class NoSlow extends Module {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onPostPlayerInput(PostPlayerInputEvent e) {
|
public void onPostPlayerInput(PostPlayerInputEvent e) {
|
||||||
if ((canFloat && mc.thePlayer.onGround)) {
|
if (canFloat && noSlowing && mc.thePlayer.onGround) {
|
||||||
if (groundSpeedOption.isToggled() && !Utils.jumpDown() && !ModuleManager.bhop.isEnabled() && Utils.keysDown() && !Utils.bowBackwards()) {
|
if (groundSpeedOption.isToggled() && !Utils.jumpDown() && !ModuleManager.bhop.isEnabled() && Utils.keysDown() && !Utils.bowBackwards()) {
|
||||||
Utils.setSpeed(getSpeedModifier());
|
Utils.setSpeed(getSpeedModifier());
|
||||||
//Utils.print("ground speed");
|
//Utils.print("ground speed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleFloatSetup();
|
||||||
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
||||||
|
public void onMouse(MouseEvent e) {
|
||||||
|
handleFloatSetup();
|
||||||
|
|
||||||
|
if (setCancelled && e.button == 1) {
|
||||||
|
setCancelled = false;
|
||||||
|
e.setCanceled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleFloatSetup() {
|
||||||
|
if (mode.getInput() != 4 || canFloat || reSendConsume || getSlowed() == 0.2f) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!Mouse.isButtonDown(1) || (mc.thePlayer.getHeldItem() == null || !holdingConsumable(mc.thePlayer.getHeldItem()))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!mc.thePlayer.onGround) {
|
||||||
|
canFloat = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), false);
|
||||||
|
setCancelled = true;
|
||||||
|
if (!Utils.jumpDown()) {
|
||||||
|
mc.thePlayer.jump();
|
||||||
|
}
|
||||||
|
reSendConsume = true;
|
||||||
|
canFloat = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void onSendPacket(SendPacketEvent e) {
|
||||||
|
if (!Utils.nullCheck()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (e.getPacket() instanceof C08PacketPlayerBlockPlacement) {
|
||||||
|
if (mode.getInput() != 4 || canFloat || reSendConsume || !mc.thePlayer.onGround || getSlowed() == 0.2f) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!Mouse.isButtonDown(1) || (mc.thePlayer.getHeldItem() == null || !holdingConsumable(mc.thePlayer.getHeldItem()))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
e.setCanceled(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
|
|
@ -107,27 +167,31 @@ public class NoSlow extends Module {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
postPlace = false;
|
postPlace = false;
|
||||||
if (mc.thePlayer.getHeldItem() != null && holdingConsumable(mc.thePlayer.getHeldItem()) && !Mouse.isButtonDown(1)) {
|
if (mc.thePlayer.getHeldItem() != null && holdingConsumable(mc.thePlayer.getHeldItem()) && (!Mouse.isButtonDown(1) || !canFloat)) {
|
||||||
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), false);
|
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), false);
|
||||||
}
|
}
|
||||||
if (!Mouse.isButtonDown(1) || (mc.thePlayer.getHeldItem() == null || !holdingConsumable(mc.thePlayer.getHeldItem()))) {
|
if (!Mouse.isButtonDown(1) || (mc.thePlayer.getHeldItem() == null || !holdingConsumable(mc.thePlayer.getHeldItem()))) {
|
||||||
resetFloat();
|
resetFloat();
|
||||||
noSlowing = false;
|
noSlowing = false;
|
||||||
|
offsetDelay = 0;
|
||||||
//Utils.print("!Noslowing");
|
//Utils.print("!Noslowing");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (reSendConsume) {
|
if (reSendConsume) {
|
||||||
if (ModuleUtils.inAirTicks > 1) {
|
if (ModuleUtils.inAirTicks > 0) {
|
||||||
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), false);
|
|
||||||
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), true);
|
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), true);
|
||||||
mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem());
|
|
||||||
canFloat = true;
|
|
||||||
reSendConsume = false;
|
reSendConsume = false;
|
||||||
|
canFloat = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!canFloat) {
|
if (!canFloat) {
|
||||||
|
offsetDelay = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
/*offsetDelay++;
|
||||||
|
if (offsetDelay < 3) {
|
||||||
|
return;
|
||||||
|
}*/
|
||||||
e.setPosY(e.getPosY() + ModuleUtils.offsetValue);
|
e.setPosY(e.getPosY() + ModuleUtils.offsetValue);
|
||||||
noSlowing = true;
|
noSlowing = true;
|
||||||
if (groundSpeedOption.isToggled()) {
|
if (groundSpeedOption.isToggled()) {
|
||||||
|
|
@ -138,26 +202,6 @@ public class NoSlow extends Module {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public void onPacketSend(SendPacketEvent e) {
|
|
||||||
if (e.getPacket() instanceof C08PacketPlayerBlockPlacement && mode.getInput() == 4 && getSlowed() != 0.2f && holdingConsumable(((C08PacketPlayerBlockPlacement) e.getPacket()).getStack()) && !BlockUtils.isInteractable(mc.objectMouseOver) && Utils.holdingEdible(((C08PacketPlayerBlockPlacement) e.getPacket()).getStack())) {
|
|
||||||
if (ModuleManager.skyWars.isEnabled() && Utils.getSkyWarsStatus() == 1 || canFloat || reSendConsume) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!mc.thePlayer.onGround) {
|
|
||||||
canFloat = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (!Utils.jumpDown()) {
|
|
||||||
mc.thePlayer.jump();
|
|
||||||
}
|
|
||||||
reSendConsume = true;
|
|
||||||
canFloat = false;
|
|
||||||
e.setCanceled(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@SubscribeEvent(priority = EventPriority.LOWEST) // called last in order to apply fix
|
@SubscribeEvent(priority = EventPriority.LOWEST) // called last in order to apply fix
|
||||||
public void onMoveInput(PrePlayerInputEvent e) {
|
public void onMoveInput(PrePlayerInputEvent e) {
|
||||||
if (mode.getInput() == 4 && getSlowed() != 0.2f && !canFloat) {
|
if (mode.getInput() == 4 && getSlowed() != 0.2f && !canFloat) {
|
||||||
|
|
@ -198,6 +242,11 @@ public class NoSlow extends Module {
|
||||||
canFloat = false;
|
canFloat = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean hasArrows(ItemStack stack) {
|
||||||
|
final boolean flag = mc.thePlayer.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0;
|
||||||
|
return flag || mc.thePlayer.inventory.hasItem(Items.arrow);
|
||||||
|
}
|
||||||
|
|
||||||
private double getSpeedModifier() {
|
private double getSpeedModifier() {
|
||||||
double speedModifier = 0.2;
|
double speedModifier = 0.2;
|
||||||
final int speedAmplifier = Utils.getSpeedAmplifier();
|
final int speedAmplifier = Utils.getSpeedAmplifier();
|
||||||
|
|
@ -218,12 +267,12 @@ public class NoSlow extends Module {
|
||||||
speedModifier = 0.37;
|
speedModifier = 0.37;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return speedModifier - 0.005;
|
return speedModifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean holdingConsumable(ItemStack itemStack) {
|
private boolean holdingConsumable(ItemStack itemStack) {
|
||||||
Item heldItem = itemStack.getItem();
|
Item heldItem = itemStack.getItem();
|
||||||
if (heldItem instanceof ItemFood || heldItem instanceof ItemBow || (heldItem instanceof ItemPotion && !ItemPotion.isSplash(mc.thePlayer.getHeldItem().getItemDamage())) || (heldItem instanceof ItemSword && !vanillaSword.isToggled())) {
|
if (heldItem instanceof ItemFood || heldItem instanceof ItemBow && hasArrows(itemStack) || (heldItem instanceof ItemPotion && !ItemPotion.isSplash(mc.thePlayer.getHeldItem().getItemDamage())) || (heldItem instanceof ItemSword && !vanillaSword.isToggled())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
package keystrokesmod.module.impl.player;
|
||||||
|
|
||||||
|
import keystrokesmod.event.ReceivePacketEvent;
|
||||||
|
import keystrokesmod.module.Module;
|
||||||
|
import keystrokesmod.module.ModuleManager;
|
||||||
|
import keystrokesmod.module.impl.movement.LongJump;
|
||||||
|
import keystrokesmod.utility.BlockUtils;
|
||||||
|
import keystrokesmod.utility.ModuleUtils;
|
||||||
|
import keystrokesmod.utility.Utils;
|
||||||
|
import net.minecraft.network.Packet;
|
||||||
|
import net.minecraft.network.play.server.S08PacketPlayerPosLook;
|
||||||
|
import net.minecraft.network.play.server.S12PacketEntityVelocity;
|
||||||
|
import net.minecraft.network.play.server.S23PacketBlockChange;
|
||||||
|
import net.minecraft.network.play.server.S27PacketExplosion;
|
||||||
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
|
||||||
|
public class AntiObby extends Module {
|
||||||
|
|
||||||
|
public AntiObby() {
|
||||||
|
super("AntiObby", category.player);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void onReceivePacket(ReceivePacketEvent e) {
|
||||||
|
if (!Utils.nullCheck() || e.isCanceled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (e.getPacket() instanceof S23PacketBlockChange) {
|
||||||
|
if (BlockUtils.isObsidian(mc.objectMouseOver)) {
|
||||||
|
e.setCanceled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,11 +5,14 @@ import keystrokesmod.event.ReceivePacketEvent;
|
||||||
import keystrokesmod.module.Module;
|
import keystrokesmod.module.Module;
|
||||||
import keystrokesmod.module.ModuleManager;
|
import keystrokesmod.module.ModuleManager;
|
||||||
import keystrokesmod.module.setting.impl.ButtonSetting;
|
import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||||
|
import keystrokesmod.module.setting.impl.GroupSetting;
|
||||||
|
import keystrokesmod.module.setting.impl.KeySetting;
|
||||||
import keystrokesmod.module.setting.impl.SliderSetting;
|
import keystrokesmod.module.setting.impl.SliderSetting;
|
||||||
import keystrokesmod.utility.Utils;
|
import keystrokesmod.utility.Utils;
|
||||||
import net.minecraft.block.*;
|
import net.minecraft.block.*;
|
||||||
import net.minecraft.enchantment.Enchantment;
|
import net.minecraft.enchantment.Enchantment;
|
||||||
import net.minecraft.enchantment.EnchantmentHelper;
|
import net.minecraft.enchantment.EnchantmentHelper;
|
||||||
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.inventory.ContainerChest;
|
import net.minecraft.inventory.ContainerChest;
|
||||||
|
|
@ -21,7 +24,6 @@ import net.minecraft.potion.Potion;
|
||||||
import net.minecraft.potion.PotionEffect;
|
import net.minecraft.potion.PotionEffect;
|
||||||
import net.minecraft.util.DamageSource;
|
import net.minecraft.util.DamageSource;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
import org.lwjgl.input.Mouse;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -30,19 +32,31 @@ public class InvManager extends Module {
|
||||||
private ButtonSetting closeChest;
|
private ButtonSetting closeChest;
|
||||||
private ButtonSetting closeInventory;
|
private ButtonSetting closeInventory;
|
||||||
private ButtonSetting disableInLobby;
|
private ButtonSetting disableInLobby;
|
||||||
|
|
||||||
private SliderSetting autoArmor;
|
private SliderSetting autoArmor;
|
||||||
|
|
||||||
private SliderSetting autoSort;
|
private SliderSetting autoSort;
|
||||||
|
|
||||||
private ButtonSetting customChest;
|
private ButtonSetting customChest;
|
||||||
private SliderSetting chestStealer;
|
private SliderSetting chestStealer;
|
||||||
private ButtonSetting middleClickToClean;
|
|
||||||
private SliderSetting inventoryCleaner;
|
private GroupSetting inventoryCleaner;
|
||||||
|
private ButtonSetting inventoryCleanerEnabled;
|
||||||
|
private SliderSetting inventoryCleanerDelay;
|
||||||
|
private KeySetting cleanKey;
|
||||||
|
private ButtonSetting cleanBuckets;
|
||||||
|
private SliderSetting maxBlockStacks;
|
||||||
|
private SliderSetting maxProjectileStacks;
|
||||||
|
|
||||||
private SliderSetting swordSlot;
|
private SliderSetting swordSlot;
|
||||||
private SliderSetting blocksSlot;
|
private SliderSetting blocksSlot;
|
||||||
private SliderSetting goldenAppleSlot;
|
private SliderSetting goldenAppleSlot;
|
||||||
private SliderSetting projectileSlot;
|
private SliderSetting projectileSlot;
|
||||||
private SliderSetting speedPotionSlot;
|
private SliderSetting speedPotionSlot;
|
||||||
private SliderSetting pearlSlot;
|
private SliderSetting pearlSlot;
|
||||||
|
|
||||||
private String[] trashItems = { "stick", "bed", "sapling", "pressureplate", "weightedplate", "book", "glassbottle", "reeds", "sugar", "expbottle", "flesh", "string", "cake", "mushroom", "flint", "compass", "dyePowder", "feather", "shears", "anvil", "torch", "seeds", "leather", "skull", "record", "flower", "minecart", "waterlily", "wheat", "sulphur", "boat", "dyepowder", "frame", "writingbook", "comparator", "banner", "diode", "item.redstone", "ghasttear", "goldnugget", "netherstalkseeds" };
|
private String[] trashItems = { "stick", "bed", "sapling", "pressureplate", "weightedplate", "book", "glassbottle", "reeds", "sugar", "expbottle", "flesh", "string", "cake", "mushroom", "flint", "compass", "dyePowder", "feather", "shears", "anvil", "torch", "seeds", "leather", "skull", "record", "flower", "minecart", "waterlily", "wheat", "sulphur", "boat", "dyepowder", "frame", "writingbook", "comparator", "banner", "diode", "item.redstone", "ghasttear", "goldnugget", "netherstalkseeds" };
|
||||||
|
|
||||||
private int lastStole;
|
private int lastStole;
|
||||||
private int lastSort;
|
private int lastSort;
|
||||||
private int lastArmor;
|
private int lastArmor;
|
||||||
|
|
@ -58,14 +72,25 @@ public class InvManager extends Module {
|
||||||
this.registerSetting(autoSort = new SliderSetting("Auto sort", true,3, 0, 20, 1));
|
this.registerSetting(autoSort = new SliderSetting("Auto sort", true,3, 0, 20, 1));
|
||||||
this.registerSetting(chestStealer = new SliderSetting("Chest stealer", true, 2, 0, 20, 1));
|
this.registerSetting(chestStealer = new SliderSetting("Chest stealer", true, 2, 0, 20, 1));
|
||||||
this.registerSetting(customChest = new ButtonSetting("Steal from custom chests", false));
|
this.registerSetting(customChest = new ButtonSetting("Steal from custom chests", false));
|
||||||
this.registerSetting(inventoryCleaner = new SliderSetting("Inventory cleaner", true, 3, 0, 20, 1));
|
|
||||||
this.registerSetting(middleClickToClean = new ButtonSetting("Middle click to clean", false));
|
this.registerSetting(inventoryCleaner = new GroupSetting("Inventory cleaner"));
|
||||||
|
this.registerSetting(inventoryCleanerEnabled = new ButtonSetting(inventoryCleaner, "Enabled", true));
|
||||||
|
this.registerSetting(inventoryCleanerDelay = new SliderSetting(inventoryCleaner, "Delay", " tick", 3, 0, 20, 1));
|
||||||
|
this.registerSetting(cleanKey = new KeySetting(inventoryCleaner, "Clean key", 1002));
|
||||||
|
this.registerSetting(cleanBuckets = new ButtonSetting(inventoryCleaner,"Clean buckets", false));
|
||||||
|
this.registerSetting(maxBlockStacks = new SliderSetting(inventoryCleaner,"Max block stacks", 5, 1, 20, 1));
|
||||||
|
this.registerSetting(maxProjectileStacks = new SliderSetting(inventoryCleaner,"Max projectile stacks", 5, 1, 20, 1));
|
||||||
|
|
||||||
this.registerSetting(swordSlot = new SliderSetting("Sword slot", true, -1, 1, 9, 1));
|
this.registerSetting(swordSlot = new SliderSetting("Sword slot", true, -1, 1, 9, 1));
|
||||||
this.registerSetting(blocksSlot = new SliderSetting("Blocks slot", true, -1, 1, 9, 1));
|
this.registerSetting(blocksSlot = new SliderSetting("Blocks slot", true, -1, 1, 9, 1));
|
||||||
this.registerSetting(goldenAppleSlot = new SliderSetting("Golden apple slot", true, -1, 1, 9, 1));
|
this.registerSetting(goldenAppleSlot = new SliderSetting("Golden apple slot", true, -1, 1, 9, 1));
|
||||||
this.registerSetting(projectileSlot = new SliderSetting("Projectile slot", true,-1, 1, 9, 1));
|
this.registerSetting(projectileSlot = new SliderSetting("Projectile slot", true,-1, 1, 9, 1));
|
||||||
this.registerSetting(speedPotionSlot = new SliderSetting("Speed potion slot", true,-1, 1, 9, 1));
|
this.registerSetting(speedPotionSlot = new SliderSetting("Speed potion slot", true,-1, 1, 9, 1));
|
||||||
this.registerSetting(pearlSlot = new SliderSetting("Pearl slot", true,-1, 1, 9, 1));
|
this.registerSetting(pearlSlot = new SliderSetting("Pearl slot", true,-1, 1, 9, 1));
|
||||||
|
|
||||||
|
this.chestStealer.setSuffix(" tick");
|
||||||
|
this.autoArmor.setSuffix(" tick");
|
||||||
|
this.autoSort.setSuffix(" tick");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
|
@ -74,7 +99,7 @@ public class InvManager extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onUpdate() {
|
public void onUpdate() {
|
||||||
if ((disableInLobby.isToggled() && Utils.isLobby())) {
|
if (disableInLobby.isToggled() && Utils.isLobby()) {
|
||||||
resetDelay();
|
resetDelay();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -134,11 +159,11 @@ public class InvManager extends Module {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (inventoryCleaner.getInput() != -1) {
|
if (inventoryCleanerEnabled.isToggled()) {
|
||||||
if (middleClickToClean.isToggled() && !Mouse.isButtonDown(2)) {
|
if (cleanKey.getKey() != 0 && !cleanKey.isPressed()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (++lastClean >= inventoryCleaner.getInput()) {
|
if (++lastClean >= inventoryCleanerDelay.getInput()) {
|
||||||
for (int i = 5; i < 45; i++) {
|
for (int i = 5; i < 45; i++) {
|
||||||
ItemStack stack = getItemStack(i);
|
ItemStack stack = getItemStack(i);
|
||||||
if (stack == null) {
|
if (stack == null) {
|
||||||
|
|
@ -153,7 +178,7 @@ public class InvManager extends Module {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((lastClean > inventoryCleaner.getInput() || lastClean == 0) && (lastArmor > autoArmor.getInput() || lastArmor == 0) && (lastSort > autoSort.getInput() || lastSort == 0)) {
|
if ((lastClean > inventoryCleanerDelay.getInput() || lastClean == 0) && (lastArmor > autoArmor.getInput() || lastArmor == 0) && (lastSort > autoSort.getInput() || lastSort == 0)) {
|
||||||
if (closeInventory.isToggled()) {
|
if (closeInventory.isToggled()) {
|
||||||
mc.thePlayer.closeScreen();
|
mc.thePlayer.closeScreen();
|
||||||
}
|
}
|
||||||
|
|
@ -162,7 +187,7 @@ public class InvManager extends Module {
|
||||||
else if (chestStealer.getInput() != -1 && mc.thePlayer.openContainer instanceof ContainerChest) {
|
else if (chestStealer.getInput() != -1 && mc.thePlayer.openContainer instanceof ContainerChest) {
|
||||||
ContainerChest chest = (ContainerChest) mc.thePlayer.openContainer;
|
ContainerChest chest = (ContainerChest) mc.thePlayer.openContainer;
|
||||||
if (chest == null || inventoryFull()) {
|
if (chest == null || inventoryFull()) {
|
||||||
autoClose();
|
autoClose(chest);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String name = Utils.stripColor(chest.getLowerChestInventory().getName());
|
String name = Utils.stripColor(chest.getLowerChestInventory().getName());
|
||||||
|
|
@ -315,7 +340,7 @@ public class InvManager extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inventoryFull() || !notEmpty || !stolen) {
|
if (inventoryFull() || !notEmpty || !stolen) {
|
||||||
autoClose();
|
autoClose(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -381,8 +406,14 @@ public class InvManager extends Module {
|
||||||
lastStole = lastArmor = lastClean = lastSort = 0;
|
lastStole = lastArmor = lastClean = lastSort = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void autoClose() {
|
private void autoClose(ContainerChest chest) {
|
||||||
if (closeChest.isToggled() && receivedInventoryData) {
|
if (closeChest.isToggled() && receivedInventoryData) {
|
||||||
|
if (chest != null) {
|
||||||
|
String name = Utils.stripColor(chest.getLowerChestInventory().getName());
|
||||||
|
if (!customChest.isToggled() && !name.equals("Chest") && !name.equals("Ender Chest") && !name.equals("Large Chest")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
mc.thePlayer.closeScreen();
|
mc.thePlayer.closeScreen();
|
||||||
receivedInventoryData = false;
|
receivedInventoryData = false;
|
||||||
}
|
}
|
||||||
|
|
@ -717,6 +748,21 @@ public class InvManager extends Module {
|
||||||
if (itemStack.getItem() instanceof ItemFishingRod && getBestRod(null) != slot) {
|
if (itemStack.getItem() instanceof ItemFishingRod && getBestRod(null) != slot) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (cleanBuckets.isToggled() && (itemStack.getItem() instanceof ItemBucket || itemStack.getItem() instanceof ItemBucketMilk)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (itemStack.getItem() instanceof ItemBlock) {
|
||||||
|
int stacksInInventory = getFullStacksOfBlocks();
|
||||||
|
if (stacksInInventory > maxBlockStacks.getInput() || !Utils.canBePlaced((ItemBlock) itemStack.getItem())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (itemStack.getItem() instanceof ItemSnowball || itemStack.getItem() instanceof ItemEgg) {
|
||||||
|
int stacksInInventory = getFullStacksOfProjectiles();
|
||||||
|
if (stacksInInventory > maxProjectileStacks.getInput()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -782,4 +828,51 @@ public class InvManager extends Module {
|
||||||
}
|
}
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int getFullStacksOfBlocks() {
|
||||||
|
int fullStacks = 0;
|
||||||
|
int maxStackSize = 64;
|
||||||
|
|
||||||
|
InventoryPlayer inventory = mc.thePlayer.inventory;
|
||||||
|
|
||||||
|
for (int i = 0; i < inventory.mainInventory.length; i++) {
|
||||||
|
ItemStack currentStack = inventory.mainInventory[i];
|
||||||
|
|
||||||
|
if (currentStack != null) {
|
||||||
|
if (!(currentStack.getItem() instanceof ItemBlock)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!Utils.canBePlaced((ItemBlock) currentStack.getItem())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (currentStack.stackSize >= maxStackSize) {
|
||||||
|
fullStacks += currentStack.stackSize / maxStackSize;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return fullStacks;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int getFullStacksOfProjectiles() {
|
||||||
|
int fullStacks = 0;
|
||||||
|
int maxStackSize = 16;
|
||||||
|
|
||||||
|
InventoryPlayer inventory = mc.thePlayer.inventory;
|
||||||
|
|
||||||
|
for (int i = 0; i < inventory.mainInventory.length; i++) {
|
||||||
|
ItemStack currentStack = inventory.mainInventory[i];
|
||||||
|
|
||||||
|
if (currentStack != null) {
|
||||||
|
if (!(currentStack.getItem() instanceof ItemEgg) && !(currentStack.getItem() instanceof ItemSnowball)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (currentStack.stackSize >= maxStackSize) {
|
||||||
|
fullStacks += currentStack.stackSize / maxStackSize;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return fullStacks;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -56,25 +56,23 @@ public class NoFall extends Module {
|
||||||
|
|
||||||
double predictedY = mc.thePlayer.posY + mc.thePlayer.motionY;
|
double predictedY = mc.thePlayer.posY + mc.thePlayer.motionY;
|
||||||
double distanceFallen = initialY - predictedY;
|
double distanceFallen = initialY - predictedY;
|
||||||
if (mc.thePlayer.motionY >= -1.0) {
|
if (mc.thePlayer.motionY >= -2.0) {
|
||||||
dynamic = 3;
|
dynamic = 3.0;
|
||||||
}
|
}
|
||||||
if (mc.thePlayer.motionY < -1.0) {
|
if (mc.thePlayer.motionY < -2.0) {
|
||||||
dynamic = 3.5;
|
dynamic = 4.0;
|
||||||
}
|
}
|
||||||
if (mc.thePlayer.motionY < -1.7) {
|
if (mc.thePlayer.motionY < -3.0) {
|
||||||
dynamic = 4;
|
dynamic = 5.0;
|
||||||
}
|
|
||||||
if (mc.thePlayer.motionY < -2.6) {
|
|
||||||
dynamic = 4.5;
|
|
||||||
}
|
}
|
||||||
if (isFalling && mode.getInput() == 2) {
|
if (isFalling && mode.getInput() == 2) {
|
||||||
if (distanceFallen >= dynamic) {
|
if (distanceFallen >= dynamic) {
|
||||||
Utils.getTimer().timerSpeed = (float) 0.72;
|
Utils.getTimer().timerSpeed = (0.6799789F + (float) Utils.randomizeDouble(-0.012, 0.012));
|
||||||
mc.getNetHandler().addToSendQueue(new C03PacketPlayer(true));
|
mc.getNetHandler().addToSendQueue(new C03PacketPlayer(true));
|
||||||
initialY = mc.thePlayer.posY;
|
initialY = mc.thePlayer.posY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//Utils.print("" + dynamic);
|
||||||
if (isFalling && mode.getInput() == 3) {
|
if (isFalling && mode.getInput() == 3) {
|
||||||
if (mc.thePlayer.ticksExisted % 2 == 0) {
|
if (mc.thePlayer.ticksExisted % 2 == 0) {
|
||||||
Utils.getTimer().timerSpeed = (float) Utils.randomizeDouble(0.5, 0.50201);
|
Utils.getTimer().timerSpeed = (float) Utils.randomizeDouble(0.5, 0.50201);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package keystrokesmod.module.impl.player;
|
package keystrokesmod.module.impl.player;
|
||||||
|
|
||||||
|
import keystrokesmod.Raven;
|
||||||
import keystrokesmod.event.PreMotionEvent;
|
import keystrokesmod.event.PreMotionEvent;
|
||||||
import keystrokesmod.event.PreUpdateEvent;
|
import keystrokesmod.event.PreUpdateEvent;
|
||||||
import keystrokesmod.event.ReceivePacketEvent;
|
import keystrokesmod.event.ReceivePacketEvent;
|
||||||
|
|
@ -84,7 +85,7 @@ public class Scaffold extends Module {
|
||||||
private long lastPlaceTime, rotationTimeout = 250L;
|
private long lastPlaceTime, rotationTimeout = 250L;
|
||||||
private float lastYaw = 0.0f;
|
private float lastYaw = 0.0f;
|
||||||
private float lastPitch = 0.0f;
|
private float lastPitch = 0.0f;
|
||||||
private float yaw, pitch, blockYaw, groundYaw, yawOffset, lastYawOffset;
|
public float yaw, pitch, blockYaw, groundYaw, yawOffset, lastYawOffset;
|
||||||
private boolean set2;
|
private boolean set2;
|
||||||
|
|
||||||
public boolean moduleEnabled;
|
public boolean moduleEnabled;
|
||||||
|
|
@ -94,7 +95,7 @@ public class Scaffold extends Module {
|
||||||
private int disableTicks;
|
private int disableTicks;
|
||||||
private int scaffoldTicks;
|
private int scaffoldTicks;
|
||||||
|
|
||||||
private long firstStroke;
|
private long firstStroke, strokeDelay = 575;
|
||||||
private float lastEdge, lastEdge2;
|
private float lastEdge, lastEdge2;
|
||||||
|
|
||||||
public Scaffold() {
|
public Scaffold() {
|
||||||
|
|
@ -113,8 +114,6 @@ public class Scaffold extends Module {
|
||||||
this.registerSetting(showBlockCount = new ButtonSetting("Show block count", true));
|
this.registerSetting(showBlockCount = new ButtonSetting("Show block count", true));
|
||||||
this.registerSetting(silentSwing = new ButtonSetting("Silent swing", false));
|
this.registerSetting(silentSwing = new ButtonSetting("Silent swing", false));
|
||||||
|
|
||||||
//this.registerSetting(yaww2 = new SliderSetting("yaw offset", "", 138, 110, 160, 1));
|
|
||||||
//this.registerSetting(minO = new SliderSetting("min offset", "", 30, 1, 90, 1));
|
|
||||||
this.alwaysOn = true;
|
this.alwaysOn = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -130,6 +129,7 @@ public class Scaffold extends Module {
|
||||||
isEnabled = true;
|
isEnabled = true;
|
||||||
moduleEnabled = true;
|
moduleEnabled = true;
|
||||||
ModuleUtils.fadeEdge = 0;
|
ModuleUtils.fadeEdge = 0;
|
||||||
|
firstStroke = 0;
|
||||||
|
|
||||||
FMLCommonHandler.instance().bus().register(scaffoldBlockCount = new ScaffoldBlockCount(mc));
|
FMLCommonHandler.instance().bus().register(scaffoldBlockCount = new ScaffoldBlockCount(mc));
|
||||||
lastSlot.set(-1);
|
lastSlot.set(-1);
|
||||||
|
|
@ -161,7 +161,7 @@ public class Scaffold extends Module {
|
||||||
}
|
}
|
||||||
canBlockFade = true;
|
canBlockFade = true;
|
||||||
int simpleY = (int) Math.round((e.posY % 1) * 10000);
|
int simpleY = (int) Math.round((e.posY % 1) * 10000);
|
||||||
if (Utils.keysDown() && usingFastScaffold() && fastScaffold.getInput() >= 1 && !ModuleManager.tower.canTower() && !ModuleManager.LongJump.isEnabled()) { // jump mode
|
if (Utils.keysDown() && usingFastScaffold() && fastScaffold.getInput() >= 1 && !ModuleManager.tower.canTower() && !ModuleManager.LongJump.function) { // jump mode
|
||||||
if (mc.thePlayer.onGround && Utils.isMoving()) {
|
if (mc.thePlayer.onGround && Utils.isMoving()) {
|
||||||
if (scaffoldTicks > 1) {
|
if (scaffoldTicks > 1) {
|
||||||
rotateForward = true;
|
rotateForward = true;
|
||||||
|
|
@ -199,7 +199,7 @@ public class Scaffold extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
//Float
|
//Float
|
||||||
if (sprint.getInput() == 2 && !usingFastScaffold() && !ModuleManager.bhop.isEnabled() && !ModuleManager.tower.canTower() && !ModuleManager.LongJump.isEnabled()) {
|
if (sprint.getInput() == 2 && !usingFastScaffold() && !ModuleManager.bhop.isEnabled() && !ModuleManager.tower.canTower() && !ModuleManager.LongJump.function) {
|
||||||
floatWasEnabled = true;
|
floatWasEnabled = true;
|
||||||
if (!floatStarted) {
|
if (!floatStarted) {
|
||||||
if (onGroundTicks > 8 && mc.thePlayer.onGround) {
|
if (onGroundTicks > 8 && mc.thePlayer.onGround) {
|
||||||
|
|
@ -246,13 +246,84 @@ public class Scaffold extends Module {
|
||||||
e.setRotations(mc.thePlayer.rotationYaw - hardcodedYaw(), 81.150F);
|
e.setRotations(mc.thePlayer.rotationYaw - hardcodedYaw(), 81.150F);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
/*float yawAngle;
|
||||||
|
float moveAngle = (float) getMovementAngle();
|
||||||
|
float relativeYaw = mc.thePlayer.rotationYaw + moveAngle;
|
||||||
|
float normalizedYaw = (relativeYaw % 360 + 360) % 360;
|
||||||
|
float quad = normalizedYaw % 90;
|
||||||
|
|
||||||
|
float firstStraight = 130.50f;
|
||||||
|
float secondStraight = 131.50f;
|
||||||
|
float thirdStraight = 132.50f;
|
||||||
|
float firstDiag = 132.50f;
|
||||||
|
float secondDiag = 134.50f;
|
||||||
|
float thirdDiag = 137.50f;
|
||||||
|
float fourthDiag = 140.50f;
|
||||||
|
|
||||||
|
//first straight
|
||||||
|
if (quad < 5 || quad >= 85) {
|
||||||
|
yawAngle = firstStraight;
|
||||||
|
|
||||||
|
//second straight
|
||||||
|
} else if (quad >= 80 || quad < 10) {
|
||||||
|
yawAngle = secondStraight;
|
||||||
|
|
||||||
|
//third straight
|
||||||
|
} else if (quad >= 65 || quad < 25) {
|
||||||
|
yawAngle = thirdStraight;
|
||||||
|
|
||||||
|
//first diag
|
||||||
|
} else if (quad >= 55 || quad < 35) {
|
||||||
|
yawAngle = firstDiag;
|
||||||
|
|
||||||
|
//second diag
|
||||||
|
} else if (quad >= 15 && quad < 45) {
|
||||||
|
yawAngle = secondDiag;
|
||||||
|
if (quad >= 38) {
|
||||||
|
yawAngle = thirdDiag;
|
||||||
|
if (quad >= 42) {
|
||||||
|
yawAngle = fourthDiag;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
yawAngle = secondDiag;
|
||||||
|
if (quad >= 45 && quad < 52) {
|
||||||
|
yawAngle = thirdDiag;
|
||||||
|
if (quad < 48) {
|
||||||
|
yawAngle = fourthDiag;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
float side = MathHelper.wrapAngleTo180_float(getMotionYaw() - yaw);
|
float side = MathHelper.wrapAngleTo180_float(getMotionYaw() - yaw);
|
||||||
float offset = (!Utils.scaffoldDiagonal(false)) ? 125.500F : 140.500F;
|
float offset = yawAngle;//(!Utils.scaffoldDiagonal(false)) ? 125.500F : 143.500F;
|
||||||
float minOffset = (!Utils.scaffoldDiagonal(false)) ? 25 : 0;
|
float minOffset = 0;//(!Utils.scaffoldDiagonal(false)) ? 5 : 0;
|
||||||
float yawBackwards = mc.thePlayer.rotationYaw - hardcodedYaw();
|
float yawBackwards = MathHelper.wrapAngleTo180_float(mc.thePlayer.rotationYaw) - hardcodedYaw();
|
||||||
float blockYawOffset = MathHelper.wrapAngleTo180_float(yawBackwards - blockYaw);
|
float blockYawOffset = MathHelper.wrapAngleTo180_float(yawBackwards - blockYaw);
|
||||||
|
|
||||||
/*if (!Utils.isMoving() || Utils.getHorizontalSpeed() == 0.0D) {
|
float minPitch = 78.650F;
|
||||||
|
|
||||||
|
if (firstStroke > 0 && (System.currentTimeMillis() - firstStroke) > strokeDelay) {
|
||||||
|
firstStroke = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (blockRotations != null) {
|
||||||
|
blockYaw = blockRotations[0];
|
||||||
|
pitch = blockRotations[1];
|
||||||
|
yawOffset = blockYawOffset;
|
||||||
|
if (pitch < minPitch && Utils.getHorizontalSpeed() < 0.6) {
|
||||||
|
pitch = minPitch;
|
||||||
|
}
|
||||||
|
if (firstStroke == 0) {
|
||||||
|
strokeDelay = 350;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
firstStroke = Utils.time();
|
||||||
|
yawOffset = 0;
|
||||||
|
pitch = minPitch;
|
||||||
|
strokeDelay = 575;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Utils.isMoving() || Utils.getHorizontalSpeed() == 0.0D) {
|
||||||
e.setRotations(yaw, pitch);
|
e.setRotations(yaw, pitch);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -267,12 +338,14 @@ public class Scaffold extends Module {
|
||||||
lastYaw + MathHelper.wrapAngleTo180_float(newYaw - lastYaw)
|
lastYaw + MathHelper.wrapAngleTo180_float(newYaw - lastYaw)
|
||||||
);
|
);
|
||||||
double minSwitch = (!Utils.scaffoldDiagonal(false)) ? 0 : 15;
|
double minSwitch = (!Utils.scaffoldDiagonal(false)) ? 0 : 15;
|
||||||
if (side >= 0 && firstStroke == 0) {
|
if (side >= 0) {
|
||||||
if (yawOffset <= -minSwitch) {
|
if (yawOffset <= -minSwitch && firstStroke == 0) {
|
||||||
set2 = false;
|
set2 = false;
|
||||||
} else if (yawOffset >= 0) {
|
firstStroke = Utils.time();
|
||||||
|
} else if (yawOffset >= 0 && firstStroke == 0) {
|
||||||
if (yawOffset >= minSwitch) {
|
if (yawOffset >= minSwitch) {
|
||||||
set2 = true;
|
set2 = true;
|
||||||
|
firstStroke = Utils.time();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (set2) {
|
if (set2) {
|
||||||
|
|
@ -281,12 +354,14 @@ public class Scaffold extends Module {
|
||||||
e.setRotations((yaw + offset * 2) - yawOffset, pitch);
|
e.setRotations((yaw + offset * 2) - yawOffset, pitch);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (side <= -0 && firstStroke == 0) {
|
} else if (side <= -0) {
|
||||||
if (yawOffset >= minSwitch) {
|
if (yawOffset >= minSwitch && firstStroke == 0) {
|
||||||
set2 = false;
|
set2 = false;
|
||||||
} else if (yawOffset <= 0) {
|
firstStroke = Utils.time();
|
||||||
|
} else if (yawOffset <= 0 && firstStroke == 0) {
|
||||||
if (yawOffset <= -minSwitch) {
|
if (yawOffset <= -minSwitch) {
|
||||||
set2 = true;
|
set2 = true;
|
||||||
|
firstStroke = Utils.time();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (set2) {
|
if (set2) {
|
||||||
|
|
@ -307,7 +382,24 @@ public class Scaffold extends Module {
|
||||||
e.setRotations(yaw - yawOffset, pitch);
|
e.setRotations(yaw - yawOffset, pitch);
|
||||||
set2 = false;*/
|
set2 = false;*/
|
||||||
|
|
||||||
float minPitch = 81.150F;
|
float minPitch = 77.9F;
|
||||||
|
|
||||||
|
float yawBackwards = MathHelper.wrapAngleTo180_float(mc.thePlayer.rotationYaw) - hardcodedYaw();
|
||||||
|
float blockYawOffset = MathHelper.wrapAngleTo180_float(yawBackwards - blockYaw);
|
||||||
|
|
||||||
|
///offset rots
|
||||||
|
float moveAngle = (float) getMovementAngle();
|
||||||
|
float relativeYaw = mc.thePlayer.rotationYaw + moveAngle;
|
||||||
|
float normalizedYaw = (relativeYaw % 360 + 360) % 360;
|
||||||
|
float quad = normalizedYaw % 90;
|
||||||
|
|
||||||
|
float firstStraight = 55.5F;
|
||||||
|
float secondStraight = 52.5F;
|
||||||
|
float thirdStraight = 49.5F;
|
||||||
|
float firstDiag = 47.5F;
|
||||||
|
float secondDiag = 46.5F;
|
||||||
|
float thirdDiag = 45.F;
|
||||||
|
float fourthDiag = 43F;
|
||||||
|
|
||||||
if (blockRotations != null) {
|
if (blockRotations != null) {
|
||||||
blockYaw = blockRotations[0];
|
blockYaw = blockRotations[0];
|
||||||
|
|
@ -316,33 +408,20 @@ public class Scaffold extends Module {
|
||||||
pitch = minPitch;
|
pitch = minPitch;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
firstStroke = 0;
|
if (yawOffset != 0) {
|
||||||
yawOffset = 40;
|
firstStroke = Utils.time();
|
||||||
lastYawOffset = 50;
|
//Utils.print("Time");
|
||||||
|
}
|
||||||
blockYaw = 0;
|
blockYaw = 0;
|
||||||
pitch = minPitch;
|
pitch = minPitch;
|
||||||
}
|
}
|
||||||
//Utils.print("" + pitch);
|
|
||||||
|
|
||||||
if (firstStroke > 0 && (System.currentTimeMillis() - firstStroke) > 275) {
|
if (firstStroke > 0 && (Utils.time() - firstStroke) > 330) {
|
||||||
firstStroke = 0;
|
firstStroke = 0;
|
||||||
|
//Utils.print("Reset time");
|
||||||
}
|
}
|
||||||
|
//Utils.print("" + firstStroke + " " + ModuleUtils.groundTicks + " " + ModuleManager.tower.speed);
|
||||||
///offset rots
|
if (firstStroke == 0 || mc.thePlayer.onGround && ModuleUtils.groundTicks < 2 || ModuleManager.tower.speed) {
|
||||||
float moveAngle = (float) getMovementAngle();
|
|
||||||
float relativeYaw = mc.thePlayer.rotationYaw + moveAngle;
|
|
||||||
float normalizedYaw = (relativeYaw % 360 + 360) % 360;
|
|
||||||
float quad = normalizedYaw % 90;
|
|
||||||
|
|
||||||
float firstStraight = 56.50f;
|
|
||||||
float secondStraight = 55.50f;
|
|
||||||
float thirdStraight = 54.50f;
|
|
||||||
float firstDiag = 54.50f;
|
|
||||||
float secondDiag = 52.50f;
|
|
||||||
float thirdDiag = 49.50f;
|
|
||||||
float fourthDiag = 44.50f;
|
|
||||||
|
|
||||||
if (firstStroke == 0 || mc.thePlayer.onGround || ModuleManager.tower.speed) {
|
|
||||||
//first straight
|
//first straight
|
||||||
if (quad < 5 || quad >= 85) {
|
if (quad < 5 || quad >= 85) {
|
||||||
if (blockRotations != null) {
|
if (blockRotations != null) {
|
||||||
|
|
@ -392,7 +471,7 @@ public class Scaffold extends Module {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (yawOffset != lastYawOffset || mc.thePlayer.onGround || ModuleManager.tower.speed) {
|
if (yawOffset != lastYawOffset || mc.thePlayer.onGround || ModuleManager.tower.speed) {
|
||||||
firstStroke = System.currentTimeMillis();
|
firstStroke = Utils.time();
|
||||||
//Utils.print("Delay");
|
//Utils.print("Delay");
|
||||||
}
|
}
|
||||||
//Utils.print("yv: " + yawOffset);
|
//Utils.print("yv: " + yawOffset);
|
||||||
|
|
@ -405,15 +484,15 @@ public class Scaffold extends Module {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
float yawDifference = getAngleDifference(lastEdge, yaw);
|
float yawDifference = getAngleDifference(lastEdge, yaw);
|
||||||
float smoothingFactor = (1.0f - (90.0f / 100.0f));
|
float smoothingFactor = (1.0f - (85.0f / 100.0f));
|
||||||
yaw = (lastEdge + yawDifference * smoothingFactor);
|
yaw = (lastEdge + yawDifference * smoothingFactor);
|
||||||
}
|
}
|
||||||
lastEdge = yaw;
|
lastEdge = yaw;
|
||||||
yaw += yawOffset;
|
yaw += yawOffset;
|
||||||
float yawDifference = getAngleDifference(lastEdge2, yaw);
|
/*float yawDifference = getAngleDifference(lastEdge2, yaw);
|
||||||
float smoothingFactor = (1.0f - (27.0f / 100.0f));
|
float smoothingFactor = (1.0f - (25.0f / 100.0f));
|
||||||
yaw = (lastEdge2 + yawDifference * smoothingFactor);
|
yaw = (lastEdge2 + yawDifference * smoothingFactor);
|
||||||
lastEdge2 = yaw;
|
lastEdge2 = yaw;*/
|
||||||
//yaw += (float) Utils.randomizeDouble(-0.00001, 0.0012);
|
//yaw += (float) Utils.randomizeDouble(-0.00001, 0.0012);
|
||||||
e.setRotations(yaw, pitch);
|
e.setRotations(yaw, pitch);
|
||||||
break;
|
break;
|
||||||
|
|
@ -428,8 +507,10 @@ public class Scaffold extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
//get yaw - player yaw offset
|
//get yaw - player yaw offset
|
||||||
//float yv = MathHelper.wrapAngleTo180_float(mc.thePlayer.rotationYaw) - hardcodedYaw();
|
float yv = MathHelper.wrapAngleTo180_float(mc.thePlayer.rotationYaw) - hardcodedYaw();
|
||||||
//Utils.print("" + MathHelper.wrapAngleTo180_float(yv - e.getYaw()));
|
if (Raven.debug) {
|
||||||
|
Utils.sendModuleMessage(this, "" + MathHelper.wrapAngleTo180_float(yv - e.getYaw()));
|
||||||
|
}
|
||||||
|
|
||||||
//Utils.print("" + mc.thePlayer.rotationYaw + " " + mc.thePlayer.rotationPitch);
|
//Utils.print("" + mc.thePlayer.rotationYaw + " " + mc.thePlayer.rotationPitch);
|
||||||
|
|
||||||
|
|
@ -440,7 +521,8 @@ public class Scaffold extends Module {
|
||||||
rotationDelay = 2;
|
rotationDelay = 2;
|
||||||
rotatingForward = true;
|
rotatingForward = true;
|
||||||
}
|
}
|
||||||
e.setYaw(mc.thePlayer.rotationYaw - hardcodedYaw() - 180 - (float) Utils.randomizeDouble(-5, 5));
|
float forwardYaw = (mc.thePlayer.rotationYaw - hardcodedYaw() - 180 - (float) Utils.randomizeInt(-5, 5));
|
||||||
|
e.setYaw(forwardYaw);
|
||||||
e.setPitch(10 - (float) Utils.randomizeDouble(1, 5));
|
e.setPitch(10 - (float) Utils.randomizeDouble(1, 5));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -465,8 +547,6 @@ public class Scaffold extends Module {
|
||||||
e.setPitch(89.9F);
|
e.setPitch(89.9F);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.print("" + e.getYaw());
|
|
||||||
|
|
||||||
lastYaw = mc.thePlayer.rotationYaw;
|
lastYaw = mc.thePlayer.rotationYaw;
|
||||||
if (lastPlaceTime > 0 && (System.currentTimeMillis() - lastPlaceTime) > rotationTimeout) blockRotations = null;
|
if (lastPlaceTime > 0 && (System.currentTimeMillis() - lastPlaceTime) > rotationTimeout) blockRotations = null;
|
||||||
if (rotationDelay > 0) --rotationDelay;
|
if (rotationDelay > 0) --rotationDelay;
|
||||||
|
|
@ -477,7 +557,8 @@ public class Scaffold extends Module {
|
||||||
if (!isEnabled) {
|
if (!isEnabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (LongJump.stopScaffold) {
|
if (holdingBlocks() && setSlot()) {
|
||||||
|
if (LongJump.stopModules) {
|
||||||
//Utils.print("Stopped scaffold due to longjump swapping");
|
//Utils.print("Stopped scaffold due to longjump swapping");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -485,7 +566,7 @@ public class Scaffold extends Module {
|
||||||
//Utils.print("Stopped scaffold due to ka untargeting");
|
//Utils.print("Stopped scaffold due to ka untargeting");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (holdingBlocks() && setSlot()) {
|
|
||||||
hasSwapped = true;
|
hasSwapped = true;
|
||||||
int mode = (int) fastScaffold.getInput();
|
int mode = (int) fastScaffold.getInput();
|
||||||
if (rotation.getInput() == 0 || rotation.getInput() == 2 || (rotation.getInput() > 0 && (rotationDelay == 0 && !rotateForward || !jumpFacingForward.isToggled()))) {
|
if (rotation.getInput() == 0 || rotation.getInput() == 2 || (rotation.getInput() > 0 && (rotationDelay == 0 && !rotateForward || !jumpFacingForward.isToggled()))) {
|
||||||
|
|
@ -531,7 +612,7 @@ public class Scaffold extends Module {
|
||||||
|
|
||||||
if (dontDisable && ++disableTicks >= 2) {
|
if (dontDisable && ++disableTicks >= 2) {
|
||||||
isEnabled = false;
|
isEnabled = false;
|
||||||
Utils.print("Extra tick");
|
//Utils.print("Extra tick");
|
||||||
}
|
}
|
||||||
if (!dontDisable) {
|
if (!dontDisable) {
|
||||||
isEnabled = false;
|
isEnabled = false;
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,19 @@ package keystrokesmod.module.impl.player;
|
||||||
|
|
||||||
import keystrokesmod.event.PostPlayerInputEvent;
|
import keystrokesmod.event.PostPlayerInputEvent;
|
||||||
import keystrokesmod.event.PreMotionEvent;
|
import keystrokesmod.event.PreMotionEvent;
|
||||||
|
import keystrokesmod.event.PreUpdateEvent;
|
||||||
import keystrokesmod.event.SendPacketEvent;
|
import keystrokesmod.event.SendPacketEvent;
|
||||||
import keystrokesmod.module.Module;
|
import keystrokesmod.module.Module;
|
||||||
import keystrokesmod.module.ModuleManager;
|
import keystrokesmod.module.ModuleManager;
|
||||||
import keystrokesmod.module.setting.impl.ButtonSetting;
|
import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||||
import keystrokesmod.module.setting.impl.SliderSetting;
|
import keystrokesmod.module.setting.impl.SliderSetting;
|
||||||
|
import keystrokesmod.utility.ModuleUtils;
|
||||||
|
import keystrokesmod.utility.RotationUtils;
|
||||||
import keystrokesmod.utility.Utils;
|
import keystrokesmod.utility.Utils;
|
||||||
import net.minecraft.network.play.client.*;
|
import net.minecraft.network.play.client.*;
|
||||||
import net.minecraft.potion.PotionEffect;
|
import net.minecraft.potion.PotionEffect;
|
||||||
|
import net.minecraft.util.BlockPos;
|
||||||
|
import net.minecraft.util.Vec3;
|
||||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
|
||||||
|
|
@ -19,7 +24,8 @@ public class Tower extends Module {
|
||||||
final private SliderSetting slowedSpeed;
|
final private SliderSetting slowedSpeed;
|
||||||
final private SliderSetting slowedTicks;
|
final private SliderSetting slowedTicks;
|
||||||
final private ButtonSetting disableWhileHurt;
|
final private ButtonSetting disableWhileHurt;
|
||||||
final private String[] towerMoveModes = new String[]{"None", "Vanilla", "Low", "Watchdog"};
|
|
||||||
|
final private String[] towerMoveModes = new String[]{"None", "Vanilla", "Low", "Watchdog", "2.5 tick"};
|
||||||
final private String[] verticalTowerModes = new String[]{"None", "Vanilla", "Extra block"};
|
final private String[] verticalTowerModes = new String[]{"None", "Vanilla", "Extra block"};
|
||||||
private int slowTicks;
|
private int slowTicks;
|
||||||
private boolean wasTowering;
|
private boolean wasTowering;
|
||||||
|
|
@ -34,7 +40,8 @@ public class Tower extends Module {
|
||||||
|
|
||||||
//vertical tower
|
//vertical tower
|
||||||
private boolean aligning, aligned, placed;
|
private boolean aligning, aligned, placed;
|
||||||
private int firstX;
|
private int blockX;
|
||||||
|
private double firstX, firstY, firstZ;
|
||||||
public boolean placeExtraBlock;
|
public boolean placeExtraBlock;
|
||||||
|
|
||||||
public boolean speed;
|
public boolean speed;
|
||||||
|
|
@ -46,17 +53,40 @@ public class Tower extends Module {
|
||||||
this.registerSetting(slowedSpeed = new SliderSetting("Slowed speed", 2, 0, 9, 0.1));
|
this.registerSetting(slowedSpeed = new SliderSetting("Slowed speed", 2, 0, 9, 0.1));
|
||||||
this.registerSetting(slowedTicks = new SliderSetting("Slowed ticks", 1, 0, 20, 1));
|
this.registerSetting(slowedTicks = new SliderSetting("Slowed ticks", 1, 0, 20, 1));
|
||||||
this.registerSetting(disableWhileHurt = new ButtonSetting("Disable while hurt", false));
|
this.registerSetting(disableWhileHurt = new ButtonSetting("Disable while hurt", false));
|
||||||
|
|
||||||
this.canBeEnabled = false;
|
this.canBeEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
@SubscribeEvent
|
||||||
public void onPreMotion(PreMotionEvent e) {
|
public void onPreMotion(PreMotionEvent e) {
|
||||||
int valY = (int) Math.round((e.posY % 1) * 10000);
|
if (canTower()) {
|
||||||
|
switch ((int) towerMove.getInput()) {
|
||||||
|
case 1:
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
if (ModuleUtils.inAirTicks == 6) {
|
||||||
|
e.setPosY(e.getPosY() + 0.000383527);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void onPreUpdate(PreUpdateEvent e) {
|
||||||
|
int valY = (int) Math.round((mc.thePlayer.posY % 1) * 10000);
|
||||||
offGroundTicks++;
|
offGroundTicks++;
|
||||||
if (mc.thePlayer.onGround) {
|
if (mc.thePlayer.onGround) {
|
||||||
offGroundTicks = 0;
|
offGroundTicks = 0;
|
||||||
}
|
}
|
||||||
if (canTower()) {
|
if (canTower() && Utils.keysDown()) {
|
||||||
wasTowering = true;
|
wasTowering = true;
|
||||||
switch ((int) towerMove.getInput()) {
|
switch ((int) towerMove.getInput()) {
|
||||||
case 1:
|
case 1:
|
||||||
|
|
@ -95,10 +125,7 @@ public class Tower extends Module {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (!Utils.keysDown()) {
|
if (mc.thePlayer.posY % 1 == 0 && !setLowMotion) {
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (e.getPosY() % 1 == 0 && !setLowMotion) {
|
|
||||||
tower = true;
|
tower = true;
|
||||||
}
|
}
|
||||||
if (tower) {
|
if (tower) {
|
||||||
|
|
@ -134,6 +161,29 @@ public class Tower extends Module {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 4:
|
||||||
|
speed = false;
|
||||||
|
int simpleY = (int) Math.round((mc.thePlayer.posY % 1.0D) * 100.0D);
|
||||||
|
switch(simpleY) {
|
||||||
|
case 0:
|
||||||
|
mc.thePlayer.motionY = 0.42f;
|
||||||
|
if (ModuleUtils.inAirTicks == 6) {
|
||||||
|
mc.thePlayer.motionY = -0.078400001525879;
|
||||||
|
}
|
||||||
|
Utils.setSpeed(getTower25Levels(getSpeedLevel()));
|
||||||
|
speed = true;
|
||||||
|
break;
|
||||||
|
case 42:
|
||||||
|
mc.thePlayer.motionY = 0.33f;
|
||||||
|
Utils.setSpeed(getTower25Levels(getSpeedLevel()));
|
||||||
|
speed = true;
|
||||||
|
break;
|
||||||
|
case 75:
|
||||||
|
mc.thePlayer.motionY = 1 - mc.thePlayer.posY % 1;
|
||||||
|
speed = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -165,14 +215,20 @@ public class Tower extends Module {
|
||||||
case 2:
|
case 2:
|
||||||
if (!aligned) {
|
if (!aligned) {
|
||||||
if (mc.thePlayer.onGround) {
|
if (mc.thePlayer.onGround) {
|
||||||
if (!aligning) firstX = (int) mc.thePlayer.posX;
|
if (!aligning) {
|
||||||
|
blockX = (int) mc.thePlayer.posX;
|
||||||
|
|
||||||
|
firstX = mc.thePlayer.posX;
|
||||||
|
firstY = mc.thePlayer.posY;
|
||||||
|
firstZ = mc.thePlayer.posZ;
|
||||||
|
}
|
||||||
mc.thePlayer.motionX = 0.22;
|
mc.thePlayer.motionX = 0.22;
|
||||||
aligning = true;
|
aligning = true;
|
||||||
}
|
}
|
||||||
if (aligning && (int) mc.thePlayer.posX > firstX) {
|
if (aligning && (int) mc.thePlayer.posX > blockX) {
|
||||||
aligned = true;
|
aligned = true;
|
||||||
}
|
}
|
||||||
yaw = 80F;
|
yaw = RotationUtils.getRotations(firstX, firstY, firstZ)[0];
|
||||||
pitch = 0;
|
pitch = 0;
|
||||||
}
|
}
|
||||||
if (aligned) {
|
if (aligned) {
|
||||||
|
|
@ -181,7 +237,7 @@ public class Tower extends Module {
|
||||||
pitch = 89.9F;
|
pitch = 89.9F;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
yaw = 80F;
|
yaw = RotationUtils.getRotations(firstX, firstY, firstZ)[0];
|
||||||
pitch = 0;
|
pitch = 0;
|
||||||
}
|
}
|
||||||
placeExtraBlock = true;
|
placeExtraBlock = true;
|
||||||
|
|
@ -279,7 +335,7 @@ public class Tower extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean modulesEnabled() {
|
private boolean modulesEnabled() {
|
||||||
return (ModuleManager.scaffold.moduleEnabled && ModuleManager.scaffold.holdingBlocks() && ModuleManager.scaffold.hasSwapped && !ModuleManager.LongJump.isEnabled());
|
return (ModuleManager.scaffold.moduleEnabled && ModuleManager.scaffold.holdingBlocks() && ModuleManager.scaffold.hasSwapped && !ModuleManager.LongJump.function);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getSpeedLevel() {
|
private int getSpeedLevel() {
|
||||||
|
|
@ -314,7 +370,7 @@ public class Tower extends Module {
|
||||||
return towerSpeedLevels[0];
|
return towerSpeedLevels[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
private double[] towerGroundSpeedLevels = {0.22, 0.25, 0.3, 0.35, 0.4};
|
private final double[] towerGroundSpeedLevels = {0.22, 0.25, 0.3, 0.35, 0.4};
|
||||||
|
|
||||||
private double getTowerGroundSpeed(int speedLevel) {
|
private double getTowerGroundSpeed(int speedLevel) {
|
||||||
if (speedLevel >= 0) {
|
if (speedLevel >= 0) {
|
||||||
|
|
@ -322,4 +378,14 @@ public class Tower extends Module {
|
||||||
}
|
}
|
||||||
return towerGroundSpeedLevels[0];
|
return towerGroundSpeedLevels[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private final double[] tower25Levels = {0.3, 0.34, 0.38, 0.42, 0.42};
|
||||||
|
|
||||||
|
private double getTower25Levels(int speedLevel) {
|
||||||
|
if (speedLevel >= 0) {
|
||||||
|
return tower25Levels[speedLevel];
|
||||||
|
}
|
||||||
|
return tower25Levels[0];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,195 @@
|
||||||
|
package keystrokesmod.module.impl.render;
|
||||||
|
|
||||||
|
import keystrokesmod.mixin.impl.accessor.IAccessorEntityRenderer;
|
||||||
|
import keystrokesmod.mixin.impl.accessor.IAccessorMinecraft;
|
||||||
|
import keystrokesmod.module.Module;
|
||||||
|
import keystrokesmod.module.impl.world.AntiBot;
|
||||||
|
import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||||
|
import keystrokesmod.module.setting.impl.SliderSetting;
|
||||||
|
import keystrokesmod.utility.RenderUtils;
|
||||||
|
import keystrokesmod.utility.Utils;
|
||||||
|
import net.minecraft.client.gui.ScaledResolution;
|
||||||
|
import net.minecraft.client.renderer.GlStateManager;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.util.Vec3;
|
||||||
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
|
||||||
|
public class Arrows extends Module {
|
||||||
|
private SliderSetting arrow;
|
||||||
|
private SliderSetting radius;
|
||||||
|
private ButtonSetting teamColor;
|
||||||
|
private ButtonSetting hideTeammates;
|
||||||
|
private ButtonSetting enemiesOnly;
|
||||||
|
private ButtonSetting renderFriends;
|
||||||
|
private ButtonSetting renderEnemies;
|
||||||
|
private ButtonSetting renderDistance;
|
||||||
|
private ButtonSetting renderOnlyOffScreen;
|
||||||
|
|
||||||
|
private int friendColor = new Color(0, 255, 0, 255).getRGB();
|
||||||
|
private int enemyColor = new Color(255, 0, 0, 255).getRGB();
|
||||||
|
|
||||||
|
private String[] arrowTypes = new String[] { "Caret", "Greater than", "Triangle" };
|
||||||
|
|
||||||
|
public Arrows() {
|
||||||
|
super("Arrows", category.render);
|
||||||
|
this.registerSetting(arrow = new SliderSetting("Arrow", 0, arrowTypes));
|
||||||
|
this.registerSetting(radius = new SliderSetting("Circle radius", 50, 30, 200, 5));
|
||||||
|
this.registerSetting(teamColor = new ButtonSetting("Team color", true));
|
||||||
|
this.registerSetting(hideTeammates = new ButtonSetting("Hide teammates", true));
|
||||||
|
this.registerSetting(enemiesOnly = new ButtonSetting("Show enemies only", false));
|
||||||
|
this.registerSetting(renderFriends = new ButtonSetting("Render friends (green)", true));
|
||||||
|
this.registerSetting(renderEnemies = new ButtonSetting("Render enemies (red)", true));
|
||||||
|
this.registerSetting(renderDistance = new ButtonSetting("Render distance", true));
|
||||||
|
this.registerSetting(renderOnlyOffScreen = new ButtonSetting("Render only offscreen", false));
|
||||||
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void onRenderTick(TickEvent.RenderTickEvent event) {
|
||||||
|
if (event.phase != TickEvent.Phase.END) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (mc.currentScreen != null || !Utils.nullCheck()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
for (EntityPlayer en : mc.theWorld.playerEntities) {
|
||||||
|
if (en == null || en == mc.thePlayer) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (AntiBot.isBot(en)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
this.renderIndicatorFor(en, event.renderTickTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void renderIndicatorFor(EntityPlayer en, float partialTicks) {
|
||||||
|
if (renderOnlyOffScreen.isToggled() && RenderUtils.isInViewFrustum(en)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int color = -1;
|
||||||
|
|
||||||
|
if (Utils.isTeamMate(en) && hideTeammates.isToggled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!Utils.isEnemy(en) && enemiesOnly.isToggled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (renderFriends.isToggled() && Utils.isFriended(en)) {
|
||||||
|
color = friendColor;
|
||||||
|
}
|
||||||
|
else if (renderEnemies.isToggled() && Utils.isEnemy(en)) {
|
||||||
|
color = enemyColor;
|
||||||
|
}
|
||||||
|
else if (teamColor.isToggled()) {
|
||||||
|
color = Utils.getColorFromEntity(en);
|
||||||
|
}
|
||||||
|
|
||||||
|
double x = en.lastTickPosX + (en.posX - en.lastTickPosX) * partialTicks - mc.getRenderManager().viewerPosX;
|
||||||
|
double y = en.lastTickPosY + (en.posY - en.lastTickPosY) * partialTicks - mc.getRenderManager().viewerPosY + en.height / 2;
|
||||||
|
double z = en.lastTickPosZ + (en.posZ - en.lastTickPosZ) * partialTicks - mc.getRenderManager().viewerPosZ;
|
||||||
|
|
||||||
|
((IAccessorEntityRenderer) mc.entityRenderer).callSetupCameraTransform(((IAccessorMinecraft) mc).getTimer().renderPartialTicks, 0);
|
||||||
|
|
||||||
|
ScaledResolution scaledResolution = new ScaledResolution(mc);
|
||||||
|
Vec3 vec = RenderUtils.convertTo2D(scaledResolution.getScaleFactor(), x, y, z);
|
||||||
|
|
||||||
|
if (vec != null) {
|
||||||
|
mc.entityRenderer.setupOverlayRendering();
|
||||||
|
ScaledResolution res = new ScaledResolution(mc);
|
||||||
|
|
||||||
|
double dx = vec.xCoord - res.getScaledWidth() / 2.0;
|
||||||
|
double dy = vec.yCoord - res.getScaledHeight() / 2.0;
|
||||||
|
boolean inFrustum = vec.zCoord < 1.0003684;
|
||||||
|
|
||||||
|
if (!inFrustum) {
|
||||||
|
dx *= -1.0;
|
||||||
|
dy *= -1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
double angle1 = Math.atan2(dx, dy);
|
||||||
|
double angle2 = Math.atan2(dy, dx) * 57.295780181884766 + 90.0;
|
||||||
|
double hypotenuse = Math.hypot(dx, dy);
|
||||||
|
double radiusInput = radius.getInput();
|
||||||
|
|
||||||
|
if (inFrustum && hypotenuse < radiusInput + 15.0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
double baseX = res.getScaledWidth() / 2.0;
|
||||||
|
double baseY = res.getScaledHeight() / 2.0;
|
||||||
|
double sinAng = Math.sin(angle1);
|
||||||
|
double cosAng = Math.cos(angle1);
|
||||||
|
double renderX = baseX + radiusInput * sinAng;
|
||||||
|
double renderY = baseY + radiusInput * cosAng;
|
||||||
|
|
||||||
|
GlStateManager.pushMatrix();
|
||||||
|
GlStateManager.translate(renderX, renderY, 0.0);
|
||||||
|
GlStateManager.rotate((float) angle2, 0.0f, 0.0f, 1.0f);
|
||||||
|
GlStateManager.scale(1.0f, 1.0f, 1.0f);
|
||||||
|
|
||||||
|
int arrowInput = (int) arrow.getInput();
|
||||||
|
|
||||||
|
if (arrowInput == 0) {
|
||||||
|
if (color == -1) {
|
||||||
|
GL11.glColor3d(1.0, 1.0, 1.0);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
int rgb = color;
|
||||||
|
float red = ((rgb >> 16) & 0xFF) / 255.0F;
|
||||||
|
float green = ((rgb >> 8) & 0xFF) / 255.0F;
|
||||||
|
float blue = ( rgb & 0xFF) / 255.0F;
|
||||||
|
GL11.glColor4f(red, green, blue, 1.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
GL11.glEnable(GL11.GL_BLEND);
|
||||||
|
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||||
|
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
GL11.glEnable(GL11.GL_LINE_SMOOTH);
|
||||||
|
|
||||||
|
double halfAngle = 0.6108652353286743;
|
||||||
|
double size = 9.0;
|
||||||
|
double offsetY = 5.0;
|
||||||
|
GL11.glLineWidth(3.0f);
|
||||||
|
GL11.glBegin(GL11.GL_LINE_STRIP);
|
||||||
|
GL11.glVertex2d(Math.sin(-halfAngle) * size, Math.cos(-halfAngle) * size - offsetY);
|
||||||
|
GL11.glVertex2d(0.0, -offsetY);
|
||||||
|
GL11.glVertex2d(Math.sin(halfAngle) * size, Math.cos(halfAngle) * size - offsetY);
|
||||||
|
GL11.glEnd();
|
||||||
|
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||||
|
GL11.glDisable(GL11.GL_BLEND);
|
||||||
|
GL11.glDisable(GL11.GL_LINE_SMOOTH);
|
||||||
|
}
|
||||||
|
else if (arrowInput == 1) {
|
||||||
|
GlStateManager.rotate(-90.0f, 0.0f, 0.0f, 1.0f);
|
||||||
|
GlStateManager.scale(1.5, 1.5, 1.5);
|
||||||
|
mc.fontRendererObj.drawString(">", -2.0f, -4.0f, color, false);
|
||||||
|
}
|
||||||
|
else if (arrowInput == 2) {
|
||||||
|
RenderUtils.draw2DPolygon(0.0, 0.0, 5.0, 3, Utils.mergeAlpha(color, 255));
|
||||||
|
}
|
||||||
|
|
||||||
|
GlStateManager.popMatrix();
|
||||||
|
|
||||||
|
renderX = baseX + (radiusInput - 13.0) * sinAng;
|
||||||
|
renderY = baseY + (radiusInput - 13.0) * cosAng;
|
||||||
|
|
||||||
|
GlStateManager.pushMatrix();
|
||||||
|
GlStateManager.translate(renderX, renderY, 0.0);
|
||||||
|
GlStateManager.scale(0.8, 0.8, 0.8);
|
||||||
|
|
||||||
|
if (renderDistance.isToggled()) {
|
||||||
|
String text = (int) mc.thePlayer.getDistanceToEntity(en) + "m";
|
||||||
|
mc.fontRendererObj.drawString(text, (float) (-mc.fontRendererObj.getStringWidth(text) / 2), -4.0f, -1, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
GlStateManager.popMatrix();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -93,7 +93,7 @@ public class BedESP extends Module {
|
||||||
float blockHeight = getBlockHeight();
|
float blockHeight = getBlockHeight();
|
||||||
if (firstBed.isToggled() && this.bed != null) {
|
if (firstBed.isToggled() && this.bed != null) {
|
||||||
float customAlpha = 0.25f;
|
float customAlpha = 0.25f;
|
||||||
if (!isBed(bed[0]) || !isBed(bed[1])) {
|
if (!isBed(bed[0])) {
|
||||||
if (firstBedTimer == null) {
|
if (firstBedTimer == null) {
|
||||||
(firstBedTimer = (new Timer(300))).start();
|
(firstBedTimer = (new Timer(300))).start();
|
||||||
}
|
}
|
||||||
|
|
@ -116,7 +116,7 @@ public class BedESP extends Module {
|
||||||
float customAlpha = 0.25f;
|
float customAlpha = 0.25f;
|
||||||
Map.Entry<BlockPos[], Timer> entry = iterator.next();
|
Map.Entry<BlockPos[], Timer> entry = iterator.next();
|
||||||
BlockPos[] blockPos = entry.getKey();
|
BlockPos[] blockPos = entry.getKey();
|
||||||
if (!isBed(blockPos[0]) || !isBed(blockPos[1])) {
|
if (!isBed(blockPos[0])) {
|
||||||
if (entry.getValue() == null) {
|
if (entry.getValue() == null) {
|
||||||
entry.setValue(new Timer(300));
|
entry.setValue(new Timer(300));
|
||||||
entry.getValue().start();
|
entry.getValue().start();
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package keystrokesmod.module.impl.render;
|
||||||
|
|
||||||
import keystrokesmod.module.Module;
|
import keystrokesmod.module.Module;
|
||||||
import keystrokesmod.module.ModuleManager;
|
import keystrokesmod.module.ModuleManager;
|
||||||
|
import keystrokesmod.module.impl.combat.Velocity;
|
||||||
import keystrokesmod.module.setting.impl.ButtonSetting;
|
import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||||
import keystrokesmod.module.setting.impl.DescriptionSetting;
|
import keystrokesmod.module.setting.impl.DescriptionSetting;
|
||||||
import keystrokesmod.module.setting.impl.SliderSetting;
|
import keystrokesmod.module.setting.impl.SliderSetting;
|
||||||
|
|
@ -82,6 +83,16 @@ public class HUD extends Module {
|
||||||
if (mc.currentScreen != null || mc.gameSettings.showDebugInfo) {
|
if (mc.currentScreen != null || mc.gameSettings.showDebugInfo) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
for (Module module : ModuleManager.organizedModules) {
|
||||||
|
module.getInfoUpdate();
|
||||||
|
if (Module.sort) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (Module.sort) {
|
||||||
|
ModuleManager.sort();
|
||||||
|
}
|
||||||
|
Module.sort = false;
|
||||||
int yPos = posY;
|
int yPos = posY;
|
||||||
double n2 = 0.0;
|
double n2 = 0.0;
|
||||||
String previousModule = "";
|
String previousModule = "";
|
||||||
|
|
@ -104,7 +115,7 @@ public class HUD extends Module {
|
||||||
if (removeCloset.isToggled() && module.closetModule) {
|
if (removeCloset.isToggled() && module.closetModule) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String moduleName = module.getName();
|
String moduleName = module.getNameInHud();
|
||||||
if (showInfo.isToggled() && !module.getInfo().isEmpty()) {
|
if (showInfo.isToggled() && !module.getInfo().isEmpty()) {
|
||||||
moduleName += " §7" + module.getInfo();
|
moduleName += " §7" + module.getInfo();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import keystrokesmod.mixin.impl.accessor.IAccessorEntityArrow;
|
||||||
import keystrokesmod.mixin.impl.accessor.IAccessorEntityRenderer;
|
import keystrokesmod.mixin.impl.accessor.IAccessorEntityRenderer;
|
||||||
import keystrokesmod.mixin.impl.accessor.IAccessorMinecraft;
|
import keystrokesmod.mixin.impl.accessor.IAccessorMinecraft;
|
||||||
import keystrokesmod.module.Module;
|
import keystrokesmod.module.Module;
|
||||||
import keystrokesmod.module.impl.world.AntiBot;
|
|
||||||
import keystrokesmod.module.setting.impl.ButtonSetting;
|
import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||||
import keystrokesmod.module.setting.impl.SliderSetting;
|
import keystrokesmod.module.setting.impl.SliderSetting;
|
||||||
import keystrokesmod.utility.BlockUtils;
|
import keystrokesmod.utility.BlockUtils;
|
||||||
|
|
@ -18,7 +17,6 @@ import net.minecraft.client.gui.ScaledResolution;
|
||||||
import net.minecraft.client.renderer.GlStateManager;
|
import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.item.EntityEnderPearl;
|
import net.minecraft.entity.item.EntityEnderPearl;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.entity.projectile.EntityArrow;
|
import net.minecraft.entity.projectile.EntityArrow;
|
||||||
import net.minecraft.entity.projectile.EntityFireball;
|
import net.minecraft.entity.projectile.EntityFireball;
|
||||||
import net.minecraft.entity.projectile.EntityLargeFireball;
|
import net.minecraft.entity.projectile.EntityLargeFireball;
|
||||||
|
|
@ -40,14 +38,17 @@ public class Indicators extends Module {
|
||||||
private ButtonSetting renderArrows;
|
private ButtonSetting renderArrows;
|
||||||
private ButtonSetting renderPearls;
|
private ButtonSetting renderPearls;
|
||||||
private ButtonSetting renderFireballs;
|
private ButtonSetting renderFireballs;
|
||||||
private ButtonSetting renderPlayers;
|
|
||||||
private SliderSetting arrow;
|
private SliderSetting arrow;
|
||||||
private SliderSetting radius;
|
private SliderSetting radius;
|
||||||
private ButtonSetting itemColors;
|
private ButtonSetting itemColors;
|
||||||
private ButtonSetting renderItem;
|
private ButtonSetting renderItem;
|
||||||
|
private ButtonSetting renderDistance;
|
||||||
private ButtonSetting threatsOnly;
|
private ButtonSetting threatsOnly;
|
||||||
|
private ButtonSetting renderOnlyOffScreen;
|
||||||
|
|
||||||
private HashSet<Entity> threats = new HashSet<>();
|
private HashSet<Entity> threats = new HashSet<>();
|
||||||
private Map<String, String> lastHeldItems = new ConcurrentHashMap<>();
|
private Map<String, String> lastHeldItems = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private String[] arrowTypes = new String[] { "Caret", "Greater than", "Triangle" };
|
private String[] arrowTypes = new String[] { "Caret", "Greater than", "Triangle" };
|
||||||
|
|
||||||
public Indicators() {
|
public Indicators() {
|
||||||
|
|
@ -55,12 +56,13 @@ public class Indicators extends Module {
|
||||||
this.registerSetting(renderArrows = new ButtonSetting("Render arrows", true));
|
this.registerSetting(renderArrows = new ButtonSetting("Render arrows", true));
|
||||||
this.registerSetting(renderPearls = new ButtonSetting("Render ender pearls", true));
|
this.registerSetting(renderPearls = new ButtonSetting("Render ender pearls", true));
|
||||||
this.registerSetting(renderFireballs = new ButtonSetting("Render fireballs", true));
|
this.registerSetting(renderFireballs = new ButtonSetting("Render fireballs", true));
|
||||||
this.registerSetting(renderPlayers = new ButtonSetting("Render players", true));
|
|
||||||
this.registerSetting(arrow = new SliderSetting("Arrow", 0, arrowTypes));
|
this.registerSetting(arrow = new SliderSetting("Arrow", 0, arrowTypes));
|
||||||
this.registerSetting(radius = new SliderSetting("Circle radius", 50, 30, 200, 5));
|
this.registerSetting(radius = new SliderSetting("Circle radius", 50, 30, 200, 5));
|
||||||
this.registerSetting(itemColors = new ButtonSetting("Item colors", true));
|
this.registerSetting(itemColors = new ButtonSetting("Item colors", true));
|
||||||
this.registerSetting(renderItem = new ButtonSetting("Render item", true));
|
this.registerSetting(renderItem = new ButtonSetting("Render item", true));
|
||||||
|
this.registerSetting(renderDistance = new ButtonSetting("Render distance", true));
|
||||||
this.registerSetting(threatsOnly = new ButtonSetting("Render only threats", true));
|
this.registerSetting(threatsOnly = new ButtonSetting("Render only threats", true));
|
||||||
|
this.registerSetting(renderOnlyOffScreen = new ButtonSetting("Render only offscreen", false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
|
|
@ -95,7 +97,11 @@ public class Indicators extends Module {
|
||||||
else if (en instanceof EntityEnderPearl) {
|
else if (en instanceof EntityEnderPearl) {
|
||||||
itemStack = new ItemStack(Items.ender_pearl);
|
itemStack = new ItemStack(Items.ender_pearl);
|
||||||
}
|
}
|
||||||
if (!threats.contains(en) && !(en instanceof EntityPlayer)) {
|
if (!threats.contains(en)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!mc.theWorld.loadedEntityList.contains(en) || !canRender(en)) {
|
||||||
|
threats.remove(en);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
this.renderIndicatorFor(en, itemStack, event.renderTickTime);
|
this.renderIndicatorFor(en, itemStack, event.renderTickTime);
|
||||||
|
|
@ -127,9 +133,6 @@ public class Indicators extends Module {
|
||||||
else if (entity instanceof EntityEnderPearl && renderPearls.isToggled()) {
|
else if (entity instanceof EntityEnderPearl && renderPearls.isToggled()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (entity instanceof EntityPlayer && renderPlayers.isToggled() && !AntiBot.isBot(entity)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -140,6 +143,9 @@ public class Indicators extends Module {
|
||||||
if (!this.shouldRender(en, itemStack)) {
|
if (!this.shouldRender(en, itemStack)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (renderOnlyOffScreen.isToggled() && RenderUtils.isInViewFrustum(en)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Color colorForStack = getColorForItem(itemStack);
|
Color colorForStack = getColorForItem(itemStack);
|
||||||
int color = itemColors.isToggled() ? colorForStack.getRGB() : -1;
|
int color = itemColors.isToggled() ? colorForStack.getRGB() : -1;
|
||||||
|
|
||||||
|
|
@ -190,7 +196,9 @@ public class Indicators extends Module {
|
||||||
GlStateManager.rotate((float) angle2, 0.0f, 0.0f, 1.0f);
|
GlStateManager.rotate((float) angle2, 0.0f, 0.0f, 1.0f);
|
||||||
GlStateManager.scale(1.0f, 1.0f, 1.0f);
|
GlStateManager.scale(1.0f, 1.0f, 1.0f);
|
||||||
|
|
||||||
if (arrow.getInput() == 0) {
|
int arrowInput = (int) arrow.getInput();
|
||||||
|
|
||||||
|
if (arrowInput == 0) {
|
||||||
if (color == -1) {
|
if (color == -1) {
|
||||||
GL11.glColor3d(1.0, 1.0, 1.0);
|
GL11.glColor3d(1.0, 1.0, 1.0);
|
||||||
}
|
}
|
||||||
|
|
@ -216,13 +224,13 @@ public class Indicators extends Module {
|
||||||
GL11.glDisable(GL11.GL_BLEND);
|
GL11.glDisable(GL11.GL_BLEND);
|
||||||
GL11.glDisable(GL11.GL_LINE_SMOOTH);
|
GL11.glDisable(GL11.GL_LINE_SMOOTH);
|
||||||
}
|
}
|
||||||
else if (arrow.getInput() == 1) {
|
else if (arrowInput == 1) {
|
||||||
GlStateManager.rotate(-90.0f, 0.0f, 0.0f, 1.0f);
|
GlStateManager.rotate(-90.0f, 0.0f, 0.0f, 1.0f);
|
||||||
GlStateManager.scale(1.5, 1.5, 1.5);
|
GlStateManager.scale(1.5, 1.5, 1.5);
|
||||||
mc.fontRendererObj.drawString(">", -2.0f, -4.0f, color, false);
|
mc.fontRendererObj.drawString(">", -2.0f, -4.0f, color, false);
|
||||||
}
|
}
|
||||||
else if (arrow.getInput() == 2) {
|
else if (arrowInput == 2) {
|
||||||
RenderUtils.draw2DPolygon(0.0, 0.0, 5.0, 3, color);
|
RenderUtils.draw2DPolygon(0.0, 0.0, 5.0, 3, Utils.mergeAlpha(color, 255));
|
||||||
}
|
}
|
||||||
|
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
|
|
@ -234,8 +242,10 @@ public class Indicators extends Module {
|
||||||
GlStateManager.translate(renderX, renderY, 0.0);
|
GlStateManager.translate(renderX, renderY, 0.0);
|
||||||
GlStateManager.scale(0.8, 0.8, 0.8);
|
GlStateManager.scale(0.8, 0.8, 0.8);
|
||||||
|
|
||||||
|
if (renderDistance.isToggled()) {
|
||||||
String text = (int) mc.thePlayer.getDistanceToEntity(en) + "m";
|
String text = (int) mc.thePlayer.getDistanceToEntity(en) + "m";
|
||||||
mc.fontRendererObj.drawString(text, (float) (-mc.fontRendererObj.getStringWidth(text) / 2), -4.0f, -1, true);
|
mc.fontRendererObj.drawString(text, (float) (-mc.fontRendererObj.getStringWidth(text) / 2), -4.0f, -1, true);
|
||||||
|
}
|
||||||
|
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
|
|
||||||
|
|
@ -269,7 +279,7 @@ public class Indicators extends Module {
|
||||||
return new Color(210, 0, 255);
|
return new Color(210, 0, 255);
|
||||||
}
|
}
|
||||||
else if (itemStack.getItem() == Items.fire_charge) {
|
else if (itemStack.getItem() == Items.fire_charge) {
|
||||||
return new Color(255, 115, 0);
|
return new Color(255, 150, 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return Color.WHITE;
|
return Color.WHITE;
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import keystrokesmod.mixin.impl.accessor.IAccessorEntityRenderer;
|
||||||
import keystrokesmod.mixin.impl.accessor.IAccessorMinecraft;
|
import keystrokesmod.mixin.impl.accessor.IAccessorMinecraft;
|
||||||
import keystrokesmod.module.Module;
|
import keystrokesmod.module.Module;
|
||||||
import keystrokesmod.module.ModuleManager;
|
import keystrokesmod.module.ModuleManager;
|
||||||
|
import keystrokesmod.module.impl.minigames.SkyWars;
|
||||||
import keystrokesmod.module.impl.world.AntiBot;
|
import keystrokesmod.module.impl.world.AntiBot;
|
||||||
import keystrokesmod.module.setting.impl.ButtonSetting;
|
import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||||
import keystrokesmod.module.setting.impl.DescriptionSetting;
|
import keystrokesmod.module.setting.impl.DescriptionSetting;
|
||||||
|
|
@ -39,14 +40,16 @@ public class Nametags extends Module {
|
||||||
private ButtonSetting showEnchants;
|
private ButtonSetting showEnchants;
|
||||||
private ButtonSetting showDurability;
|
private ButtonSetting showDurability;
|
||||||
private ButtonSetting showStackSize;
|
private ButtonSetting showStackSize;
|
||||||
|
|
||||||
private int backGroundColor = new Color(0, 0, 0, 100).getRGB();
|
private int backGroundColor = new Color(0, 0, 0, 100).getRGB();
|
||||||
private int friendColor = new Color(0, 255, 0, 255).getRGB();
|
private int friendColor = new Color(0, 255, 0, 255).getRGB();
|
||||||
private int enemyColor = new Color(255, 0, 0, 255).getRGB();
|
private int enemyColor = new Color(255, 0, 0, 255).getRGB();
|
||||||
|
|
||||||
private double normalizedThreshold = 8;
|
private double normalizedThreshold = 8;
|
||||||
|
|
||||||
public Nametags() {
|
public Nametags() {
|
||||||
super("Nametags", category.render, 0);
|
super("Nametags", category.render, 0);
|
||||||
this.registerSetting(scale = new SliderSetting("Scale", 1.0, 0.5, 5.0, 0.1));
|
this.registerSetting(scale = new SliderSetting("Scale", 1.0, 0.1, 5.0, 0.1));
|
||||||
this.registerSetting(autoScale = new ButtonSetting("Auto-scale", true));
|
this.registerSetting(autoScale = new ButtonSetting("Auto-scale", true));
|
||||||
this.registerSetting(drawBackground = new ButtonSetting("Draw background", true));
|
this.registerSetting(drawBackground = new ButtonSetting("Draw background", true));
|
||||||
this.registerSetting(onlyRenderName = new ButtonSetting("Only render name", false));
|
this.registerSetting(onlyRenderName = new ButtonSetting("Only render name", false));
|
||||||
|
|
@ -86,7 +89,7 @@ public class Nametags extends Module {
|
||||||
interpolatedY = mc.thePlayer.lastTickPosY + (mc.thePlayer.posY - mc.thePlayer.lastTickPosY) * ev.partialTicks + mc.thePlayer.getEyeHeight();
|
interpolatedY = mc.thePlayer.lastTickPosY + (mc.thePlayer.posY - mc.thePlayer.lastTickPosY) * ev.partialTicks + mc.thePlayer.getEyeHeight();
|
||||||
interpolatedZ = mc.thePlayer.lastTickPosZ + (mc.thePlayer.posZ - mc.thePlayer.lastTickPosZ) * ev.partialTicks;
|
interpolatedZ = mc.thePlayer.lastTickPosZ + (mc.thePlayer.posZ - mc.thePlayer.lastTickPosZ) * ev.partialTicks;
|
||||||
}
|
}
|
||||||
|
long strengthDuration = SkyWars.isSkyWarsTeams ? 2 : 5;
|
||||||
ScaledResolution scaledResolution = new ScaledResolution(mc);
|
ScaledResolution scaledResolution = new ScaledResolution(mc);
|
||||||
|
|
||||||
for (EntityPlayer en : mc.theWorld.playerEntities) {
|
for (EntityPlayer en : mc.theWorld.playerEntities) {
|
||||||
|
|
@ -161,7 +164,7 @@ public class Nametags extends Module {
|
||||||
name = name + " " + Utils.getHealthStr(en, false);
|
name = name + " " + Utils.getHealthStr(en, false);
|
||||||
}
|
}
|
||||||
if (showHitsToKill.isToggled()) {
|
if (showHitsToKill.isToggled()) {
|
||||||
name = name + " " + Utils.getHitsToKill(en, mc.thePlayer.getCurrentEquippedItem());
|
name = name + " " + Utils.getHitsToKillStr(en, mc.thePlayer.getCurrentEquippedItem());
|
||||||
}
|
}
|
||||||
if (showDistance.isToggled()) {
|
if (showDistance.isToggled()) {
|
||||||
int distance = Math.round(mc.thePlayer.getDistanceToEntity(en));
|
int distance = Math.round(mc.thePlayer.getDistanceToEntity(en));
|
||||||
|
|
@ -186,7 +189,7 @@ public class Nametags extends Module {
|
||||||
if (ModuleManager.skyWars.isEnabled() && ModuleManager.skyWars.strengthIndicator.isToggled() && !ModuleManager.skyWars.strengthPlayers.isEmpty() && ModuleManager.skyWars.strengthPlayers.get(en) != null) {
|
if (ModuleManager.skyWars.isEnabled() && ModuleManager.skyWars.strengthIndicator.isToggled() && !ModuleManager.skyWars.strengthPlayers.isEmpty() && ModuleManager.skyWars.strengthPlayers.get(en) != null) {
|
||||||
double startTime = ModuleManager.skyWars.strengthPlayers.get(en);
|
double startTime = ModuleManager.skyWars.strengthPlayers.get(en);
|
||||||
double timePassed = (System.currentTimeMillis() - startTime) / 1000;
|
double timePassed = (System.currentTimeMillis() - startTime) / 1000;
|
||||||
double strengthRemaining = Math.max(0, Utils.round(5.0 - timePassed, 1));
|
double strengthRemaining = Math.max(0, Utils.round(strengthDuration - timePassed, 1));
|
||||||
String strengthInfo = "§4" + Utils.asWholeNum(strengthRemaining) + "s§r ";
|
String strengthInfo = "§4" + Utils.asWholeNum(strengthRemaining) + "s§r ";
|
||||||
name = strengthInfo + name;
|
name = strengthInfo + name;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,10 @@ public abstract class Setting {
|
||||||
}
|
}
|
||||||
this.visible = visible;
|
this.visible = visible;
|
||||||
for (CategoryComponent categoryComponent : Raven.clickGui.categories) {
|
for (CategoryComponent categoryComponent : Raven.clickGui.categories) {
|
||||||
if (categoryComponent.categoryName == module.moduleCategory()) {
|
if (categoryComponent.category == module.moduleCategory()) {
|
||||||
for (ModuleComponent moduleComponent : categoryComponent.modules) {
|
for (ModuleComponent moduleComponent : categoryComponent.modules) {
|
||||||
if (moduleComponent.mod.getName().equals(module.getName())) {
|
if (moduleComponent.mod.getName().equals(module.getName())) {
|
||||||
moduleComponent.updateSettingPositions();
|
moduleComponent.updateSettingPositions(0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ public class ButtonSetting extends Setting {
|
||||||
private boolean isEnabled;
|
private boolean isEnabled;
|
||||||
public boolean isMethodButton;
|
public boolean isMethodButton;
|
||||||
private Runnable method;
|
private Runnable method;
|
||||||
|
public GroupSetting group;
|
||||||
|
|
||||||
public ButtonSetting(String name, boolean isEnabled) {
|
public ButtonSetting(String name, boolean isEnabled) {
|
||||||
super(name);
|
super(name);
|
||||||
|
|
@ -16,6 +17,14 @@ public class ButtonSetting extends Setting {
|
||||||
this.isMethodButton = false;
|
this.isMethodButton = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ButtonSetting(GroupSetting group, String name, boolean isEnabled) {
|
||||||
|
super(name);
|
||||||
|
this.group = group;
|
||||||
|
this.name = name;
|
||||||
|
this.isEnabled = isEnabled;
|
||||||
|
this.isMethodButton = false;
|
||||||
|
}
|
||||||
|
|
||||||
public ButtonSetting(String name, Runnable method) {
|
public ButtonSetting(String name, Runnable method) {
|
||||||
super(name);
|
super(name);
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
|
@ -61,9 +70,7 @@ public class ButtonSetting extends Setting {
|
||||||
try {
|
try {
|
||||||
booleanValue = data.getAsJsonPrimitive(getName()).getAsBoolean();
|
booleanValue = data.getAsJsonPrimitive(getName()).getAsBoolean();
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {}
|
||||||
|
|
||||||
}
|
|
||||||
setEnabled(booleanValue);
|
setEnabled(booleanValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,19 @@ import org.lwjgl.input.Mouse;
|
||||||
|
|
||||||
public class KeySetting extends Setting {
|
public class KeySetting extends Setting {
|
||||||
private int key;
|
private int key;
|
||||||
|
public GroupSetting group;
|
||||||
|
|
||||||
public KeySetting(String name, int key) {
|
public KeySetting(String name, int key) {
|
||||||
super(name);
|
super(name);
|
||||||
this.key = key;
|
this.key = key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public KeySetting(GroupSetting group, String name, int key) {
|
||||||
|
super(name);
|
||||||
|
this.group = group;
|
||||||
|
this.key = key;
|
||||||
|
}
|
||||||
|
|
||||||
public int getKey() {
|
public int getKey() {
|
||||||
return this.key;
|
return this.key;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,11 @@ public class SliderSetting extends Setting {
|
||||||
public boolean isString;
|
public boolean isString;
|
||||||
private String suffix = "";
|
private String suffix = "";
|
||||||
public boolean canBeDisabled;
|
public boolean canBeDisabled;
|
||||||
|
public GroupSetting groupSetting;
|
||||||
|
|
||||||
public SliderSetting(String settingName, double defaultValue, double min, double max, double intervals) {
|
public SliderSetting(GroupSetting groupSetting, String settingName, double defaultValue, double min, double max, double intervals) {
|
||||||
super(settingName);
|
super(settingName);
|
||||||
|
this.groupSetting = groupSetting;
|
||||||
this.settingName = settingName;
|
this.settingName = settingName;
|
||||||
this.defaultValue = defaultValue;
|
this.defaultValue = defaultValue;
|
||||||
this.min = min;
|
this.min = min;
|
||||||
|
|
@ -27,8 +29,17 @@ public class SliderSetting extends Setting {
|
||||||
this.isString = false;
|
this.isString = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SliderSetting(String settingName, double defaultValue, double min, double max, double intervals) {
|
||||||
|
this((GroupSetting) null, settingName, defaultValue, min, max, intervals);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SliderSetting(GroupSetting groupSetting, String settingName, String suffix, double defaultValue, double min, double max, double intervals) {
|
||||||
|
this(groupSetting, settingName, defaultValue, min, max, intervals);
|
||||||
|
this.suffix = suffix;
|
||||||
|
}
|
||||||
|
|
||||||
public SliderSetting(String settingName, String suffix, double defaultValue, double min, double max, double intervals) {
|
public SliderSetting(String settingName, String suffix, double defaultValue, double min, double max, double intervals) {
|
||||||
this(settingName, defaultValue, min, max, intervals);
|
this((GroupSetting) null, settingName, defaultValue, min, max, intervals);
|
||||||
this.suffix = suffix;
|
this.suffix = suffix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -43,8 +54,9 @@ public class SliderSetting extends Setting {
|
||||||
this.canBeDisabled = canBeDisabled;
|
this.canBeDisabled = canBeDisabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SliderSetting(String settingName, int defaultValue, String[] options) {
|
public SliderSetting(GroupSetting groupSetting, String settingName, int defaultValue, String[] options) {
|
||||||
super(settingName);
|
super(settingName);
|
||||||
|
this.groupSetting = groupSetting;
|
||||||
this.settingName = settingName;
|
this.settingName = settingName;
|
||||||
this.options = options;
|
this.options = options;
|
||||||
this.defaultValue = defaultValue;
|
this.defaultValue = defaultValue;
|
||||||
|
|
@ -54,8 +66,17 @@ public class SliderSetting extends Setting {
|
||||||
this.isString = true;
|
this.isString = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SliderSetting(String settingName, int defaultValue, String[] options) {
|
||||||
|
this((GroupSetting) null, settingName, defaultValue, options);
|
||||||
|
}
|
||||||
|
|
||||||
public SliderSetting(String settingName, String suffix, int defaultValue, String[] options) {
|
public SliderSetting(String settingName, String suffix, int defaultValue, String[] options) {
|
||||||
this(settingName, defaultValue, options);
|
this((GroupSetting) null, settingName, defaultValue, options);
|
||||||
|
this.suffix = suffix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SliderSetting(GroupSetting groupSetting, String settingName, String suffix, int defaultValue, String[] options) {
|
||||||
|
this(groupSetting, settingName, defaultValue, options);
|
||||||
this.suffix = suffix;
|
this.suffix = suffix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -99,6 +120,10 @@ public class SliderSetting extends Setting {
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setSuffix(String suffix) {
|
||||||
|
this.suffix = suffix;
|
||||||
|
}
|
||||||
|
|
||||||
public static double roundToInterval(double v, int p) {
|
public static double roundToInterval(double v, int p) {
|
||||||
if (p < 0) {
|
if (p < 0) {
|
||||||
return 0.0D;
|
return 0.0D;
|
||||||
|
|
|
||||||
|
|
@ -651,7 +651,7 @@ public class ScriptDefaults {
|
||||||
for (ModuleComponent module : categoryComponent.modules) {
|
for (ModuleComponent module : categoryComponent.modules) {
|
||||||
modules.add(module.mod.getName());
|
modules.add(module.mod.getName());
|
||||||
}
|
}
|
||||||
categories.put(categoryComponent.categoryName.name(), modules);
|
categories.put(categoryComponent.category.name(), modules);
|
||||||
}
|
}
|
||||||
return categories;
|
return categories;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ public class ScriptManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (CategoryComponent categoryComponent : Raven.clickGui.categories) {
|
for (CategoryComponent categoryComponent : Raven.clickGui.categories) {
|
||||||
if (categoryComponent.categoryName == Module.category.scripts) {
|
if (categoryComponent.category == Module.category.scripts) {
|
||||||
categoryComponent.reloadModules(false);
|
categoryComponent.reloadModules(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,18 @@ public class BlockUtils {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isObsidian(Block block) {
|
||||||
|
return block instanceof BlockObsidian;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isObsidian(MovingObjectPosition mv) {
|
||||||
|
if (mv == null || mv.typeOfHit != MovingObjectPosition.MovingObjectType.BLOCK || mv.getBlockPos() == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
IBlockState iblockstate = mc.theWorld.getBlockState(mv.getBlockPos());
|
||||||
|
return isObsidian(iblockstate.getBlock());
|
||||||
|
}
|
||||||
|
|
||||||
public static Vec3 getHitVec(Vec3 hitVec, BlockPos blockPos) {
|
public static Vec3 getHitVec(Vec3 hitVec, BlockPos blockPos) {
|
||||||
float x = (float)(hitVec.xCoord - blockPos.getX());
|
float x = (float)(hitVec.xCoord - blockPos.getX());
|
||||||
float y = (float)(hitVec.yCoord - blockPos.getY());
|
float y = (float)(hitVec.yCoord - blockPos.getY());
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import keystrokesmod.Raven;
|
||||||
import keystrokesmod.module.Module;
|
import keystrokesmod.module.Module;
|
||||||
import keystrokesmod.module.ModuleManager;
|
import keystrokesmod.module.ModuleManager;
|
||||||
import keystrokesmod.module.impl.client.Settings;
|
import keystrokesmod.module.impl.client.Settings;
|
||||||
|
import keystrokesmod.module.impl.combat.Velocity;
|
||||||
import keystrokesmod.module.impl.minigames.DuelsStats;
|
import keystrokesmod.module.impl.minigames.DuelsStats;
|
||||||
import keystrokesmod.module.impl.movement.Bhop;
|
import keystrokesmod.module.impl.movement.Bhop;
|
||||||
import keystrokesmod.module.impl.movement.Fly;
|
import keystrokesmod.module.impl.movement.Fly;
|
||||||
|
|
@ -213,11 +214,11 @@ public class Commands {
|
||||||
switch (args[1]) {
|
switch (args[1]) {
|
||||||
case "horizontal":
|
case "horizontal":
|
||||||
case "h":
|
case "h":
|
||||||
//Velocity.horizontal.setValueRaw(value);
|
Velocity.horizontal.setValueRaw(value);
|
||||||
break;
|
break;
|
||||||
case "vertical":
|
case "vertical":
|
||||||
case "v":
|
case "v":
|
||||||
//Velocity.vertical.setValueRaw(value);
|
Velocity.vertical.setValueRaw(value);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
print(invSyn, 1);
|
print(invSyn, 1);
|
||||||
|
|
@ -228,7 +229,7 @@ public class Commands {
|
||||||
print(args[2], 0);
|
print(args[2], 0);
|
||||||
}
|
}
|
||||||
else if (cm.startsWith("ping")) {
|
else if (cm.startsWith("ping")) {
|
||||||
Ping.checkPing();
|
Ping.checkPing(false);
|
||||||
}
|
}
|
||||||
else if (cm.startsWith("sprint")) {
|
else if (cm.startsWith("sprint")) {
|
||||||
if (!hasArgs || args.length != 2) {
|
if (!hasArgs || args.length != 2) {
|
||||||
|
|
@ -360,7 +361,8 @@ public class Commands {
|
||||||
print("&aSaved profile:", 1);
|
print("&aSaved profile:", 1);
|
||||||
print(name, 0);
|
print(name, 0);
|
||||||
Raven.profileManager.loadProfiles();
|
Raven.profileManager.loadProfiles();
|
||||||
} else if (args[1].equals("load") || args[1].equals("l")) {
|
}
|
||||||
|
else if (args[1].equals("load") || args[1].equals("l")) {
|
||||||
if (args.length != 3) {
|
if (args.length != 3) {
|
||||||
print(invSyn, 1);
|
print(invSyn, 1);
|
||||||
return;
|
return;
|
||||||
|
|
@ -378,7 +380,8 @@ public class Commands {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print("&cInvalid profile.", 1);
|
print("&cInvalid profile.", 1);
|
||||||
} else if (args[1].equals("remove") || args[1].equals("r")) {
|
}
|
||||||
|
else if (args[1].equals("remove") || args[1].equals("r")) {
|
||||||
if (args.length != 3) {
|
if (args.length != 3) {
|
||||||
print(invSyn, 1);
|
print(invSyn, 1);
|
||||||
return;
|
return;
|
||||||
|
|
@ -494,6 +497,6 @@ public class Commands {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void od() {
|
public static void od() {
|
||||||
Ping.rs();
|
Ping.reset(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package keystrokesmod.utility;
|
||||||
|
|
||||||
|
import keystrokesmod.Raven;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
||||||
|
|
||||||
|
public class Debugger {
|
||||||
|
private static Minecraft mc = Minecraft.getMinecraft();
|
||||||
|
public static boolean MIXIN; // for debugging mixin related
|
||||||
|
public static boolean BACKGROUND; // background processes like cache clearing and such
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void onRenderTick(TickEvent.RenderTickEvent ev) {
|
||||||
|
if (!Raven.debug || ev.phase != TickEvent.Phase.END || !Utils.nullCheck()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (mc.currentScreen == null) {
|
||||||
|
RenderUtils.renderBPS(true, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void debugMixin(Object obj, String message) {
|
||||||
|
if (!MIXIN) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Utils.sendMessage("&d" + obj.getClass().getSimpleName() + "&7: " + message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -10,13 +10,16 @@ import net.minecraft.client.Minecraft;
|
||||||
import keystrokesmod.module.ModuleManager;
|
import keystrokesmod.module.ModuleManager;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.network.play.client.*;
|
import net.minecraft.network.play.client.*;
|
||||||
|
import net.minecraft.network.play.server.S27PacketExplosion;
|
||||||
import net.minecraft.util.BlockPos;
|
import net.minecraft.util.BlockPos;
|
||||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public class ModuleUtils {
|
public class ModuleUtils {
|
||||||
private final Minecraft mc;
|
private final Minecraft mc;
|
||||||
|
|
@ -26,18 +29,19 @@ public class ModuleUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isBreaking;
|
public static boolean isBreaking;
|
||||||
public static boolean threwFireball;
|
public static boolean threwFireball, threwFireballLow;
|
||||||
private int isBreakingTick;
|
private int isBreakingTick;
|
||||||
public static long MAX_EXPLOSION_DIST_SQ = 10;
|
public static long MAX_EXPLOSION_DIST_SQ = 10;
|
||||||
private long FIREBALL_TIMEOUT = 500L, fireballTime = 0;
|
private long FIREBALL_TIMEOUT = 500L, fireballTime = 0;
|
||||||
public static int inAirTicks;
|
public static int inAirTicks, groundTicks;
|
||||||
public static int fadeEdge;
|
public static int fadeEdge;
|
||||||
public static int lastFaceDifference;
|
public static int lastFaceDifference;
|
||||||
private int lastFace;
|
private int lastFace;
|
||||||
public static float offsetValue = 1E-9F;
|
public static float offsetValue = 1E-14F;
|
||||||
public static boolean isAttacking;
|
public static boolean isAttacking;
|
||||||
private int attackingTicks;
|
private int attackingTicks;
|
||||||
|
private int unTargetTicks;
|
||||||
|
public static int profileTicks = -1;
|
||||||
|
|
||||||
public static boolean isBlocked;
|
public static boolean isBlocked;
|
||||||
|
|
||||||
|
|
@ -54,8 +58,13 @@ public class ModuleUtils {
|
||||||
isBlocked = true;
|
isBlocked = true;
|
||||||
}
|
}
|
||||||
else if (e.getPacket() instanceof C07PacketPlayerDigging && isBlocked) {
|
else if (e.getPacket() instanceof C07PacketPlayerDigging && isBlocked) {
|
||||||
|
C07PacketPlayerDigging c07 = (C07PacketPlayerDigging) e.getPacket();
|
||||||
|
String edger;
|
||||||
|
edger = String.valueOf(c07.getStatus());
|
||||||
|
if (Objects.equals(edger, "RELEASE_USE_ITEM")) {
|
||||||
isBlocked = false;
|
isBlocked = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (e.getPacket() instanceof C09PacketHeldItemChange && isBlocked) {
|
else if (e.getPacket() instanceof C09PacketHeldItemChange && isBlocked) {
|
||||||
isBlocked = false;
|
isBlocked = false;
|
||||||
}
|
}
|
||||||
|
|
@ -85,8 +94,13 @@ public class ModuleUtils {
|
||||||
isBlocked = true;
|
isBlocked = true;
|
||||||
}
|
}
|
||||||
else if (e.getPacket() instanceof C07PacketPlayerDigging && isBlocked) {
|
else if (e.getPacket() instanceof C07PacketPlayerDigging && isBlocked) {
|
||||||
|
C07PacketPlayerDigging c07 = (C07PacketPlayerDigging) e.getPacket();
|
||||||
|
String edger;
|
||||||
|
edger = String.valueOf(c07.getStatus());
|
||||||
|
if (Objects.equals(edger, "RELEASE_USE_ITEM")) {
|
||||||
isBlocked = false;
|
isBlocked = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (e.getPacket() instanceof C09PacketHeldItemChange && isBlocked) {
|
else if (e.getPacket() instanceof C09PacketHeldItemChange && isBlocked) {
|
||||||
isBlocked = false;
|
isBlocked = false;
|
||||||
}
|
}
|
||||||
|
|
@ -114,6 +128,9 @@ public class ModuleUtils {
|
||||||
if (Utils.keybinds.isMouseDown(1)) {
|
if (Utils.keybinds.isMouseDown(1)) {
|
||||||
fireballTime = System.currentTimeMillis();
|
fireballTime = System.currentTimeMillis();
|
||||||
threwFireball = true;
|
threwFireball = true;
|
||||||
|
if (mc.thePlayer.rotationPitch > 50F) {
|
||||||
|
threwFireballLow = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -137,6 +154,8 @@ public class ModuleUtils {
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onPreUpdate(PreUpdateEvent e) {
|
public void onPreUpdate(PreUpdateEvent e) {
|
||||||
|
|
||||||
|
profileTicks++;
|
||||||
|
|
||||||
if (isAttacking) {
|
if (isAttacking) {
|
||||||
if (attackingTicks <= 0) {
|
if (attackingTicks <= 0) {
|
||||||
isAttacking = false;
|
isAttacking = false;
|
||||||
|
|
@ -147,14 +166,18 @@ public class ModuleUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LongJump.slotReset && ++LongJump.slotResetTicks >= 2) {
|
if (LongJump.slotReset && ++LongJump.slotResetTicks >= 2) {
|
||||||
LongJump.stopKillAura = false;
|
LongJump.stopModules = false;
|
||||||
LongJump.stopScaffold = false;
|
|
||||||
LongJump.slotResetTicks = 0;
|
LongJump.slotResetTicks = 0;
|
||||||
LongJump.slotReset = false;
|
LongJump.slotReset = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fireballTime > 0 && (System.currentTimeMillis() - fireballTime) > FIREBALL_TIMEOUT / 3) {
|
||||||
|
threwFireballLow = false;
|
||||||
|
ModuleManager.velocity.disableVelo = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (fireballTime > 0 && (System.currentTimeMillis() - fireballTime) > FIREBALL_TIMEOUT) {
|
if (fireballTime > 0 && (System.currentTimeMillis() - fireballTime) > FIREBALL_TIMEOUT) {
|
||||||
threwFireball = false;
|
threwFireball = threwFireballLow = false;
|
||||||
fireballTime = 0;
|
fireballTime = 0;
|
||||||
ModuleManager.velocity.disableVelo = false;
|
ModuleManager.velocity.disableVelo = false;
|
||||||
}
|
}
|
||||||
|
|
@ -165,8 +188,8 @@ public class ModuleUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ModuleManager.killAura.justUnTargeted) {
|
if (ModuleManager.killAura.justUnTargeted) {
|
||||||
if (++ModuleManager.killAura.unTargetTicks >= 2) {
|
if (++unTargetTicks >= 2) {
|
||||||
ModuleManager.killAura.unTargetTicks = 0;
|
unTargetTicks = 0;
|
||||||
ModuleManager.killAura.justUnTargeted = false;
|
ModuleManager.killAura.justUnTargeted = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -184,6 +207,7 @@ public class ModuleUtils {
|
||||||
else {
|
else {
|
||||||
inAirTicks = 19;
|
inAirTicks = 19;
|
||||||
}
|
}
|
||||||
|
groundTicks = !mc.thePlayer.onGround ? 0 : ++groundTicks;
|
||||||
|
|
||||||
// 7 tick needs to always finish the motion or itll lag back
|
// 7 tick needs to always finish the motion or itll lag back
|
||||||
if (!ModuleManager.bhop.isEnabled() && ModuleManager.bhop.mode.getInput() == 3 && ModuleManager.bhop.didMove) {
|
if (!ModuleManager.bhop.isEnabled() && ModuleManager.bhop.mode.getInput() == 3 && ModuleManager.bhop.didMove) {
|
||||||
|
|
|
||||||
|
|
@ -4,44 +4,74 @@ import net.minecraftforge.client.event.ClientChatReceivedEvent;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
|
||||||
public class Ping {
|
public class Ping {
|
||||||
private static boolean e = false;
|
private static boolean sendChat = false;
|
||||||
private static long s = 0L;
|
private static long sendTime = 0L;
|
||||||
|
// For chat commands
|
||||||
|
private static boolean sendChatCC = false;
|
||||||
|
private static long sendTimeCC = 0L;
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onChatMessageRecieved(ClientChatReceivedEvent event) {
|
public void onChatMessageRecieved(ClientChatReceivedEvent event) {
|
||||||
if (e && Utils.nullCheck()) {
|
if ((sendChat ^ sendChatCC) && Utils.nullCheck()) {
|
||||||
if (Utils.stripColor(event.message.getUnformattedText()).startsWith("Unknown")) {
|
if (Utils.stripColor(event.message.getUnformattedText()).startsWith("Unknown")) {
|
||||||
event.setCanceled(true);
|
event.setCanceled(true);
|
||||||
e = false;
|
this.getPing(sendChatCC);
|
||||||
this.getPing();
|
sendChat = false;
|
||||||
|
sendChatCC = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void checkPing() {
|
public static void checkPing(boolean isChat) {
|
||||||
|
if (isChat) {
|
||||||
|
Utils.sendMessage("&7[&fping&7] &7Checking...");
|
||||||
|
}
|
||||||
|
else {
|
||||||
Commands.print("§3Checking...", 1);
|
Commands.print("§3Checking...", 1);
|
||||||
if (e) {
|
}
|
||||||
|
if (sendChat) {
|
||||||
|
if (isChat) {
|
||||||
|
Utils.sendMessage("&7[&fping&7] &7Please wait.");
|
||||||
|
}
|
||||||
|
else {
|
||||||
Commands.print("§cPlease wait.", 0);
|
Commands.print("§cPlease wait.", 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
Utils.mc.thePlayer.sendChatMessage("/...");
|
Utils.mc.thePlayer.sendChatMessage("/...");
|
||||||
e = true;
|
if (isChat) {
|
||||||
s = System.currentTimeMillis();
|
sendChatCC = true;
|
||||||
|
sendTimeCC = System.currentTimeMillis();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
sendChat = true;
|
||||||
|
sendTime = System.currentTimeMillis();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void getPing() {
|
private void getPing(boolean isChat) {
|
||||||
int ping = (int) (System.currentTimeMillis() - s) - 20;
|
int ping = (int) (System.currentTimeMillis() - (isChat ? sendTimeCC : sendTime)) - 20;
|
||||||
if (ping < 0) {
|
if (ping < 0) {
|
||||||
ping = 0;
|
ping = 0;
|
||||||
}
|
}
|
||||||
|
if (isChat) {
|
||||||
|
Utils.sendMessage("&7[&fping&7] &7Your ping: &b" + ping + "&7ms.");
|
||||||
|
}
|
||||||
|
else {
|
||||||
Commands.print("Your ping: " + ping + "ms", 0);
|
Commands.print("Your ping: " + ping + "ms", 0);
|
||||||
rs();
|
}
|
||||||
|
reset(isChat);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void rs() {
|
public static void reset(boolean isChat) {
|
||||||
e = false;
|
if (isChat) {
|
||||||
s = 0L;
|
sendChatCC = false;
|
||||||
|
sendTimeCC = 0L;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
sendChat = false;
|
||||||
|
sendTime = 0L;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,32 @@ public class RenderUtils {
|
||||||
renderBox(blockPos.getX() + 0.0625F, blockPos.getY(), blockPos.getZ() + 0.0625F, 0.875f, 0.875f, 0.875f, color, outline, shade);
|
renderBox(blockPos.getX() + 0.0625F, blockPos.getY(), blockPos.getZ() + 0.0625F, 0.875f, 0.875f, 0.875f, color, outline, shade);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void drawPlayerBoundingBox(Vec3 pos, int color) {
|
||||||
|
GlStateManager.pushMatrix();
|
||||||
|
double x = pos.xCoord - mc.getRenderManager().viewerPosX;
|
||||||
|
double y = pos.yCoord - mc.getRenderManager().viewerPosY;
|
||||||
|
double z = pos.zCoord - mc.getRenderManager().viewerPosZ;
|
||||||
|
AxisAlignedBB bbox = mc.thePlayer.getEntityBoundingBox().expand(0.1D, 0.1, 0.1);
|
||||||
|
AxisAlignedBB axis = new AxisAlignedBB(bbox.minX - mc.thePlayer.posX + x, bbox.minY - mc.thePlayer.posY + y, bbox.minZ - mc.thePlayer.posZ + z, bbox.maxX - mc.thePlayer.posX + x, bbox.maxY - mc.thePlayer.posY + y, bbox.maxZ - mc.thePlayer.posZ + z);
|
||||||
|
float a = (float) (color >> 24 & 255) / 255.0F;
|
||||||
|
float r = (float) (color >> 16 & 255) / 255.0F;
|
||||||
|
float g = (float) (color >> 8 & 255) / 255.0F;
|
||||||
|
float b = (float) (color & 255) / 255.0F;
|
||||||
|
GL11.glBlendFunc(770, 771);
|
||||||
|
GL11.glEnable(3042);
|
||||||
|
GL11.glDisable(3553);
|
||||||
|
GL11.glDisable(2929);
|
||||||
|
GL11.glDepthMask(false);
|
||||||
|
GL11.glLineWidth(2.0F);
|
||||||
|
GL11.glColor4f(r, g, b, a);
|
||||||
|
drawBoundingBox(axis, r, g, b, a);
|
||||||
|
GL11.glEnable(3553);
|
||||||
|
GL11.glEnable(2929);
|
||||||
|
GL11.glDepthMask(true);
|
||||||
|
GL11.glDisable(3042);
|
||||||
|
GlStateManager.popMatrix();
|
||||||
|
}
|
||||||
|
|
||||||
public static void renderBlock(BlockPos blockPos, int color, double y2, boolean outline, boolean shade) {
|
public static void renderBlock(BlockPos blockPos, int color, double y2, boolean outline, boolean shade) {
|
||||||
renderBox(blockPos.getX(), blockPos.getY(), blockPos.getZ(), 1, y2, 1, color, outline, shade);
|
renderBox(blockPos.getX(), blockPos.getY(), blockPos.getZ(), 1, y2, 1, color, outline, shade);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,25 @@ public class RotationUtils {
|
||||||
return new float[] { yaw, pitch };
|
return new float[] { yaw, pitch };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static float[] getRotations(double posX, double posY, double posZ) {
|
||||||
|
double x = posX + 1.0 - mc.thePlayer.posX;
|
||||||
|
double y = posY + 1.0 - (mc.thePlayer.posY + mc.thePlayer.getEyeHeight());
|
||||||
|
double z = posZ + 1.0 - mc.thePlayer.posZ;
|
||||||
|
|
||||||
|
float angleToBlock = (float) (Math.atan2(z, x) * (180 / Math.PI)) - 90.0f;
|
||||||
|
float deltaYaw = MathHelper.wrapAngleTo180_float(angleToBlock - mc.thePlayer.rotationYaw);
|
||||||
|
float yaw = mc.thePlayer.rotationYaw + deltaYaw;
|
||||||
|
|
||||||
|
double distance = MathHelper.sqrt_double(x * x + z * z);
|
||||||
|
float angleToBlockPitch = (float) (-(Math.atan2(y, distance) * (180 / Math.PI)));
|
||||||
|
float deltaPitch = MathHelper.wrapAngleTo180_float(angleToBlockPitch - mc.thePlayer.rotationPitch);
|
||||||
|
float pitch = mc.thePlayer.rotationPitch + deltaPitch;
|
||||||
|
|
||||||
|
pitch = clampTo90(pitch);
|
||||||
|
|
||||||
|
return new float[] { yaw, pitch };
|
||||||
|
}
|
||||||
|
|
||||||
public static float[] getRotations(BlockPos blockPos, EnumFacing enumFacing) {
|
public static float[] getRotations(BlockPos blockPos, EnumFacing enumFacing) {
|
||||||
double x = blockPos.getX() + 0.5D;
|
double x = blockPos.getX() + 0.5D;
|
||||||
double y = blockPos.getY() + 0.5D;
|
double y = blockPos.getY() + 0.5D;
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import keystrokesmod.module.setting.impl.SliderSetting;
|
||||||
import net.minecraft.block.*;
|
import net.minecraft.block.*;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.entity.EntityPlayerSP;
|
import net.minecraft.client.entity.EntityPlayerSP;
|
||||||
|
import net.minecraft.client.gui.FontRenderer;
|
||||||
import net.minecraft.client.gui.inventory.GuiInventory;
|
import net.minecraft.client.gui.inventory.GuiInventory;
|
||||||
import net.minecraft.client.network.NetworkPlayerInfo;
|
import net.minecraft.client.network.NetworkPlayerInfo;
|
||||||
import net.minecraft.client.renderer.ActiveRenderInfo;
|
import net.minecraft.client.renderer.ActiveRenderInfo;
|
||||||
|
|
@ -440,9 +441,31 @@ public class Utils {
|
||||||
return ObfuscationReflectionHelper.getPrivateValue(Minecraft.class, Minecraft.getMinecraft(), "timer", "field_71428_T");
|
return ObfuscationReflectionHelper.getPrivateValue(Minecraft.class, Minecraft.getMinecraft(), "timer", "field_71428_T");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getHitsToKill(final EntityPlayer entityPlayer, final ItemStack itemStack) {
|
public static double getHitsToKill(final EntityPlayer target, final ItemStack usedItem) {
|
||||||
final int n = (int)Math.ceil(ap(entityPlayer, itemStack));
|
double heldItemDamageLevel = 1.0;
|
||||||
return "§" + ((n <= 1) ? "c" : ((n <= 3) ? "6" : ((n <= 5) ? "e" : "a"))) + n;
|
if (usedItem != null && (usedItem.getItem() instanceof ItemSword || usedItem.getItem() instanceof ItemAxe)) {
|
||||||
|
heldItemDamageLevel += getDamageLevel(usedItem);
|
||||||
|
}
|
||||||
|
double armorProtPercentage = 0.0;
|
||||||
|
double totalEPF = 0.0;
|
||||||
|
for (int i = 0; i < 4; ++i) {
|
||||||
|
final ItemStack stack = target.inventory.armorItemInSlot(i);
|
||||||
|
if (stack != null) {
|
||||||
|
if (stack.getItem() instanceof ItemArmor) {
|
||||||
|
armorProtPercentage += ((ItemArmor)stack.getItem()).damageReduceAmount * 0.04;
|
||||||
|
final int protLevel = EnchantmentHelper.getEnchantmentLevel(Enchantment.protection.effectId, stack);
|
||||||
|
if (protLevel != 0) {
|
||||||
|
final double epf = Math.floor(0.75 * (6 + protLevel * protLevel) / 3.0);
|
||||||
|
totalEPF += epf;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
totalEPF = 0.04 * Math.min(Math.ceil(Math.min(totalEPF, 25.0) * 0.75), 20.0);
|
||||||
|
final double armorReduction = armorProtPercentage + totalEPF * (1.0 - armorProtPercentage);
|
||||||
|
final double damage = heldItemDamageLevel * (1.0 - armorReduction);
|
||||||
|
final double hitsToKill = getCompleteHealth(target) / damage;
|
||||||
|
return round(hitsToKill, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static double ap(final EntityPlayer entityPlayer, final ItemStack itemStack) {
|
public static double ap(final EntityPlayer entityPlayer, final ItemStack itemStack) {
|
||||||
|
|
@ -519,14 +542,28 @@ public class Utils {
|
||||||
public static boolean isTeamMate(Entity entity) {
|
public static boolean isTeamMate(Entity entity) {
|
||||||
try {
|
try {
|
||||||
Entity teamMate = entity;
|
Entity teamMate = entity;
|
||||||
if (mc.thePlayer.isOnSameTeam((EntityLivingBase) entity) || mc.thePlayer.getDisplayName().getUnformattedText().startsWith(teamMate.getDisplayName().getUnformattedText().substring(0, 2))) {
|
if (mc.thePlayer.isOnSameTeam((EntityLivingBase) entity) || mc.thePlayer.getDisplayName().getUnformattedText().startsWith(teamMate.getDisplayName().getUnformattedText().substring(0, 2)) || getNetworkDisplayName().startsWith(teamMate.getDisplayName().getUnformattedText().substring(0, 2))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
|
||||||
}
|
}
|
||||||
|
catch (Exception ignored) {}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getNetworkDisplayName() {
|
||||||
|
try {
|
||||||
|
NetworkPlayerInfo playerInfo = mc.getNetHandler().getPlayerInfo(mc.thePlayer.getUniqueID());
|
||||||
|
return ScorePlayerTeam.formatPlayerName(playerInfo.getPlayerTeam(), playerInfo.getGameProfile().getName());
|
||||||
|
}
|
||||||
|
catch (Exception ignored) {}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getHitsToKillStr(final EntityPlayer entityPlayer, final ItemStack itemStack) {
|
||||||
|
final int n = (int)Math.ceil(getHitsToKill(entityPlayer, itemStack));
|
||||||
|
return "§" + ((n <= 1) ? "c" : ((n <= 3) ? "6" : ((n <= 5) ? "e" : "a"))) + n;
|
||||||
|
}
|
||||||
|
|
||||||
public static void setSpeed(double n) {
|
public static void setSpeed(double n) {
|
||||||
if (n == 0.0) {
|
if (n == 0.0) {
|
||||||
mc.thePlayer.motionZ = 0.0;
|
mc.thePlayer.motionZ = 0.0;
|
||||||
|
|
@ -1259,7 +1296,60 @@ public class Utils {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int getColorFromEntity(Entity entity) {
|
||||||
|
if (entity instanceof EntityPlayer) {
|
||||||
|
ScorePlayerTeam scoreplayerteam = (ScorePlayerTeam)((EntityLivingBase) entity).getTeam();
|
||||||
|
if (scoreplayerteam != null) {
|
||||||
|
String s = FontRenderer.getFormatFromString(scoreplayerteam.getColorPrefix());
|
||||||
|
if (s.length() >= 2) {
|
||||||
|
return mc.getRenderManager().getFontRenderer().getColorCode(s.charAt(1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String displayName = entity.getDisplayName().getFormattedText();
|
||||||
|
displayName = Utils.removeFormatCodes(displayName);
|
||||||
|
if (displayName.isEmpty() || !displayName.startsWith("§") || displayName.charAt(1) == 'f') {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
switch (displayName.charAt(1)) {
|
||||||
|
case '0':
|
||||||
|
return -16777216;
|
||||||
|
case '1':
|
||||||
|
return -16777046;
|
||||||
|
case '2':
|
||||||
|
return -16733696;
|
||||||
|
case '3':
|
||||||
|
return -16733526;
|
||||||
|
case '4':
|
||||||
|
return -5636096;
|
||||||
|
case '5':
|
||||||
|
return -5635926;
|
||||||
|
case '6':
|
||||||
|
return -22016;
|
||||||
|
case '7':
|
||||||
|
return -5592406;
|
||||||
|
case '8':
|
||||||
|
return -11184811;
|
||||||
|
case '9':
|
||||||
|
return -11184641;
|
||||||
|
case 'a':
|
||||||
|
return -11141291;
|
||||||
|
case 'b':
|
||||||
|
return -11141121;
|
||||||
|
case 'c':
|
||||||
|
return -43691;
|
||||||
|
case 'd':
|
||||||
|
return -43521;
|
||||||
|
case 'e':
|
||||||
|
return -171;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
public static double getDamageLevel(ItemStack itemStack) {
|
public static double getDamageLevel(ItemStack itemStack) {
|
||||||
|
if (itemStack == null) {
|
||||||
|
return 0.0;
|
||||||
|
}
|
||||||
double baseDamage = 0.0;
|
double baseDamage = 0.0;
|
||||||
for (final Map.Entry<String, AttributeModifier> entry : itemStack.getAttributeModifiers().entries()) {
|
for (final Map.Entry<String, AttributeModifier> entry : itemStack.getAttributeModifiers().entries()) {
|
||||||
if (entry.getKey().equals("generic.attackDamage")) {
|
if (entry.getKey().equals("generic.attackDamage")) {
|
||||||
|
|
@ -1272,7 +1362,6 @@ public class Utils {
|
||||||
return baseDamage + sharp_level * 1.25 + (fire_level * 4 - 1);
|
return baseDamage + sharp_level * 1.25 + (fire_level * 4 - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static boolean canBePlaced(ItemBlock itemBlock) {
|
public static boolean canBePlaced(ItemBlock itemBlock) {
|
||||||
Block block = itemBlock.getBlock();
|
Block block = itemBlock.getBlock();
|
||||||
if (block == null) {
|
if (block == null) {
|
||||||
|
|
|
||||||
|
|
@ -28,15 +28,15 @@ public abstract class Command {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void chat(String msg) {
|
|
||||||
Utils.sendMessage(ModuleManager.lowercaseChatCommands() ? msg.toLowerCase() : msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void chatWithPrefix(String msg) {
|
protected void chatWithPrefix(String msg) {
|
||||||
Utils.sendMessage("&7[&f" + this.command + "&7] &r" + (ModuleManager.lowercaseChatCommands() ? msg.toLowerCase() : msg));
|
Utils.sendMessage("&7[&f" + this.command + "&7] &r" + (ModuleManager.lowercaseChatCommands() ? msg.toLowerCase() : msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void chat(String msg) {
|
||||||
|
Utils.sendMessage(ModuleManager.lowercaseChatCommands() ? msg.toLowerCase() : msg);
|
||||||
|
}
|
||||||
|
|
||||||
protected void syntaxError() {
|
protected void syntaxError() {
|
||||||
Utils.sendMessage("§csyntax error");
|
Utils.sendMessage("§cSyntax error");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,11 @@ public class CommandManager {
|
||||||
registerCommand(new Name());
|
registerCommand(new Name());
|
||||||
registerCommand(new Binds());
|
registerCommand(new Binds());
|
||||||
registerCommand(new Cname());
|
registerCommand(new Cname());
|
||||||
|
registerCommand(new Debug());
|
||||||
registerCommand(new Friend());
|
registerCommand(new Friend());
|
||||||
registerCommand(new Enemy());
|
registerCommand(new Enemy());
|
||||||
|
registerCommand(new Profiles());
|
||||||
registerCommand(new Q());
|
registerCommand(new Q());
|
||||||
registerCommand(new QList());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void executeCommand(String input) {
|
public void executeCommand(String input) {
|
||||||
|
|
@ -43,7 +44,7 @@ public class CommandManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.sendMessage("§cunknown command. use .help for a list of commands.");
|
Utils.sendMessage("§cUnknown command. Use .help for a list of commands.");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean autoComplete(String input) {
|
public boolean autoComplete(String input) {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ public class Cname extends Command {
|
||||||
public void onExecute(String[] args) {
|
public void onExecute(String[] args) {
|
||||||
if (args.length == 2) {
|
if (args.length == 2) {
|
||||||
NameHider.fakeName = args[1];
|
NameHider.fakeName = args[1];
|
||||||
chat("&7[&fcname&7] &7Name has been set to &b" + NameHider.fakeName + "&7.");
|
chatWithPrefix("&7Name has been set to &b" + NameHider.fakeName + "&7.");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
syntaxError();
|
syntaxError();
|
||||||
|
|
|
||||||
|
|
@ -5,19 +5,22 @@ import keystrokesmod.utility.command.Command;
|
||||||
|
|
||||||
public class Enemy extends Command {
|
public class Enemy extends Command {
|
||||||
public Enemy() {
|
public Enemy() {
|
||||||
super("Enemy");
|
super("enemy", new String[] { "enemy", "e" });
|
||||||
}
|
}
|
||||||
|
|
||||||
private String ign;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onExecute(String[] args) {
|
public void onExecute(String[] args) {
|
||||||
if (args.length == 2) {
|
if (args.length == 2) {
|
||||||
ign = args[1];
|
if (args[1].equals("clear")) {
|
||||||
if (Utils.isEnemy(ign)) {
|
chatWithPrefix("&b" + Utils.enemies.size() + " &7enem" + (Utils.enemies.size() == 1 ? "y" : "ies") + " cleared.");
|
||||||
Utils.removeEnemy(ign);
|
Utils.enemies.clear();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean added = Utils.addEnemy(args[1]);
|
||||||
|
if (!added) {
|
||||||
|
Utils.removeEnemy(args[1]);
|
||||||
}
|
}
|
||||||
else Utils.addEnemy(ign);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
syntaxError();
|
syntaxError();
|
||||||
|
|
|
||||||
|
|
@ -5,19 +5,22 @@ import keystrokesmod.utility.command.Command;
|
||||||
|
|
||||||
public class Friend extends Command {
|
public class Friend extends Command {
|
||||||
public Friend() {
|
public Friend() {
|
||||||
super("Friend");
|
super("friend", new String[] { "friend", "f" });
|
||||||
}
|
}
|
||||||
|
|
||||||
private String ign;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onExecute(String[] args) {
|
public void onExecute(String[] args) {
|
||||||
if (args.length == 2) {
|
if (args.length == 2) {
|
||||||
ign = args[1];
|
if (args[1].equals("clear")) {
|
||||||
if (Utils.isFriended(ign)) {
|
chatWithPrefix("&b" + Utils.friends.size() + " &7friend" + (Utils.friends.size() == 1 ? "" : "s") + " cleared.");
|
||||||
Utils.removeFriend(ign);
|
Utils.friends.clear();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean added = Utils.addFriend(args[1]);
|
||||||
|
if (!added) {
|
||||||
|
Utils.removeFriend(args[1]);
|
||||||
}
|
}
|
||||||
else Utils.addFriend(ign);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
syntaxError();
|
syntaxError();
|
||||||
|
|
|
||||||
|
|
@ -9,16 +9,19 @@ public class Help extends Command {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onExecute(String[] args) {
|
public void onExecute(String[] args) {
|
||||||
chat("&7[&fhelp&7] Chat commands - &dGeneral");
|
chatWithPrefix("&7Chat commands - &dGeneral");
|
||||||
chat(" &b.(ign/name) &7Copy your username.");
|
chat(" &b.ign/name &7Copy your username.");
|
||||||
chat(" &b.ping &7Estimate your ping.");
|
chat(" &b.ping &7Estimate your ping.");
|
||||||
chat(" &b.q [gamemode] &7Queue a mode");
|
chat(" &b.friend/enemy [name/clear] &7Adds as enemy/friend.");
|
||||||
chat(" &b.qlist &7List queueable modes");
|
chat(" &b.q [mode] &7Queues a gamemode.");
|
||||||
chat("&7---------------------------");
|
chatWithPrefix("&7Chat commands - &dModules");
|
||||||
chat("&7[&fhelp&7] Chat commands - &dModules");
|
|
||||||
chat(" &b.cname [name] &7Set name hider name.");
|
chat(" &b.cname [name] &7Set name hider name.");
|
||||||
chat(" &b.binds (key) &7List module binds.");
|
chat(" &b.binds (key) &7List module binds.");
|
||||||
chat(" &b.friend [name] &7Add/Remove somebody as a friend");
|
chatWithPrefix("&7Chat commands - &dProfiles");
|
||||||
chat(" &b.enemy [name] &7Add/Remove somebody as a enemy");
|
chat(" &b.profiles &7List loaded profiles.");
|
||||||
|
chat(" &b.profiles save (name) &7Save current settings as a profile.");
|
||||||
|
chat(" &b.profiles load [name] &7Load a profile.");
|
||||||
|
chat(" &b.profiles delete [name] &7Delete a profile.");
|
||||||
|
chat(" &b.profiles rename [oldname] [newname] &7Rename a profile.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,6 @@ public class Name extends Command {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Utils.addToClipboard(mc.thePlayer.getName());
|
Utils.addToClipboard(mc.thePlayer.getName());
|
||||||
chat("&7[&fname&7] Copied &b" + mc.thePlayer.getName() + " &7to clipboard");
|
chatWithPrefix("&7Copied &b" + mc.thePlayer.getName() + " &7to clipboard");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,6 @@ public class Ping extends Command {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onExecute(String[] args) {
|
public void onExecute(String[] args) {
|
||||||
keystrokesmod.utility.Ping.checkPing();
|
keystrokesmod.utility.Ping.checkPing(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
||||||
package keystrokesmod.utility.command.impl;
|
|
||||||
|
|
||||||
import keystrokesmod.utility.Utils;
|
|
||||||
import keystrokesmod.utility.command.Command;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class QList extends Command {
|
|
||||||
public QList() {
|
|
||||||
super("QList");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onExecute(String[] args) {
|
|
||||||
Utils.print("Hi");
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, String> hypixelPlayCommands = new HashMap<>();
|
|
||||||
{hypixelPlayCommands.put("p", "bedwars_practice");
|
|
||||||
hypixelPlayCommands.put("1", "bedwars_eight_one");
|
|
||||||
hypixelPlayCommands.put("2", "bedwars_eight_two");
|
|
||||||
hypixelPlayCommands.put("3", "bedwars_four_three");
|
|
||||||
hypixelPlayCommands.put("4", "bedwars_four_four");
|
|
||||||
hypixelPlayCommands.put("4v4", "bedwars_two_four");
|
|
||||||
hypixelPlayCommands.put("2t", "bedwars_eight_two_tourney");
|
|
||||||
hypixelPlayCommands.put("2un", "bedwars_eight_two_towerUnderworld");
|
|
||||||
hypixelPlayCommands.put("4un", "bedwars_four_four_towerUnderworld");
|
|
||||||
hypixelPlayCommands.put("2r", "bedwars_eight_two_rush");
|
|
||||||
hypixelPlayCommands.put("4r", "bedwars_four_four_rush");
|
|
||||||
hypixelPlayCommands.put("pit", "pit");
|
|
||||||
hypixelPlayCommands.put("swsn", "solo_normal");
|
|
||||||
hypixelPlayCommands.put("swsi", "solo_insane");
|
|
||||||
hypixelPlayCommands.put("swtn", "teams_normal");
|
|
||||||
hypixelPlayCommands.put("swti", "teams_insane");
|
|
||||||
hypixelPlayCommands.put("bowd", "duels_bow_duel");
|
|
||||||
hypixelPlayCommands.put("classicduel", "duels_classic_duel");
|
|
||||||
hypixelPlayCommands.put("opduel", "duels_op_duel");
|
|
||||||
hypixelPlayCommands.put("uhcduel", "duels_uhc_duel");
|
|
||||||
hypixelPlayCommands.put("bridgeduel", "duels_bridge_duel");
|
|
||||||
hypixelPlayCommands.put("uhc", "uhc_solo");
|
|
||||||
hypixelPlayCommands.put("uhcteams", "uhc_teams");
|
|
||||||
hypixelPlayCommands.put("grinch", "arcade_grinch_simulator_v2");
|
|
||||||
hypixelPlayCommands.put("grinchtourney", "arcade_grinch_simulator_v2_tourney");
|
|
||||||
hypixelPlayCommands.put("mm", "murder_classic");
|
|
||||||
hypixelPlayCommands.put("castle", "bedwars_castle");
|
|
||||||
// wool games
|
|
||||||
hypixelPlayCommands.put("ww", "wool_wool_wars_two_four");
|
|
||||||
hypixelPlayCommands.put("ctw", "wool_capture_the_wool_two_twenty");
|
|
||||||
}
|
|
||||||
String playCommand = "", gameMode = "";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -2,9 +2,12 @@ package keystrokesmod.utility.profile;
|
||||||
|
|
||||||
import com.google.gson.*;
|
import com.google.gson.*;
|
||||||
import keystrokesmod.Raven;
|
import keystrokesmod.Raven;
|
||||||
|
import keystrokesmod.clickgui.ClickGui;
|
||||||
import keystrokesmod.clickgui.components.impl.CategoryComponent;
|
import keystrokesmod.clickgui.components.impl.CategoryComponent;
|
||||||
import keystrokesmod.module.Module;
|
import keystrokesmod.module.Module;
|
||||||
import keystrokesmod.module.ModuleManager;
|
import keystrokesmod.module.ModuleManager;
|
||||||
|
import keystrokesmod.module.impl.client.Gui;
|
||||||
|
import keystrokesmod.module.impl.client.Settings;
|
||||||
import keystrokesmod.module.impl.movement.Sprint;
|
import keystrokesmod.module.impl.movement.Sprint;
|
||||||
import keystrokesmod.module.impl.render.HUD;
|
import keystrokesmod.module.impl.render.HUD;
|
||||||
import keystrokesmod.module.impl.render.TargetHUD;
|
import keystrokesmod.module.impl.render.TargetHUD;
|
||||||
|
|
@ -22,6 +25,7 @@ import java.io.FileWriter;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class ProfileManager {
|
public class ProfileManager {
|
||||||
public static Minecraft mc = Minecraft.getMinecraft();
|
public static Minecraft mc = Minecraft.getMinecraft();
|
||||||
|
|
@ -93,6 +97,11 @@ public class ProfileManager {
|
||||||
moduleInformation.addProperty("posY", ModuleManager.sprint.posY);
|
moduleInformation.addProperty("posY", ModuleManager.sprint.posY);
|
||||||
moduleInformation.addProperty("text", ModuleManager.sprint.text);
|
moduleInformation.addProperty("text", ModuleManager.sprint.text);
|
||||||
}
|
}
|
||||||
|
else if (module instanceof Gui) {
|
||||||
|
for (CategoryComponent c : ClickGui.categories) {
|
||||||
|
moduleInformation.addProperty(c.category.name(), c.x + "," + c.y + "," + c.opened);
|
||||||
|
}
|
||||||
|
}
|
||||||
for (Setting setting : module.getSettings()) {
|
for (Setting setting : module.getSettings()) {
|
||||||
if (setting instanceof ButtonSetting && !((ButtonSetting) setting).isMethodButton) {
|
if (setting instanceof ButtonSetting && !((ButtonSetting) setting).isMethodButton) {
|
||||||
moduleInformation.addProperty(setting.getName(), ((ButtonSetting) setting).isToggled());
|
moduleInformation.addProperty(setting.getName(), ((ButtonSetting) setting).isToggled());
|
||||||
|
|
@ -143,6 +152,7 @@ public class ProfileManager {
|
||||||
failedMessage("load", name);
|
failedMessage("load", name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
boolean currentProfileGuiSave = Settings.loadGuiPositions.isToggled();
|
||||||
for (JsonElement moduleJson : modules) {
|
for (JsonElement moduleJson : modules) {
|
||||||
JsonObject moduleInformation = moduleJson.getAsJsonObject();
|
JsonObject moduleInformation = moduleJson.getAsJsonObject();
|
||||||
String moduleName = moduleInformation.get("name").getAsString();
|
String moduleName = moduleInformation.get("name").getAsString();
|
||||||
|
|
@ -217,6 +227,31 @@ public class ProfileManager {
|
||||||
ModuleManager.sprint.text = text;
|
ModuleManager.sprint.text = text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (currentProfileGuiSave && module.getName().equals("Gui")) {
|
||||||
|
for (Map.Entry<String, JsonElement> setting : moduleInformation.entrySet()) {
|
||||||
|
String settingName = setting.getKey();
|
||||||
|
if (!Module.categoriesString.contains(settingName)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
String element = setting.getValue().getAsString();
|
||||||
|
String[] statesStr = element.split(",");
|
||||||
|
|
||||||
|
int posX = Integer.parseInt(statesStr[0]);
|
||||||
|
int posY = Integer.parseInt(statesStr[1]);
|
||||||
|
|
||||||
|
for (CategoryComponent c : ClickGui.categories) {
|
||||||
|
if (c.category.name().equals(settingName)) {
|
||||||
|
c.setX(posX, true);
|
||||||
|
c.setY(posY, true);
|
||||||
|
if (statesStr.length > 2) {
|
||||||
|
boolean opened = Boolean.parseBoolean(statesStr[2]);
|
||||||
|
c.opened = opened;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (Setting setting : module.getSettings()) {
|
for (Setting setting : module.getSettings()) {
|
||||||
setting.loadProfile(moduleInformation);
|
setting.loadProfile(moduleInformation);
|
||||||
|
|
@ -279,7 +314,7 @@ public class ProfileManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (CategoryComponent categoryComponent : Raven.clickGui.categories) {
|
for (CategoryComponent categoryComponent : Raven.clickGui.categories) {
|
||||||
if (categoryComponent.categoryName == Module.category.profiles) {
|
if (categoryComponent.category == Module.category.profiles) {
|
||||||
categoryComponent.reloadModules(true);
|
categoryComponent.reloadModules(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import keystrokesmod.clickgui.ClickGui;
|
||||||
import keystrokesmod.module.Module;
|
import keystrokesmod.module.Module;
|
||||||
import keystrokesmod.module.impl.client.Settings;
|
import keystrokesmod.module.impl.client.Settings;
|
||||||
import keystrokesmod.module.setting.impl.ButtonSetting;
|
import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||||
|
import keystrokesmod.utility.ModuleUtils;
|
||||||
import keystrokesmod.utility.Utils;
|
import keystrokesmod.utility.Utils;
|
||||||
|
|
||||||
public class ProfileModule extends Module {
|
public class ProfileModule extends Module {
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@
|
||||||
"network.MixinNetHandlerPlayClient",
|
"network.MixinNetHandlerPlayClient",
|
||||||
"render.MixinRenderManager",
|
"render.MixinRenderManager",
|
||||||
"render.MixinCustomSky",
|
"render.MixinCustomSky",
|
||||||
|
"client.MixinPlayerControllerMP",
|
||||||
|
|
||||||
"accessor.IAccessorEntityPlayerSP",
|
"accessor.IAccessorEntityPlayerSP",
|
||||||
"accessor.IAccessorEntityArrow",
|
"accessor.IAccessorEntityArrow",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue