From 7ee0cf9df233c404e5cc8def0370da852df0cb95 Mon Sep 17 00:00:00 2001 From: Colton Kennedy Date: Wed, 11 Oct 2023 20:10:32 -0400 Subject: [PATCH] Modified binding system to use Custom bindings. Minecraft's default bindings suck, so here's a replacement. --- .../aoba/core/settings/SettingManager.java | 2 +- .../core/settings/types/KeybindSetting.java | 11 +++---- .../net/aoba/gui/tabs/ModuleSettingsTab.java | 2 +- .../gui/tabs/components/KeybindComponent.java | 5 ++-- .../java/net/aoba/mixin/KeyboardMixin.java | 12 ++++---- .../java/net/aoba/module/ModuleManager.java | 30 +++++++++++-------- .../aoba/module/modules/combat/Aimbot.java | 6 ++-- .../aoba/module/modules/combat/AntiInvis.java | 6 ++-- .../module/modules/combat/AntiKnockback.java | 3 +- .../module/modules/combat/AutoRespawn.java | 4 +-- .../aoba/module/modules/combat/AutoSoup.java | 3 +- .../aoba/module/modules/combat/AutoTotem.java | 5 ++-- .../aoba/module/modules/combat/Criticals.java | 3 +- .../module/modules/combat/CrystalAura.java | 5 ++-- .../aoba/module/modules/combat/KillAura.java | 3 +- .../aoba/module/modules/combat/Nametags.java | 3 +- .../aoba/module/modules/combat/NoOverlay.java | 3 +- .../net/aoba/module/modules/combat/Reach.java | 3 +- .../module/modules/combat/TriggerBot.java | 5 ++-- .../aoba/module/modules/misc/AntiCactus.java | 5 ++-- .../net/aoba/module/modules/misc/AutoEat.java | 5 ++-- .../aoba/module/modules/misc/AutoFish.java | 5 ++-- .../aoba/module/modules/misc/AutoWalk.java | 5 ++-- .../aoba/module/modules/misc/FastBreak.java | 5 ++-- .../aoba/module/modules/misc/FastPlace.java | 5 ++-- .../net/aoba/module/modules/misc/Timer.java | 5 ++-- .../net/aoba/module/modules/movement/Fly.java | 5 ++-- .../aoba/module/modules/movement/Freecam.java | 5 ++-- .../aoba/module/modules/movement/Glide.java | 5 ++-- .../aoba/module/modules/movement/Jesus.java | 5 ++-- .../aoba/module/modules/movement/Jetpack.java | 5 ++-- .../aoba/module/modules/movement/NoFall.java | 5 ++-- .../module/modules/movement/NoSlowdown.java | 3 +- .../aoba/module/modules/movement/Noclip.java | 5 ++-- .../module/modules/movement/Safewalk.java | 3 +- .../aoba/module/modules/movement/Sneak.java | 3 +- .../aoba/module/modules/movement/Spider.java | 3 +- .../aoba/module/modules/movement/Sprint.java | 3 +- .../aoba/module/modules/movement/Step.java | 3 +- .../module/modules/render/Breadcrumbs.java | 3 +- .../aoba/module/modules/render/ChestESP.java | 3 +- .../aoba/module/modules/render/EntityESP.java | 3 +- .../module/modules/render/Fullbright.java | 3 +- .../aoba/module/modules/render/ItemESP.java | 3 +- .../net/aoba/module/modules/render/POV.java | 3 +- .../aoba/module/modules/render/PlayerESP.java | 3 +- .../module/modules/render/SpawnerESP.java | 5 ++-- .../aoba/module/modules/render/Tracer.java | 5 ++-- .../module/modules/render/Trajectory.java | 5 ++-- .../net/aoba/module/modules/render/XRay.java | 5 ++-- .../aoba/module/modules/world/AutoFarm.java | 3 +- .../aoba/module/modules/world/AutoSign.java | 3 +- .../net/aoba/module/modules/world/Nuker.java | 3 +- .../module/modules/world/TileBreaker.java | 3 +- 54 files changed, 154 insertions(+), 101 deletions(-) diff --git a/src/main/java/net/aoba/core/settings/SettingManager.java b/src/main/java/net/aoba/core/settings/SettingManager.java index 878416ce..274ad392 100644 --- a/src/main/java/net/aoba/core/settings/SettingManager.java +++ b/src/main/java/net/aoba/core/settings/SettingManager.java @@ -107,7 +107,7 @@ public static void loadSettings(String name, List setting_list) { } case KEYBIND -> { int keyCode = Integer.parseInt(config.getProperty(setting.ID, null)); - setting.setValue(new KeyBinding(setting.ID, keyCode, "key.categories.aoba")); + setting.setValue(InputUtil.fromKeyCode(keyCode, 0)); } case VECTOR2 -> { String value_x = config.getProperty(setting.ID + "_x", null); diff --git a/src/main/java/net/aoba/core/settings/types/KeybindSetting.java b/src/main/java/net/aoba/core/settings/types/KeybindSetting.java index fc1a253a..fcfca485 100644 --- a/src/main/java/net/aoba/core/settings/types/KeybindSetting.java +++ b/src/main/java/net/aoba/core/settings/types/KeybindSetting.java @@ -3,19 +3,20 @@ import java.util.function.Consumer; import net.aoba.core.settings.Setting; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil.Key; -public class KeybindSetting extends Setting { - public KeybindSetting(String ID, String description, KeyBinding default_value) { +public class KeybindSetting extends Setting { + public KeybindSetting(String ID, String description, Key default_value) { super(ID, description, default_value); type = TYPE.KEYBIND; } - public KeybindSetting(String ID, String displayName, String description, KeyBinding default_value) { + public KeybindSetting(String ID, String displayName, String description, Key default_value) { super(ID, displayName, description, default_value); type = TYPE.KEYBIND; } - public KeybindSetting(String ID, String description, KeyBinding default_value, Consumer onUpdate) { + public KeybindSetting(String ID, String description, Key default_value, Consumer onUpdate) { super(ID, description, default_value, onUpdate); type = TYPE.KEYBIND; } @@ -24,7 +25,7 @@ public KeybindSetting(String ID, String description, KeyBinding default_value, C * Checks whether or not a value is with this setting's valid range. */ @Override - protected boolean isValueValid(KeyBinding value) { + protected boolean isValueValid(Key value) { return true; } } \ No newline at end of file diff --git a/src/main/java/net/aoba/gui/tabs/ModuleSettingsTab.java b/src/main/java/net/aoba/gui/tabs/ModuleSettingsTab.java index 4a5a35d1..30484e1b 100644 --- a/src/main/java/net/aoba/gui/tabs/ModuleSettingsTab.java +++ b/src/main/java/net/aoba/gui/tabs/ModuleSettingsTab.java @@ -58,7 +58,7 @@ public ModuleSettingsTab(String title, float x, float y, Module module) { i += 30; } - this.setHeight(i); + this.setHeight(i - 30); } public final String getTitle() { diff --git a/src/main/java/net/aoba/gui/tabs/components/KeybindComponent.java b/src/main/java/net/aoba/gui/tabs/components/KeybindComponent.java index f793965e..93d98478 100644 --- a/src/main/java/net/aoba/gui/tabs/components/KeybindComponent.java +++ b/src/main/java/net/aoba/gui/tabs/components/KeybindComponent.java @@ -32,7 +32,7 @@ public void draw(DrawContext drawContext, float partialTicks, Color color) { renderUtils.drawString(drawContext, "Keybind", actualX + 8, actualY + 8, 0xFFFFFF); renderUtils.drawBox(drawContext.getMatrices(), actualX + actualWidth - 100, actualY + 2, 98, actualHeight - 4, new Color(115, 115, 115), 0.8f); renderUtils.drawOutline(drawContext.getMatrices(), actualX + actualWidth - 100, actualY + 2, 98, actualHeight - 4); - renderUtils.drawString(drawContext, this.keyBind.getValue().getBoundKeyLocalizedText().getString(), actualX + actualWidth - 90, actualY + 8, 0xFFFFFF); + renderUtils.drawString(drawContext, this.keyBind.getValue().getLocalizedText().getString(), actualX + actualWidth - 90, actualY + 8, 0xFFFFFF); } @Override @@ -47,8 +47,7 @@ public void OnKeyDown(KeyDownEvent event) { if(listeningForKey) { int key = event.GetKey(); int scanCode = event.GetScanCode(); - - keyBind.getValue().setBoundKey(InputUtil.fromKeyCode(key, scanCode)); + keyBind.setValue(InputUtil.fromKeyCode(key, scanCode)); listeningForKey = false; event.SetCancelled(true); diff --git a/src/main/java/net/aoba/mixin/KeyboardMixin.java b/src/main/java/net/aoba/mixin/KeyboardMixin.java index dcdd87a8..c05155ca 100644 --- a/src/main/java/net/aoba/mixin/KeyboardMixin.java +++ b/src/main/java/net/aoba/mixin/KeyboardMixin.java @@ -1,5 +1,6 @@ package net.aoba.mixin; +import org.lwjgl.glfw.GLFW; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -15,11 +16,12 @@ public class KeyboardMixin { @Inject(at = {@At("HEAD")}, method = {"onKey(JIIII)V" }, cancellable = true) private void OnKeyDown(long window, int key, int scancode, int action, int modifiers, CallbackInfo ci) { - KeyDownEvent event = new KeyDownEvent(window, key, scancode, action, modifiers); - Aoba.getInstance().eventManager.Fire(event); - - if(event.IsCancelled()) { - ci.cancel(); + if(action == GLFW.GLFW_PRESS) { + KeyDownEvent event = new KeyDownEvent(window, key, scancode, action, modifiers); + Aoba.getInstance().eventManager.Fire(event); + if(event.IsCancelled()) { + ci.cancel(); + } } } } diff --git a/src/main/java/net/aoba/module/ModuleManager.java b/src/main/java/net/aoba/module/ModuleManager.java index cda59101..6799d1c6 100644 --- a/src/main/java/net/aoba/module/ModuleManager.java +++ b/src/main/java/net/aoba/module/ModuleManager.java @@ -26,7 +26,9 @@ import net.aoba.Aoba; import net.aoba.core.settings.Setting; import net.aoba.core.settings.SettingManager; +import net.aoba.event.events.KeyDownEvent; import net.aoba.event.events.RenderEvent; +import net.aoba.event.listeners.KeyDownListener; import org.lwjgl.opengl.GL11; import net.aoba.misc.RenderUtils; import net.aoba.module.modules.combat.*; @@ -36,9 +38,10 @@ import net.aoba.module.modules.world.*; import net.minecraft.client.MinecraftClient; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil.Key; import net.minecraft.client.util.math.MatrixStack; -public class ModuleManager { +public class ModuleManager implements KeyDownListener { public ArrayList modules = new ArrayList(); //Modules @@ -145,18 +148,11 @@ public ModuleManager() { SettingManager.register_setting(setting, Aoba.getInstance().settingManager.modules_category); } } + + Aoba.getInstance().eventManager.AddListener(KeyDownListener.class, this); } public void update() { - - - for(Module module : modules) { - KeyBinding binding = module.getBind().getValue(); - if(binding.wasPressed()) { - module.toggle(); - binding.setPressed(false); - } - } } public void render(MatrixStack matrixStack) { @@ -165,9 +161,7 @@ public void render(MatrixStack matrixStack) { GL11.glEnable(GL11.GL_LINE_SMOOTH); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glDisable(GL11.GL_DEPTH_TEST); - - - + matrixStack.push(); RenderUtils.applyRenderOffset(matrixStack); @@ -198,4 +192,14 @@ public Module getModuleByName(String string) { } return null; } + + @Override + public void OnKeyDown(KeyDownEvent event) { + for(Module module : modules) { + Key binding = module.getBind().getValue(); + if(binding.getCode() == event.GetKey()) { + module.toggle(); + } + } + } } diff --git a/src/main/java/net/aoba/module/modules/combat/Aimbot.java b/src/main/java/net/aoba/module/modules/combat/Aimbot.java index db233c85..edddfff4 100644 --- a/src/main/java/net/aoba/module/modules/combat/Aimbot.java +++ b/src/main/java/net/aoba/module/modules/combat/Aimbot.java @@ -36,6 +36,8 @@ import net.minecraft.command.argument.EntityAnchorArgumentType.EntityAnchor; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; +import net.minecraft.client.util.InputUtil; +import net.minecraft.client.util.InputUtil.Key; public class Aimbot extends Module implements RenderListener, TickListener { @@ -45,9 +47,9 @@ public class Aimbot extends Module implements RenderListener, TickListener { private BooleanSetting targetPlayers; public Aimbot() { - super(new KeybindSetting("key.aimbot", "Aimbot Key", new KeyBinding("key.aimbot", GLFW.GLFW_KEY_K, "key.categories.aoba"))); + super(new KeybindSetting("key.aimbot", "Aimbot Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("Aimbot"); - + this.setCategory(Category.Combat); this.setDescription("Locks your crosshair towards a desire player or entity."); diff --git a/src/main/java/net/aoba/module/modules/combat/AntiInvis.java b/src/main/java/net/aoba/module/modules/combat/AntiInvis.java index 774162bf..bfa0d3d0 100644 --- a/src/main/java/net/aoba/module/modules/combat/AntiInvis.java +++ b/src/main/java/net/aoba/module/modules/combat/AntiInvis.java @@ -22,15 +22,15 @@ package net.aoba.module.modules.combat; import org.lwjgl.glfw.GLFW; - import net.aoba.core.settings.types.KeybindSetting; import net.aoba.module.Module; -import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; public class AntiInvis extends Module { public AntiInvis() { - super(new KeybindSetting("key.antiinvis", "AntiInvis Key", new KeyBinding("key.antiinvis", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); + super(new KeybindSetting("key.antiinvis", "AntiInvis Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); + this.setName("AntiInvis"); this.setCategory(Category.Combat); this.setDescription("Reveals players who are invisible."); diff --git a/src/main/java/net/aoba/module/modules/combat/AntiKnockback.java b/src/main/java/net/aoba/module/modules/combat/AntiKnockback.java index 652ae096..be037081 100644 --- a/src/main/java/net/aoba/module/modules/combat/AntiKnockback.java +++ b/src/main/java/net/aoba/module/modules/combat/AntiKnockback.java @@ -26,11 +26,12 @@ import net.aoba.core.settings.types.KeybindSetting; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; public class AntiKnockback extends Module { public AntiKnockback() { - super(new KeybindSetting("key.antiknockback", "AntiKnockback Key", new KeyBinding("key.antiknockback", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); + super(new KeybindSetting("key.antiknockback", "AntiKnockback Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("AntiKnockback"); diff --git a/src/main/java/net/aoba/module/modules/combat/AutoRespawn.java b/src/main/java/net/aoba/module/modules/combat/AutoRespawn.java index 1b2ab396..1c6f4e8e 100644 --- a/src/main/java/net/aoba/module/modules/combat/AutoRespawn.java +++ b/src/main/java/net/aoba/module/modules/combat/AutoRespawn.java @@ -28,6 +28,7 @@ import net.aoba.event.listeners.ReceivePacketListener; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.c2s.play.ClientStatusC2SPacket; import net.minecraft.network.packet.s2c.play.HealthUpdateS2CPacket; @@ -35,8 +36,7 @@ public class AutoRespawn extends Module implements ReceivePacketListener { public AutoRespawn() { - - super(new KeybindSetting("key.autorespawn", "AutoRespawn Key", new KeyBinding("key.autorespawn", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); + super(new KeybindSetting("key.autorespawn", "AutoRespawn Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("AutoRespawn"); diff --git a/src/main/java/net/aoba/module/modules/combat/AutoSoup.java b/src/main/java/net/aoba/module/modules/combat/AutoSoup.java index 878a8696..c28bac2e 100644 --- a/src/main/java/net/aoba/module/modules/combat/AutoSoup.java +++ b/src/main/java/net/aoba/module/modules/combat/AutoSoup.java @@ -29,6 +29,7 @@ import net.aoba.event.listeners.TickListener; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.entity.player.PlayerInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -44,7 +45,7 @@ public class AutoSoup extends Module implements TickListener { private int previousSlot = -1; public AutoSoup() { - super(new KeybindSetting("key.autosoup", "AutoSoup Key", new KeyBinding("key.autosoup", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); + super(new KeybindSetting("key.autosoup", "AutoSoup Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("AutoSoup"); this.setCategory(Category.Combat); diff --git a/src/main/java/net/aoba/module/modules/combat/AutoTotem.java b/src/main/java/net/aoba/module/modules/combat/AutoTotem.java index 1a265ab1..a0d2135f 100644 --- a/src/main/java/net/aoba/module/modules/combat/AutoTotem.java +++ b/src/main/java/net/aoba/module/modules/combat/AutoTotem.java @@ -26,12 +26,13 @@ import net.aoba.core.settings.types.KeybindSetting; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; public class AutoTotem extends Module{ public AutoTotem() { - super(new KeybindSetting("key.autototem", "AutoTotem Key", new KeyBinding("key.autototem", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); - + super(new KeybindSetting("key.autototem", "AutoTotem Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); + this.setName("AutoTotem"); this.setCategory(Category.Combat); this.setDescription("Automatically replaced totems."); diff --git a/src/main/java/net/aoba/module/modules/combat/Criticals.java b/src/main/java/net/aoba/module/modules/combat/Criticals.java index dc411f5e..b9c3bcbe 100644 --- a/src/main/java/net/aoba/module/modules/combat/Criticals.java +++ b/src/main/java/net/aoba/module/modules/combat/Criticals.java @@ -28,11 +28,12 @@ import net.aoba.event.listeners.SendPacketListener; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; public class Criticals extends Module implements SendPacketListener { public Criticals() { - super(new KeybindSetting("key.criticals", "Criticals Key", new KeyBinding("key.criticals", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); + super(new KeybindSetting("key.criticals", "Criticals Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("Criticals"); this.setCategory(Category.Combat); diff --git a/src/main/java/net/aoba/module/modules/combat/CrystalAura.java b/src/main/java/net/aoba/module/modules/combat/CrystalAura.java index a8e7ce56..f55fe85f 100644 --- a/src/main/java/net/aoba/module/modules/combat/CrystalAura.java +++ b/src/main/java/net/aoba/module/modules/combat/CrystalAura.java @@ -32,6 +32,7 @@ import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.entity.Entity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.decoration.EndCrystalEntity; @@ -48,8 +49,8 @@ public class CrystalAura extends Module implements TickListener { private float radius = 10.0f; public CrystalAura() { - super(new KeybindSetting("key.crystalaura", "Crystal Aura Key", new KeyBinding("key.crystalaura", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); - + super(new KeybindSetting("key.crystalaura", "Crystal Aura Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); + this.setName("CrystalAura"); this.setCategory(Category.Combat); this.setDescription("Attacks anything within your personal space."); diff --git a/src/main/java/net/aoba/module/modules/combat/KillAura.java b/src/main/java/net/aoba/module/modules/combat/KillAura.java index 0aa82a66..eaef9d2c 100644 --- a/src/main/java/net/aoba/module/modules/combat/KillAura.java +++ b/src/main/java/net/aoba/module/modules/combat/KillAura.java @@ -31,6 +31,7 @@ import net.aoba.event.listeners.TickListener; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.mob.Monster; @@ -50,7 +51,7 @@ private enum Priority { private BooleanSetting targetPlayers; public KillAura() { - super(new KeybindSetting("key.killaura", "Kill Aura Key", new KeyBinding("key.killaura", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); + super(new KeybindSetting("key.killaura", "Kill Aura Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("KillAura"); this.setCategory(Category.Combat); diff --git a/src/main/java/net/aoba/module/modules/combat/Nametags.java b/src/main/java/net/aoba/module/modules/combat/Nametags.java index 7a1e17e2..eb8262de 100644 --- a/src/main/java/net/aoba/module/modules/combat/Nametags.java +++ b/src/main/java/net/aoba/module/modules/combat/Nametags.java @@ -27,6 +27,7 @@ import net.aoba.core.settings.types.KeybindSetting; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; public class Nametags extends Module { @@ -35,7 +36,7 @@ public class Nametags extends Module { private BooleanSetting alwaysVisible; public Nametags() { - super(new KeybindSetting("key.nametags", "NameTags Key", new KeyBinding("key.nametags", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); + super(new KeybindSetting("key.nametags", "NameTags Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("Nametags"); this.setCategory(Category.Combat); diff --git a/src/main/java/net/aoba/module/modules/combat/NoOverlay.java b/src/main/java/net/aoba/module/modules/combat/NoOverlay.java index cbf964b7..cc9465b2 100644 --- a/src/main/java/net/aoba/module/modules/combat/NoOverlay.java +++ b/src/main/java/net/aoba/module/modules/combat/NoOverlay.java @@ -26,11 +26,12 @@ import net.aoba.core.settings.types.KeybindSetting; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; public class NoOverlay extends Module { public NoOverlay() { - super(new KeybindSetting("key.nooverlay", "NoOverlay Key", new KeyBinding("key.nooverlay", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); + super(new KeybindSetting("key.nooverlay", "NoOverlay Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("NoOverlay"); this.setCategory(Category.Combat); diff --git a/src/main/java/net/aoba/module/modules/combat/Reach.java b/src/main/java/net/aoba/module/modules/combat/Reach.java index e3c20df8..d2c72f0d 100644 --- a/src/main/java/net/aoba/module/modules/combat/Reach.java +++ b/src/main/java/net/aoba/module/modules/combat/Reach.java @@ -26,13 +26,14 @@ import net.aoba.core.settings.types.KeybindSetting; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; public class Reach extends Module { private FloatSetting distance; public Reach() { - super(new KeybindSetting("key.reach", "Reach Key", new KeyBinding("key.reach", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); + super(new KeybindSetting("key.reach", "Reach Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("Reach"); this.setCategory(Category.Combat); diff --git a/src/main/java/net/aoba/module/modules/combat/TriggerBot.java b/src/main/java/net/aoba/module/modules/combat/TriggerBot.java index e5591f5b..9375b7d4 100644 --- a/src/main/java/net/aoba/module/modules/combat/TriggerBot.java +++ b/src/main/java/net/aoba/module/modules/combat/TriggerBot.java @@ -10,6 +10,7 @@ import net.aoba.event.listeners.TickListener; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.entity.Entity; import net.minecraft.entity.mob.Monster; import net.minecraft.entity.passive.AnimalEntity; @@ -25,8 +26,8 @@ public class TriggerBot extends Module implements TickListener { private BooleanSetting targetPlayers; public TriggerBot() { - super(new KeybindSetting("key.triggerbot", "TriggerBot Key", new KeyBinding("key.triggerbot", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); - + super(new KeybindSetting("key.triggerbot", "TriggerBot Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); + this.setName("Triggerbot"); this.setCategory(Category.Combat); this.setDescription("Attacks anything you are looking at."); diff --git a/src/main/java/net/aoba/module/modules/misc/AntiCactus.java b/src/main/java/net/aoba/module/modules/misc/AntiCactus.java index 44cf444e..529bafd9 100644 --- a/src/main/java/net/aoba/module/modules/misc/AntiCactus.java +++ b/src/main/java/net/aoba/module/modules/misc/AntiCactus.java @@ -26,12 +26,13 @@ import net.aoba.core.settings.types.KeybindSetting; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; public class AntiCactus extends Module { public AntiCactus() { - super(new KeybindSetting("key.anticactus", "AntiCactus Key", new KeyBinding("key.anticactus", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); - + super(new KeybindSetting("key.anticactus", "AntiCactus Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); + this.setName("AntiCactus"); this.setCategory(Category.Misc); this.setDescription("Prevents blocks from hurting you."); diff --git a/src/main/java/net/aoba/module/modules/misc/AutoEat.java b/src/main/java/net/aoba/module/modules/misc/AutoEat.java index d4f15d9e..16045017 100644 --- a/src/main/java/net/aoba/module/modules/misc/AutoEat.java +++ b/src/main/java/net/aoba/module/modules/misc/AutoEat.java @@ -28,6 +28,7 @@ import net.aoba.event.listeners.TickListener; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.item.FoodComponent; import net.minecraft.item.Item; @@ -35,8 +36,8 @@ public class AutoEat extends Module implements TickListener { private int hunger = 6; public AutoEat() { - super(new KeybindSetting("key.autoeat", "AntiCactus Key", new KeyBinding("key.autoeat", GLFW.GLFW_KEY_N, "key.categories.aoba"))); - + super(new KeybindSetting("key.autoeat", "AntiCactus Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); + this.setName("AutoEat"); this.setCategory(Category.Misc); this.setDescription("Automatically eats the best food in your inventory."); diff --git a/src/main/java/net/aoba/module/modules/misc/AutoFish.java b/src/main/java/net/aoba/module/modules/misc/AutoFish.java index c91fd02f..8b0d39d6 100644 --- a/src/main/java/net/aoba/module/modules/misc/AutoFish.java +++ b/src/main/java/net/aoba/module/modules/misc/AutoFish.java @@ -28,6 +28,7 @@ import net.aoba.event.listeners.ReceivePacketListener; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.c2s.play.PlayerInteractItemC2SPacket; import net.minecraft.network.packet.s2c.play.PlaySoundS2CPacket; @@ -36,8 +37,8 @@ public class AutoFish extends Module implements ReceivePacketListener { public AutoFish() { - super(new KeybindSetting("key.autofish", "AutoFish Key", new KeyBinding("key.autofish", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); - + super(new KeybindSetting("key.autofish", "AutoFish Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); + this.setName("AutoFish"); this.setCategory(Category.Misc); this.setDescription("Automatically fishes for you."); diff --git a/src/main/java/net/aoba/module/modules/misc/AutoWalk.java b/src/main/java/net/aoba/module/modules/misc/AutoWalk.java index 16a92b74..3bfb38c4 100644 --- a/src/main/java/net/aoba/module/modules/misc/AutoWalk.java +++ b/src/main/java/net/aoba/module/modules/misc/AutoWalk.java @@ -28,11 +28,12 @@ import net.aoba.event.listeners.TickListener; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; public class AutoWalk extends Module implements TickListener { public AutoWalk() { - super(new KeybindSetting("key.autowalk", "AutoWalk Key", new KeyBinding("key.autowalk", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); - + super(new KeybindSetting("key.autowalk", "AutoWalk Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); + this.setName("AutoWalk"); this.setCategory(Category.Misc); this.setDescription("Places blocks exceptionally fast"); diff --git a/src/main/java/net/aoba/module/modules/misc/FastBreak.java b/src/main/java/net/aoba/module/modules/misc/FastBreak.java index 06c79414..66eeca60 100644 --- a/src/main/java/net/aoba/module/modules/misc/FastBreak.java +++ b/src/main/java/net/aoba/module/modules/misc/FastBreak.java @@ -26,14 +26,15 @@ import net.aoba.core.settings.types.KeybindSetting; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; public class FastBreak extends Module { private FloatSetting multiplier; public FastBreak() { - super(new KeybindSetting("key.fastbreak", "FastBreak Key", new KeyBinding("key.fastbreak", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); - + super(new KeybindSetting("key.fastbreak", "FastBreak Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); + this.setName("FastBreak"); this.setCategory(Category.Misc); this.setDescription("Breaks blocks quicker based on a multiplier."); diff --git a/src/main/java/net/aoba/module/modules/misc/FastPlace.java b/src/main/java/net/aoba/module/modules/misc/FastPlace.java index b3d0a024..1b482083 100644 --- a/src/main/java/net/aoba/module/modules/misc/FastPlace.java +++ b/src/main/java/net/aoba/module/modules/misc/FastPlace.java @@ -29,13 +29,14 @@ import net.aoba.interfaces.IMinecraftClient; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; public class FastPlace extends Module implements TickListener{ IMinecraftClient iMC; public FastPlace() { - super(new KeybindSetting("key.fastplace", "FastPlace Key", new KeyBinding("key.fastplace", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); - + super(new KeybindSetting("key.fastplace", "FastPlace Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); + this.setName("FastPlace"); this.setCategory(Category.Misc); this.setDescription("Places blocks exceptionally fast"); diff --git a/src/main/java/net/aoba/module/modules/misc/Timer.java b/src/main/java/net/aoba/module/modules/misc/Timer.java index 6fc1771a..3a98b438 100644 --- a/src/main/java/net/aoba/module/modules/misc/Timer.java +++ b/src/main/java/net/aoba/module/modules/misc/Timer.java @@ -26,13 +26,14 @@ import net.aoba.core.settings.types.KeybindSetting; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; public class Timer extends Module { private FloatSetting multiplier; public Timer() { - super(new KeybindSetting("key.timer", "Timer Key", new KeyBinding("key.timer", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); - + super(new KeybindSetting("key.timer", "Timer Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); + this.setName("Timer"); this.setCategory(Category.Misc); this.setDescription("Increases the speed of Minecraft."); diff --git a/src/main/java/net/aoba/module/modules/movement/Fly.java b/src/main/java/net/aoba/module/modules/movement/Fly.java index 82681a00..4d106783 100644 --- a/src/main/java/net/aoba/module/modules/movement/Fly.java +++ b/src/main/java/net/aoba/module/modules/movement/Fly.java @@ -30,6 +30,7 @@ import net.aoba.module.Module; import net.minecraft.client.network.ClientPlayerEntity; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.entity.Entity; import net.minecraft.util.math.Vec3d; @@ -38,8 +39,8 @@ public class Fly extends Module implements TickListener { private FloatSetting flySpeed; public Fly() { - super(new KeybindSetting("key.fly", "Fly Key", new KeyBinding("key.fly", GLFW.GLFW_KEY_V, "key.categories.aoba"))); - + super(new KeybindSetting("key.fly", "Fly Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_V, 0))); + this.setName("Fly"); this.setCategory(Category.Movement); this.setDescription("Allows the player to fly."); diff --git a/src/main/java/net/aoba/module/modules/movement/Freecam.java b/src/main/java/net/aoba/module/modules/movement/Freecam.java index f757639f..8a8d0b16 100644 --- a/src/main/java/net/aoba/module/modules/movement/Freecam.java +++ b/src/main/java/net/aoba/module/modules/movement/Freecam.java @@ -32,6 +32,7 @@ import net.aoba.module.Module; import net.minecraft.client.network.ClientPlayerEntity; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.entity.Entity.RemovalReason; import net.minecraft.util.math.Vec3d; @@ -40,8 +41,8 @@ public class Freecam extends Module implements TickListener { private FloatSetting flySpeed; public Freecam() { - super(new KeybindSetting("key.freecam", "Freecam Key", new KeyBinding("key.freecam", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); - + super(new KeybindSetting("key.freecam", "Freecam Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); + this.setName("Freecam"); this.setCategory(Category.Movement); this.setDescription("Allows the player to clip through blocks (Only work clientside)."); diff --git a/src/main/java/net/aoba/module/modules/movement/Glide.java b/src/main/java/net/aoba/module/modules/movement/Glide.java index e67f7aad..1e108027 100644 --- a/src/main/java/net/aoba/module/modules/movement/Glide.java +++ b/src/main/java/net/aoba/module/modules/movement/Glide.java @@ -29,12 +29,13 @@ import net.aoba.module.Module; import net.minecraft.client.network.ClientPlayerEntity; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; public class Glide extends Module implements TickListener { private float fallSpeed = .25f; public Glide() { - super(new KeybindSetting("key.glide", "Glide Key", new KeyBinding("key.glide", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); - + super(new KeybindSetting("key.glide", "Glide Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); + this.setName("Glide"); this.setCategory(Category.Movement); this.setDescription("Allows the player to glide down."); diff --git a/src/main/java/net/aoba/module/modules/movement/Jesus.java b/src/main/java/net/aoba/module/modules/movement/Jesus.java index ed5fc86e..18c306a7 100644 --- a/src/main/java/net/aoba/module/modules/movement/Jesus.java +++ b/src/main/java/net/aoba/module/modules/movement/Jesus.java @@ -29,14 +29,15 @@ import net.aoba.event.listeners.TickListener; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; public class Jesus extends Module implements TickListener { public BooleanSetting legit; public Jesus() { - super(new KeybindSetting("key.jesus", "Jesus Key", new KeyBinding("key.jesus", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); - + super(new KeybindSetting("key.jesus", "Jesus Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); + this.setName("Jesus"); this.setCategory(Category.Movement); this.setDescription("Allows the player to walk on water."); diff --git a/src/main/java/net/aoba/module/modules/movement/Jetpack.java b/src/main/java/net/aoba/module/modules/movement/Jetpack.java index dbfab09c..81190cdf 100644 --- a/src/main/java/net/aoba/module/modules/movement/Jetpack.java +++ b/src/main/java/net/aoba/module/modules/movement/Jetpack.java @@ -30,6 +30,7 @@ import net.aoba.module.Module; import net.minecraft.client.network.ClientPlayerEntity; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.entity.Entity; import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket.OnGroundOnly; import net.minecraft.particle.ParticleEffect; @@ -41,8 +42,8 @@ public class Jetpack extends Module implements TickListener { private FloatSetting jetpackSpeed; public Jetpack() { - super(new KeybindSetting("key.jetpack", "Jetpack Key", new KeyBinding("key.jetpack", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); - + super(new KeybindSetting("key.jetpack", "Jetpack Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); + this.setName("Jetpack"); this.setCategory(Category.Movement); this.setDescription("Like fly, but a lot more fun!"); diff --git a/src/main/java/net/aoba/module/modules/movement/NoFall.java b/src/main/java/net/aoba/module/modules/movement/NoFall.java index 82ea2123..345f6972 100644 --- a/src/main/java/net/aoba/module/modules/movement/NoFall.java +++ b/src/main/java/net/aoba/module/modules/movement/NoFall.java @@ -28,13 +28,14 @@ import net.aoba.event.listeners.TickListener; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket.OnGroundOnly; public class NoFall extends Module implements TickListener { public NoFall() { - super(new KeybindSetting("key.nofall", "NoFall Key", new KeyBinding("key.nofall", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); - + super(new KeybindSetting("key.nofall", "NoFall Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); + this.setName("No-Fall"); this.setCategory(Category.Movement); this.setDescription("Prevents fall damage."); diff --git a/src/main/java/net/aoba/module/modules/movement/NoSlowdown.java b/src/main/java/net/aoba/module/modules/movement/NoSlowdown.java index d5745a52..0b6e8230 100644 --- a/src/main/java/net/aoba/module/modules/movement/NoSlowdown.java +++ b/src/main/java/net/aoba/module/modules/movement/NoSlowdown.java @@ -28,11 +28,12 @@ import net.aoba.event.listeners.TickListener; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; public class NoSlowdown extends Module implements TickListener { public NoSlowdown() { - super(new KeybindSetting("key.noslowdown", "NoSlowdown Key", new KeyBinding("key.noslowdown", GLFW.GLFW_KEY_Z, "key.categories.aoba"))); + super(new KeybindSetting("key.noslowdown", "NoSlowdown Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("NoSlowdown"); this.setCategory(Category.Movement); diff --git a/src/main/java/net/aoba/module/modules/movement/Noclip.java b/src/main/java/net/aoba/module/modules/movement/Noclip.java index 82296062..f53cb6c1 100644 --- a/src/main/java/net/aoba/module/modules/movement/Noclip.java +++ b/src/main/java/net/aoba/module/modules/movement/Noclip.java @@ -29,14 +29,15 @@ import net.aoba.module.Module; import net.minecraft.client.network.ClientPlayerEntity; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.util.math.Vec3d; public class Noclip extends Module implements TickListener { private float flySpeed = 5; public Noclip() { - super(new KeybindSetting("key.noclip", "Noclip Key", new KeyBinding("key.noclip", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); - + super(new KeybindSetting("key.noclip", "Noclip Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); + this.setName("Noclip"); this.setCategory(Category.Movement); this.setDescription("Allows the player to clip through blocks (Only work clientside)."); diff --git a/src/main/java/net/aoba/module/modules/movement/Safewalk.java b/src/main/java/net/aoba/module/modules/movement/Safewalk.java index 8af7518a..e88f3cfe 100644 --- a/src/main/java/net/aoba/module/modules/movement/Safewalk.java +++ b/src/main/java/net/aoba/module/modules/movement/Safewalk.java @@ -28,12 +28,13 @@ import net.aoba.event.listeners.TickListener; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.util.math.Vec3d; public class Safewalk extends Module implements TickListener { public Safewalk() { - super(new KeybindSetting("key.safewalk", "Safewalk Key", new KeyBinding("key.safewalk", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); + super(new KeybindSetting("key.safewalk", "Safewalk Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("Safewalk"); this.setCategory(Category.Movement); diff --git a/src/main/java/net/aoba/module/modules/movement/Sneak.java b/src/main/java/net/aoba/module/modules/movement/Sneak.java index 008b86d1..0e53410e 100644 --- a/src/main/java/net/aoba/module/modules/movement/Sneak.java +++ b/src/main/java/net/aoba/module/modules/movement/Sneak.java @@ -29,13 +29,14 @@ import net.aoba.module.Module; import net.minecraft.client.network.ClientPlayerEntity; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.network.packet.c2s.play.ClientCommandC2SPacket; import net.minecraft.network.packet.c2s.play.ClientCommandC2SPacket.Mode; public class Sneak extends Module implements TickListener { public Sneak() { - super(new KeybindSetting("key.sneakhack", "Sneak Key", new KeyBinding("key.sneakhack", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); + super(new KeybindSetting("key.sneakhack", "Sneak Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("Sneak"); this.setCategory(Category.Movement); diff --git a/src/main/java/net/aoba/module/modules/movement/Spider.java b/src/main/java/net/aoba/module/modules/movement/Spider.java index eb407df5..eef3b3f9 100644 --- a/src/main/java/net/aoba/module/modules/movement/Spider.java +++ b/src/main/java/net/aoba/module/modules/movement/Spider.java @@ -29,12 +29,13 @@ import net.aoba.module.Module; import net.minecraft.client.network.ClientPlayerEntity; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.util.math.Vec3d; public class Spider extends Module implements TickListener { public Spider() { - super(new KeybindSetting("key.spider", "Spider Key", new KeyBinding("key.spider", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); + super(new KeybindSetting("key.spider", "Spider Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("Spider"); this.setCategory(Category.Movement); diff --git a/src/main/java/net/aoba/module/modules/movement/Sprint.java b/src/main/java/net/aoba/module/modules/movement/Sprint.java index a3ed60c2..99860be0 100644 --- a/src/main/java/net/aoba/module/modules/movement/Sprint.java +++ b/src/main/java/net/aoba/module/modules/movement/Sprint.java @@ -28,11 +28,12 @@ import net.aoba.event.listeners.TickListener; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; public class Sprint extends Module implements TickListener { public Sprint() { - super(new KeybindSetting("key.sprinthack", "Sprint Key", new KeyBinding("key.sprinthack", GLFW.GLFW_KEY_G, "key.categories.aoba"))); + super(new KeybindSetting("key.sprinthack", "Sprint Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("Sprint"); this.setCategory(Category.Movement); diff --git a/src/main/java/net/aoba/module/modules/movement/Step.java b/src/main/java/net/aoba/module/modules/movement/Step.java index d83b4eb2..c8714c5d 100644 --- a/src/main/java/net/aoba/module/modules/movement/Step.java +++ b/src/main/java/net/aoba/module/modules/movement/Step.java @@ -26,13 +26,14 @@ import net.aoba.core.settings.types.KeybindSetting; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; public class Step extends Module { private FloatSetting stepHeight; public Step() { - super(new KeybindSetting("key.step", "Step Key", new KeyBinding("key.step", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); + super(new KeybindSetting("key.step", "Step Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("Step"); this.setCategory(Category.Movement); diff --git a/src/main/java/net/aoba/module/modules/render/Breadcrumbs.java b/src/main/java/net/aoba/module/modules/render/Breadcrumbs.java index 3063891b..7c7fc86e 100644 --- a/src/main/java/net/aoba/module/modules/render/Breadcrumbs.java +++ b/src/main/java/net/aoba/module/modules/render/Breadcrumbs.java @@ -34,6 +34,7 @@ import org.lwjgl.glfw.GLFW; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.util.math.Vec3d; import net.aoba.gui.Color; import net.aoba.misc.RainbowColor; @@ -52,7 +53,7 @@ public class Breadcrumbs extends Module implements RenderListener, TickListener private List positions = new ArrayList(); public Breadcrumbs() { - super(new KeybindSetting("key.breadcrumbs", "Breadcrumbs Key", new KeyBinding("key.breadcrumbs", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); + super(new KeybindSetting("key.breadcrumbs", "Breadcrumbs Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("Breadcrumbs"); this.setCategory(Category.Render); diff --git a/src/main/java/net/aoba/module/modules/render/ChestESP.java b/src/main/java/net/aoba/module/modules/render/ChestESP.java index fb7bffb2..a027d4b6 100644 --- a/src/main/java/net/aoba/module/modules/render/ChestESP.java +++ b/src/main/java/net/aoba/module/modules/render/ChestESP.java @@ -40,6 +40,7 @@ import net.minecraft.block.entity.ChestBlockEntity; import net.minecraft.block.entity.TrappedChestBlockEntity; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.util.math.Box; public class ChestESP extends Module implements RenderListener, TickListener { @@ -52,7 +53,7 @@ public class ChestESP extends Module implements RenderListener, TickListener { public FloatSetting effectSpeed = new FloatSetting("chestesp_effectspeed", "Effect Speed", "Effect Speed", 4, 1, 20, 0.1); public ChestESP() { - super(new KeybindSetting("key.chestesp", "ChestESP Key", new KeyBinding("key.chestesp", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); + super(new KeybindSetting("key.chestesp", "ChestESP Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("ChestESP"); this.setCategory(Category.Render); diff --git a/src/main/java/net/aoba/module/modules/render/EntityESP.java b/src/main/java/net/aoba/module/modules/render/EntityESP.java index 16f9fe3d..e53b306e 100644 --- a/src/main/java/net/aoba/module/modules/render/EntityESP.java +++ b/src/main/java/net/aoba/module/modules/render/EntityESP.java @@ -34,6 +34,7 @@ import net.aoba.misc.RainbowColor; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.entity.Entity; import net.minecraft.entity.player.PlayerEntity; @@ -52,7 +53,7 @@ public class EntityESP extends Module implements RenderListener, TickListener { public FloatSetting effectSpeed = new FloatSetting("entityesp_effectspeed", "Effect Speed", "Effect Speed", 4, 1, 20, 0.1); public EntityESP() { - super(new KeybindSetting("key.entityesp", "EntityESP Key", new KeyBinding("key.entityesp", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); + super(new KeybindSetting("key.entityesp", "EntityESP Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("EntityESP"); this.setCategory(Category.Render); diff --git a/src/main/java/net/aoba/module/modules/render/Fullbright.java b/src/main/java/net/aoba/module/modules/render/Fullbright.java index a9b95995..fdd9513d 100644 --- a/src/main/java/net/aoba/module/modules/render/Fullbright.java +++ b/src/main/java/net/aoba/module/modules/render/Fullbright.java @@ -27,12 +27,13 @@ import net.aoba.interfaces.ISimpleOption; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; public class Fullbright extends Module { private double previousValue = 0.0; public Fullbright() { - super(new KeybindSetting("key.fullbright", "Fullbright Key", new KeyBinding("key.fullbright", GLFW.GLFW_KEY_F, "key.categories.aoba"))); + super(new KeybindSetting("key.fullbright", "Fullbright Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("Fullbright"); this.setCategory(Category.Render); diff --git a/src/main/java/net/aoba/module/modules/render/ItemESP.java b/src/main/java/net/aoba/module/modules/render/ItemESP.java index 6f483672..69a1c06c 100644 --- a/src/main/java/net/aoba/module/modules/render/ItemESP.java +++ b/src/main/java/net/aoba/module/modules/render/ItemESP.java @@ -29,13 +29,14 @@ import net.aoba.gui.Color; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.entity.Entity; import net.minecraft.entity.ItemEntity; public class ItemESP extends Module implements RenderListener { public ItemESP() { - super(new KeybindSetting("key.itemesp", "ItemESP Key", new KeyBinding("key.itemesp", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); + super(new KeybindSetting("key.itemesp", "ItemESP Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("ItemESP"); this.setCategory(Category.Render); diff --git a/src/main/java/net/aoba/module/modules/render/POV.java b/src/main/java/net/aoba/module/modules/render/POV.java index e5704343..41e3ba1d 100644 --- a/src/main/java/net/aoba/module/modules/render/POV.java +++ b/src/main/java/net/aoba/module/modules/render/POV.java @@ -31,6 +31,7 @@ import net.minecraft.client.MinecraftClient; import net.minecraft.client.network.ClientPlayerEntity; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.entity.Entity; import net.minecraft.entity.player.PlayerEntity; @@ -41,7 +42,7 @@ public class POV extends Module implements TickListener { private boolean fakePlayerSpawned = false; public POV() { - super(new KeybindSetting("key.pov", "POV Key", new KeyBinding("key.pov", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); + super(new KeybindSetting("key.pov", "POV Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("POV"); this.setCategory(Category.Render); diff --git a/src/main/java/net/aoba/module/modules/render/PlayerESP.java b/src/main/java/net/aoba/module/modules/render/PlayerESP.java index 8c49ef63..bd2b695c 100644 --- a/src/main/java/net/aoba/module/modules/render/PlayerESP.java +++ b/src/main/java/net/aoba/module/modules/render/PlayerESP.java @@ -30,11 +30,12 @@ import net.aoba.module.Module; import net.minecraft.client.network.AbstractClientPlayerEntity; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; public class PlayerESP extends Module implements RenderListener { public PlayerESP() { - super(new KeybindSetting("key.playeresp", "PlayerESP Key", new KeyBinding("key.playeresp", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); + super(new KeybindSetting("key.playeresp", "PlayerESP Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("PlayerESP"); this.setCategory(Category.Render); diff --git a/src/main/java/net/aoba/module/modules/render/SpawnerESP.java b/src/main/java/net/aoba/module/modules/render/SpawnerESP.java index fe5f3cbf..cbc09bbc 100644 --- a/src/main/java/net/aoba/module/modules/render/SpawnerESP.java +++ b/src/main/java/net/aoba/module/modules/render/SpawnerESP.java @@ -34,13 +34,14 @@ import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.MobSpawnerBlockEntity; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.util.math.Box; public class SpawnerESP extends Module implements RenderListener { public SpawnerESP() { - super(new KeybindSetting("key.spawneresp", "SpawnerESP Key", new KeyBinding("key.spawneresp", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); - + super(new KeybindSetting("key.spawneresp", "SpawnerESP Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); + this.setName("SpawnerESP"); this.setCategory(Category.Render); this.setDescription("Allows the player to see spawners with an ESP."); diff --git a/src/main/java/net/aoba/module/modules/render/Tracer.java b/src/main/java/net/aoba/module/modules/render/Tracer.java index e293371c..687cc6ff 100644 --- a/src/main/java/net/aoba/module/modules/render/Tracer.java +++ b/src/main/java/net/aoba/module/modules/render/Tracer.java @@ -28,14 +28,15 @@ import net.aoba.event.listeners.RenderListener; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; public class Tracer extends Module implements RenderListener { public Tracer() { - super(new KeybindSetting("key.tracer", "Tracer Key", new KeyBinding("key.tracer", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); - + super(new KeybindSetting("key.tracer", "Tracer Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); + this.setName("Tracer"); this.setCategory(Category.Render); this.setDescription("Points toward other players and entities with a line."); diff --git a/src/main/java/net/aoba/module/modules/render/Trajectory.java b/src/main/java/net/aoba/module/modules/render/Trajectory.java index 59da04da..a502625e 100644 --- a/src/main/java/net/aoba/module/modules/render/Trajectory.java +++ b/src/main/java/net/aoba/module/modules/render/Trajectory.java @@ -38,6 +38,7 @@ import net.minecraft.client.render.Tessellator; import net.minecraft.client.render.VertexFormat; import net.minecraft.client.render.VertexFormats; +import net.minecraft.client.util.InputUtil; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.item.BowItem; import net.minecraft.item.Item; @@ -47,8 +48,8 @@ public class Trajectory extends Module implements RenderListener { public Trajectory() { - super(new KeybindSetting("key.trajectory", "Trajectory Key", new KeyBinding("key.trajectory", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); - + super(new KeybindSetting("key.trajectory", "Trajectory Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); + this.setName("Trajectory"); this.setCategory(Category.Render); this.setDescription("Allows the player to see where they are aiming. (DISABLED)"); diff --git a/src/main/java/net/aoba/module/modules/render/XRay.java b/src/main/java/net/aoba/module/modules/render/XRay.java index e56aaeb6..1ed08daa 100644 --- a/src/main/java/net/aoba/module/modules/render/XRay.java +++ b/src/main/java/net/aoba/module/modules/render/XRay.java @@ -30,13 +30,14 @@ import net.minecraft.block.Block; import net.minecraft.block.Blocks; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; public class XRay extends Module { public static ArrayList blocks = new ArrayList(); public XRay() { - super(new KeybindSetting("key.xray", "XRay Key", new KeyBinding("key.xray", GLFW.GLFW_KEY_X, "key.categories.aoba"))); - + super(new KeybindSetting("key.xray", "XRay Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); + this.setName("XRay"); this.setCategory(Category.Render); this.setDescription("Allows the player to see ores."); diff --git a/src/main/java/net/aoba/module/modules/world/AutoFarm.java b/src/main/java/net/aoba/module/modules/world/AutoFarm.java index 9fb483a0..69fc1f3c 100644 --- a/src/main/java/net/aoba/module/modules/world/AutoFarm.java +++ b/src/main/java/net/aoba/module/modules/world/AutoFarm.java @@ -27,6 +27,7 @@ import net.minecraft.block.CropBlock; import net.minecraft.block.FarmlandBlock; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket; @@ -50,7 +51,7 @@ public class AutoFarm extends Module implements TickListener { private FloatSetting radius; public AutoFarm() { - super(new KeybindSetting("key.autofarm", "AutoFarm Key", new KeyBinding("key.autofarm", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); + super(new KeybindSetting("key.autofarm", "AutoFarm Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("AutoFarm"); this.setCategory(Category.World); diff --git a/src/main/java/net/aoba/module/modules/world/AutoSign.java b/src/main/java/net/aoba/module/modules/world/AutoSign.java index 2c02f40a..0569d689 100644 --- a/src/main/java/net/aoba/module/modules/world/AutoSign.java +++ b/src/main/java/net/aoba/module/modules/world/AutoSign.java @@ -26,12 +26,13 @@ import net.aoba.core.settings.types.KeybindSetting; import net.aoba.module.Module; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; public class AutoSign extends Module { String[] text; public AutoSign() { - super(new KeybindSetting("key.autosign", "AutoSign Key", new KeyBinding("key.autosign", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); + super(new KeybindSetting("key.autosign", "AutoSign Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("AutoSign"); this.setCategory(Category.World); diff --git a/src/main/java/net/aoba/module/modules/world/Nuker.java b/src/main/java/net/aoba/module/modules/world/Nuker.java index 8819552c..e4efb4c4 100644 --- a/src/main/java/net/aoba/module/modules/world/Nuker.java +++ b/src/main/java/net/aoba/module/modules/world/Nuker.java @@ -35,6 +35,7 @@ import net.minecraft.block.Blocks; import net.minecraft.client.MinecraftClient; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket; import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket.Action; import net.minecraft.util.math.BlockPos; @@ -47,7 +48,7 @@ public class Nuker extends Module implements RenderListener, TickListener { private FloatSetting radius; public Nuker() { - super(new KeybindSetting("key.nuker", "Nuker Key", new KeyBinding("key.nuker", GLFW.GLFW_KEY_N, "key.categories.aoba"))); + super(new KeybindSetting("key.nuker", "Nuker Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("Nuker"); this.setCategory(Category.World); diff --git a/src/main/java/net/aoba/module/modules/world/TileBreaker.java b/src/main/java/net/aoba/module/modules/world/TileBreaker.java index 47edb154..6d7c0bb1 100644 --- a/src/main/java/net/aoba/module/modules/world/TileBreaker.java +++ b/src/main/java/net/aoba/module/modules/world/TileBreaker.java @@ -36,6 +36,7 @@ import net.minecraft.block.Blocks; import net.minecraft.client.MinecraftClient; import net.minecraft.client.option.KeyBinding; +import net.minecraft.client.util.InputUtil; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Box; import net.minecraft.util.math.Direction; @@ -48,7 +49,7 @@ public class TileBreaker extends Module implements TickListener, RenderListener private FloatSetting radius; public TileBreaker() { - super(new KeybindSetting("key.tilebreaker", "TileBreaker Key", new KeyBinding("key.tilebreaker", GLFW.GLFW_KEY_UNKNOWN, "key.categories.aoba"))); + super(new KeybindSetting("key.tilebreaker", "TileBreaker Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); this.setName("TileBreaker"); this.setCategory(Category.World);