This commit is contained in:
parent
95e9a0e77f
commit
7340d2207b
|
|
@ -5,16 +5,17 @@ import java.util.concurrent.Executors;
|
||||||
import java.util.concurrent.ScheduledExecutorService;
|
import java.util.concurrent.ScheduledExecutorService;
|
||||||
|
|
||||||
import keystrokesmod.event.PostProfileLoadEvent;
|
import keystrokesmod.event.PostProfileLoadEvent;
|
||||||
|
import keystrokesmod.event.PostSetSliderEvent;
|
||||||
import keystrokesmod.keystroke.KeySrokeRenderer;
|
import keystrokesmod.keystroke.KeySrokeRenderer;
|
||||||
import keystrokesmod.keystroke.KeyStrokeConfigGui;
|
import keystrokesmod.keystroke.KeyStrokeConfigGui;
|
||||||
import keystrokesmod.keystroke.keystrokeCommand;
|
import keystrokesmod.keystroke.keystrokeCommand;
|
||||||
import keystrokesmod.module.Module;
|
import keystrokesmod.module.Module;
|
||||||
import keystrokesmod.clickgui.ClickGui;
|
import keystrokesmod.clickgui.ClickGui;
|
||||||
import keystrokesmod.module.ModuleManager;
|
import keystrokesmod.module.ModuleManager;
|
||||||
|
import keystrokesmod.script.ScriptDefaults;
|
||||||
|
import keystrokesmod.script.ScriptManager;
|
||||||
import keystrokesmod.script.classes.Entity;
|
import keystrokesmod.script.classes.Entity;
|
||||||
import keystrokesmod.script.classes.NetworkPlayer;
|
import keystrokesmod.script.classes.NetworkPlayer;
|
||||||
import keystrokesmod.utility.ModuleUtils;
|
|
||||||
import keystrokesmod.script.ScriptManager;
|
|
||||||
import keystrokesmod.utility.*;
|
import keystrokesmod.utility.*;
|
||||||
import keystrokesmod.utility.command.CommandManager;
|
import keystrokesmod.utility.command.CommandManager;
|
||||||
import keystrokesmod.utility.profile.Profile;
|
import keystrokesmod.utility.profile.Profile;
|
||||||
|
|
@ -23,7 +24,6 @@ import net.minecraft.client.Minecraft;
|
||||||
import net.minecraftforge.client.ClientCommandHandler;
|
import net.minecraftforge.client.ClientCommandHandler;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
|
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
|
||||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
import net.minecraftforge.fml.common.Mod.EventHandler;
|
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||||
|
|
@ -31,12 +31,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent;
|
import net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent;
|
||||||
import net.minecraftforge.fml.common.gameevent.TickEvent.Phase;
|
import net.minecraftforge.fml.common.gameevent.TickEvent.Phase;
|
||||||
|
|
||||||
@Mod(
|
@Mod(modid = "keystrokes", name = "KeystrokesMod", version = "KMV5", acceptedMinecraftVersions = "[1.8.9]")
|
||||||
modid = "keystrokes",
|
|
||||||
name = "KeystrokesMod",
|
|
||||||
version = "KMV5",
|
|
||||||
acceptedMinecraftVersions = "[1.8.9]"
|
|
||||||
)
|
|
||||||
public class Raven {
|
public class Raven {
|
||||||
public static boolean debug = false;
|
public static boolean debug = false;
|
||||||
public static Minecraft mc = Minecraft.getMinecraft();
|
public static Minecraft mc = Minecraft.getMinecraft();
|
||||||
|
|
@ -63,19 +58,20 @@ public class Raven {
|
||||||
Runtime.getRuntime().addShutdownHook(new Thread(cachedExecutor::shutdown));
|
Runtime.getRuntime().addShutdownHook(new Thread(cachedExecutor::shutdown));
|
||||||
ClientCommandHandler.instance.registerCommand(new keystrokeCommand());
|
ClientCommandHandler.instance.registerCommand(new keystrokeCommand());
|
||||||
MinecraftForge.EVENT_BUS.register(this);
|
MinecraftForge.EVENT_BUS.register(this);
|
||||||
MinecraftForge.EVENT_BUS.register(new DebugInfoRenderer());
|
MinecraftForge.EVENT_BUS.register(new Debugger());
|
||||||
MinecraftForge.EVENT_BUS.register(new CPSCalculator());
|
MinecraftForge.EVENT_BUS.register(new CPSCalculator());
|
||||||
MinecraftForge.EVENT_BUS.register(new MovementFix(mc));
|
MinecraftForge.EVENT_BUS.register(new MovementFix(this.mc));
|
||||||
MinecraftForge.EVENT_BUS.register(new KeySrokeRenderer());
|
MinecraftForge.EVENT_BUS.register(new KeySrokeRenderer());
|
||||||
MinecraftForge.EVENT_BUS.register(new Ping());
|
MinecraftForge.EVENT_BUS.register(new Ping());
|
||||||
MinecraftForge.EVENT_BUS.register(packetsHandler = new PacketsHandler());
|
MinecraftForge.EVENT_BUS.register(packetsHandler = new PacketsHandler());
|
||||||
MinecraftForge.EVENT_BUS.register(new ModuleUtils(mc));
|
MinecraftForge.EVENT_BUS.register(new ModuleUtils(this.mc));
|
||||||
Reflection.getFields();
|
Reflection.getFields();
|
||||||
moduleManager.register();
|
moduleManager.register();
|
||||||
scriptManager = new ScriptManager();
|
scriptManager = new ScriptManager();
|
||||||
keySrokeRenderer = new KeySrokeRenderer();
|
keySrokeRenderer = new KeySrokeRenderer();
|
||||||
clickGui = new ClickGui();
|
clickGui = new ClickGui();
|
||||||
profileManager = new ProfileManager();
|
profileManager = new ProfileManager();
|
||||||
|
ScriptDefaults.reloadModules();
|
||||||
scriptManager.loadScripts();
|
scriptManager.loadScripts();
|
||||||
profileManager.loadProfiles();
|
profileManager.loadProfiles();
|
||||||
profileManager.loadProfile("default");
|
profileManager.loadProfile("default");
|
||||||
|
|
@ -83,7 +79,6 @@ public class Raven {
|
||||||
MinecraftForge.EVENT_BUS.register(ModuleManager.scaffold);
|
MinecraftForge.EVENT_BUS.register(ModuleManager.scaffold);
|
||||||
MinecraftForge.EVENT_BUS.register(ModuleManager.tower);
|
MinecraftForge.EVENT_BUS.register(ModuleManager.tower);
|
||||||
commandManager = new CommandManager();
|
commandManager = new CommandManager();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
|
|
@ -93,6 +88,9 @@ public class Raven {
|
||||||
if (mc.thePlayer.ticksExisted % 6000 == 0) { // reset cache every 5 minutes
|
if (mc.thePlayer.ticksExisted % 6000 == 0) { // reset cache every 5 minutes
|
||||||
Entity.clearCache();
|
Entity.clearCache();
|
||||||
NetworkPlayer.clearCache();
|
NetworkPlayer.clearCache();
|
||||||
|
if (Debugger.BACKGROUND) {
|
||||||
|
Utils.sendMessage("&aticks % 6000 == 0 &7reached, clearing script caches. (&dEntity&7, &dNetworkPlayer&7)");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (Reflection.sendMessage) {
|
if (Reflection.sendMessage) {
|
||||||
Utils.sendMessage("&cThere was an error, relaunch the game.");
|
Utils.sendMessage("&cThere was an error, relaunch the game.");
|
||||||
|
|
@ -111,9 +109,6 @@ public class Raven {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mc.currentScreen == null) {
|
if (mc.currentScreen == null) {
|
||||||
for (Profile profile : Raven.profileManager.profiles) {
|
|
||||||
profile.getModule().onKeyBind();
|
|
||||||
}
|
|
||||||
for (Module module : Raven.scriptManager.scripts.values()) {
|
for (Module module : Raven.scriptManager.scripts.values()) {
|
||||||
module.onKeyBind();
|
module.onKeyBind();
|
||||||
}
|
}
|
||||||
|
|
@ -134,6 +129,16 @@ public class Raven {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void onPostProfileLoad(PostProfileLoadEvent e) {
|
||||||
|
clickGui.onSliderChange();
|
||||||
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void onPostSetSlider(PostSetSliderEvent e) {
|
||||||
|
clickGui.onSliderChange();
|
||||||
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onEntityJoinWorld(EntityJoinWorldEvent e) {
|
public void onEntityJoinWorld(EntityJoinWorldEvent e) {
|
||||||
if (e.entity == mc.thePlayer) {
|
if (e.entity == mc.thePlayer) {
|
||||||
|
|
@ -143,14 +148,12 @@ public class Raven {
|
||||||
}
|
}
|
||||||
Entity.clearCache();
|
Entity.clearCache();
|
||||||
NetworkPlayer.clearCache();
|
NetworkPlayer.clearCache();
|
||||||
|
if (Debugger.BACKGROUND) {
|
||||||
|
Utils.sendMessage("&enew world&7, clearing script caches. (&dEntity&7, &dNetworkPlayer&7)");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public void onPostProfileLoad(PostProfileLoadEvent e) {
|
|
||||||
clickGui.onProfileLoad();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ModuleManager getModuleManager() {
|
public static ModuleManager getModuleManager() {
|
||||||
return moduleManager;
|
return moduleManager;
|
||||||
}
|
}
|
||||||
|
|
@ -170,4 +173,4 @@ public class Raven {
|
||||||
public static void toggleKeyStrokeConfigGui() {
|
public static void toggleKeyStrokeConfigGui() {
|
||||||
isKeyStrokeConfigGuiToggled = true;
|
isKeyStrokeConfigGuiToggled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -89,7 +89,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.opened;
|
||||||
this.previousScale = (int) Gui.guiScale.getInput();
|
this.previousScale = (int) Gui.guiScale.getInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -142,17 +142,17 @@ public class ClickGui extends GuiScreen {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (CommandLine.a) {
|
if (CommandLine.opened) {
|
||||||
if (!this.commandLineSend.visible) {
|
if (!this.commandLineSend.visible) {
|
||||||
this.commandLineSend.visible = true;
|
this.commandLineSend.visible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
r = CommandLine.animate.isToggled() ? CommandLine.an.getValueInt(0, 200, 2) : 200;
|
r = CommandLine.animate.isToggled() ? CommandLine.animation.getValueInt(0, 200, 2) : 200;
|
||||||
if (CommandLine.b) {
|
if (CommandLine.closed) {
|
||||||
r = 200 - r;
|
r = 200 - r;
|
||||||
if (r == 0) {
|
if (r == 0) {
|
||||||
CommandLine.b = false;
|
CommandLine.closed = false;
|
||||||
CommandLine.a = false;
|
CommandLine.opened = false;
|
||||||
this.commandLineSend.visible = false;
|
this.commandLineSend.visible = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -167,62 +167,66 @@ public class ClickGui extends GuiScreen {
|
||||||
this.commandLineInput.drawTextBox();
|
this.commandLineInput.drawTextBox();
|
||||||
super.drawScreen(x, y, p);
|
super.drawScreen(x, y, p);
|
||||||
}
|
}
|
||||||
else if (CommandLine.b) {
|
else if (CommandLine.closed) {
|
||||||
CommandLine.b = false;
|
CommandLine.closed = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void mouseClicked(int x, int y, int m) throws IOException {
|
public void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {
|
||||||
Iterator var4 = categories.iterator();
|
if (mouseButton == 0) {
|
||||||
|
boolean draggingAssigned = false;
|
||||||
while (true) {
|
for (int i = categories.size() - 1; i >= 0; i--) {
|
||||||
CategoryComponent category;
|
CategoryComponent category = categories.get(i);
|
||||||
do {
|
if (!draggingAssigned && category.draggable(mouseX, mouseY)) {
|
||||||
do {
|
category.overTitle(true);
|
||||||
if (!var4.hasNext()) {
|
category.xx = mouseX - category.getX();
|
||||||
if (CommandLine.a) {
|
category.yy = mouseY - category.getY();
|
||||||
this.commandLineInput.mouseClicked(x, y, m);
|
category.dragging = true;
|
||||||
super.mouseClicked(x, y, m);
|
draggingAssigned = true;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
return;
|
category.overTitle(false);
|
||||||
}
|
|
||||||
|
|
||||||
category = (CategoryComponent) var4.next();
|
|
||||||
if (category.v(x, y) && !category.i(x, y) && m == 0) {
|
|
||||||
category.overTitle(true);
|
|
||||||
category.xx = x - category.getX();
|
|
||||||
category.yy = y - category.getY();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (category.overTitle(x, y) && m == 1) {
|
|
||||||
category.mouseClicked(!category.isOpened());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (category.i(x, y) && m == 0) {
|
|
||||||
category.cv(!category.p());
|
|
||||||
}
|
|
||||||
} while (!category.isOpened());
|
|
||||||
} while (category.getModules().isEmpty());
|
|
||||||
|
|
||||||
for (Component c : category.getModules()) {
|
|
||||||
if (c.onClick(x, y, m) && c instanceof ModuleComponent) {
|
|
||||||
category.openModule((ModuleComponent) c);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mouseButton == 1) {
|
||||||
|
boolean toggled = false;
|
||||||
|
for (int i = categories.size() - 1; i >= 0; i--) {
|
||||||
|
CategoryComponent category = categories.get(i);
|
||||||
|
if (!toggled && category.overTitle(mouseX, mouseY)) {
|
||||||
|
category.mouseClicked(!category.isOpened());
|
||||||
|
toggled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (CategoryComponent category : categories) {
|
||||||
|
if (category.isOpened() && !category.getModules().isEmpty() && category.overRect(mouseX, mouseY)) {
|
||||||
|
for (ModuleComponent component : category.getModules()) {
|
||||||
|
if (component.onClick(mouseX, mouseY, mouseButton)) {
|
||||||
|
category.openModule(component);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CommandLine.opened) {
|
||||||
|
this.commandLineInput.mouseClicked(mouseX, mouseY, mouseButton);
|
||||||
|
super.mouseClicked(mouseX, mouseY, mouseButton);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void mouseReleased(int x, int y, int s) {
|
|
||||||
if (s == 0) {
|
public void mouseReleased(int x, int y, int button) {
|
||||||
|
if (button == 0) {
|
||||||
Iterator<CategoryComponent> iterator = categories.iterator();
|
Iterator<CategoryComponent> iterator = categories.iterator();
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
CategoryComponent category = iterator.next();
|
CategoryComponent category = iterator.next();
|
||||||
category.overTitle(false);
|
category.overTitle(false);
|
||||||
if (category.isOpened() && !category.getModules().isEmpty()) {
|
if (category.isOpened() && !category.getModules().isEmpty()) {
|
||||||
for (Component module : category.getModules()) {
|
for (Component module : category.getModules()) {
|
||||||
module.mouseReleased(x, y, s);
|
module.mouseReleased(x, y, button);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -261,7 +265,8 @@ public class ClickGui extends GuiScreen {
|
||||||
public void keyTyped(char t, int k) {
|
public void keyTyped(char t, int k) {
|
||||||
if (k == Keyboard.KEY_ESCAPE && !binding()) {
|
if (k == Keyboard.KEY_ESCAPE && !binding()) {
|
||||||
this.mc.displayGuiScreen(null);
|
this.mc.displayGuiScreen(null);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
Iterator<CategoryComponent> iterator = categories.iterator();
|
Iterator<CategoryComponent> iterator = categories.iterator();
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
CategoryComponent category = iterator.next();
|
CategoryComponent category = iterator.next();
|
||||||
|
|
@ -272,7 +277,7 @@ public class ClickGui extends GuiScreen {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CommandLine.a) {
|
if (CommandLine.opened) {
|
||||||
String cm = this.commandLineInput.getText();
|
String cm = this.commandLineInput.getText();
|
||||||
if (k == 28 && !cm.isEmpty()) {
|
if (k == 28 && !cm.isEmpty()) {
|
||||||
Commands.rCMD(this.commandLineInput.getText());
|
Commands.rCMD(this.commandLineInput.getText());
|
||||||
|
|
@ -307,6 +312,7 @@ public class ClickGui extends GuiScreen {
|
||||||
this.mc.gameSettings.guiScale = originalScale;
|
this.mc.gameSettings.guiScale = originalScale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean doesGuiPauseGame() {
|
public boolean doesGuiPauseGame() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -324,11 +330,11 @@ public class ClickGui extends GuiScreen {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onProfileLoad() {
|
public void onSliderChange() {
|
||||||
for (CategoryComponent c : categories) {
|
for (CategoryComponent c : categories) {
|
||||||
for (ModuleComponent m : c.getModules()) {
|
for (ModuleComponent m : c.getModules()) {
|
||||||
m.onProfileLoad();
|
m.onSliderChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -46,7 +46,7 @@ public class BindComponent extends Component {
|
||||||
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'");
|
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" + getKeyAsStr(true) + "§r'");
|
Minecraft.getMinecraft().fontRendererObj.drawStringWithShadow(this.isBinding ? "Press a key..." : this.keySetting.getName() + ": '§e" + getKeyAsStr(true) + "§r'", (float) ((this.moduleComponent.categoryComponent.getX() + 4) * 2) + xOffset, (float) ((this.moduleComponent.categoryComponent.getY() + this.o + (this.keySetting == null ? 3 : 4)) * 2), Theme.getGradient(Theme.descriptor[0], Theme.descriptor[1], 0));
|
||||||
}
|
}
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
@ -57,7 +57,7 @@ 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.overSetting(x, y) && this.moduleComponent.isOpened && this.moduleComponent.mod.canBeEnabled()) {
|
if (this.overSetting(x, y) && this.moduleComponent.isOpened && this.moduleComponent.mod.canBeEnabled() && this.visible && (this.keySetting == null || this.keySetting.visible)) {
|
||||||
if (button == 0) {
|
if (button == 0) {
|
||||||
this.isBinding = !this.isBinding;
|
this.isBinding = !this.isBinding;
|
||||||
}
|
}
|
||||||
|
|
@ -139,7 +139,7 @@ public class BindComponent extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getKeyAsStr(boolean isKey) {
|
public String getKeyAsStr(boolean isKey) {
|
||||||
int key = isKey ? this.keySetting.getKey() : this.moduleComponent.mod.getKeycode();;
|
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));
|
return (key >= 1000 ? ((key == 1069 || key == 1070) ? getScroll(key) : "M" + (key - 1000)) : Keyboard.getKeyName(key));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ 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;
|
||||||
|
|
@ -52,7 +51,7 @@ public class ButtonComponent extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onClick(int x, int y, int b) {
|
public boolean onClick(int x, int y, int b) {
|
||||||
if (this.i(x, y) && b == 0 && this.p.isOpened) {
|
if (this.i(x, y) && b == 0 && this.p.isOpened && this.visible && this.buttonSetting.visible) {
|
||||||
if (this.buttonSetting.isMethodButton) {
|
if (this.buttonSetting.isMethodButton) {
|
||||||
this.buttonSetting.runMethod();
|
this.buttonSetting.runMethod();
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -69,4 +68,4 @@ public class ButtonComponent extends Component {
|
||||||
public boolean i(int x, int y) {
|
public boolean i(int x, int y) {
|
||||||
return x > this.x && x < this.x + this.p.categoryComponent.getWidth() && y > this.y && y < this.y + 11;
|
return x > this.x && x < this.x + this.p.categoryComponent.getWidth() && y > this.y && y < this.y + 11;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -38,7 +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 pin = false;
|
|
||||||
public boolean hovering = false;
|
public boolean hovering = false;
|
||||||
public boolean hoveringOverCategory = false;
|
public boolean hoveringOverCategory = false;
|
||||||
public Timer smoothTimer;
|
public Timer smoothTimer;
|
||||||
|
|
@ -145,14 +144,6 @@ public class CategoryComponent {
|
||||||
this.dragging = d;
|
this.dragging = d;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean p() {
|
|
||||||
return this.pin;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void cv(boolean on) {
|
|
||||||
this.pin = on;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isOpened() {
|
public boolean isOpened() {
|
||||||
return this.opened;
|
return this.opened;
|
||||||
}
|
}
|
||||||
|
|
@ -326,10 +317,6 @@ public class CategoryComponent {
|
||||||
hovering = overTitle(mouseX, mouseY);
|
hovering = overTitle(mouseX, mouseY);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean i(int x, int y) {
|
|
||||||
return x >= this.x + 92 - 13 && x <= this.x + this.width && (float) y >= (float) this.y + 2.0F && y <= this.y + this.titleHeight + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean overTitle(int x, int y) {
|
public boolean overTitle(int x, int y) {
|
||||||
return x >= this.x && x <= this.x + this.width && (float) y >= (float) this.y + 2.0F && y <= this.y + this.titleHeight + 1;
|
return x >= this.x && x <= this.x + this.width && (float) y >= (float) this.y + 2.0F && y <= this.y + this.titleHeight + 1;
|
||||||
}
|
}
|
||||||
|
|
@ -338,10 +325,14 @@ public class CategoryComponent {
|
||||||
return x >= this.x - 2 && x <= this.x + this.width + 2 && (float) y >= (float) this.y + 2.0F && y <= this.y + this.titleHeight + big + 1;
|
return x >= this.x - 2 && x <= this.x + this.width + 2 && (float) y >= (float) this.y + 2.0F && y <= this.y + this.titleHeight + big + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean v(int x, int y) {
|
public boolean draggable(int x, int y) {
|
||||||
return x >= this.x && x <= this.x + this.width && y >= this.y && y <= this.y + this.titleHeight;
|
return x >= this.x && x <= this.x + this.width && y >= this.y && y <= this.y + this.titleHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean overRect(int x, int y) {
|
||||||
|
return x >= this.x - 2 && x <= this.x + this.width + 2 && y >= this.y && y <= lastHeight;
|
||||||
|
}
|
||||||
|
|
||||||
private void renderItemForCategory(Module.category category, int x, int y, boolean enchant) {
|
private void renderItemForCategory(Module.category category, int x, int y, boolean enchant) {
|
||||||
RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
|
RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
|
||||||
double scale = 0.55;
|
double scale = 0.55;
|
||||||
|
|
|
||||||
|
|
@ -195,10 +195,10 @@ public class ModuleComponent extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onProfileLoad() {
|
public void onSliderChange() {
|
||||||
for (Component c : this.settings) {
|
for (Component c : this.settings) {
|
||||||
if (c instanceof SliderComponent) {
|
if (c instanceof SliderComponent) {
|
||||||
((SliderComponent) c).onProfileLoad();
|
((SliderComponent) c).onSliderChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ public class SliderComponent extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onProfileLoad() {
|
public void onSliderChange() {
|
||||||
double initial = (sliderSetting.getInput() == -1 && sliderSetting.canBeDisabled) ? -1 : sliderSetting.getInput();
|
double initial = (sliderSetting.getInput() == -1 && sliderSetting.canBeDisabled) ? -1 : sliderSetting.getInput();
|
||||||
|
|
||||||
this.targetValue = initial;
|
this.targetValue = initial;
|
||||||
|
|
@ -146,7 +146,7 @@ public class SliderComponent extends Component {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(int mouseX, int mouseY, int button) {
|
public boolean onClick(int mouseX, int mouseY, int button) {
|
||||||
if ((u(mouseX, mouseY) || i(mouseX, mouseY)) && button == 0 && this.moduleComponent.isOpened) {
|
if ((u(mouseX, mouseY) || i(mouseX, mouseY)) && button == 0 && this.moduleComponent.isOpened && this.visible && this.sliderSetting.visible) {
|
||||||
this.heldDown = true;
|
this.heldDown = true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package keystrokesmod.event;
|
||||||
|
|
||||||
|
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||||
|
|
||||||
|
public class PostSetSliderEvent extends Event {
|
||||||
|
public double previousVal;
|
||||||
|
public double newVal;
|
||||||
|
|
||||||
|
public PostSetSliderEvent(double previousVal, double newVal) {
|
||||||
|
this.previousVal = previousVal;
|
||||||
|
this.newVal = newVal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
package keystrokesmod.event;
|
package keystrokesmod.event;
|
||||||
|
|
||||||
|
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||||
|
|
||||||
|
@Cancelable
|
||||||
public class SlotUpdateEvent extends Event {
|
public class SlotUpdateEvent extends Event {
|
||||||
public int slot;
|
public int slot;
|
||||||
|
|
||||||
public SlotUpdateEvent(int slot) {
|
public SlotUpdateEvent(int slot) {
|
||||||
this.slot = slot;
|
this.slot = slot;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -51,7 +51,11 @@ public class MixinMinecraft {
|
||||||
|
|
||||||
@Redirect(method = "runTick", at = @At(value = "FIELD", target = "Lnet/minecraft/entity/player/InventoryPlayer;currentItem:I", opcode = Opcodes.PUTFIELD))
|
@Redirect(method = "runTick", at = @At(value = "FIELD", target = "Lnet/minecraft/entity/player/InventoryPlayer;currentItem:I", opcode = Opcodes.PUTFIELD))
|
||||||
private void onSetCurrentItem(InventoryPlayer inventoryPlayer, int slot) {
|
private void onSetCurrentItem(InventoryPlayer inventoryPlayer, int slot) {
|
||||||
MinecraftForge.EVENT_BUS.post(new SlotUpdateEvent(slot));
|
SlotUpdateEvent e = new SlotUpdateEvent(slot);
|
||||||
|
MinecraftForge.EVENT_BUS.post(e);
|
||||||
|
if (e.isCanceled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
inventoryPlayer.currentItem = slot;
|
inventoryPlayer.currentItem = slot;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package keystrokesmod.mixin.impl.render;
|
||||||
|
|
||||||
|
import keystrokesmod.utility.Utils;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||||
|
import net.minecraft.client.renderer.entity.RenderPlayer;
|
||||||
|
|
||||||
|
@Mixin(RenderPlayer.class)
|
||||||
|
public class MixinRenderPlayer {
|
||||||
|
@Redirect(method = "setModelVisibilities(Lnet/minecraft/client/entity/AbstractClientPlayer;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/InventoryPlayer;getCurrentItem()Lnet/minecraft/item/ItemStack;"))
|
||||||
|
private ItemStack redirectGetCurrentItem(InventoryPlayer inventory) {
|
||||||
|
if (Minecraft.getMinecraft().gameSettings.thirdPersonView == 0) {
|
||||||
|
return Utils.getSpoofedItem(inventory.getCurrentItem());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return inventory.getCurrentItem();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -6,27 +6,27 @@ import keystrokesmod.utility.Commands;
|
||||||
import keystrokesmod.utility.Timer;
|
import keystrokesmod.utility.Timer;
|
||||||
|
|
||||||
public class CommandLine extends Module {
|
public class CommandLine extends Module {
|
||||||
public static boolean a = false;
|
public static boolean opened = false;
|
||||||
public static boolean b = false;
|
public static boolean closed = false;
|
||||||
public static Timer an;
|
public static Timer animation;
|
||||||
public static ButtonSetting animate;
|
public static ButtonSetting animate;
|
||||||
|
|
||||||
public CommandLine() {
|
public CommandLine() {
|
||||||
super("Command line", Module.category.client, 0);
|
super("Command line", category.client);
|
||||||
this.registerSetting(animate = new ButtonSetting("Animate", true));
|
this.registerSetting(animate = new ButtonSetting("Animate", true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
Commands.setccs();
|
Commands.setccs();
|
||||||
a = true;
|
opened = true;
|
||||||
b = false;
|
closed = false;
|
||||||
(an = new Timer(500.0F)).start();
|
(animation = new Timer(500.0F)).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
b = true;
|
closed = true;
|
||||||
if (an != null) {
|
if (animation != null) {
|
||||||
an.start();
|
animation.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
Commands.od();
|
Commands.od();
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,8 @@ public class KillAura extends Module {
|
||||||
private boolean disableCheckUsing;
|
private boolean disableCheckUsing;
|
||||||
private int disableCTicks;
|
private int disableCTicks;
|
||||||
|
|
||||||
|
public boolean blocked;
|
||||||
|
|
||||||
public KillAura() {
|
public KillAura() {
|
||||||
super("KillAura", category.combat);
|
super("KillAura", category.combat);
|
||||||
this.registerSetting(aps = new SliderSetting("APS", 16.0, 1.0, 20.0, 0.5));
|
this.registerSetting(aps = new SliderSetting("APS", 16.0, 1.0, 20.0, 0.5));
|
||||||
|
|
@ -226,9 +228,17 @@ public class KillAura extends Module {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onPreUpdate(PreUpdateEvent e) {
|
public void onPreUpdate(PreUpdateEvent e) {
|
||||||
if (!Utils.nullCheck() || ModuleUtils.profileTicks <= 1) {
|
if (!Utils.nullCheck()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (target == null || !manualBlock() && manualBlock.isToggled()) {
|
||||||
|
if (ModuleUtils.swapTick == 0 && !ModuleUtils.isBlocked) {
|
||||||
|
interactTicks = 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
interactTicks = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (target != null && Utils.holdingSword()) {
|
if (target != null && Utils.holdingSword()) {
|
||||||
if (Mouse.isButtonDown(0) && Utils.tabbedIn()) {
|
if (Mouse.isButtonDown(0) && Utils.tabbedIn()) {
|
||||||
mc.thePlayer.swingItem();
|
mc.thePlayer.swingItem();
|
||||||
|
|
@ -244,6 +254,7 @@ public class KillAura extends Module {
|
||||||
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;
|
||||||
|
blocked = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!checkUsing) {
|
if (!checkUsing) {
|
||||||
|
|
@ -263,13 +274,16 @@ public class KillAura extends Module {
|
||||||
if (Mouse.isButtonDown(1) && Utils.tabbedIn()) {
|
if (Mouse.isButtonDown(1) && Utils.tabbedIn()) {
|
||||||
Reflection.setItemInUse(this.blockingClient = true);
|
Reflection.setItemInUse(this.blockingClient = true);
|
||||||
canBlockServerside = (target == null);
|
canBlockServerside = (target == null);
|
||||||
|
blocked = true;
|
||||||
}
|
}
|
||||||
else if (canBlockServerside) {
|
else if (canBlockServerside) {
|
||||||
Reflection.setItemInUse(this.blockingClient = false);
|
Reflection.setItemInUse(this.blockingClient = false);
|
||||||
canBlockServerside = false;
|
canBlockServerside = false;
|
||||||
|
blocked = false;
|
||||||
}
|
}
|
||||||
if (g == null && !BlockUtils.isInteractable(mc.objectMouseOver) || target != null) {
|
if (g == null && !BlockUtils.isInteractable(mc.objectMouseOver) || target != null) {
|
||||||
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), false);
|
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), false);
|
||||||
|
blocked = false;
|
||||||
}
|
}
|
||||||
usedWhileTargeting = Mouse.isButtonDown(1);
|
usedWhileTargeting = Mouse.isButtonDown(1);
|
||||||
}
|
}
|
||||||
|
|
@ -594,7 +608,6 @@ public class KillAura extends Module {
|
||||||
//Utils.print("2");
|
//Utils.print("2");
|
||||||
}
|
}
|
||||||
partialTicks = 0;
|
partialTicks = 0;
|
||||||
interactTicks = 0;
|
|
||||||
handleBlocking(false);
|
handleBlocking(false);
|
||||||
target = null;
|
target = null;
|
||||||
attackingEntity = null;
|
attackingEntity = null;
|
||||||
|
|
@ -799,14 +812,13 @@ public class KillAura extends Module {
|
||||||
case 1: // vanilla
|
case 1: // vanilla
|
||||||
setKeyBindState(keyCode, blockState, false);
|
setKeyBindState(keyCode, blockState, false);
|
||||||
this.blockingClient = blockState;
|
this.blockingClient = blockState;
|
||||||
|
blocked = blockState;
|
||||||
break;
|
break;
|
||||||
case 2: // partial
|
case 2: // partial
|
||||||
Reflection.setItemInUse(this.blockingClient = ModuleUtils.isBlocked);
|
Reflection.setItemInUse(this.blockingClient = ModuleUtils.isBlocked);
|
||||||
break;
|
break;
|
||||||
case 3: // interact a
|
case 3: // interact a
|
||||||
case 4: // interact b
|
case 4: // interact b
|
||||||
case 5: // hypixel a
|
|
||||||
case 6: // hypixel b
|
|
||||||
Reflection.setItemInUse(this.blockingClient = blockState);
|
Reflection.setItemInUse(this.blockingClient = blockState);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -862,6 +874,7 @@ public class KillAura extends Module {
|
||||||
blockingServer = false;
|
blockingServer = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
lag = true;
|
||||||
switch ((int) autoBlockMode.getInput()) {
|
switch ((int) autoBlockMode.getInput()) {
|
||||||
case 2: // partial
|
case 2: // partial
|
||||||
if (interactTicks >= 3) {
|
if (interactTicks >= 3) {
|
||||||
|
|
@ -871,20 +884,12 @@ public class KillAura extends Module {
|
||||||
switch (interactTicks) {
|
switch (interactTicks) {
|
||||||
case 1:
|
case 1:
|
||||||
if (ModuleUtils.isBlocked) {
|
if (ModuleUtils.isBlocked) {
|
||||||
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
sendUnBlockPacket();
|
||||||
}
|
|
||||||
else {
|
|
||||||
handleInteractAndAttack(distance, true, true, swung);
|
|
||||||
sendBlockPacket();
|
|
||||||
lag = true;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (!ModuleUtils.isBlocked) {
|
handleInteractAndAttack(distance, true, true, swung);
|
||||||
handleInteractAndAttack(distance, true, true, swung);
|
sendBlockPacket();
|
||||||
sendBlockPacket();
|
|
||||||
lag = true;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -926,15 +931,13 @@ public class KillAura extends Module {
|
||||||
case 1:
|
case 1:
|
||||||
blinking.set(true);
|
blinking.set(true);
|
||||||
if (ModuleUtils.isBlocked) {
|
if (ModuleUtils.isBlocked) {
|
||||||
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
sendUnBlockPacket();
|
||||||
lag = false;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
handleInteractAndAttack(distance, true, true, swung);
|
handleInteractAndAttack(distance, true, true, swung);
|
||||||
sendBlockPacket();
|
sendBlockPacket();
|
||||||
releasePackets(); // release
|
releasePackets(); // release
|
||||||
lag = true;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -948,15 +951,13 @@ public class KillAura extends Module {
|
||||||
case 1:
|
case 1:
|
||||||
blinking.set(true);
|
blinking.set(true);
|
||||||
if (ModuleUtils.isBlocked) {
|
if (ModuleUtils.isBlocked) {
|
||||||
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
sendUnBlockPacket();
|
||||||
lag = false;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
handleInteractAndAttack(distance, true, true, swung);
|
handleInteractAndAttack(distance, true, true, swung);
|
||||||
sendBlockPacket();
|
sendBlockPacket();
|
||||||
releasePackets(); // release
|
releasePackets(); // release
|
||||||
lag = true;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -974,18 +975,16 @@ public class KillAura extends Module {
|
||||||
case 1:
|
case 1:
|
||||||
blinking.set(true);
|
blinking.set(true);
|
||||||
if (ModuleUtils.isBlocked) {
|
if (ModuleUtils.isBlocked) {
|
||||||
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
sendUnBlockPacket();
|
||||||
lag = false;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
handleInteractAndAttack(distance, true, true, swung);
|
handleInteractAndAttack(distance, true, true, swung);
|
||||||
sendBlockPacket();
|
sendBlockPacket();
|
||||||
releasePackets(); // release
|
releasePackets(); // release
|
||||||
lag = true;
|
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (firstEdge == 2 || firstEdge == 5) {
|
if (firstEdge == 2 || firstEdge == 6) {
|
||||||
firstCycle = false;
|
firstCycle = false;
|
||||||
}
|
}
|
||||||
interactTicks = 0;
|
interactTicks = 0;
|
||||||
|
|
@ -1001,14 +1000,12 @@ public class KillAura extends Module {
|
||||||
case 1:
|
case 1:
|
||||||
blinking.set(true);
|
blinking.set(true);
|
||||||
if (ModuleUtils.isBlocked) {
|
if (ModuleUtils.isBlocked) {
|
||||||
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
sendUnBlockPacket();
|
||||||
lag = false;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
handleInteractAndAttack(distance, true, true, swung);
|
handleInteractAndAttack(distance, true, true, swung);
|
||||||
sendBlockPacket();
|
sendBlockPacket();
|
||||||
lag = true;
|
|
||||||
releasePackets(); // release
|
releasePackets(); // release
|
||||||
firstCycle = true;
|
firstCycle = true;
|
||||||
interactTicks = 0;
|
interactTicks = 0;
|
||||||
|
|
@ -1028,7 +1025,6 @@ public class KillAura extends Module {
|
||||||
if (ModuleUtils.isBlocked) {
|
if (ModuleUtils.isBlocked) {
|
||||||
setSwapSlot();
|
setSwapSlot();
|
||||||
swapped = true;
|
swapped = true;
|
||||||
lag = false;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
|
@ -1039,7 +1035,6 @@ public class KillAura extends Module {
|
||||||
handleInteractAndAttack(distance, true, true, swung);
|
handleInteractAndAttack(distance, true, true, swung);
|
||||||
sendBlockPacket();
|
sendBlockPacket();
|
||||||
releasePackets(); // release
|
releasePackets(); // release
|
||||||
lag = true;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1055,7 +1050,6 @@ public class KillAura extends Module {
|
||||||
if (ModuleUtils.isBlocked) {
|
if (ModuleUtils.isBlocked) {
|
||||||
setSwapSlot();
|
setSwapSlot();
|
||||||
swapped = true;
|
swapped = true;
|
||||||
lag = false;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
|
@ -1066,7 +1060,6 @@ public class KillAura extends Module {
|
||||||
handleInteractAndAttack(distance, true, true, swung);
|
handleInteractAndAttack(distance, true, true, swung);
|
||||||
sendBlockPacket();
|
sendBlockPacket();
|
||||||
releasePackets(); // release
|
releasePackets(); // release
|
||||||
lag = true;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1086,13 +1079,12 @@ public class KillAura extends Module {
|
||||||
swapped = true;
|
swapped = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
sendUnBlockPacket();
|
||||||
}
|
}
|
||||||
firstGyatt++;
|
firstGyatt++;
|
||||||
if (firstGyatt > 4) {
|
if (firstGyatt > 4) {
|
||||||
firstGyatt = 0;
|
firstGyatt = 0;
|
||||||
}
|
}
|
||||||
lag = false;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
|
@ -1103,7 +1095,6 @@ public class KillAura extends Module {
|
||||||
handleInteractAndAttack(distance, true, true, swung);
|
handleInteractAndAttack(distance, true, true, swung);
|
||||||
sendBlockPacket();
|
sendBlockPacket();
|
||||||
releasePackets(); // release
|
releasePackets(); // release
|
||||||
lag = true;
|
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
firstCycle = false;
|
firstCycle = false;
|
||||||
|
|
@ -1124,13 +1115,12 @@ public class KillAura extends Module {
|
||||||
swapped = true;
|
swapped = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
sendUnBlockPacket();
|
||||||
}
|
}
|
||||||
firstEdge++;
|
firstEdge++;
|
||||||
if (firstEdge > 4) {
|
if (firstEdge > 4) {
|
||||||
firstEdge = 0;
|
firstEdge = 0;
|
||||||
}
|
}
|
||||||
lag = false;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
|
@ -1141,7 +1131,6 @@ public class KillAura extends Module {
|
||||||
handleInteractAndAttack(distance, true, true, swung);
|
handleInteractAndAttack(distance, true, true, swung);
|
||||||
sendBlockPacket();
|
sendBlockPacket();
|
||||||
releasePackets(); // release
|
releasePackets(); // release
|
||||||
lag = true;
|
|
||||||
firstCycle = true;
|
firstCycle = true;
|
||||||
interactTicks = 0;
|
interactTicks = 0;
|
||||||
break;
|
break;
|
||||||
|
|
@ -1153,6 +1142,7 @@ public class KillAura extends Module {
|
||||||
int bestSwapSlot = getBestSwapSlot();
|
int bestSwapSlot = getBestSwapSlot();
|
||||||
mc.thePlayer.sendQueue.addToSendQueue(new C09PacketHeldItemChange(bestSwapSlot));
|
mc.thePlayer.sendQueue.addToSendQueue(new C09PacketHeldItemChange(bestSwapSlot));
|
||||||
Raven.packetsHandler.playerSlot.set(bestSwapSlot);
|
Raven.packetsHandler.playerSlot.set(bestSwapSlot);
|
||||||
|
blocked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setCurrentSlot() {
|
private void setCurrentSlot() {
|
||||||
|
|
@ -1218,7 +1208,13 @@ public class KillAura extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendBlockPacket() {
|
private void sendBlockPacket() {
|
||||||
mc.getNetHandler().addToSendQueue(new C08PacketPlayerBlockPlacement(mc.thePlayer.getHeldItem()));
|
mc.thePlayer.sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(mc.thePlayer.getHeldItem()));
|
||||||
|
blocked = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendUnBlockPacket() {
|
||||||
|
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, DOWN));
|
||||||
|
blocked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setKeyBindState(int keycode, boolean state, boolean invokeTick) {
|
private void setKeyBindState(int keycode, boolean state, boolean invokeTick) {
|
||||||
|
|
@ -1233,7 +1229,7 @@ public class KillAura extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void swingItem() {
|
private void swingItem() {
|
||||||
if (silentSwing.isToggled() && mc.thePlayer.isBlocking()) {
|
if ((silentSwing.isToggled() && mc.thePlayer.isBlocking()) || ModuleManager.bedAura.stopAutoblock) {
|
||||||
mc.thePlayer.sendQueue.addToSendQueue(new C0APacketAnimation());
|
mc.thePlayer.sendQueue.addToSendQueue(new C0APacketAnimation());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -1397,7 +1393,7 @@ public class KillAura extends Module {
|
||||||
}
|
}
|
||||||
swapped = false;
|
swapped = false;
|
||||||
lag = false;
|
lag = false;
|
||||||
firstEdge = firstGyatt = interactTicks = 0;
|
firstEdge = firstGyatt = 0;
|
||||||
firstCycle = true;
|
firstCycle = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,14 +77,14 @@ public class Velocity extends Module {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
horizontal.setVisible(velocityModes.getInput() != 2, this);
|
this.horizontal.setVisible(velocityModes.getInput() != 2, this);
|
||||||
vertical.setVisible(velocityModes.getInput() != 2, this);
|
this.vertical.setVisible(velocityModes.getInput() != 2, this);
|
||||||
chance.setVisible(velocityModes.getInput() != 2, this);
|
this.chance.setVisible(velocityModes.getInput() != 2, this);
|
||||||
reverseHorizontal.setVisible(velocityModes.getInput() == 2, this);
|
this.reverseHorizontal.setVisible(velocityModes.getInput() == 2, this);
|
||||||
|
|
||||||
minExtraSpeed.setVisible(velocityModes.getInput() == 2, this);
|
this.minExtraSpeed.setVisible(velocityModes.getInput() == 2, this);
|
||||||
extraSpeedBoost.setVisible(velocityModes.getInput() == 2, this);
|
this.extraSpeedBoost.setVisible(velocityModes.getInput() == 2, this);
|
||||||
reverseDebug.setVisible(velocityModes.getInput() == 2, this);
|
this.reverseDebug.setVisible(velocityModes.getInput() == 2, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
|
|
@ -110,7 +110,7 @@ public class Velocity extends Module {
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onReceivePacket(ReceivePacketEvent e) {
|
public void onReceivePacket(ReceivePacketEvent e) {
|
||||||
if (velocityModes.getInput() == 1) {
|
if (velocityModes.getInput() == 1) {
|
||||||
if (!Utils.nullCheck() || LongJump.stopVelocity || e.isCanceled() || ModuleManager.bedAura.cancelKnockback() || velocityModes.getInput() == 2 && ModuleUtils.firstDamage || ModuleManager.bhop.isEnabled() && ModuleManager.bhop.damageBoost.isToggled() && ModuleUtils.firstDamage && (!ModuleManager.bhop.damageBoostRequireKey.isToggled() || ModuleManager.bhop.damageBoostKey.isPressed())) {
|
if (!Utils.nullCheck() || LongJump.stopVelocity || e.isCanceled() || ModuleManager.bedAura.cancelKnockback() || ModuleManager.tower.cancelKnockback() || velocityModes.getInput() == 2 && ModuleUtils.firstDamage || ModuleManager.bhop.isEnabled() && ModuleManager.bhop.damageBoost.isToggled() && ModuleUtils.firstDamage && (!ModuleManager.bhop.damageBoostRequireKey.isToggled() || ModuleManager.bhop.damageBoostKey.isPressed())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (e.getPacket() instanceof S27PacketExplosion) {
|
if (e.getPacket() instanceof S27PacketExplosion) {
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package keystrokesmod.module.impl.movement;
|
||||||
import keystrokesmod.event.PostMotionEvent;
|
import keystrokesmod.event.PostMotionEvent;
|
||||||
import keystrokesmod.event.PostPlayerInputEvent;
|
import keystrokesmod.event.PostPlayerInputEvent;
|
||||||
import keystrokesmod.event.PreMotionEvent;
|
import keystrokesmod.event.PreMotionEvent;
|
||||||
|
import keystrokesmod.event.PreUpdateEvent;
|
||||||
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.impl.combat.Velocity;
|
||||||
|
|
@ -17,6 +18,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
|
||||||
public class Bhop extends Module {
|
public class Bhop extends Module {
|
||||||
public SliderSetting mode;
|
public SliderSetting mode;
|
||||||
|
public static SliderSetting friction;
|
||||||
public static SliderSetting speedSetting;
|
public static SliderSetting speedSetting;
|
||||||
private ButtonSetting liquidDisable;
|
private ButtonSetting liquidDisable;
|
||||||
public ButtonSetting disablerOnly;
|
public ButtonSetting disablerOnly;
|
||||||
|
|
@ -30,11 +32,13 @@ public class Bhop extends Module {
|
||||||
public boolean hopping, lowhop, didMove, setRotation;
|
public boolean hopping, lowhop, didMove, setRotation;
|
||||||
private int motionTick = 0;
|
private int motionTick = 0;
|
||||||
public boolean isNormalPos;
|
public boolean isNormalPos;
|
||||||
|
public boolean running;
|
||||||
|
|
||||||
public Bhop() {
|
public Bhop() {
|
||||||
super("Bhop", Module.category.movement);
|
super("Bhop", Module.category.movement);
|
||||||
this.registerSetting(mode = new SliderSetting("Mode", 0, modes));
|
this.registerSetting(mode = new SliderSetting("Mode", 0, modes));
|
||||||
this.registerSetting(speedSetting = new SliderSetting("Speed", 2.0, 0.8, 1.2, 0.01));
|
this.registerSetting(speedSetting = new SliderSetting("Speed", 2.0, 0.8, 1.2, 0.01));
|
||||||
|
this.registerSetting(friction = new SliderSetting("Friction multiplier", 1, 1, 1.3, 0.01));
|
||||||
this.registerSetting(disablerOnly = new ButtonSetting("Lowhop only if disabler loaded", false));
|
this.registerSetting(disablerOnly = new ButtonSetting("Lowhop only if disabler loaded", false));
|
||||||
this.registerSetting(liquidDisable = new ButtonSetting("Disable in liquid", true));
|
this.registerSetting(liquidDisable = new ButtonSetting("Disable in liquid", true));
|
||||||
this.registerSetting(sneakDisable = new ButtonSetting("Disable while sneaking", true));
|
this.registerSetting(sneakDisable = new ButtonSetting("Disable while sneaking", true));
|
||||||
|
|
@ -81,7 +85,7 @@ public class Bhop extends Module {
|
||||||
if (ModuleManager.scaffold.moduleEnabled || ModuleManager.scaffold.lowhop) {
|
if (ModuleManager.scaffold.moduleEnabled || ModuleManager.scaffold.lowhop) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ModuleManager.LongJump.function) {
|
if (LongJump.function) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
motionTick = 0;
|
motionTick = 0;
|
||||||
|
|
@ -96,6 +100,7 @@ public class Bhop extends Module {
|
||||||
else {
|
else {
|
||||||
mc.thePlayer.motionY = 0.41999998688698;
|
mc.thePlayer.motionY = 0.41999998688698;
|
||||||
}
|
}
|
||||||
|
running = true;
|
||||||
if (mc.thePlayer.posY % 1 == 0) {
|
if (mc.thePlayer.posY % 1 == 0) {
|
||||||
isNormalPos = true;
|
isNormalPos = true;
|
||||||
}
|
}
|
||||||
|
|
@ -119,7 +124,7 @@ public class Bhop extends Module {
|
||||||
|
|
||||||
if (Utils.isMoving()) {
|
if (Utils.isMoving()) {
|
||||||
if (!Utils.noSlowingBackWithBow() && !ModuleManager.sprint.disableBackwards()) {
|
if (!Utils.noSlowingBackWithBow() && !ModuleManager.sprint.disableBackwards()) {
|
||||||
Utils.setSpeed(speedModifier - Utils.randomizeDouble(0.0003, 0.0001));
|
Utils.setSpeed((speedModifier - Utils.randomizeDouble(0.0003, 0.0001)) * ModuleUtils.applyFrictionMulti());
|
||||||
}
|
}
|
||||||
didMove = true;
|
didMove = true;
|
||||||
}
|
}
|
||||||
|
|
@ -213,5 +218,6 @@ public class Bhop extends Module {
|
||||||
|
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
hopping = false;
|
hopping = false;
|
||||||
|
running = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -18,6 +18,7 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.network.Packet;
|
import net.minecraft.network.Packet;
|
||||||
import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement;
|
import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement;
|
||||||
import net.minecraft.network.play.client.C09PacketHeldItemChange;
|
import net.minecraft.network.play.client.C09PacketHeldItemChange;
|
||||||
|
import net.minecraft.network.play.client.C0APacketAnimation;
|
||||||
import net.minecraft.network.play.server.*;
|
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;
|
||||||
|
|
@ -34,18 +35,20 @@ public class LongJump extends Module {
|
||||||
|
|
||||||
private ButtonSetting manual;
|
private ButtonSetting manual;
|
||||||
private ButtonSetting onlyWithVelocity;
|
private ButtonSetting onlyWithVelocity;
|
||||||
private KeySetting disableKey;
|
private KeySetting disableKey, flatKey;
|
||||||
|
|
||||||
private ButtonSetting allowStrafe;
|
private ButtonSetting allowStrafe;
|
||||||
private ButtonSetting invertYaw;
|
private ButtonSetting invertYaw;
|
||||||
private ButtonSetting stopMovement;
|
private ButtonSetting stopMovement;
|
||||||
private ButtonSetting hideExplosion;
|
private ButtonSetting hideExplosion;
|
||||||
public ButtonSetting spoofItem;
|
public ButtonSetting spoofItem;
|
||||||
|
private ButtonSetting beginFlat;
|
||||||
|
private ButtonSetting silentSwing;
|
||||||
|
|
||||||
private KeySetting temporaryFlightKey;
|
private KeySetting verticalKey;
|
||||||
private SliderSetting pitchVal;
|
private SliderSetting pitchVal;
|
||||||
|
|
||||||
public String[] modes = new String[]{"Floyd", "Boost"};
|
public String[] modes = new String[]{"Float", "Boost"};
|
||||||
|
|
||||||
private boolean manualWasOn;
|
private boolean manualWasOn;
|
||||||
|
|
||||||
|
|
@ -53,7 +56,7 @@ public class LongJump extends Module {
|
||||||
private float pitch;
|
private float pitch;
|
||||||
|
|
||||||
private boolean notMoving;
|
private boolean notMoving;
|
||||||
private boolean enabled;
|
private boolean enabled, swapped;
|
||||||
public static boolean function;
|
public static boolean function;
|
||||||
|
|
||||||
private int boostTicks;
|
private int boostTicks;
|
||||||
|
|
@ -89,17 +92,23 @@ public class LongJump extends Module {
|
||||||
this.registerSetting(stopMovement = new ButtonSetting("Stop movement", false));
|
this.registerSetting(stopMovement = new ButtonSetting("Stop movement", false));
|
||||||
this.registerSetting(hideExplosion = new ButtonSetting("Hide explosion", false));
|
this.registerSetting(hideExplosion = new ButtonSetting("Hide explosion", false));
|
||||||
this.registerSetting(spoofItem = new ButtonSetting("Spoof item", false));
|
this.registerSetting(spoofItem = new ButtonSetting("Spoof item", false));
|
||||||
|
this.registerSetting(silentSwing = new ButtonSetting("Silent swing", false));
|
||||||
|
|
||||||
this.registerSetting(temporaryFlightKey = new KeySetting("Vertical key", Keyboard.KEY_SPACE));
|
this.registerSetting(beginFlat = new ButtonSetting("Begin flat", false));
|
||||||
|
this.registerSetting(verticalKey = new KeySetting("Vertical key", Keyboard.KEY_SPACE));
|
||||||
|
this.registerSetting(flatKey = new KeySetting("Flat key", Keyboard.KEY_SPACE));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void guiUpdate() {
|
public void guiUpdate() {
|
||||||
this.onlyWithVelocity.setVisible(manual.isToggled(), this);
|
this.onlyWithVelocity.setVisible(manual.isToggled(), this);
|
||||||
this.disableKey.setVisible(manual.isToggled(), this);
|
this.disableKey.setVisible(manual.isToggled(), this);
|
||||||
|
this.spoofItem.setVisible(!manual.isToggled(), this);
|
||||||
|
this.silentSwing.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.temporaryFlightKey.setVisible(mode.getInput() == 0, this);
|
this.verticalKey.setVisible(mode.getInput() == 0 && beginFlat.isToggled(), this);
|
||||||
|
this.flatKey.setVisible(mode.getInput() == 0 && !beginFlat.isToggled(), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
|
@ -148,6 +157,16 @@ public class LongJump extends Module {
|
||||||
disabled();
|
disabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (spoofItem.isToggled() && lastSlot != -1) {
|
||||||
|
((IMixinItemRenderer) mc.getItemRenderer()).setCancelUpdate(true);
|
||||||
|
((IMixinItemRenderer) mc.getItemRenderer()).setCancelReset(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (swapped) {
|
||||||
|
resetSlot();
|
||||||
|
swapped = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!function) {
|
if (!function) {
|
||||||
if (manual.isToggled() && !enabled && (!onlyWithVelocity.isToggled() || onlyWithVelocity.isToggled() && ModuleManager.velocity.isEnabled())) {
|
if (manual.isToggled() && !enabled && (!onlyWithVelocity.isToggled() || onlyWithVelocity.isToggled() && ModuleManager.velocity.isEnabled())) {
|
||||||
if (ModuleUtils.threwFireballLow) {
|
if (ModuleUtils.threwFireballLow) {
|
||||||
|
|
@ -158,11 +177,6 @@ public class LongJump extends Module {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spoofItem.isToggled() && lastSlot != -1) {
|
|
||||||
((IMixinItemRenderer) mc.getItemRenderer()).setCancelUpdate(true);
|
|
||||||
((IMixinItemRenderer) mc.getItemRenderer()).setCancelReset(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
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) {
|
||||||
|
|
@ -176,6 +190,7 @@ public class LongJump extends Module {
|
||||||
lastSlot = spoofSlot = mc.thePlayer.inventory.currentItem;
|
lastSlot = spoofSlot = mc.thePlayer.inventory.currentItem;
|
||||||
if (mc.thePlayer.inventory.currentItem != fireballSlot) {
|
if (mc.thePlayer.inventory.currentItem != fireballSlot) {
|
||||||
mc.thePlayer.inventory.currentItem = fireballSlot;
|
mc.thePlayer.inventory.currentItem = fireballSlot;
|
||||||
|
swapped = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -193,7 +208,7 @@ public class LongJump extends Module {
|
||||||
} else {
|
} else {
|
||||||
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 > (!verticalKey() ? 33/*flat motion ticks*/ : (!notMoving ? 32/*normal motion ticks*/ : 33/*vertical motion ticks*/))) {
|
||||||
disabled();
|
disabled();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -265,8 +280,15 @@ public class LongJump extends Module {
|
||||||
mc.getNetHandler().addToSendQueue(new C08PacketPlayerBlockPlacement(mc.thePlayer.getHeldItem()));
|
mc.getNetHandler().addToSendQueue(new C08PacketPlayerBlockPlacement(mc.thePlayer.getHeldItem()));
|
||||||
//((IAccessorMinecraft) mc).callRightClickMouse();
|
//((IAccessorMinecraft) mc).callRightClickMouse();
|
||||||
}
|
}
|
||||||
mc.thePlayer.swingItem();
|
if (silentSwing.isToggled()) {
|
||||||
mc.getItemRenderer().resetEquippedProgress();
|
mc.thePlayer.sendQueue.addToSendQueue(new C0APacketAnimation());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
mc.thePlayer.swingItem();
|
||||||
|
if (!spoofItem.isToggled()) {
|
||||||
|
mc.getItemRenderer().resetEquippedProgress();
|
||||||
|
}
|
||||||
|
}
|
||||||
stopVelocity = true;
|
stopVelocity = true;
|
||||||
//Utils.print("Right click");
|
//Utils.print("Right click");
|
||||||
}
|
}
|
||||||
|
|
@ -360,7 +382,7 @@ public class LongJump extends Module {
|
||||||
fireballTime = rotateTick = stopTime = 0;
|
fireballTime = rotateTick = stopTime = 0;
|
||||||
boostTicks = -1;
|
boostTicks = -1;
|
||||||
resetSlot();
|
resetSlot();
|
||||||
enabled = function = notMoving = stopVelocity = stopModules = false;
|
enabled = function = notMoving = stopVelocity = stopModules = swapped = false;
|
||||||
if (!manual.isToggled()) {
|
if (!manual.isToggled()) {
|
||||||
disable();
|
disable();
|
||||||
}
|
}
|
||||||
|
|
@ -372,7 +394,7 @@ public class LongJump extends Module {
|
||||||
if (fireballSlot == -1) {
|
if (fireballSlot == -1) {
|
||||||
Utils.print("&cFireball not found.");
|
Utils.print("&cFireball not found.");
|
||||||
disabled();
|
disabled();
|
||||||
} else if (ModuleManager.scaffold.isEnabled || (pre && Utils.distanceToGround(mc.thePlayer) > 3)/* || (!pre && !PacketUtil.canRightClickItem())*/) { //needs porting
|
} else if ((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.");
|
||||||
disabled();
|
disabled();
|
||||||
fireballSlot = -1;
|
fireballSlot = -1;
|
||||||
|
|
@ -392,6 +414,7 @@ public class LongJump extends Module {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
slotReset = true;
|
slotReset = true;
|
||||||
|
stopModules = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getSpeedLevel() {
|
private int getSpeedLevel() {
|
||||||
|
|
@ -407,12 +430,10 @@ public class LongJump extends Module {
|
||||||
// only apply horizontal boost once
|
// only apply horizontal boost once
|
||||||
void modifyHorizontal() {
|
void modifyHorizontal() {
|
||||||
if (boostSetting.getInput() != 0) {
|
if (boostSetting.getInput() != 0) {
|
||||||
//client.print("&7horizontal &b" + boostTicks + " " + client.getPlayer().getHurtTime());
|
|
||||||
|
|
||||||
double speed = boostSetting.getInput() - Utils.randomizeDouble(0.0001, 0);
|
double speed = ((boostSetting.getInput() > 1.6 && ModuleManager.scaffold.isEnabled) ? 1.6 : boostSetting.getInput()) - Utils.randomizeDouble(0.0001, 0);
|
||||||
if (Utils.isMoving()) {
|
if (Utils.isMoving()) {
|
||||||
Utils.setSpeed(speed);
|
Utils.setSpeed(speed);
|
||||||
//Utils.print("og speed");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -421,7 +442,7 @@ public class LongJump extends Module {
|
||||||
if (verticalMotion.getInput() != 0) {
|
if (verticalMotion.getInput() != 0) {
|
||||||
double ver = ((!notMoving ? verticalMotion.getInput() : 1.16 /*vertical*/) * (1.0 / (1.0 + (0.05 * getSpeedLevel())))) + Utils.randomizeDouble(0.0001, 0.1);
|
double ver = ((!notMoving ? verticalMotion.getInput() : 1.16 /*vertical*/) * (1.0 / (1.0 + (0.05 * getSpeedLevel())))) + Utils.randomizeDouble(0.0001, 0.1);
|
||||||
double decay = motionDecay.getInput() / 1000;
|
double decay = motionDecay.getInput() / 1000;
|
||||||
if (boostTicks > 1 && !temporaryFlightKey()) {
|
if (boostTicks > 1 && !verticalKey()) {
|
||||||
if (boostTicks > 1 || boostTicks <= (!notMoving ? 32/*horizontal motion ticks*/ : 33/*vertical motion ticks*/)) {
|
if (boostTicks > 1 || boostTicks <= (!notMoving ? 32/*horizontal motion ticks*/ : 33/*vertical motion ticks*/)) {
|
||||||
mc.thePlayer.motionY = Utils.randomizeDouble(0.0101, 0.01);
|
mc.thePlayer.motionY = Utils.randomizeDouble(0.0101, 0.01);
|
||||||
}
|
}
|
||||||
|
|
@ -436,9 +457,9 @@ public class LongJump extends Module {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean temporaryFlightKey() {
|
private boolean verticalKey() {
|
||||||
if (notMoving) return true;
|
if (notMoving) return true;
|
||||||
return temporaryFlightKey.isPressed();
|
return beginFlat.isToggled() ? verticalKey.isPressed() : !flatKey.isPressed();
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getKeyCode(String keyName) {
|
private int getKeyCode(String keyName) {
|
||||||
|
|
|
||||||
|
|
@ -232,6 +232,7 @@ public class NoSlow extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static float getSlowed() {
|
public static float getSlowed() {
|
||||||
|
float val = (100.0F - (float) slowed.getInput()) / 100.0F;
|
||||||
if (mc.thePlayer.getHeldItem() == null || ModuleManager.noSlow == null || !ModuleManager.noSlow.isEnabled()) {
|
if (mc.thePlayer.getHeldItem() == null || ModuleManager.noSlow == null || !ModuleManager.noSlow.isEnabled()) {
|
||||||
return 0.2f;
|
return 0.2f;
|
||||||
}
|
}
|
||||||
|
|
@ -248,8 +249,10 @@ public class NoSlow extends Module {
|
||||||
else if (fix) {
|
else if (fix) {
|
||||||
return 0.2f;
|
return 0.2f;
|
||||||
}
|
}
|
||||||
|
else if (ModuleManager.killAura.blocked) {
|
||||||
|
return val;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
float val = (100.0F - (float) slowed.getInput()) / 100.0F;
|
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ public class Sprint extends Module {
|
||||||
private ButtonSetting displayText;
|
private ButtonSetting displayText;
|
||||||
private ButtonSetting rainbow;
|
private ButtonSetting rainbow;
|
||||||
public SliderSetting omniDirectional;
|
public SliderSetting omniDirectional;
|
||||||
|
private SliderSetting floatSetting;
|
||||||
public ButtonSetting disableBackwards;
|
public ButtonSetting disableBackwards;
|
||||||
public String text = "[Sprint (Toggled)]";
|
public String text = "[Sprint (Toggled)]";
|
||||||
public float posX = 5;
|
public float posX = 5;
|
||||||
|
|
@ -52,10 +53,15 @@ public class Sprint extends Module {
|
||||||
this.registerSetting(displayText = new ButtonSetting("Display text", false));
|
this.registerSetting(displayText = new ButtonSetting("Display text", false));
|
||||||
this.registerSetting(rainbow = new ButtonSetting("Rainbow", false));
|
this.registerSetting(rainbow = new ButtonSetting("Rainbow", false));
|
||||||
this.registerSetting(omniDirectional = new SliderSetting("Omni-Directional", 0, omniDirectionalModes));
|
this.registerSetting(omniDirectional = new SliderSetting("Omni-Directional", 0, omniDirectionalModes));
|
||||||
|
this.registerSetting(floatSetting = new SliderSetting("Float speed", "%", 100, 0.0, 100.0, 1.0));
|
||||||
this.registerSetting(disableBackwards = new ButtonSetting("Disable backwards", false));
|
this.registerSetting(disableBackwards = new ButtonSetting("Disable backwards", false));
|
||||||
this.closetModule = true;
|
this.closetModule = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void guiUpdate() {
|
||||||
|
this.floatSetting.setVisible(omniDirectional.getInput() == 3, this);
|
||||||
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onPreMotion(PreMotionEvent e) {
|
public void onPreMotion(PreMotionEvent e) {
|
||||||
|
|
||||||
|
|
@ -234,9 +240,9 @@ public class Sprint extends Module {
|
||||||
double min = 0;
|
double min = 0;
|
||||||
if (mc.thePlayer.moveStrafing != 0 && mc.thePlayer.moveForward != 0) min = 0.003;
|
if (mc.thePlayer.moveStrafing != 0 && mc.thePlayer.moveForward != 0) min = 0.003;
|
||||||
if (speedLevel >= 0) {
|
if (speedLevel >= 0) {
|
||||||
return floatSpeedLevels[speedLevel] - min;
|
return ((floatSpeedLevels[speedLevel] - min) * (floatSetting.getInput() / 100));
|
||||||
}
|
}
|
||||||
return floatSpeedLevels[0] - min;
|
return ((floatSpeedLevels[0] - min) * (floatSetting.getInput() / 100));
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getSpeedLevel() {
|
private int getSpeedLevel() {
|
||||||
|
|
|
||||||
|
|
@ -18,14 +18,16 @@ import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
|
||||||
public class TargetStrafe extends Module {
|
public class TargetStrafe extends Module {
|
||||||
private ButtonSetting bhopOnly;
|
private ButtonSetting requireBhop;
|
||||||
|
private ButtonSetting requireJump;
|
||||||
|
|
||||||
private double angle;
|
private double angle;
|
||||||
private float radius = 0.6f;
|
private float radius = 0.6f;
|
||||||
|
|
||||||
public TargetStrafe() {
|
public TargetStrafe() {
|
||||||
super("TargetStrafe", category.movement);
|
super("TargetStrafe", category.movement);
|
||||||
this.registerSetting(bhopOnly = new ButtonSetting("Require bhop", false));
|
this.registerSetting(requireBhop = new ButtonSetting("Require bhop", false));
|
||||||
|
this.registerSetting(requireJump = new ButtonSetting("Require jump key", false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void guiUpdate() {
|
public void guiUpdate() {
|
||||||
|
|
@ -39,7 +41,10 @@ public class TargetStrafe extends Module {
|
||||||
|
|
||||||
@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 (bhopOnly.isToggled() && !ModuleManager.bhop.isEnabled()) {
|
if (requireBhop.isToggled() && !ModuleManager.bhop.isEnabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (requireJump.isToggled() && !Utils.jumpDown()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ModuleManager.scaffold.isEnabled) {
|
if (ModuleManager.scaffold.isEnabled) {
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ public class BedAura extends Module {
|
||||||
private ButtonSetting sendAnimations;
|
private ButtonSetting sendAnimations;
|
||||||
private ButtonSetting silentSwing;
|
private ButtonSetting silentSwing;
|
||||||
private String[] modes = new String[] { "Legit", "Instant", "Swap" };
|
private String[] modes = new String[] { "Legit", "Instant", "Swap" };
|
||||||
|
|
||||||
private BlockPos[] bedPos;
|
private BlockPos[] bedPos;
|
||||||
public float breakProgress;
|
public float breakProgress;
|
||||||
private int lastSlot = -1;
|
private int lastSlot = -1;
|
||||||
|
|
@ -129,13 +130,16 @@ public class BedAura extends Module {
|
||||||
}
|
}
|
||||||
switch (noAutoBlockTicks) {
|
switch (noAutoBlockTicks) {
|
||||||
case -1:
|
case -1:
|
||||||
resetSlot();
|
|
||||||
noAutoBlockTicks = -2;
|
noAutoBlockTicks = -2;
|
||||||
break;
|
return;
|
||||||
case -2:
|
case -2:
|
||||||
|
resetSlot();
|
||||||
|
noAutoBlockTicks = -3;
|
||||||
|
return;
|
||||||
|
case -3:
|
||||||
stopAutoblock = false;
|
stopAutoblock = false;
|
||||||
noAutoBlockTicks = 0;
|
noAutoBlockTicks = 0;
|
||||||
break;
|
return;
|
||||||
}
|
}
|
||||||
if (breakNearBlock.isToggled() && isCovered(bedPos[0]) && isCovered(bedPos[1])) {
|
if (breakNearBlock.isToggled() && isCovered(bedPos[0]) && isCovered(bedPos[1])) {
|
||||||
if (nearestBlock == null) {
|
if (nearestBlock == null) {
|
||||||
|
|
@ -151,7 +155,7 @@ public class BedAura extends Module {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onReceivePacket(ReceivePacketEvent e) {
|
public void onReceivePacket(ReceivePacketEvent e) {
|
||||||
if (!Utils.nullCheck() || !cancelKnockback()) {
|
if (!Utils.nullCheck() || !cancelKnockback.isToggled() || currentBlock == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (e.getPacket() instanceof S12PacketEntityVelocity) {
|
if (e.getPacket() instanceof S12PacketEntityVelocity) {
|
||||||
|
|
@ -186,7 +190,7 @@ public class BedAura extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
||||||
public void onRenderWorld(RenderWorldLastEvent renderWorldLastEvent) {
|
public void onRenderWorld(RenderWorldLastEvent e) {
|
||||||
if (!renderOutline.isToggled() || currentBlock == null || !Utils.nullCheck()) {
|
if (!renderOutline.isToggled() || currentBlock == null || !Utils.nullCheck()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -387,8 +391,17 @@ public class BedAura extends Module {
|
||||||
if (breakProgress == 0 && !aiming) {
|
if (breakProgress == 0 && !aiming) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!stopAutoblock && breakProgress <= 0 && mode.getInput() == 2 && ModuleManager.killAura.autoBlockOverride()) {
|
if ((!stopAutoblock || noAutoBlockTicks == 99) && breakProgress <= 0 && mode.getInput() == 2 && ModuleManager.killAura.autoBlockOverride()) {
|
||||||
stopAutoblock = true; // if blocking then return and stop autoblocking
|
stopAutoblock = true;
|
||||||
|
if (noAutoBlockTicks == 0) {
|
||||||
|
noAutoBlockTicks = 99;
|
||||||
|
}
|
||||||
|
else if (noAutoBlockTicks == 99) {
|
||||||
|
noAutoBlockTicks = 0;
|
||||||
|
}
|
||||||
|
if (Raven.debug) {
|
||||||
|
Utils.sendModuleMessage(this, "&7stopping autoblock on &3start &7(&b" + mc.thePlayer.ticksExisted + "&7)");
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mode.getInput() == 2 || mode.getInput() == 0) {
|
if (mode.getInput() == 2 || mode.getInput() == 0) {
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ import net.minecraft.network.handshake.client.C00Handshake;
|
||||||
import net.minecraft.network.login.client.C00PacketLoginStart;
|
import net.minecraft.network.login.client.C00PacketLoginStart;
|
||||||
import net.minecraft.network.login.client.C01PacketEncryptionResponse;
|
import net.minecraft.network.login.client.C01PacketEncryptionResponse;
|
||||||
import net.minecraft.network.play.client.C00PacketKeepAlive;
|
import net.minecraft.network.play.client.C00PacketKeepAlive;
|
||||||
|
import net.minecraft.network.play.client.C02PacketUseEntity;
|
||||||
import net.minecraft.network.play.client.C0FPacketConfirmTransaction;
|
import net.minecraft.network.play.client.C0FPacketConfirmTransaction;
|
||||||
import net.minecraft.network.status.client.C00PacketServerQuery;
|
import net.minecraft.network.status.client.C00PacketServerQuery;
|
||||||
import net.minecraft.network.status.client.C01PacketPing;
|
import net.minecraft.network.status.client.C01PacketPing;
|
||||||
|
|
@ -40,7 +41,7 @@ public class Blink extends Module {
|
||||||
private static SliderSetting maximumBlinkTicks;
|
private static SliderSetting maximumBlinkTicks;
|
||||||
private ButtonSetting initialPosition;
|
private ButtonSetting initialPosition;
|
||||||
private ButtonSetting renderTimer;
|
private ButtonSetting renderTimer;
|
||||||
private ButtonSetting disableOnBreak;
|
private ButtonSetting disableOnBreak, disableOnAttack;
|
||||||
private ConcurrentLinkedQueue<Packet> blinkedPackets = new ConcurrentLinkedQueue<>();
|
private ConcurrentLinkedQueue<Packet> blinkedPackets = new ConcurrentLinkedQueue<>();
|
||||||
private Vec3 pos;
|
private Vec3 pos;
|
||||||
//final private int color = Theme.getGradient((int) theme.getInput(), 255);
|
//final private int color = Theme.getGradient((int) theme.getInput(), 255);
|
||||||
|
|
@ -54,6 +55,7 @@ public class Blink extends Module {
|
||||||
this.registerSetting(initialPosition = new ButtonSetting("Show initial position", true));
|
this.registerSetting(initialPosition = new ButtonSetting("Show initial position", true));
|
||||||
this.registerSetting(renderTimer = new ButtonSetting("Render Timer", false));
|
this.registerSetting(renderTimer = new ButtonSetting("Render Timer", false));
|
||||||
this.registerSetting(disableOnBreak = new ButtonSetting("Disable on Break", false));
|
this.registerSetting(disableOnBreak = new ButtonSetting("Disable on Break", false));
|
||||||
|
this.registerSetting(disableOnAttack = new ButtonSetting("Disable on Attack", false));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -95,6 +97,10 @@ public class Blink extends Module {
|
||||||
if (packet instanceof C00PacketLoginStart || packet instanceof C00Handshake) {
|
if (packet instanceof C00PacketLoginStart || packet instanceof C00Handshake) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (disableOnAttack.isToggled() && packet instanceof C02PacketUseEntity || blinkTicks >= 99999) {
|
||||||
|
blinkTicks = 99999;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!e.isCanceled()) {
|
if (!e.isCanceled()) {
|
||||||
started = true;
|
started = true;
|
||||||
blinkedPackets.add(packet);
|
blinkedPackets.add(packet);
|
||||||
|
|
@ -116,11 +122,14 @@ public class Blink extends Module {
|
||||||
disable();
|
disable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (blinkTicks >= 99999) {
|
||||||
|
disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onRenderTick(TickEvent.RenderTickEvent ev) {
|
public void onRenderTick(TickEvent.RenderTickEvent ev) {
|
||||||
if (!Utils.nullCheck() || !renderTimer.isToggled() || blinkTicks == 0) {
|
if (!Utils.nullCheck() || !renderTimer.isToggled() || blinkTicks == 0 || blinkTicks >= 99999) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ev.phase == TickEvent.Phase.END) {
|
if (ev.phase == TickEvent.Phase.END) {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ package keystrokesmod.module.impl.player;
|
||||||
|
|
||||||
import keystrokesmod.event.PreMotionEvent;
|
import keystrokesmod.event.PreMotionEvent;
|
||||||
import keystrokesmod.event.PreUpdateEvent;
|
import keystrokesmod.event.PreUpdateEvent;
|
||||||
|
import keystrokesmod.event.ReceivePacketEvent;
|
||||||
|
import keystrokesmod.event.SendPacketEvent;
|
||||||
import keystrokesmod.module.Module;
|
import keystrokesmod.module.Module;
|
||||||
import keystrokesmod.module.setting.impl.ButtonSetting;
|
import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||||
import keystrokesmod.module.setting.impl.SliderSetting;
|
import keystrokesmod.module.setting.impl.SliderSetting;
|
||||||
|
|
@ -12,17 +14,24 @@ import keystrokesmod.utility.Reflection;
|
||||||
import keystrokesmod.utility.Utils;
|
import keystrokesmod.utility.Utils;
|
||||||
import net.minecraft.client.gui.GuiIngame;
|
import net.minecraft.client.gui.GuiIngame;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.network.Packet;
|
||||||
import net.minecraft.network.play.client.C03PacketPlayer;
|
import net.minecraft.network.play.client.C03PacketPlayer;
|
||||||
|
import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement;
|
||||||
|
import net.minecraft.network.play.server.*;
|
||||||
import net.minecraft.util.BlockPos;
|
import net.minecraft.util.BlockPos;
|
||||||
import net.minecraftforge.client.event.ClientChatReceivedEvent;
|
import net.minecraftforge.client.event.ClientChatReceivedEvent;
|
||||||
|
import net.minecraftforge.client.event.sound.SoundEvent;
|
||||||
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 java.util.Objects;
|
||||||
|
|
||||||
public class NoFall extends Module {
|
public class NoFall extends Module {
|
||||||
public SliderSetting mode;
|
public SliderSetting mode;
|
||||||
private SliderSetting minFallDistance;
|
private SliderSetting minFallDistance;
|
||||||
private ButtonSetting disableAdventure;
|
private ButtonSetting disableAdventure;
|
||||||
private ButtonSetting ignoreVoid;
|
private ButtonSetting ignoreVoid;
|
||||||
|
private ButtonSetting hideSound;
|
||||||
private String[] modes = new String[]{"Spoof", "NoGround", "Packet A", "Packet B", "CTW Packet"};
|
private String[] modes = new String[]{"Spoof", "NoGround", "Packet A", "Packet B", "CTW Packet"};
|
||||||
|
|
||||||
private double initialY;
|
private double initialY;
|
||||||
|
|
@ -35,12 +44,33 @@ public class NoFall extends Module {
|
||||||
this.registerSetting(disableAdventure = new ButtonSetting("Disable adventure", false));
|
this.registerSetting(disableAdventure = new ButtonSetting("Disable adventure", false));
|
||||||
this.registerSetting(minFallDistance = new SliderSetting("Minimum fall distance", 3, 0, 10, 0.1));
|
this.registerSetting(minFallDistance = new SliderSetting("Minimum fall distance", 3, 0, 10, 0.1));
|
||||||
this.registerSetting(ignoreVoid = new ButtonSetting("Ignore void", true));
|
this.registerSetting(ignoreVoid = new ButtonSetting("Ignore void", true));
|
||||||
|
//this.registerSetting(hideSound = new ButtonSetting("Hide fall damage sound", false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
Utils.resetTimer();
|
Utils.resetTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*@SubscribeEvent
|
||||||
|
public void onReceivePacket(ReceivePacketEvent e) {
|
||||||
|
if (e.getPacket() instanceof S29PacketSoundEffect) {
|
||||||
|
S29PacketSoundEffect s29 = (S29PacketSoundEffect) e.getPacket();
|
||||||
|
/*if (!Objects.equals(String.valueOf(s29.getSoundName()), "random.explode")) {
|
||||||
|
|
||||||
|
}*/
|
||||||
|
/*Utils.print("" + s29.getSoundName());
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/*@SubscribeEvent
|
||||||
|
public void onSoundEvent(SoundEvent.SoundSourceEvent e) {
|
||||||
|
if (e.name.startsWith("game.player.hurt.fall")) {
|
||||||
|
Utils.print("Fall dmg sound");
|
||||||
|
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onPreUpdate(PreUpdateEvent e) {
|
public void onPreUpdate(PreUpdateEvent e) {
|
||||||
if (reset()) {
|
if (reset()) {
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,7 @@ public class Safewalk extends Module {
|
||||||
|
|
||||||
private int unsneakDelayTicks = 0;
|
private int unsneakDelayTicks = 0;
|
||||||
private boolean isSneaking;
|
private boolean isSneaking;
|
||||||
private boolean hasSneaked;
|
private boolean canSneak;
|
||||||
private Vec3 pos;
|
|
||||||
|
|
||||||
public Safewalk() {
|
public Safewalk() {
|
||||||
super("Safewalk", Module.category.player, 0);
|
super("Safewalk", Module.category.player, 0);
|
||||||
|
|
@ -55,7 +54,6 @@ public class Safewalk extends Module {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onPostPlayerInput(PostPlayerInputEvent e) {
|
public void onPostPlayerInput(PostPlayerInputEvent e) {
|
||||||
Vec3 current = new Vec3((int) mc.thePlayer.posX, (int) mc.thePlayer.posY, (int) mc.thePlayer.posZ);
|
|
||||||
if (!sneak.isToggled() || !Utils.nullCheck()) {
|
if (!sneak.isToggled() || !Utils.nullCheck()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -64,10 +62,9 @@ public class Safewalk extends Module {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
boolean edge = mc.thePlayer.onGround && Utils.isEdgeOfBlock();
|
boolean edge = mc.thePlayer.onGround && Utils.isEdgeOfBlock();
|
||||||
if (edge && !hasSneaked) {
|
if (edge) {
|
||||||
if (!this.isSneaking) {
|
if (!this.isSneaking) {
|
||||||
hasSneaked = true;
|
canSneak = true;
|
||||||
pos = new Vec3((int) mc.thePlayer.posX, (int) mc.thePlayer.posY, (int) mc.thePlayer.posZ);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -75,13 +72,13 @@ public class Safewalk extends Module {
|
||||||
if (unsneakDelayTicks > 0) {
|
if (unsneakDelayTicks > 0) {
|
||||||
unsneakDelayTicks--;
|
unsneakDelayTicks--;
|
||||||
}
|
}
|
||||||
else if (!current.equals(pos)) {
|
else {
|
||||||
this.setSneakState(false);
|
this.setSneakState(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (hasSneaked) {
|
if (canSneak) {
|
||||||
this.setSneakState(true);
|
this.setSneakState(true);
|
||||||
unsneakDelayTicks = (int) sneakDelay.getInput();
|
unsneakDelayTicks = (int) sneakDelay.getInput();
|
||||||
}
|
}
|
||||||
|
|
@ -104,7 +101,7 @@ public class Safewalk extends Module {
|
||||||
if (!sneakState && Utils.isBindDown(mc.gameSettings.keyBindSneak)) {
|
if (!sneakState && Utils.isBindDown(mc.gameSettings.keyBindSneak)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
hasSneaked = sneakState;
|
canSneak = sneakState;
|
||||||
mc.thePlayer.movementInput.sneak = sneakState;
|
mc.thePlayer.movementInput.sneak = sneakState;
|
||||||
this.isSneaking = sneakState;
|
this.isSneaking = sneakState;
|
||||||
//Utils.print("Edge " + mc.thePlayer.movementInput.sneak + " " + sneakState + " " + mc.thePlayer.ticksExisted);
|
//Utils.print("Edge " + mc.thePlayer.movementInput.sneak + " " + sneakState + " " + mc.thePlayer.ticksExisted);
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import keystrokesmod.event.*;
|
||||||
import keystrokesmod.mixin.interfaces.IMixinItemRenderer;
|
import keystrokesmod.mixin.interfaces.IMixinItemRenderer;
|
||||||
import keystrokesmod.module.Module;
|
import keystrokesmod.module.Module;
|
||||||
import keystrokesmod.module.ModuleManager;
|
import keystrokesmod.module.ModuleManager;
|
||||||
|
import keystrokesmod.module.impl.movement.Bhop;
|
||||||
import keystrokesmod.module.impl.movement.LongJump;
|
import keystrokesmod.module.impl.movement.LongJump;
|
||||||
import keystrokesmod.module.setting.impl.ButtonSetting;
|
import keystrokesmod.module.setting.impl.ButtonSetting;
|
||||||
import keystrokesmod.module.setting.impl.SliderSetting;
|
import keystrokesmod.module.setting.impl.SliderSetting;
|
||||||
|
|
@ -38,10 +39,10 @@ public class Scaffold extends Module {
|
||||||
private final SliderSetting motion;
|
private final SliderSetting motion;
|
||||||
public SliderSetting rotation, fakeRotation;
|
public SliderSetting rotation, fakeRotation;
|
||||||
private SliderSetting sprint;
|
private SliderSetting sprint;
|
||||||
|
private SliderSetting floatFirstJump;
|
||||||
private SliderSetting fastScaffold;
|
private SliderSetting fastScaffold;
|
||||||
private SliderSetting multiPlace;
|
private SliderSetting multiPlace;
|
||||||
public ButtonSetting autoSwap;
|
public ButtonSetting autoSwap;
|
||||||
private ButtonSetting cancelKnockBack;
|
|
||||||
private ButtonSetting fastOnRMB;
|
private ButtonSetting fastOnRMB;
|
||||||
public ButtonSetting highlightBlocks;
|
public ButtonSetting highlightBlocks;
|
||||||
private ButtonSetting jumpFacingForward;
|
private ButtonSetting jumpFacingForward;
|
||||||
|
|
@ -52,18 +53,32 @@ public class Scaffold extends Module {
|
||||||
private String[] rotationModes = new String[] { "§cDisabled", "Simple", "Offset", "Precise" };
|
private String[] rotationModes = new String[] { "§cDisabled", "Simple", "Offset", "Precise" };
|
||||||
private String[] fakeRotationModes = new String[] { "§cDisabled", "Strict", "Smooth", "Spin" };
|
private String[] fakeRotationModes = new String[] { "§cDisabled", "Strict", "Smooth", "Spin" };
|
||||||
private String[] sprintModes = new String[] { "§cDisabled", "Vanilla", "Float" };
|
private String[] sprintModes = new String[] { "§cDisabled", "Vanilla", "Float" };
|
||||||
private String[] fastScaffoldModes = new String[] { "§cDisabled", "Jump B", "Jump B Low", "Jump E", "Keep-Y", "Keep-Y Low", "Jump Nigger" };
|
private String[] fastScaffoldModes = new String[] { "§cDisabled", "Jump A", "Jump B", "Jump B Low", "Jump E", "Keep-Y", "Keep-Y Low" };
|
||||||
private String[] multiPlaceModes = new String[] { "§cDisabled", "1 extra", "2 extra" };
|
private String[] multiPlaceModes = new String[] { "§cDisabled", "1 extra", "2 extra" };
|
||||||
|
|
||||||
|
//Highlight blocks
|
||||||
public Map<BlockPos, Timer> highlight = new HashMap<>();
|
public Map<BlockPos, Timer> highlight = new HashMap<>();
|
||||||
|
public boolean canBlockFade;
|
||||||
|
|
||||||
|
//Block count
|
||||||
private ScaffoldBlockCount scaffoldBlockCount;
|
private ScaffoldBlockCount scaffoldBlockCount;
|
||||||
|
|
||||||
|
//swapping related
|
||||||
public AtomicInteger lastSlot = new AtomicInteger(-1);
|
public AtomicInteger lastSlot = new AtomicInteger(-1);
|
||||||
|
private int spoofSlot;
|
||||||
public boolean hasSwapped;
|
public boolean hasSwapped;
|
||||||
private boolean hasPlaced;
|
private int blockSlot = -1;
|
||||||
|
|
||||||
|
//placements related
|
||||||
|
private boolean hasPlaced, finishProcedure, canPlace;
|
||||||
|
private PlaceData lastPlacement;
|
||||||
|
private EnumFacing[] facings = { EnumFacing.EAST, EnumFacing.WEST, EnumFacing.NORTH, EnumFacing.SOUTH, EnumFacing.UP };
|
||||||
|
private BlockPos[] offsets = { new BlockPos(-1, 0, 0), new BlockPos(1, 0, 0), new BlockPos(0, 0, 1), new BlockPos(0, 0, -1), new BlockPos(0, -1, 0) };
|
||||||
|
private Vec3 targetBlock;
|
||||||
|
private PlaceData blockInfo;
|
||||||
|
private Vec3 blockPos, hitVec, lookVec;
|
||||||
|
|
||||||
|
//bypass related
|
||||||
private boolean rotateForward;
|
private boolean rotateForward;
|
||||||
private double startYPos = -1;
|
private double startYPos = -1;
|
||||||
public boolean fastScaffoldKeepY;
|
public boolean fastScaffoldKeepY;
|
||||||
|
|
@ -72,27 +87,12 @@ public class Scaffold extends Module {
|
||||||
private int keepYTicks;
|
private int keepYTicks;
|
||||||
public boolean lowhop;
|
public boolean lowhop;
|
||||||
private int rotationDelay;
|
private int rotationDelay;
|
||||||
private int blockSlot = -1;
|
|
||||||
|
|
||||||
private float fakeYaw1, fakeYaw2;
|
|
||||||
|
|
||||||
public boolean canBlockFade;
|
|
||||||
|
|
||||||
private boolean floatJumped;
|
private boolean floatJumped;
|
||||||
private boolean floatStarted;
|
private boolean floatStarted;
|
||||||
private boolean floatWasEnabled;
|
private boolean floatWasEnabled;
|
||||||
private boolean floatKeepY;
|
private boolean floatKeepY;
|
||||||
|
|
||||||
private Vec3 targetBlock;
|
//disable checks
|
||||||
private PlaceData blockInfo;
|
|
||||||
private Vec3 blockPos, hitVec, lookVec;
|
|
||||||
private float[] blockRotations;
|
|
||||||
private long lastPlaceTime, rotationTimeout = 250L;
|
|
||||||
private float lastYaw = 0.0f;
|
|
||||||
private float lastPitch = 0.0f;
|
|
||||||
public float scaffoldYaw, scaffoldPitch, blockYaw, groundYaw, yawOffset, lastYawOffset;
|
|
||||||
private boolean set2;
|
|
||||||
|
|
||||||
public boolean moduleEnabled;
|
public boolean moduleEnabled;
|
||||||
public boolean isEnabled;
|
public boolean isEnabled;
|
||||||
private boolean disabledModule;
|
private boolean disabledModule;
|
||||||
|
|
@ -100,32 +100,21 @@ public class Scaffold extends Module {
|
||||||
private int disableTicks;
|
private int disableTicks;
|
||||||
private int scaffoldTicks;
|
private int scaffoldTicks;
|
||||||
|
|
||||||
|
//rotation related
|
||||||
private boolean was451, was452;
|
private boolean was451, was452;
|
||||||
|
|
||||||
private float minOffset, pOffset;
|
private float minOffset, pOffset;
|
||||||
private float minPitch = 80F;
|
private float minPitch = 80F;
|
||||||
|
|
||||||
private float edge;
|
private float edge;
|
||||||
|
|
||||||
private long firstStroke;
|
private long firstStroke;
|
||||||
private float lastEdge, lastEdge2, yawAngle, theYaw;
|
private float lastEdge2, yawAngle, theYaw;
|
||||||
private boolean lastAir;
|
|
||||||
private double thisX, thisY, thisZ;
|
|
||||||
|
|
||||||
private float finalYaw, finalPitch, lastFY, lastFP;
|
|
||||||
private boolean set3;
|
|
||||||
|
|
||||||
private float fakeYaw, fakePitch;
|
|
||||||
|
|
||||||
private int speedEdge;
|
|
||||||
|
|
||||||
private int currentFace;
|
|
||||||
private boolean enabledOffGround = false;
|
private boolean enabledOffGround = false;
|
||||||
|
private float[] blockRotations;
|
||||||
|
public float scaffoldYaw, scaffoldPitch, blockYaw, yawOffset;
|
||||||
|
private boolean set2;
|
||||||
|
//fake rotations
|
||||||
|
private float fakeYaw, fakePitch;
|
||||||
|
private float fakeYaw1, fakeYaw2;
|
||||||
|
|
||||||
private EnumFacing[] facings = { EnumFacing.EAST, EnumFacing.WEST, EnumFacing.NORTH, EnumFacing.SOUTH, EnumFacing.UP };
|
|
||||||
private BlockPos[] offsets = { new BlockPos(-1, 0, 0), new BlockPos(1, 0, 0), new BlockPos(0, 0, 1), new BlockPos(0, 0, -1), new BlockPos(0, -1, 0) };
|
|
||||||
|
|
||||||
//private final SliderSetting offsetAmount;
|
|
||||||
|
|
||||||
public Scaffold() {
|
public Scaffold() {
|
||||||
super("Scaffold", category.player);
|
super("Scaffold", category.player);
|
||||||
|
|
@ -133,10 +122,10 @@ public class Scaffold extends Module {
|
||||||
this.registerSetting(rotation = new SliderSetting("Rotation", 1, rotationModes));
|
this.registerSetting(rotation = new SliderSetting("Rotation", 1, rotationModes));
|
||||||
this.registerSetting(fakeRotation = new SliderSetting("Rotation (fake)", 0, fakeRotationModes));
|
this.registerSetting(fakeRotation = new SliderSetting("Rotation (fake)", 0, fakeRotationModes));
|
||||||
this.registerSetting(sprint = new SliderSetting("Sprint mode", 0, sprintModes));
|
this.registerSetting(sprint = new SliderSetting("Sprint mode", 0, sprintModes));
|
||||||
|
this.registerSetting(floatFirstJump = new SliderSetting("§eFloat §rfirst jump speed", "%", 100, 50, 100, 1));
|
||||||
this.registerSetting(fastScaffold = new SliderSetting("Fast scaffold", 0, fastScaffoldModes));
|
this.registerSetting(fastScaffold = new SliderSetting("Fast scaffold", 0, fastScaffoldModes));
|
||||||
this.registerSetting(multiPlace = new SliderSetting("Multi-place", 0, multiPlaceModes));
|
this.registerSetting(multiPlace = new SliderSetting("Multi-place", 0, multiPlaceModes));
|
||||||
this.registerSetting(autoSwap = new ButtonSetting("Auto swap", true));
|
this.registerSetting(autoSwap = new ButtonSetting("Auto swap", true));
|
||||||
this.registerSetting(cancelKnockBack = new ButtonSetting("Cancel knockback", false));
|
|
||||||
this.registerSetting(fastOnRMB = new ButtonSetting("Fast on RMB", true));
|
this.registerSetting(fastOnRMB = new ButtonSetting("Fast on RMB", true));
|
||||||
this.registerSetting(highlightBlocks = new ButtonSetting("Highlight blocks", true));
|
this.registerSetting(highlightBlocks = new ButtonSetting("Highlight blocks", true));
|
||||||
this.registerSetting(jumpFacingForward = new ButtonSetting("Jump facing forward", false));
|
this.registerSetting(jumpFacingForward = new ButtonSetting("Jump facing forward", false));
|
||||||
|
|
@ -150,6 +139,10 @@ public class Scaffold extends Module {
|
||||||
this.alwaysOn = true;
|
this.alwaysOn = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void guiUpdate() {
|
||||||
|
this.floatFirstJump.setVisible(sprint.getInput() == 2, this);
|
||||||
|
}
|
||||||
|
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
if (ModuleManager.tower.canTower() && (ModuleManager.tower.dCount == 0 || !Utils.isMoving())) {
|
if (ModuleManager.tower.canTower() && (ModuleManager.tower.dCount == 0 || !Utils.isMoving())) {
|
||||||
towerEdge = true;
|
towerEdge = true;
|
||||||
|
|
@ -205,9 +198,8 @@ public class Scaffold extends Module {
|
||||||
if (scaffoldTicks > 1) {
|
if (scaffoldTicks > 1) {
|
||||||
rotateForward();
|
rotateForward();
|
||||||
mc.thePlayer.jump();
|
mc.thePlayer.jump();
|
||||||
Utils.setSpeed(getSpeed(getSpeedLevel()) - Utils.randomizeDouble(0.0003, 0.0001));
|
Utils.setSpeed((getSpeed(getSpeedLevel()) - Utils.randomizeDouble(0.0003, 0.0001) * ModuleUtils.applyFrictionMulti()));
|
||||||
speedEdge++;
|
if (fastScaffold.getInput() == 6 || fastScaffold.getInput() == 3 && firstKeepYPlace) {
|
||||||
if (fastScaffold.getInput() == 5 || fastScaffold.getInput() == 2 && firstKeepYPlace) {
|
|
||||||
lowhop = true;
|
lowhop = true;
|
||||||
}
|
}
|
||||||
//Utils.print("Keepy");
|
//Utils.print("Keepy");
|
||||||
|
|
@ -221,11 +213,11 @@ public class Scaffold extends Module {
|
||||||
else if (fastScaffoldKeepY) {
|
else if (fastScaffoldKeepY) {
|
||||||
fastScaffoldKeepY = firstKeepYPlace = false;
|
fastScaffoldKeepY = firstKeepYPlace = false;
|
||||||
startYPos = -1;
|
startYPos = -1;
|
||||||
keepYTicks = speedEdge = 0;
|
keepYTicks = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Float
|
//Float
|
||||||
if (sprint.getInput() == 2 && !usingFastScaffold() && !ModuleManager.bhop.isEnabled() && !ModuleManager.tower.canTower() && !ModuleManager.LongJump.function) {
|
if (sprint.getInput() == 2 && !usingFastScaffold() && !fastScaffoldKeepY && !ModuleManager.bhop.isEnabled() && !ModuleManager.tower.canTower() && !ModuleManager.LongJump.function) {
|
||||||
floatWasEnabled = true;
|
floatWasEnabled = true;
|
||||||
if (!floatStarted) {
|
if (!floatStarted) {
|
||||||
if (ModuleUtils.groundTicks > 8 && mc.thePlayer.onGround) {
|
if (ModuleUtils.groundTicks > 8 && mc.thePlayer.onGround) {
|
||||||
|
|
@ -233,7 +225,8 @@ public class Scaffold extends Module {
|
||||||
startYPos = e.posY;
|
startYPos = e.posY;
|
||||||
mc.thePlayer.jump();
|
mc.thePlayer.jump();
|
||||||
if (Utils.isMoving()) {
|
if (Utils.isMoving()) {
|
||||||
Utils.setSpeed(getSpeed(getSpeedLevel()) - Utils.randomizeDouble(0.0003, 0.0001));
|
double fvl = (getSpeed(getSpeedLevel()) - Utils.randomizeDouble(0.0003, 0.0001)) * (floatFirstJump.getInput() / 100);
|
||||||
|
Utils.setSpeed(fvl);
|
||||||
}
|
}
|
||||||
floatJumped = true;
|
floatJumped = true;
|
||||||
} else if (ModuleUtils.groundTicks <= 8 && mc.thePlayer.onGround) {
|
} else if (ModuleUtils.groundTicks <= 8 && mc.thePlayer.onGround) {
|
||||||
|
|
@ -272,10 +265,7 @@ public class Scaffold extends Module {
|
||||||
switch ((int) rotation.getInput()) {
|
switch ((int) rotation.getInput()) {
|
||||||
case 1:
|
case 1:
|
||||||
scaffoldYaw = mc.thePlayer.rotationYaw - hardcodedYaw();
|
scaffoldYaw = mc.thePlayer.rotationYaw - hardcodedYaw();
|
||||||
scaffoldPitch = 79F;
|
scaffoldPitch = 78F;
|
||||||
if (currentFace == 1) {
|
|
||||||
scaffoldPitch = 87F;
|
|
||||||
}
|
|
||||||
e.setRotations(scaffoldYaw, scaffoldPitch);
|
e.setRotations(scaffoldYaw, scaffoldPitch);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
|
@ -291,39 +281,39 @@ public class Scaffold extends Module {
|
||||||
long strokeDelay = 250;
|
long strokeDelay = 250;
|
||||||
|
|
||||||
if (quad <= 5 || quad >= 85) {
|
if (quad <= 5 || quad >= 85) {
|
||||||
yawAngle = 127.40F;
|
yawAngle = 126.50F;
|
||||||
minOffset = 13;
|
minOffset = 13;
|
||||||
minPitch = 75.48F;
|
minPitch = 77.08F;
|
||||||
}
|
}
|
||||||
if (quad > 5 && quad <= 15 || quad >= 75 && quad < 85) {
|
if (quad > 5 && quad <= 15 || quad >= 75 && quad < 85) {
|
||||||
yawAngle = 128.55F;
|
yawAngle = 127.50F;
|
||||||
minOffset = 11;
|
minOffset = 10;
|
||||||
minPitch = 75.74F;
|
minPitch = 77.34F;
|
||||||
}
|
}
|
||||||
if (quad > 15 && quad <= 25 || quad >= 65 && quad < 75) {
|
if (quad > 15 && quad <= 25 || quad >= 65 && quad < 75) {
|
||||||
yawAngle = 129.70F;
|
yawAngle = 128.50F;
|
||||||
minOffset = 8;
|
minOffset = 7;
|
||||||
minPitch = 75.95F;
|
minPitch = 77.65F;
|
||||||
}
|
}
|
||||||
if (quad > 25 && quad <= 32 || quad >= 58 && quad < 65) {
|
if (quad > 25 && quad <= 32 || quad >= 58 && quad < 65) {
|
||||||
yawAngle = 130.85F;
|
yawAngle = 130F;
|
||||||
minOffset = 6;
|
minOffset = 6;
|
||||||
minPitch = 76.13F;
|
minPitch = 78.13F;
|
||||||
}
|
}
|
||||||
if (quad > 32 && quad <= 38 || quad >= 52 && quad < 58) {
|
if (quad > 32 && quad <= 38 || quad >= 52 && quad < 58) {
|
||||||
yawAngle = 131.80F;
|
yawAngle = 131.50F;
|
||||||
minOffset = 5;
|
minOffset = 4;
|
||||||
minPitch = 76.41F;
|
minPitch = 78.41F;
|
||||||
}
|
}
|
||||||
if (quad > 38 && quad <= 42 || quad >= 48 && quad < 52) {
|
if (quad > 38 && quad <= 42 || quad >= 48 && quad < 52) {
|
||||||
yawAngle = 134.30F;
|
yawAngle = 133.50F;
|
||||||
minOffset = 4;
|
minOffset = 2;
|
||||||
minPitch = 77.54F;
|
minPitch = 79.54F;
|
||||||
}
|
}
|
||||||
if (quad > 42 && quad <= 45 || quad >= 45 && quad < 48) {
|
if (quad > 42 && quad <= 45 || quad >= 45 && quad < 48) {
|
||||||
yawAngle = 137.85F;
|
yawAngle = 137F;
|
||||||
minOffset = 3;
|
minOffset = 1;
|
||||||
minPitch = 77.93F;
|
minPitch = 79.93F;
|
||||||
}
|
}
|
||||||
//Utils.print("" + minOffset);
|
//Utils.print("" + minOffset);
|
||||||
//float offsetAmountD = ((((float) offsetAmount.getInput() / 10) - 10) * -2) - (((float) offsetAmount.getInput() / 10) - 10);
|
//float offsetAmountD = ((((float) offsetAmount.getInput() / 10) - 10) * -2) - (((float) offsetAmount.getInput() / 10) - 10);
|
||||||
|
|
@ -343,7 +333,7 @@ public class Scaffold extends Module {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
scaffoldYaw = mc.thePlayer.rotationYaw - hardcodedYaw();
|
scaffoldYaw = mc.thePlayer.rotationYaw - hardcodedYaw();
|
||||||
scaffoldPitch = 78f;
|
scaffoldPitch = 77f;
|
||||||
}
|
}
|
||||||
e.setRotations(scaffoldYaw, scaffoldPitch);
|
e.setRotations(scaffoldYaw, scaffoldPitch);
|
||||||
break;
|
break;
|
||||||
|
|
@ -363,9 +353,6 @@ public class Scaffold extends Module {
|
||||||
}
|
}
|
||||||
yawOffset = 0;
|
yawOffset = 0;
|
||||||
}
|
}
|
||||||
//minOffset = 0;//turning this off for now
|
|
||||||
Block blockBelow = BlockUtils.getBlock(new BlockPos(Utils.getPosDirectionX(2), mc.thePlayer.posY - 1, Utils.getPosDirectionZ(2)));
|
|
||||||
lastAir = blockBelow instanceof BlockAir;
|
|
||||||
|
|
||||||
if (!Utils.isMoving() || Utils.getHorizontalSpeed() == 0.0D) {
|
if (!Utils.isMoving() || Utils.getHorizontalSpeed() == 0.0D) {
|
||||||
e.setRotations(theYaw, scaffoldPitch);
|
e.setRotations(theYaw, scaffoldPitch);
|
||||||
|
|
@ -537,13 +524,8 @@ public class Scaffold extends Module {
|
||||||
e.setPitch(89.9F);
|
e.setPitch(89.9F);
|
||||||
}
|
}
|
||||||
|
|
||||||
lastYaw = mc.thePlayer.rotationYaw;
|
|
||||||
if (lastPlaceTime > 0 && (System.currentTimeMillis() - lastPlaceTime) > rotationTimeout) blockRotations = null;
|
|
||||||
if (rotationDelay > 0) --rotationDelay;
|
if (rotationDelay > 0) --rotationDelay;
|
||||||
|
|
||||||
finalYaw = e.getYaw();
|
|
||||||
finalPitch = e.getPitch();
|
|
||||||
|
|
||||||
//Fake rotations
|
//Fake rotations
|
||||||
if (fakeRotation.getInput() > 0) {
|
if (fakeRotation.getInput() > 0) {
|
||||||
if (fakeRotation.getInput() == 1) {
|
if (fakeRotation.getInput() == 1) {
|
||||||
|
|
@ -551,7 +533,7 @@ public class Scaffold extends Module {
|
||||||
if (blockRotations != null) {
|
if (blockRotations != null) {
|
||||||
fakePitch = blockRotations[1] + 5;
|
fakePitch = blockRotations[1] + 5;
|
||||||
} else {
|
} else {
|
||||||
fakePitch = scaffoldPitch;
|
fakePitch = 80f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (fakeRotation.getInput() == 2) {
|
else if (fakeRotation.getInput() == 2) {
|
||||||
|
|
@ -565,7 +547,7 @@ public class Scaffold extends Module {
|
||||||
if (blockRotations != null) {
|
if (blockRotations != null) {
|
||||||
fakePitch = blockRotations[1] + 5;
|
fakePitch = blockRotations[1] + 5;
|
||||||
} else {
|
} else {
|
||||||
fakePitch = scaffoldPitch;
|
fakePitch = 80f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (fakeRotation.getInput() == 3) {
|
else if (fakeRotation.getInput() == 3) {
|
||||||
|
|
@ -577,23 +559,18 @@ public class Scaffold extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onSendPacket(SendPacketEvent e) {
|
public void onPostPlayerInput(PostPlayerInputEvent e) {
|
||||||
if (!Utils.nullCheck()) {
|
if (!ModuleManager.scaffold.isEnabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!isEnabled) {
|
mc.thePlayer.movementInput.jump = false;
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (e.getPacket() instanceof C08PacketPlayerBlockPlacement) {
|
|
||||||
currentFace = ((C08PacketPlayerBlockPlacement) e.getPacket()).getPlacedBlockDirection();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onSlotUpdate(SlotUpdateEvent e) {
|
public void onSlotUpdate(SlotUpdateEvent e) {
|
||||||
if (isEnabled) {
|
if (isEnabled) {
|
||||||
lastSlot.set(e.slot);
|
lastSlot.set(e.slot);
|
||||||
//Utils.print("Switched slot | " + e.slot);
|
e.setCanceled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -605,15 +582,27 @@ public class Scaffold extends Module {
|
||||||
if (LongJump.function) {
|
if (LongJump.function) {
|
||||||
startYPos = -1;
|
startYPos = -1;
|
||||||
}
|
}
|
||||||
|
if (LongJump.stopModules) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (ModuleManager.killAura.isTargeting || ModuleManager.killAura.justUnTargeted) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (holdingBlocks() && setSlot()) {
|
if (holdingBlocks() && setSlot()) {
|
||||||
|
if (moduleEnabled && !finishProcedure) {
|
||||||
if (LongJump.stopModules) {
|
if (Utils.distanceToGround(mc.thePlayer) <= 3) {
|
||||||
//Utils.print("Stopped scaffold due to longjump swapping");
|
canPlace = true;
|
||||||
return;
|
finishProcedure = true;
|
||||||
}
|
}
|
||||||
if (ModuleManager.killAura.isTargeting || ModuleManager.killAura.justUnTargeted) {
|
if (Utils.distanceToGround(mc.thePlayer) > 6) {
|
||||||
//Utils.print("Stopped scaffold due to ka untargeting");
|
canPlace = true;
|
||||||
return;
|
if (hasPlaced) {
|
||||||
|
finishProcedure = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!finishProcedure) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hasSwapped = true;
|
hasSwapped = true;
|
||||||
|
|
@ -629,25 +618,25 @@ public class Scaffold extends Module {
|
||||||
if ((int) mc.thePlayer.posY > (int) startYPos) {
|
if ((int) mc.thePlayer.posY > (int) startYPos) {
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case 1:
|
case 1:
|
||||||
if (!firstKeepYPlace && keepYTicks == 8 || keepYTicks == 11) {
|
if (!firstKeepYPlace && keepYTicks == 3) {
|
||||||
placeBlock(1, 0);
|
placeBlock(1, 0);
|
||||||
firstKeepYPlace = true;
|
firstKeepYPlace = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (!firstKeepYPlace && keepYTicks == 8 || firstKeepYPlace && keepYTicks == 7) {
|
if (!firstKeepYPlace && keepYTicks == 8 || keepYTicks == 11) {
|
||||||
placeBlock(1, 0);
|
placeBlock(1, 0);
|
||||||
firstKeepYPlace = true;
|
firstKeepYPlace = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (!firstKeepYPlace && keepYTicks == 7) {
|
if (!firstKeepYPlace && keepYTicks == 8 || firstKeepYPlace && keepYTicks == 7) {
|
||||||
placeBlock(1, 0);
|
placeBlock(1, 0);
|
||||||
firstKeepYPlace = true;
|
firstKeepYPlace = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 4:
|
||||||
if (!firstKeepYPlace && keepYTicks == 3) {
|
if (!firstKeepYPlace && keepYTicks == 7) {
|
||||||
placeBlock(1, 0);
|
placeBlock(1, 0);
|
||||||
firstKeepYPlace = true;
|
firstKeepYPlace = true;
|
||||||
}
|
}
|
||||||
|
|
@ -698,34 +687,16 @@ public class Scaffold extends Module {
|
||||||
blockInfo = null;
|
blockInfo = null;
|
||||||
blockRotations = null;
|
blockRotations = null;
|
||||||
fastScaffoldKeepY = firstKeepYPlace = rotateForward = rotatingForward = floatStarted = floatJumped = floatWasEnabled = towerEdge =
|
fastScaffoldKeepY = firstKeepYPlace = rotateForward = rotatingForward = floatStarted = floatJumped = floatWasEnabled = towerEdge =
|
||||||
was451 = was452 = lastAir = enabledOffGround = false;
|
was451 = was452 = enabledOffGround = finishProcedure = canPlace = false;
|
||||||
rotationDelay = keepYTicks = scaffoldTicks = speedEdge = 0;
|
rotationDelay = keepYTicks = scaffoldTicks = 0;
|
||||||
firstStroke = 0;
|
firstStroke = 0;
|
||||||
startYPos = -1;
|
startYPos = -1;
|
||||||
lookVec = null;
|
lookVec = null;
|
||||||
set3 = false;
|
lastPlacement = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public void onReceivePacket(ReceivePacketEvent e) {
|
|
||||||
if (!isEnabled) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!Utils.nullCheck() || !cancelKnockBack.isToggled()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (e.getPacket() instanceof S12PacketEntityVelocity) {
|
|
||||||
if (((S12PacketEntityVelocity) e.getPacket()).getEntityID() == mc.thePlayer.getEntityId()) {
|
|
||||||
e.setCanceled(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (e.getPacket() instanceof S27PacketExplosion) {
|
|
||||||
e.setCanceled(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getInfo() {
|
public String getInfo() {
|
||||||
String info;
|
String info;
|
||||||
|
|
@ -781,7 +752,7 @@ public class Scaffold extends Module {
|
||||||
return sprint.getInput() == 2 && Utils.isMoving() && !usingFastScaffold();
|
return sprint.getInput() == 2 && Utils.isMoving() && !usingFastScaffold();
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean usingFastScaffold() {
|
public boolean usingFastScaffold() {
|
||||||
return fastScaffold.getInput() > 0 && (!fastOnRMB.isToggled() || (Mouse.isButtonDown(1) || ModuleManager.bhop.isEnabled()) && Utils.tabbedIn());
|
return fastScaffold.getInput() > 0 && (!fastOnRMB.isToggled() || (Mouse.isButtonDown(1) || ModuleManager.bhop.isEnabled()) && Utils.tabbedIn());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -814,6 +785,9 @@ public class Scaffold extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canSafewalk() {
|
public boolean canSafewalk() {
|
||||||
|
if (!safeWalk.isToggled()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (usingFastScaffold()) {
|
if (usingFastScaffold()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -859,6 +833,7 @@ public class Scaffold extends Module {
|
||||||
if (blockInfo == null) {
|
if (blockInfo == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
lastPlacement = blockInfo;
|
||||||
place(blockInfo);
|
place(blockInfo);
|
||||||
blockInfo = null;
|
blockInfo = null;
|
||||||
}
|
}
|
||||||
|
|
@ -914,98 +889,60 @@ public class Scaffold extends Module {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*private List<PlaceData> findBlocks(int yOffset, int xOffset) {
|
|
||||||
List<PlaceData> possibleBlocks = new ArrayList<>();
|
|
||||||
int x = (int) Math.floor(mc.thePlayer.posX + xOffset);
|
|
||||||
int y = (int) Math.floor(((startYPos != -1) ? startYPos : (mc.thePlayer.posY)) + yOffset);
|
|
||||||
int z = (int) Math.floor(mc.thePlayer.posZ);
|
|
||||||
|
|
||||||
BlockPos pos = new BlockPos(x, y - 1, z);
|
|
||||||
|
|
||||||
for (int lastCheck = 0; lastCheck < 2; lastCheck++) {
|
|
||||||
for (int i = 0; i < offsets.length; i++) {
|
|
||||||
BlockPos newPos = pos.add(offsets[i]);
|
|
||||||
Block block = BlockUtils.getBlock(newPos);
|
|
||||||
if (lastCheck == 0) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (!block.getMaterial().isReplaceable() && !BlockUtils.isInteractable(block)) {
|
|
||||||
possibleBlocks.add(new PlaceData(facings[i], newPos));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
BlockPos[] additionalOffsets = { // adjust these for perfect placement
|
|
||||||
pos.add(-1, 0, 0),
|
|
||||||
pos.add(1, 0, 0),
|
|
||||||
pos.add(0, 0, 1),
|
|
||||||
pos.add(0, 0, -1),
|
|
||||||
pos.add(0, -1, 0),
|
|
||||||
|
|
||||||
pos.add(-2, 0, 0),
|
|
||||||
pos.add(2, 0, 0),
|
|
||||||
pos.add(0, 0, 2),
|
|
||||||
pos.add(0, 0, -2),
|
|
||||||
pos.add(0, -2, 0),
|
|
||||||
|
|
||||||
pos.add(-3, 0, 0),
|
|
||||||
pos.add(3, 0, 0),
|
|
||||||
pos.add(0, 0, 3),
|
|
||||||
pos.add(0, 0, -3),
|
|
||||||
pos.add(0, -3, 0),
|
|
||||||
};
|
|
||||||
for (int lastCheck = 0; lastCheck < 2; lastCheck++) {
|
|
||||||
for (BlockPos additionalPos : additionalOffsets) {
|
|
||||||
for (int i = 0; i < offsets.length; i++) {
|
|
||||||
BlockPos newPos = additionalPos.add(offsets[i]);
|
|
||||||
Block block = BlockUtils.getBlock(newPos);
|
|
||||||
if (lastCheck == 0) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (!block.getMaterial().isReplaceable() && !BlockUtils.isInteractable(block)) {
|
|
||||||
possibleBlocks.add(new PlaceData(facings[i], newPos));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
BlockPos[] additionalOffsets2 = { // adjust these for perfect placement
|
|
||||||
new BlockPos(-1, 0, 0),
|
|
||||||
new BlockPos(1, 0, 0),
|
|
||||||
new BlockPos(0, 0, 1),
|
|
||||||
new BlockPos(0, 0, -1),
|
|
||||||
new BlockPos(0, -1, 0),
|
|
||||||
|
|
||||||
new BlockPos(-2, 0, 0),
|
|
||||||
new BlockPos(2, 0, 0),
|
|
||||||
new BlockPos(0, 0, 2),
|
|
||||||
new BlockPos(0, 0, -2),
|
|
||||||
new BlockPos(0, -2, 0),
|
|
||||||
|
|
||||||
new BlockPos(-3, 0, 0),
|
|
||||||
new BlockPos(3, 0, 0),
|
|
||||||
new BlockPos(0, 0, 3),
|
|
||||||
new BlockPos(0, 0, -3),
|
|
||||||
new BlockPos(0, -3, 0),
|
|
||||||
};
|
|
||||||
for (int lastCheck = 0; lastCheck < 2; lastCheck++) {
|
|
||||||
for (BlockPos additionalPos2 : additionalOffsets2) {
|
|
||||||
for (BlockPos additionalPos : additionalOffsets) {
|
|
||||||
for (int i = 0; i < offsets.length; i++) {
|
|
||||||
BlockPos newPos = additionalPos2.add(additionalPos.add(offsets[i]));
|
|
||||||
Block block = BlockUtils.getBlock(newPos);
|
|
||||||
if (lastCheck == 0) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (!block.getMaterial().isReplaceable() && !BlockUtils.isInteractable(block)) {
|
|
||||||
possibleBlocks.add(new PlaceData(facings[i], newPos));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return possibleBlocks.isEmpty() ? null : possibleBlocks;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
private List<PlaceData> findBlocks(int yOffset, int xOffset) {
|
private List<PlaceData> findBlocks(int yOffset, int xOffset) {
|
||||||
|
int x = (int) Math.floor(mc.thePlayer.posX + xOffset);
|
||||||
|
int y = (int) Math.floor(((startYPos != -1) ? startYPos : mc.thePlayer.posY) + yOffset);
|
||||||
|
int z = (int) Math.floor(mc.thePlayer.posZ);
|
||||||
|
BlockPos base = new BlockPos(x, y - 1, z);
|
||||||
|
if (!BlockUtils.replaceable(base)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
EnumFacing[] allFacings = EnumFacing.values();
|
||||||
|
List<EnumFacing> validFacings = new ArrayList<>(5);
|
||||||
|
for (EnumFacing facing : allFacings) {
|
||||||
|
if (facing != EnumFacing.UP && placeConditions(facing, yOffset, xOffset)) {
|
||||||
|
validFacings.add(facing);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int maxLayer = 4;
|
||||||
|
List<PlaceData> possibleBlocks = new ArrayList<>();
|
||||||
|
|
||||||
|
main:
|
||||||
|
for (int dy = 1; dy <= maxLayer; dy++) {
|
||||||
|
BlockPos layerBase = new BlockPos(x, y - dy, z);
|
||||||
|
if (dy == 1) {
|
||||||
|
for (EnumFacing facing : validFacings) {
|
||||||
|
BlockPos neighbor = layerBase.offset(facing);
|
||||||
|
if (!BlockUtils.replaceable(neighbor) && !BlockUtils.isInteractable(BlockUtils.getBlock(neighbor))) {
|
||||||
|
if (lastPlacement != null && neighbor.equals(lastPlacement.blockPos)) {
|
||||||
|
possibleBlocks.add(new PlaceData(neighbor, facing.getOpposite()));
|
||||||
|
break main;
|
||||||
|
}
|
||||||
|
possibleBlocks.add(new PlaceData(neighbor, facing.getOpposite()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (EnumFacing facing : validFacings) {
|
||||||
|
BlockPos adjacent = layerBase.offset(facing);
|
||||||
|
if (BlockUtils.replaceable(adjacent)) {
|
||||||
|
for (EnumFacing nestedFacing : validFacings) {
|
||||||
|
BlockPos nestedNeighbor = adjacent.offset(nestedFacing);
|
||||||
|
if (!BlockUtils.replaceable(nestedNeighbor) && !BlockUtils.isInteractable(BlockUtils.getBlock(nestedNeighbor))) {
|
||||||
|
if (lastPlacement != null && nestedNeighbor.equals(lastPlacement.blockPos)) {
|
||||||
|
possibleBlocks.add(new PlaceData(nestedNeighbor, facing.getOpposite()));
|
||||||
|
break main;
|
||||||
|
}
|
||||||
|
possibleBlocks.add(new PlaceData(nestedNeighbor, nestedFacing.getOpposite()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return possibleBlocks.isEmpty() ? null : possibleBlocks;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*private List<PlaceData> findBlocks(int yOffset, int xOffset) {
|
||||||
List<PlaceData> possibleBlocks = new ArrayList<>();
|
List<PlaceData> possibleBlocks = new ArrayList<>();
|
||||||
int x = (int) Math.floor(mc.thePlayer.posX + xOffset);
|
int x = (int) Math.floor(mc.thePlayer.posX + xOffset);
|
||||||
int y = (int) Math.floor(((startYPos != -1) ? startYPos : (mc.thePlayer.posY)) + yOffset);
|
int y = (int) Math.floor(((startYPos != -1) ? startYPos : (mc.thePlayer.posY)) + yOffset);
|
||||||
|
|
@ -1072,7 +1009,7 @@ public class Scaffold extends Module {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return possibleBlocks.isEmpty() ? null : possibleBlocks;
|
return possibleBlocks.isEmpty() ? null : possibleBlocks;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
private boolean placeConditions(EnumFacing enumFacing, int yCondition, int xCondition) {
|
private boolean placeConditions(EnumFacing enumFacing, int yCondition, int xCondition) {
|
||||||
if (xCondition == -1) {
|
if (xCondition == -1) {
|
||||||
|
|
@ -1246,11 +1183,12 @@ public class Scaffold extends Module {
|
||||||
if (autoSwap.isToggled() && blockSlot != -1) {
|
if (autoSwap.isToggled() && blockSlot != -1) {
|
||||||
if (ModuleManager.autoSwap.swapToGreaterStack.isToggled()) {
|
if (ModuleManager.autoSwap.swapToGreaterStack.isToggled()) {
|
||||||
mc.thePlayer.inventory.currentItem = slot;
|
mc.thePlayer.inventory.currentItem = slot;
|
||||||
|
spoofSlot = slot;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mc.thePlayer.inventory.currentItem = blockSlot;
|
mc.thePlayer.inventory.currentItem = blockSlot;
|
||||||
|
spoofSlot = blockSlot;
|
||||||
}
|
}
|
||||||
//Utils.print("set slot?");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemStack heldItem = mc.thePlayer.getHeldItem();
|
ItemStack heldItem = mc.thePlayer.getHeldItem();
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
||||||
package keystrokesmod.module.impl.player;
|
package keystrokesmod.module.impl.player;
|
||||||
|
|
||||||
import keystrokesmod.event.PostPlayerInputEvent;
|
import keystrokesmod.event.*;
|
||||||
import keystrokesmod.event.PreMotionEvent;
|
|
||||||
import keystrokesmod.event.PreUpdateEvent;
|
|
||||||
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.GroupSetting;
|
||||||
import keystrokesmod.module.setting.impl.SliderSetting;
|
import keystrokesmod.module.setting.impl.SliderSetting;
|
||||||
import keystrokesmod.utility.ModuleUtils;
|
import keystrokesmod.utility.ModuleUtils;
|
||||||
import keystrokesmod.utility.RotationUtils;
|
import keystrokesmod.utility.RotationUtils;
|
||||||
import keystrokesmod.utility.Utils;
|
import keystrokesmod.utility.Utils;
|
||||||
import net.minecraft.client.settings.KeyBinding;
|
import net.minecraft.client.settings.KeyBinding;
|
||||||
import net.minecraft.network.play.client.*;
|
import net.minecraft.network.play.client.*;
|
||||||
|
import net.minecraft.network.play.server.S12PacketEntityVelocity;
|
||||||
|
import net.minecraft.network.play.server.S27PacketExplosion;
|
||||||
import net.minecraft.potion.PotionEffect;
|
import net.minecraft.potion.PotionEffect;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
|
||||||
|
|
@ -23,8 +23,11 @@ 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;
|
||||||
|
private GroupSetting cancelKnockbackGroup;
|
||||||
|
private final ButtonSetting cancelKnockback;
|
||||||
|
private ButtonSetting cancelVelocityRequired;
|
||||||
|
|
||||||
final private String[] towerMoveModes = new String[]{"None", "Vanilla", "Low", "Edge", "2.5 tick", "1.5 tick", "Test"};
|
final private String[] towerMoveModes = new String[]{"None", "Vanilla", "Low", "Edge", "2.5 tick", "1.5 tick", "1 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;
|
||||||
|
|
@ -55,10 +58,28 @@ public class Tower extends Module {
|
||||||
this.registerSetting(slowedSpeed = new SliderSetting("Slowed speed", "%", 0, 0, 100, 1));
|
this.registerSetting(slowedSpeed = new SliderSetting("Slowed speed", "%", 0, 0, 100, 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.registerSetting(cancelKnockbackGroup = new GroupSetting("Cancel knockback"));
|
||||||
|
this.registerSetting(cancelKnockback = new ButtonSetting(cancelKnockbackGroup, "Enable Cancel knockback", false));
|
||||||
|
this.registerSetting(cancelVelocityRequired = new ButtonSetting(cancelKnockbackGroup, "Require velocity enabled", false));
|
||||||
|
|
||||||
this.canBeEnabled = false;
|
this.canBeEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void onReceivePacket(ReceivePacketEvent e) {
|
||||||
|
if (!Utils.nullCheck() || !cancelKnockback()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (e.getPacket() instanceof S12PacketEntityVelocity) {
|
||||||
|
if (((S12PacketEntityVelocity) e.getPacket()).getEntityID() == mc.thePlayer.getEntityId()) {
|
||||||
|
e.setCanceled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (e.getPacket() instanceof S27PacketExplosion) {
|
||||||
|
e.setCanceled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onPreMotion(PreMotionEvent e) {
|
public void onPreMotion(PreMotionEvent e) {
|
||||||
if (canTower() && Utils.keysDown()) {
|
if (canTower() && Utils.keysDown()) {
|
||||||
|
|
@ -263,10 +284,10 @@ public class Tower extends Module {
|
||||||
Utils.setSpeed(Utils.getHorizontalSpeed()); // Strafe tick
|
Utils.setSpeed(Utils.getHorizontalSpeed()); // Strafe tick
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
mc.thePlayer.motionY = 1 - mc.thePlayer.posY % 1f + 0.0000001;
|
mc.thePlayer.motionY = 1 - mc.thePlayer.posY % 1f;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
mc.thePlayer.motionY = -0.01;
|
mc.thePlayer.motionY = 0.005;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -294,7 +315,7 @@ public class Tower extends Module {
|
||||||
slowTicks = 0;
|
slowTicks = 0;
|
||||||
}
|
}
|
||||||
if (speed) {
|
if (speed) {
|
||||||
Utils.setSpeed(Utils.getHorizontalSpeed(mc.thePlayer) / 1.6);
|
Utils.setSpeed(Utils.getHorizontalSpeed(mc.thePlayer) / 2);
|
||||||
}
|
}
|
||||||
hasTowered = tower = firstJump = startedTowerInAir = setLowMotion = speed = false;
|
hasTowered = tower = firstJump = startedTowerInAir = setLowMotion = speed = false;
|
||||||
cMotionTicks = placeTicks = towerTicks = grounds = 0;
|
cMotionTicks = placeTicks = towerTicks = grounds = 0;
|
||||||
|
|
@ -412,6 +433,19 @@ public class Tower extends Module {
|
||||||
setLowMotion = false;
|
setLowMotion = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean cancelKnockback() {
|
||||||
|
if (!canTower()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (cancelVelocityRequired.isToggled() && !ModuleManager.velocity.isEnabled()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (cancelKnockback.isToggled()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean canTower() {
|
public boolean canTower() {
|
||||||
if (!Utils.nullCheck() || !Utils.jumpDown() || !Utils.tabbedIn()) {
|
if (!Utils.nullCheck() || !Utils.jumpDown() || !Utils.tabbedIn()) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -113,4 +113,4 @@ public class BreakProgress extends Module {
|
||||||
this.block = null;
|
this.block = null;
|
||||||
this.progressStr = "";
|
this.progressStr = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ 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;
|
||||||
|
import keystrokesmod.module.setting.impl.GroupSetting;
|
||||||
import keystrokesmod.module.setting.impl.SliderSetting;
|
import keystrokesmod.module.setting.impl.SliderSetting;
|
||||||
import keystrokesmod.utility.RenderUtils;
|
import keystrokesmod.utility.RenderUtils;
|
||||||
import keystrokesmod.utility.Utils;
|
import keystrokesmod.utility.Utils;
|
||||||
|
|
@ -36,10 +37,12 @@ public class Nametags extends Module {
|
||||||
private ButtonSetting showInvis;
|
private ButtonSetting showInvis;
|
||||||
private ButtonSetting removeTags;
|
private ButtonSetting removeTags;
|
||||||
private ButtonSetting renderSelf;
|
private ButtonSetting renderSelf;
|
||||||
|
private GroupSetting armorSettings;
|
||||||
private ButtonSetting showArmor;
|
private ButtonSetting showArmor;
|
||||||
private ButtonSetting showEnchants;
|
private ButtonSetting showEnchants;
|
||||||
private ButtonSetting showDurability;
|
private ButtonSetting showDurability;
|
||||||
private ButtonSetting showStackSize;
|
private ButtonSetting showStackSize;
|
||||||
|
private ButtonSetting outlineFSE;
|
||||||
|
|
||||||
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();
|
||||||
|
|
@ -60,11 +63,12 @@ public class Nametags extends Module {
|
||||||
this.registerSetting(showHitsToKill = new ButtonSetting("Show hits to kill", false));
|
this.registerSetting(showHitsToKill = new ButtonSetting("Show hits to kill", false));
|
||||||
this.registerSetting(showInvis = new ButtonSetting("Show invis", true));
|
this.registerSetting(showInvis = new ButtonSetting("Show invis", true));
|
||||||
this.registerSetting(removeTags = new ButtonSetting("Remove tags", false));
|
this.registerSetting(removeTags = new ButtonSetting("Remove tags", false));
|
||||||
this.registerSetting(new DescriptionSetting("Armor settings"));
|
this.registerSetting(armorSettings = new GroupSetting("Armor settings"));
|
||||||
this.registerSetting(showArmor = new ButtonSetting("Show armor", false));
|
this.registerSetting(showArmor = new ButtonSetting(armorSettings, "Show armor", false));
|
||||||
this.registerSetting(showEnchants = new ButtonSetting("Show enchants", true));
|
this.registerSetting(showEnchants = new ButtonSetting(armorSettings, "Show enchants", true));
|
||||||
this.registerSetting(showDurability = new ButtonSetting("Show durability", true));
|
this.registerSetting(showDurability = new ButtonSetting(armorSettings, "Show durability", true));
|
||||||
this.registerSetting(showStackSize = new ButtonSetting("Show stack size", true));
|
this.registerSetting(showStackSize = new ButtonSetting(armorSettings, "Show stack size", true));
|
||||||
|
this.registerSetting(outlineFSE = new ButtonSetting("Outline friends/enemies", true));
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||||
|
|
@ -205,11 +209,12 @@ public class Nametags extends Module {
|
||||||
if (drawBackground.isToggled()) {
|
if (drawBackground.isToggled()) {
|
||||||
RenderUtils.drawRect(x1, y1, x2, y2, backGroundColor);
|
RenderUtils.drawRect(x1, y1, x2, y2, backGroundColor);
|
||||||
}
|
}
|
||||||
if (Utils.isFriended(en)) {
|
if (outlineFSE.isToggled()) {
|
||||||
RenderUtils.drawOutline(x1, y1, x2, y2, 2, friendColor);
|
if (Utils.isFriended(en)) {
|
||||||
}
|
RenderUtils.drawOutline(x1, y1, x2, y2, 2, friendColor);
|
||||||
else if (Utils.isEnemy(en)) {
|
} else if (Utils.isEnemy(en)) {
|
||||||
RenderUtils.drawOutline(x1, y1, x2, y2, 2, enemyColor);
|
RenderUtils.drawOutline(x1, y1, x2, y2, 2, enemyColor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
mc.fontRendererObj.drawString(name, -strWidth, -9, -1, dropShadow.isToggled());
|
mc.fontRendererObj.drawString(name, -strWidth, -9, -1, dropShadow.isToggled());
|
||||||
if (showArmor.isToggled()) {
|
if (showArmor.isToggled()) {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package keystrokesmod.utility;
|
||||||
|
|
||||||
import keystrokesmod.event.*;
|
import keystrokesmod.event.*;
|
||||||
import keystrokesmod.module.impl.combat.Velocity;
|
import keystrokesmod.module.impl.combat.Velocity;
|
||||||
|
import keystrokesmod.module.impl.movement.Bhop;
|
||||||
import keystrokesmod.module.impl.movement.LongJump;
|
import keystrokesmod.module.impl.movement.LongJump;
|
||||||
import keystrokesmod.module.impl.render.HUD;
|
import keystrokesmod.module.impl.render.HUD;
|
||||||
import keystrokesmod.utility.command.CommandManager;
|
import keystrokesmod.utility.command.CommandManager;
|
||||||
|
|
@ -46,7 +47,7 @@ public class ModuleUtils {
|
||||||
public static boolean isAttacking;
|
public static boolean isAttacking;
|
||||||
private int attackingTicks;
|
private int attackingTicks;
|
||||||
private int unTargetTicks;
|
private int unTargetTicks;
|
||||||
public static int profileTicks = -1;
|
public static int profileTicks = -1, swapTick;
|
||||||
public static boolean lastTickOnGround, lastTickPos1;
|
public static boolean lastTickOnGround, lastTickPos1;
|
||||||
private boolean thisTickOnGround, thisTickPos1;
|
private boolean thisTickOnGround, thisTickPos1;
|
||||||
public static boolean firstDamage;
|
public static boolean firstDamage;
|
||||||
|
|
@ -60,6 +61,7 @@ public class ModuleUtils {
|
||||||
private int edgeTick;
|
private int edgeTick;
|
||||||
|
|
||||||
public static boolean canSlow, didSlow, setSlow;
|
public static boolean canSlow, didSlow, setSlow;
|
||||||
|
private static boolean allowFriction;
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onWorldJoin(EntityJoinWorldEvent e) {
|
public void onWorldJoin(EntityJoinWorldEvent e) {
|
||||||
|
|
@ -74,6 +76,10 @@ public class ModuleUtils {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (e.getPacket() instanceof C09PacketHeldItemChange) {
|
||||||
|
swapTick = 2;
|
||||||
|
}
|
||||||
|
|
||||||
// isBlocked
|
// isBlocked
|
||||||
EntityLivingBase g = Utils.raytrace(3);
|
EntityLivingBase g = Utils.raytrace(3);
|
||||||
|
|
||||||
|
|
@ -138,6 +144,10 @@ public class ModuleUtils {
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
|
if (e.getPacket() instanceof C09PacketHeldItemChange) {
|
||||||
|
swapTick = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -159,111 +169,6 @@ public class ModuleUtils {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public void onPreUpdate(PreUpdateEvent e) {
|
|
||||||
|
|
||||||
if (damage && ++damageTicks >= 8) {
|
|
||||||
damage = firstDamage = false;
|
|
||||||
damageTicks = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
profileTicks++;
|
|
||||||
|
|
||||||
if (isAttacking) {
|
|
||||||
if (attackingTicks <= 0) {
|
|
||||||
isAttacking = false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
--attackingTicks;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (LongJump.slotReset && ++LongJump.slotResetTicks >= 2) {
|
|
||||||
LongJump.stopModules = false;
|
|
||||||
LongJump.slotResetTicks = 0;
|
|
||||||
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) {
|
|
||||||
threwFireball = threwFireballLow = false;
|
|
||||||
fireballTime = 0;
|
|
||||||
ModuleManager.velocity.disableVelo = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isBreaking && ++isBreakingTick >= 1) {
|
|
||||||
isBreaking = false;
|
|
||||||
isBreakingTick = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ModuleManager.killAura.justUnTargeted) {
|
|
||||||
if (++unTargetTicks >= 2) {
|
|
||||||
unTargetTicks = 0;
|
|
||||||
ModuleManager.killAura.justUnTargeted = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CommandManager.status.cooldown != 0) {
|
|
||||||
if (mc.thePlayer.ticksExisted % 20 == 0) {
|
|
||||||
CommandManager.status.cooldown--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public void onChat(ClientChatReceivedEvent e) {
|
|
||||||
if (!Utils.nullCheck()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
String stripped = Utils.stripColor(e.message.getUnformattedText());
|
|
||||||
|
|
||||||
//online
|
|
||||||
if (stripped.contains("You tipped ") && stripped.contains(" in") && stripped.contains("!") && CommandManager.status.start) {
|
|
||||||
CommandManager.status.start = false;
|
|
||||||
Utils.print("§a " + CommandManager.status.ign + " is online");
|
|
||||||
e.setCanceled(true);
|
|
||||||
}
|
|
||||||
if ((stripped.contains("You've already tipped someone in the past hour in") && stripped.contains("! Wait a bit and try again!") || stripped.contains("You've already tipped that person today in ")) && CommandManager.status.start) {
|
|
||||||
CommandManager.status.start = false;
|
|
||||||
Utils.print("§a " + CommandManager.status.ign + " is online");
|
|
||||||
//client.print(util.colorSymbol + "7^ if player recently left the server this may be innacurate (rate limited)");
|
|
||||||
e.setCanceled(true);
|
|
||||||
}
|
|
||||||
//offline
|
|
||||||
if (stripped.contains("That player is not online, try another user!") && CommandManager.status.start) {
|
|
||||||
CommandManager.status.start = false;
|
|
||||||
Utils.print("§7 " + CommandManager.status.ign + " is offline");
|
|
||||||
e.setCanceled(true);
|
|
||||||
}
|
|
||||||
//invalid name
|
|
||||||
if (stripped.contains("Can't find a player by the name of '") && CommandManager.status.start) {
|
|
||||||
CommandManager.status.cooldown = 0;
|
|
||||||
CommandManager.status.start = false;
|
|
||||||
CommandManager.status.currentMode = CommandManager.status.lastMode;
|
|
||||||
Utils.print("§7 " + CommandManager.status.ign + " doesn't exist");
|
|
||||||
e.setCanceled(true);
|
|
||||||
}
|
|
||||||
if (stripped.contains("That's not a valid username!") && CommandManager.status.start) {
|
|
||||||
CommandManager.status.cooldown = 0;
|
|
||||||
CommandManager.status.start = false;
|
|
||||||
CommandManager.status.currentMode = CommandManager.status.lastMode;
|
|
||||||
Utils.print("§binvalid username");
|
|
||||||
e.setCanceled(true);
|
|
||||||
}
|
|
||||||
//checking urself
|
|
||||||
if (stripped.contains("You cannot give yourself tips!") && CommandManager.status.start) {
|
|
||||||
CommandManager.status.cooldown = 0;
|
|
||||||
CommandManager.status.start = false;
|
|
||||||
CommandManager.status.currentMode = CommandManager.status.lastMode;
|
|
||||||
Utils.print("§a " + CommandManager.status.ign + " is online");
|
|
||||||
e.setCanceled(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onReceivePacket(ReceivePacketEvent e) {
|
public void onReceivePacket(ReceivePacketEvent e) {
|
||||||
if (!Utils.nullCheck()) {
|
if (!Utils.nullCheck()) {
|
||||||
|
|
@ -316,6 +221,89 @@ public class ModuleUtils {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void onPreUpdate(PreUpdateEvent e) {
|
||||||
|
|
||||||
|
if (swapTick > 0) {
|
||||||
|
--swapTick;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((canSlow || ModuleManager.scaffold.moduleEnabled && !ModuleManager.tower.canTower()) && !mc.thePlayer.onGround) {
|
||||||
|
double motionVal = 0.9507832 - ((double) inAirTicks / 10000) - Utils.randomizeDouble(0.00001, 0.00006);
|
||||||
|
if (mc.thePlayer.hurtTime == 0 && inAirTicks >= 4 && !setSlow) {
|
||||||
|
mc.thePlayer.motionX *= motionVal;
|
||||||
|
mc.thePlayer.motionZ *= motionVal;
|
||||||
|
setSlow = true;
|
||||||
|
//Utils.print("Slow " + motionVal);
|
||||||
|
}
|
||||||
|
didSlow = true;
|
||||||
|
}
|
||||||
|
else if (didSlow) {
|
||||||
|
canSlow = didSlow = false;
|
||||||
|
}
|
||||||
|
if (mc.thePlayer.onGround || mc.thePlayer.hurtTime != 0) {
|
||||||
|
setSlow = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!ModuleManager.bhop.running && !ModuleManager.scaffold.fastScaffoldKeepY) {
|
||||||
|
allowFriction = false;
|
||||||
|
}
|
||||||
|
else if (!mc.thePlayer.onGround) {
|
||||||
|
allowFriction = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (damage && ++damageTicks >= 8) {
|
||||||
|
damage = firstDamage = false;
|
||||||
|
damageTicks = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
profileTicks++;
|
||||||
|
|
||||||
|
if (isAttacking) {
|
||||||
|
if (attackingTicks <= 0) {
|
||||||
|
isAttacking = false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
--attackingTicks;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (LongJump.slotReset && ++LongJump.slotResetTicks >= 2) {
|
||||||
|
LongJump.stopModules = false;
|
||||||
|
LongJump.slotResetTicks = 0;
|
||||||
|
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) {
|
||||||
|
threwFireball = threwFireballLow = false;
|
||||||
|
fireballTime = 0;
|
||||||
|
ModuleManager.velocity.disableVelo = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isBreaking && ++isBreakingTick >= 1) {
|
||||||
|
isBreaking = false;
|
||||||
|
isBreakingTick = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ModuleManager.killAura.justUnTargeted) {
|
||||||
|
if (++unTargetTicks >= 2) {
|
||||||
|
unTargetTicks = 0;
|
||||||
|
ModuleManager.killAura.justUnTargeted = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CommandManager.status.cooldown != 0) {
|
||||||
|
if (mc.thePlayer.ticksExisted % 20 == 0) {
|
||||||
|
CommandManager.status.cooldown--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onPreMotion(PreMotionEvent e) {
|
public void onPreMotion(PreMotionEvent e) {
|
||||||
int simpleY = (int) Math.round((e.posY % 1) * 10000);
|
int simpleY = (int) Math.round((e.posY % 1) * 10000);
|
||||||
|
|
@ -458,23 +446,6 @@ public class ModuleUtils {
|
||||||
fadeEdge = 0;
|
fadeEdge = 0;
|
||||||
ModuleManager.scaffold.highlight.clear();
|
ModuleManager.scaffold.highlight.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((canSlow || ModuleManager.scaffold.moduleEnabled && !ModuleManager.tower.canTower()) && !mc.thePlayer.onGround) {
|
|
||||||
double motionVal = 0.92 - ((double) inAirTicks / 10000) - Utils.randomizeDouble(0.00001, 0.00006);
|
|
||||||
if (mc.thePlayer.hurtTime == 0 && inAirTicks > 4 && !setSlow) {
|
|
||||||
mc.thePlayer.motionX *= motionVal;
|
|
||||||
mc.thePlayer.motionZ *= motionVal;
|
|
||||||
setSlow = true;
|
|
||||||
//Utils.print("Slow " + motionVal);
|
|
||||||
}
|
|
||||||
didSlow = true;
|
|
||||||
}
|
|
||||||
else if (didSlow) {
|
|
||||||
canSlow = didSlow = false;
|
|
||||||
}
|
|
||||||
if (mc.thePlayer.onGround) {
|
|
||||||
setSlow = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void resetLowhop() {
|
private void resetLowhop() {
|
||||||
|
|
@ -489,6 +460,14 @@ public class ModuleUtils {
|
||||||
canSlow = true;
|
canSlow = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static double applyFrictionMulti() {
|
||||||
|
final int speedAmplifier = Utils.getSpeedAmplifier();
|
||||||
|
if (speedAmplifier > 1 && allowFriction) {
|
||||||
|
return Bhop.friction.getInput();
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
||||||
public void onRenderWorld(RenderWorldLastEvent e) {
|
public void onRenderWorld(RenderWorldLastEvent e) {
|
||||||
if (!ModuleManager.scaffold.canBlockFade) {
|
if (!ModuleManager.scaffold.canBlockFade) {
|
||||||
|
|
@ -512,4 +491,54 @@ public class ModuleUtils {
|
||||||
RenderUtils.renderBlock(entry.getKey(), Utils.mergeAlpha(Theme.getGradient((int) HUD.theme.getInput(), 0), alpha), true, false);
|
RenderUtils.renderBlock(entry.getKey(), Utils.mergeAlpha(Theme.getGradient((int) HUD.theme.getInput(), 0), alpha), true, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void onChat(ClientChatReceivedEvent e) {
|
||||||
|
if (!Utils.nullCheck()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String stripped = Utils.stripColor(e.message.getUnformattedText());
|
||||||
|
|
||||||
|
//online
|
||||||
|
if (stripped.contains("You tipped ") && stripped.contains(" in") && stripped.contains("!") && CommandManager.status.start) {
|
||||||
|
CommandManager.status.start = false;
|
||||||
|
Utils.print("§a " + CommandManager.status.ign + " is online");
|
||||||
|
e.setCanceled(true);
|
||||||
|
}
|
||||||
|
if ((stripped.contains("You've already tipped someone in the past hour in") && stripped.contains("! Wait a bit and try again!") || stripped.contains("You've already tipped that person today in ")) && CommandManager.status.start) {
|
||||||
|
CommandManager.status.start = false;
|
||||||
|
Utils.print("§a " + CommandManager.status.ign + " is online");
|
||||||
|
//client.print(util.colorSymbol + "7^ if player recently left the server this may be innacurate (rate limited)");
|
||||||
|
e.setCanceled(true);
|
||||||
|
}
|
||||||
|
//offline
|
||||||
|
if (stripped.contains("That player is not online, try another user!") && CommandManager.status.start) {
|
||||||
|
CommandManager.status.start = false;
|
||||||
|
Utils.print("§7 " + CommandManager.status.ign + " is offline");
|
||||||
|
e.setCanceled(true);
|
||||||
|
}
|
||||||
|
//invalid name
|
||||||
|
if (stripped.contains("Can't find a player by the name of '") && CommandManager.status.start) {
|
||||||
|
CommandManager.status.cooldown = 0;
|
||||||
|
CommandManager.status.start = false;
|
||||||
|
CommandManager.status.currentMode = CommandManager.status.lastMode;
|
||||||
|
Utils.print("§7 " + CommandManager.status.ign + " doesn't exist");
|
||||||
|
e.setCanceled(true);
|
||||||
|
}
|
||||||
|
if (stripped.contains("That's not a valid username!") && CommandManager.status.start) {
|
||||||
|
CommandManager.status.cooldown = 0;
|
||||||
|
CommandManager.status.start = false;
|
||||||
|
CommandManager.status.currentMode = CommandManager.status.lastMode;
|
||||||
|
Utils.print("§binvalid username");
|
||||||
|
e.setCanceled(true);
|
||||||
|
}
|
||||||
|
//checking urself
|
||||||
|
if (stripped.contains("You cannot give yourself tips!") && CommandManager.status.start) {
|
||||||
|
CommandManager.status.cooldown = 0;
|
||||||
|
CommandManager.status.start = false;
|
||||||
|
CommandManager.status.currentMode = CommandManager.status.lastMode;
|
||||||
|
Utils.print("§a " + CommandManager.status.ign + " is online");
|
||||||
|
e.setCanceled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -25,6 +25,7 @@
|
||||||
"network.MixinNetHandlerPlayClient",
|
"network.MixinNetHandlerPlayClient",
|
||||||
"render.MixinRenderManager",
|
"render.MixinRenderManager",
|
||||||
"render.MixinCustomSky",
|
"render.MixinCustomSky",
|
||||||
|
"render.MixinRenderPlayer",
|
||||||
"client.MixinPlayerControllerMP",
|
"client.MixinPlayerControllerMP",
|
||||||
|
|
||||||
"accessor.IAccessorEntityPlayerSP",
|
"accessor.IAccessorEntityPlayerSP",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue