diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..192a852f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,32 @@ +name: Build + +on: [ push, pull_request ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Java setup + uses: actions/setup-java@v4 + with: + distribution: 'adopt' + java-version: 8 + cache: gradle + + - name: Build + run: | + chmod +x ./gradlew + ./gradlew setupCiWorkspace --no-daemon + ./gradlew clean --no-daemon + ./gradlew build --no-daemon --refresh-dependencies + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: raven + path: build/libs/ \ No newline at end of file diff --git a/build.gradle b/build.gradle index 07c61a73..969826a8 100644 --- a/build.gradle +++ b/build.gradle @@ -38,7 +38,7 @@ plugins { version = "1.2" group = "keystrokesmod" -archivesBaseName = "[1.8.9] BetterKeystrokes V" +archivesBaseName = "KeystrokesMod" minecraft { version = "1.8.9-11.15.1.2318-1.8.9" diff --git a/src/main/java/keystrokesmod/client/main/Raven.java b/src/main/java/keystrokesmod/client/main/Raven.java index 122f7f26..5b497208 100644 --- a/src/main/java/keystrokesmod/client/main/Raven.java +++ b/src/main/java/keystrokesmod/client/main/Raven.java @@ -53,8 +53,8 @@ public class Raven { public static boolean debugger = false; public static final VersionManager versionManager = new VersionManager(); public static CommandManager commandManager; - public static final String sourceLocation = "https://github.com/Kopamed/Raven-bPLUS"; - public static final String downloadLocation = "https://github.com/Kopamed/Raven-bPLUS/raw/main/build/libs/%5B1.8.9%5D%20BetterKeystrokes%20V-1.2.jar"; + public static final String sourceLocation = "https://github.com/Coccocoahelper/Raven-BLITE"; + public static final String downloadLocation = "https://github.com/Coccocoahelper/Raven-BLITE/raw/main/build/libs/%5B1.8.9%5D%20BetterKeystrokes%20V-1.2.jar"; public static final String discord = "https://discord.gg/QQMQfCRyNP"; public static String[] updateText = {"Your version of Raven B+ (" + versionManager.getClientVersion().toString() + ") is outdated!", "Enter the command update into client CommandLine to open the download page", "or just enable the update module to get a message in chat.", "", "Newest version: " + versionManager.getLatestVersion().toString()}; public static ConfigManager configManager; @@ -80,7 +80,6 @@ public class Raven { public static void init() { MinecraftForge.EVENT_BUS.register(new Raven()); - MinecraftForge.EVENT_BUS.register(new DebugInfoRenderer()); MinecraftForge.EVENT_BUS.register(new MouseManager()); MinecraftForge.EVENT_BUS.register(new ChatHelper()); diff --git a/src/main/java/keystrokesmod/client/module/ModuleManager.java b/src/main/java/keystrokesmod/client/module/ModuleManager.java index 3cb73fba..fef2c87a 100644 --- a/src/main/java/keystrokesmod/client/module/ModuleManager.java +++ b/src/main/java/keystrokesmod/client/module/ModuleManager.java @@ -29,7 +29,6 @@ public ModuleManager() { addModule(new LeftClicker()); addModule(new RightClicker()); addModule(new AimAssist()); - addModule(new BurstClicker()); addModule(new ClickAssist()); addModule(new DelayRemover()); addModule(new HitBox()); @@ -51,7 +50,6 @@ public ModuleManager() { addModule(new BedAura()); addModule(new FallSpeed()); addModule(new FastPlace()); - addModule(new Freecam()); addModule(new NoFall()); addModule(new SafeWalk()); addModule(new AntiBot()); @@ -67,13 +65,11 @@ public ModuleManager() { addModule(new DuelsStats()); addModule(new MurderMystery()); addModule(new SumoFences()); - addModule(new SlyPort()); addModule(new ClientNameSpoof()); addModule(new FakeChat()); addModule(new NameHider()); addModule(new StringEncrypt()); addModule(new WaterBucket()); - //addModule(new AutoConfig()); addModule(new Terminal()); addModule(new GuiModule()); addModule(new SelfDestruct()); @@ -90,17 +86,12 @@ public ModuleManager() { addModule(new Armour()); addModule(new Healing()); addModule(new Trajectories()); - addModule(new WTap()); - addModule(new BlockHit()); - addModule(new STap()); addModule(new AutoWeapon()); addModule(new BedwarsOverlay()); - addModule(new ShiftTap()); addModule(new FPSSpoofer()); addModule(new ExplicitB9NameTags()); - addModule(new AutoBlock()); addModule(new MiddleClick()); // why ? diff --git a/src/main/java/keystrokesmod/client/module/modules/client/SelfDestruct.java b/src/main/java/keystrokesmod/client/module/modules/client/SelfDestruct.java index 27aaee50..5cfa321e 100644 --- a/src/main/java/keystrokesmod/client/module/modules/client/SelfDestruct.java +++ b/src/main/java/keystrokesmod/client/module/modules/client/SelfDestruct.java @@ -3,7 +3,6 @@ import keystrokesmod.client.main.Raven; import keystrokesmod.client.module.Module; import keystrokesmod.client.utils.ChatHelper; -import keystrokesmod.client.utils.DebugInfoRenderer; import keystrokesmod.client.utils.MouseManager; import keystrokesmod.keystroke.KeyStrokeRenderer; import net.minecraftforge.common.MinecraftForge; @@ -32,7 +31,6 @@ public void onEnable() { // dude your event system doesnt even work bruh MinecraftForge.EVENT_BUS.unregister(new Raven()); - MinecraftForge.EVENT_BUS.unregister(new DebugInfoRenderer()); MinecraftForge.EVENT_BUS.unregister(new MouseManager()); MinecraftForge.EVENT_BUS.unregister(new KeyStrokeRenderer()); MinecraftForge.EVENT_BUS.unregister(new ChatHelper()); diff --git a/src/main/java/keystrokesmod/client/module/modules/combat/AutoBlock.java b/src/main/java/keystrokesmod/client/module/modules/combat/AutoBlock.java deleted file mode 100644 index f0376b41..00000000 --- a/src/main/java/keystrokesmod/client/module/modules/combat/AutoBlock.java +++ /dev/null @@ -1,60 +0,0 @@ -package keystrokesmod.client.module.modules.combat; - -import keystrokesmod.client.module.Module; -import keystrokesmod.client.module.setting.impl.DoubleSliderSetting; -import keystrokesmod.client.module.setting.impl.SliderSetting; -import keystrokesmod.client.utils.CoolDown; -import keystrokesmod.client.utils.Utils; -import net.minecraft.client.settings.KeyBinding; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.TickEvent; -import org.lwjgl.input.Mouse; - -public class AutoBlock extends Module { - public static DoubleSliderSetting duration, distance; - public static SliderSetting chance; - private boolean engaged; - private CoolDown engagedTime = new CoolDown(0); - - public AutoBlock(){ - super("AutoBlock", ModuleCategory.combat); - - this.registerSetting(duration = new DoubleSliderSetting("Block duration (MS)", 20, 100, 1, 500, 1)); - this.registerSetting(distance = new DoubleSliderSetting("Distance to player (blocks)", 0, 3, 0, 6, 0.01)); - this.registerSetting(chance = new SliderSetting("Chance %", 100, 0, 100, 1)); - } - - @SubscribeEvent - public void yes(TickEvent.RenderTickEvent e){ - if(!Utils.Player.isPlayerInGame()) - return; - - if(engaged){ - if((engagedTime.hasFinished() || !Mouse.isButtonDown(0)) && duration.getInputMin() <= engagedTime.getElapsedTime()){ - engaged = false; - release(); - } - return; - } - - if (Mouse.isButtonDown(0) && mc.objectMouseOver != null && mc.objectMouseOver.entityHit != null && mc.thePlayer.getDistanceToEntity(mc.objectMouseOver.entityHit) >= distance.getInputMin()&& mc.objectMouseOver.entityHit != null && mc.thePlayer.getDistanceToEntity(mc.objectMouseOver.entityHit) <= distance.getInputMax() && (chance.getInput() == 100 || Math.random() <= chance.getInput() / 100)){ - engaged = true; - engagedTime.setCooldown((long)duration.getInputMax()); - engagedTime.start(); - press(); - } - } - - private static void release() { - int key = mc.gameSettings.keyBindUseItem.getKeyCode(); - KeyBinding.setKeyBindState(key, false); - Utils.Client.setMouseButtonState(1, false); - } - - private static void press() { - int key = mc.gameSettings.keyBindUseItem.getKeyCode(); - KeyBinding.setKeyBindState(key, true); - KeyBinding.onTick(key); - Utils.Client.setMouseButtonState(1, true); - } -} diff --git a/src/main/java/keystrokesmod/client/module/modules/combat/BurstClicker.java b/src/main/java/keystrokesmod/client/module/modules/combat/BurstClicker.java deleted file mode 100644 index a84c6082..00000000 --- a/src/main/java/keystrokesmod/client/module/modules/combat/BurstClicker.java +++ /dev/null @@ -1,126 +0,0 @@ -package keystrokesmod.client.module.modules.combat; - -import keystrokesmod.client.main.Raven; -import keystrokesmod.client.module.Module; -import keystrokesmod.client.module.setting.impl.DescriptionSetting; -import keystrokesmod.client.module.setting.impl.SliderSetting; -import keystrokesmod.client.module.setting.impl.TickSetting; -import keystrokesmod.client.utils.Utils; -import net.minecraft.client.settings.KeyBinding; -import net.minecraft.item.ItemBlock; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.TickEvent.RenderTickEvent; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -public class BurstClicker extends Module { - public static DescriptionSetting artificialDragClicking; - public static SliderSetting clicks; - public static SliderSetting delay; - public static TickSetting delayRandomizer; - public static TickSetting placeWhenBlock; - private boolean l_c = false; - private boolean l_r = false; - private Method rightClickMouse = null; - - public BurstClicker() { - super("BurstClicker", ModuleCategory.combat); - - this.registerSetting(artificialDragClicking = new DescriptionSetting("Artificial dragclicking.")); - this.registerSetting(clicks = new SliderSetting("Clicks", 0.0D, 0.0D, 50.0D, 1.0D)); - this.registerSetting(delay = new SliderSetting("Delay (ms)", 5.0D, 1.0D, 40.0D, 1.0D)); - this.registerSetting(delayRandomizer = new TickSetting("Delay randomizer", true)); - this.registerSetting(placeWhenBlock = new TickSetting("Place when block", false)); - try { - try { - this.rightClickMouse = mc.getClass().getDeclaredMethod("func_147121_ag"); - } catch (NoSuchMethodException var4) { - try { - this.rightClickMouse = mc.getClass().getDeclaredMethod("rightClickMouse"); - } catch (NoSuchMethodException var3) { - } - } - } catch(NoClassDefFoundError varbruh){ - varbruh.printStackTrace(); - } - - if (this.rightClickMouse != null) { - this.rightClickMouse.setAccessible(true); - } - - } - - public void onEnable() { - if (clicks.getInput() != 0.0D && mc.currentScreen == null && mc.inGameHasFocus) { - Raven.getExecutor().execute(() -> { - try { - int cl = (int) clicks.getInput(); - int del = (int) delay.getInput(); - - for(int i = 0; i < cl * 2 && this.isEnabled() && Utils.Player.isPlayerInGame() && mc.currentScreen == null && mc.inGameHasFocus; ++i) { - if (i % 2 == 0) { - this.l_c = true; - if (del != 0) { - int realDel = del; - if (delayRandomizer.isToggled()) { - realDel = del + Utils.Java.rand().nextInt(25) * (Utils.Java.rand().nextBoolean() ? -1 : 1); - if (realDel <= 0) { - realDel = del / 3 - realDel; - } - } - - Thread.sleep(realDel); - } - } else { - this.l_r = true; - } - } - - this.disable(); - } catch (InterruptedException var5) { - } - - }); - } else { - this.disable(); - } - } - - public void onDisable() { - this.l_c = false; - this.l_r = false; - } - - @SubscribeEvent - public void r(RenderTickEvent ev) { - if (Utils.Player.isPlayerInGame()) { - if (this.l_c) { - this.c(true); - this.l_c = false; - } else if (this.l_r) { - this.c(false); - this.l_r = false; - } - } - - } - - private void c(boolean st) { - boolean r = placeWhenBlock.isToggled() && mc.thePlayer.getHeldItem() != null && mc.thePlayer.getHeldItem().getItem() instanceof ItemBlock; - if (r) { - try { - this.rightClickMouse.invoke(mc); - } catch (IllegalAccessException | InvocationTargetException var4) { - } - } else { - int key = mc.gameSettings.keyBindAttack.getKeyCode(); - KeyBinding.setKeyBindState(key, st); - if (st) { - KeyBinding.onTick(key); - } - } - - Utils.Client.setMouseButtonState(r ? 1 : 0, st); - } -} diff --git a/src/main/java/keystrokesmod/client/module/modules/combat/STap.java b/src/main/java/keystrokesmod/client/module/modules/combat/STap.java deleted file mode 100644 index 568a6ac4..00000000 --- a/src/main/java/keystrokesmod/client/module/modules/combat/STap.java +++ /dev/null @@ -1,157 +0,0 @@ -package keystrokesmod.client.module.modules.combat; - -import keystrokesmod.client.module.*; -import keystrokesmod.client.module.modules.world.AntiBot; -import keystrokesmod.client.module.setting.impl.DescriptionSetting; -import keystrokesmod.client.module.setting.impl.DoubleSliderSetting; -import keystrokesmod.client.module.setting.impl.SliderSetting; -import keystrokesmod.client.module.setting.impl.TickSetting; -import keystrokesmod.client.utils.CoolDown; -import keystrokesmod.client.utils.Utils; -import net.minecraft.client.settings.KeyBinding; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.TickEvent; -import org.lwjgl.input.Keyboard; -import org.lwjgl.input.Mouse; - -import java.util.concurrent.ThreadLocalRandom; - -public class STap extends Module { - public static SliderSetting range, eventType, chance; - public static DescriptionSetting eventTypeDesc; - public static TickSetting onlyPlayers; - public static DoubleSliderSetting actionTicks, onceEvery, postDelay; - public static boolean comboing, hitCoolDown, alreadyHit, waitingForPostDelay; - public static int hitTimeout, hitsWaited; - private CoolDown actionTimer = new CoolDown(0), postDelayTimer = new CoolDown(0); - - public STap(){ - super("STap", ModuleCategory.combat); - this.registerSetting(onlyPlayers = new TickSetting("Only combo players", true)); - this.registerSetting(actionTicks = new DoubleSliderSetting("Action Time (MS)", 25, 55, 1, 500, 1)); - this.registerSetting(onceEvery = new DoubleSliderSetting("Once every ... hits", 1, 1, 1, 10, 1)); - this.registerSetting(postDelay = new DoubleSliderSetting("Post Delay (MS)", 10, 40, 0, 500, 1)); - this.registerSetting(chance = new SliderSetting("Chance %", 100, 0, 100, 1)); - this.registerSetting(range = new SliderSetting("Range: ", 3, 1, 6, 0.05)); - this.registerSetting(eventType = new SliderSetting("Value: ", 2, 1, 2, 1)); - this.registerSetting(eventTypeDesc = new DescriptionSetting("Mode: POST")); - } - - public void guiUpdate(){ - eventTypeDesc.setDesc(Utils.md + Utils.Modes.SprintResetTimings.values()[(int) eventType.getInput() - 1]); - } - - - @SubscribeEvent - public void onTick(TickEvent.RenderTickEvent e) { - if(!Utils.Player.isPlayerInGame()) - return; - - if(waitingForPostDelay){ - if(postDelayTimer.hasFinished()){ - waitingForPostDelay = false; - comboing = true; - startCombo(); - actionTimer.start(); - } - return; - } - - if(comboing) { - if(actionTimer.hasFinished()){ - comboing = false; - finishCombo(); - return; - }else { - return; - } - } - - - - if (mc.objectMouseOver != null && mc.objectMouseOver.entityHit instanceof Entity && Mouse.isButtonDown(0)) { - Entity target = mc.objectMouseOver.entityHit; - if(target.isDead) { - return; - } - - if (mc.thePlayer.getDistanceToEntity(target) <= range.getInput()) { - if ((target.hurtResistantTime >= 10 && Utils.Modes.SprintResetTimings.values()[(int) eventType.getInput() - 1] == Utils.Modes.SprintResetTimings.POST) || (target.hurtResistantTime <= 10 && Utils.Modes.SprintResetTimings.values()[(int) eventType.getInput() - 1] == Utils.Modes.SprintResetTimings.PRE)) { - - if (onlyPlayers.isToggled()){ - if (!(target instanceof EntityPlayer)){ - return; - } - } - - if(AntiBot.bot(target)){ - return; - } - - - if (hitCoolDown && !alreadyHit) { - hitsWaited++; - if(hitsWaited >= hitTimeout){ - hitCoolDown = false; - hitsWaited = 0; - } else { - alreadyHit = true; - return; - } - } - - - if(!(chance.getInput() == 100 || Math.random() <= chance.getInput() / 100)) - return; - - if(!alreadyHit){ - guiUpdate(); - if(onceEvery.getInputMin() == onceEvery.getInputMax()) { - hitTimeout = (int)onceEvery.getInputMin(); - } else { - - hitTimeout = ThreadLocalRandom.current().nextInt((int)onceEvery.getInputMin(), (int)onceEvery.getInputMax()); - } - hitCoolDown = true; - hitsWaited = 0; - - actionTimer.setCooldown((long)ThreadLocalRandom.current().nextDouble(actionTicks.getInputMin(), actionTicks.getInputMax()+0.01)); - - if(postDelay.getInputMax() != 0){ - postDelayTimer.setCooldown((long)ThreadLocalRandom.current().nextDouble(postDelay.getInputMin(), postDelay.getInputMax()+0.01)); - postDelayTimer.start(); - waitingForPostDelay = true; - } else { - comboing = true; - startCombo(); - actionTimer.start(); - alreadyHit = true; - } - - alreadyHit = true; - } - } else { - if(alreadyHit){ - alreadyHit = false; - } - - } - } - } - } - - private static void finishCombo() { - if(!Keyboard.isKeyDown(mc.gameSettings.keyBindBack.getKeyCode())){ - KeyBinding.setKeyBindState(mc.gameSettings.keyBindBack.getKeyCode(), false); - } - } - - private static void startCombo() { - if(Keyboard.isKeyDown(mc.gameSettings.keyBindForward.getKeyCode())) { - KeyBinding.setKeyBindState(mc.gameSettings.keyBindBack.getKeyCode(), true); - KeyBinding.onTick(mc.gameSettings.keyBindBack.getKeyCode()); - } - } -} diff --git a/src/main/java/keystrokesmod/client/module/modules/combat/WTap.java b/src/main/java/keystrokesmod/client/module/modules/combat/WTap.java deleted file mode 100644 index 93ac7eeb..00000000 --- a/src/main/java/keystrokesmod/client/module/modules/combat/WTap.java +++ /dev/null @@ -1,156 +0,0 @@ -package keystrokesmod.client.module.modules.combat; - -import keystrokesmod.client.module.*; -import keystrokesmod.client.module.modules.world.AntiBot; -import keystrokesmod.client.module.setting.impl.DescriptionSetting; -import keystrokesmod.client.module.setting.impl.DoubleSliderSetting; -import keystrokesmod.client.module.setting.impl.SliderSetting; -import keystrokesmod.client.module.setting.impl.TickSetting; -import keystrokesmod.client.utils.CoolDown; -import keystrokesmod.client.utils.Utils; -import net.minecraft.client.settings.KeyBinding; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.TickEvent; -import org.lwjgl.input.Keyboard; -import org.lwjgl.input.Mouse; - -import java.util.concurrent.ThreadLocalRandom; - -public class WTap extends Module { - public static SliderSetting range, eventType, chance; - public static DescriptionSetting eventTypeDesc; - public static TickSetting onlyPlayers; - public static DoubleSliderSetting actionTicks, onceEvery, postDelay; - public static boolean comboing, hitCoolDown, alreadyHit, waitingForPostDelay; - public static int hitTimeout, hitsWaited; - public static CoolDown actionTimer = new CoolDown(0), postDelayTimer = new CoolDown(0); - - public WTap(){ - super("WTap", ModuleCategory.combat); - this.registerSetting(onlyPlayers = new TickSetting("Only combo players", true)); - this.registerSetting(actionTicks = new DoubleSliderSetting("Action Time (MS)", 25, 55, 1, 500, 1)); - this.registerSetting(onceEvery = new DoubleSliderSetting("Once every ... hits", 1, 1, 1, 10, 1)); - this.registerSetting(postDelay = new DoubleSliderSetting("Post delay (MS)", 25, 55, 1, 500, 1)); - this.registerSetting(chance = new SliderSetting("Chance %", 100, 0, 100, 1)); - this.registerSetting(range = new SliderSetting("Range: ", 3, 1, 6, 0.05)); - this.registerSetting(eventType = new SliderSetting("Value: ", 2, 1, 2, 1)); - this.registerSetting(eventTypeDesc = new DescriptionSetting("Mode: POST")); - } - - - public void guiUpdate() { - eventTypeDesc.setDesc(Utils.md + Utils.Modes.SprintResetTimings.values()[(int) eventType.getInput() - 1]); - } - - - @SubscribeEvent - public void onTick(TickEvent.RenderTickEvent e) { - if(!Utils.Player.isPlayerInGame()) - return; - - if(waitingForPostDelay){ - if(postDelayTimer.hasFinished()){ - waitingForPostDelay = false; - comboing = true; - startCombo(); - actionTimer.start(); - } - return; - } - - if(comboing) { - if(actionTimer.hasFinished()){ - comboing = false; - finishCombo(); - return; - }else { - return; - } - } - - - - if (mc.objectMouseOver != null && mc.objectMouseOver.entityHit instanceof Entity && Mouse.isButtonDown(0)) { - Entity target = mc.objectMouseOver.entityHit; - if(target.isDead) { - return; - } - - if (mc.thePlayer.getDistanceToEntity(target) <= range.getInput()) { - if ((target.hurtResistantTime >= 10 && Utils.Modes.SprintResetTimings.values()[(int) eventType.getInput() - 1] == Utils.Modes.SprintResetTimings.POST) || (target.hurtResistantTime <= 10 && Utils.Modes.SprintResetTimings.values()[(int) eventType.getInput() - 1] == Utils.Modes.SprintResetTimings.PRE)) { - - if (onlyPlayers.isToggled()){ - if (!(target instanceof EntityPlayer)){ - return; - } - } - - if(AntiBot.bot(target)){ - return; - } - - - if (hitCoolDown && !alreadyHit) { - hitsWaited++; - if(hitsWaited >= hitTimeout){ - hitCoolDown = false; - hitsWaited = 0; - } else { - alreadyHit = true; - return; - } - } - - if(!(chance.getInput() == 100 || Math.random() <= chance.getInput() / 100)) - return; - - if(!alreadyHit){ - guiUpdate(); - if(onceEvery.getInputMin() == onceEvery.getInputMax()) { - hitTimeout = (int)onceEvery.getInputMin(); - } else { - - hitTimeout = ThreadLocalRandom.current().nextInt((int)onceEvery.getInputMin(), (int)onceEvery.getInputMax()); - } - hitCoolDown = true; - hitsWaited = 0; - - actionTimer.setCooldown((long)ThreadLocalRandom.current().nextDouble(actionTicks.getInputMin(), actionTicks.getInputMax()+0.01)); - - if(postDelay.getInputMax() != 0){ - postDelayTimer.setCooldown((long)ThreadLocalRandom.current().nextDouble(postDelay.getInputMin(), postDelay.getInputMax()+0.01)); - postDelayTimer.start(); - waitingForPostDelay = true; - } else { - comboing = true; - startCombo(); - actionTimer.start(); - alreadyHit = true; - } - - alreadyHit = true; - } - } else { - if(alreadyHit){ - } - alreadyHit = false; - } - } - } - } - - private static void finishCombo() { - if(Keyboard.isKeyDown(mc.gameSettings.keyBindForward.getKeyCode())){ - KeyBinding.setKeyBindState(mc.gameSettings.keyBindForward.getKeyCode(), true); - } - } - - private static void startCombo() { - if(Keyboard.isKeyDown(mc.gameSettings.keyBindForward.getKeyCode())) { - KeyBinding.setKeyBindState(mc.gameSettings.keyBindForward.getKeyCode(), false); - KeyBinding.onTick(mc.gameSettings.keyBindForward.getKeyCode()); - } - } -} diff --git a/src/main/java/keystrokesmod/client/module/modules/movement/SlyPort.java b/src/main/java/keystrokesmod/client/module/modules/movement/SlyPort.java deleted file mode 100644 index 8a76e49a..00000000 --- a/src/main/java/keystrokesmod/client/module/modules/movement/SlyPort.java +++ /dev/null @@ -1,88 +0,0 @@ -package keystrokesmod.client.module.modules.movement; - -import keystrokesmod.client.module.Module; -import keystrokesmod.client.module.setting.impl.DescriptionSetting; -import keystrokesmod.client.module.setting.impl.SliderSetting; -import keystrokesmod.client.module.setting.impl.TickSetting; -import keystrokesmod.client.module.modules.world.AntiBot; -import keystrokesmod.client.utils.Utils; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.Vec3; - -import java.util.Iterator; - -public class SlyPort extends Module { - public static DescriptionSetting f; - public static SliderSetting r; - public static TickSetting b; - public static TickSetting d; - public static TickSetting e; - private final boolean s = false; - - public SlyPort() { - super("SlyPort", ModuleCategory.movement); - this.registerSetting(f = new DescriptionSetting("Teleport behind enemies.")); - this.registerSetting(r = new SliderSetting("Range", 6.0D, 2.0D, 15.0D, 1.0D)); - this.registerSetting(e = new TickSetting("Aim", true)); - this.registerSetting(b = new TickSetting("Play sound", true)); - this.registerSetting(d = new TickSetting("Players only", true)); - } - - public void onEnable() { - Entity en = this.ge(); - if (en != null) { - this.tp(en); - } - - this.disable(); - } - - private void tp(Entity en) { - if (b.isToggled()) { - mc.thePlayer.playSound("mob.endermen.portal", 1.0F, 1.0F); - } - - Vec3 vec = en.getLookVec(); - double x = en.posX - vec.xCoord * 2.5D; - double z = en.posZ - vec.zCoord * 2.5D; - mc.thePlayer.setPosition(x, mc.thePlayer.posY, z); - if (e.isToggled()) { - Utils.Player.aim(en, 0.0F, false); - } - - } - - private Entity ge() { - Entity en = null; - double r = Math.pow(SlyPort.r.getInput(), 2.0D); - double dist = r + 1.0D; - Iterator var6 = mc.theWorld.loadedEntityList.iterator(); - - while(true) { - Entity ent; - do { - do { - do { - do { - if (!var6.hasNext()) { - return en; - } - - ent = (Entity)var6.next(); - } while(ent == mc.thePlayer); - } while(!(ent instanceof EntityLivingBase)); - } while(((EntityLivingBase)ent).deathTime != 0); - } while(SlyPort.d.isToggled() && !(ent instanceof EntityPlayer)); - - if (!AntiBot.bot(ent)) { - double d = mc.thePlayer.getDistanceSqToEntity(ent); - if (!(d > r) && !(dist < d)) { - dist = d; - en = ent; - } - } - } - } -} diff --git a/src/main/java/keystrokesmod/client/module/modules/player/BedAura.java b/src/main/java/keystrokesmod/client/module/modules/player/BedAura.java deleted file mode 100644 index a88c0d8b..00000000 --- a/src/main/java/keystrokesmod/client/module/modules/player/BedAura.java +++ /dev/null @@ -1,72 +0,0 @@ -package keystrokesmod.client.module.modules.player; - -import keystrokesmod.client.module.Module; -import keystrokesmod.client.module.setting.impl.SliderSetting; -import keystrokesmod.client.utils.Utils; -import net.minecraft.init.Blocks; -import net.minecraft.network.play.client.C07PacketPlayerDigging; -import net.minecraft.network.play.client.C07PacketPlayerDigging.Action; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; - -import java.util.TimerTask; - -public class BedAura extends Module { - public static SliderSetting r; - private java.util.Timer t; - private BlockPos m = null; - private final long per = 600L; - - public BedAura() { - super("BedAura", ModuleCategory.player); - this.registerSetting(r = new SliderSetting("Range", 5.0D, 2.0D, 10.0D, 1.0D)); - } - - public void onEnable() { - (this.t = new java.util.Timer()).scheduleAtFixedRate(this.t(), 0L, 600L); - } - - public void onDisable() { - if (this.t != null) { - this.t.cancel(); - this.t.purge(); - this.t = null; - } - - this.m = null; - } - - public TimerTask t() { - return new TimerTask() { - public void run() { - int ra = (int)BedAura.r.getInput(); - - for(int y = ra; y >= -ra; --y) { - for(int x = -ra; x <= ra; ++x) { - for(int z = -ra; z <= ra; ++z) { - if (Utils.Player.isPlayerInGame()) { - BlockPos p = new BlockPos(Module.mc.thePlayer.posX + (double) x, Module.mc.thePlayer.posY + (double) y, Module.mc.thePlayer.posZ + (double) z); - boolean bed = Module.mc.theWorld.getBlockState(p).getBlock() == Blocks.bed; - if (BedAura.this.m == p) { - if (!bed) { - BedAura.this.m = null; - } - } else if (bed) { - BedAura.this.mi(p); - BedAura.this.m = p; - break; - } - } - } - } - } - - } - }; - } - - private void mi(BlockPos p) { - mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(Action.START_DESTROY_BLOCK, p, EnumFacing.NORTH)); - mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(Action.STOP_DESTROY_BLOCK, p, EnumFacing.NORTH)); - } -} diff --git a/src/main/java/keystrokesmod/client/module/modules/player/Freecam.java b/src/main/java/keystrokesmod/client/module/modules/player/Freecam.java deleted file mode 100644 index a3744cdd..00000000 --- a/src/main/java/keystrokesmod/client/module/modules/player/Freecam.java +++ /dev/null @@ -1,167 +0,0 @@ -package keystrokesmod.client.module.modules.player; - -import keystrokesmod.client.module.Module; -import keystrokesmod.client.module.setting.impl.SliderSetting; -import keystrokesmod.client.module.setting.impl.TickSetting; -import keystrokesmod.client.utils.Utils; -import net.minecraft.client.entity.EntityOtherPlayerMP; -import net.minecraftforge.client.event.MouseEvent; -import net.minecraftforge.client.event.RenderWorldLastEvent; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import org.lwjgl.input.Keyboard; - -import java.awt.*; - -public class Freecam extends Module { - public static SliderSetting a; - public static TickSetting b; - private final double toRad = 0.017453292519943295D; - public static EntityOtherPlayerMP en = null; - private int[] lcc = new int[]{Integer.MAX_VALUE, 0}; - private final float[] sAng = new float[]{0.0F, 0.0F}; - - public Freecam() { - super("Freecam", ModuleCategory.player); - this.registerSetting(a = new SliderSetting("Speed", 2.5D, 0.5D, 10.0D, 0.5D)); - this.registerSetting(b = new TickSetting("Disable on damage", true)); - } - - @Override - public void onEnable() { - if(!Utils.Player.isPlayerInGame()) { - return; - } - if (!mc.thePlayer.onGround) { - this.disable(); - } else { - en = new EntityOtherPlayerMP(mc.theWorld, mc.thePlayer.getGameProfile()); - en.copyLocationAndAnglesFrom(mc.thePlayer); - this.sAng[0] = en.rotationYawHead = mc.thePlayer.rotationYawHead; - this.sAng[1] = mc.thePlayer.rotationPitch; - en.setVelocity(0.0D, 0.0D, 0.0D); - en.setInvisible(true); - mc.theWorld.addEntityToWorld(-8008, en); - mc.setRenderViewEntity(en); - } - } - - public void onDisable() { - if (en != null) { - mc.setRenderViewEntity(mc.thePlayer); - mc.thePlayer.rotationYaw = mc.thePlayer.rotationYawHead = this.sAng[0]; - mc.thePlayer.rotationPitch = this.sAng[1]; - mc.theWorld.removeEntity(en); - en = null; - } - - this.lcc = new int[]{Integer.MAX_VALUE, 0}; - int rg = 1; - int x = mc.thePlayer.chunkCoordX; - int z = mc.thePlayer.chunkCoordZ; - - for(int x2 = -1; x2 <= 1; ++x2) { - for(int z2 = -1; z2 <= 1; ++z2) { - int a = x + x2; - int b = z + z2; - mc.theWorld.markBlockRangeForRenderUpdate(a * 16, 0, b * 16, a * 16 + 15, 256, b * 16 + 15); - } - } - - } - - public void update() { - if(!Utils.Player.isPlayerInGame() || en == null) - return; - if (b.isToggled() && mc.thePlayer.hurtTime != 0) { - this.disable(); - } else { - mc.thePlayer.setSprinting(false); - mc.thePlayer.moveForward = 0.0F; - mc.thePlayer.moveStrafing = 0.0F; - en.rotationYaw = en.rotationYawHead = mc.thePlayer.rotationYaw; - en.rotationPitch = mc.thePlayer.rotationPitch; - double s = 0.215D * a.getInput(); - EntityOtherPlayerMP var10000; - double rad; - double dx; - double dz; - if (Keyboard.isKeyDown(mc.gameSettings.keyBindForward.getKeyCode())) { - rad = (double)en.rotationYawHead * 0.017453292519943295D; - dx = -1.0D * Math.sin(rad) * s; - dz = Math.cos(rad) * s; - var10000 = en; - var10000.posX += dx; - var10000 = en; - var10000.posZ += dz; - } - - if (Keyboard.isKeyDown(mc.gameSettings.keyBindBack.getKeyCode())) { - rad = (double)en.rotationYawHead * 0.017453292519943295D; - dx = -1.0D * Math.sin(rad) * s; - dz = Math.cos(rad) * s; - var10000 = en; - var10000.posX -= dx; - var10000 = en; - var10000.posZ -= dz; - } - - if (Keyboard.isKeyDown(mc.gameSettings.keyBindLeft.getKeyCode())) { - rad = (double)(en.rotationYawHead - 90.0F) * 0.017453292519943295D; - dx = -1.0D * Math.sin(rad) * s; - dz = Math.cos(rad) * s; - var10000 = en; - var10000.posX += dx; - var10000 = en; - var10000.posZ += dz; - } - - if (Keyboard.isKeyDown(mc.gameSettings.keyBindRight.getKeyCode())) { - rad = (double)(en.rotationYawHead + 90.0F) * 0.017453292519943295D; - dx = -1.0D * Math.sin(rad) * s; - dz = Math.cos(rad) * s; - var10000 = en; - var10000.posX += dx; - var10000 = en; - var10000.posZ += dz; - } - - if (Keyboard.isKeyDown(mc.gameSettings.keyBindJump.getKeyCode())) { - var10000 = en; - var10000.posY += 0.93D * s; - } - - if (Keyboard.isKeyDown(mc.gameSettings.keyBindSneak.getKeyCode())) { - var10000 = en; - var10000.posY -= 0.93D * s; - } - - mc.thePlayer.setSneaking(false); - if (this.lcc[0] != Integer.MAX_VALUE && (this.lcc[0] != en.chunkCoordX || this.lcc[1] != en.chunkCoordZ)) { - int x = en.chunkCoordX; - int z = en.chunkCoordZ; - mc.theWorld.markBlockRangeForRenderUpdate(x * 16, 0, z * 16, x * 16 + 15, 256, z * 16 + 15); - } - - this.lcc[0] = en.chunkCoordX; - this.lcc[1] = en.chunkCoordZ; - } - } - - @SubscribeEvent - public void re(RenderWorldLastEvent e) { - if (Utils.Player.isPlayerInGame()) { - mc.thePlayer.renderArmPitch = mc.thePlayer.prevRenderArmPitch = 700.0F; - Utils.HUD.drawBoxAroundEntity(mc.thePlayer, 1, 0.0D, 0.0D, Color.green.getRGB(), false); - Utils.HUD.drawBoxAroundEntity(mc.thePlayer, 2, 0.0D, 0.0D, Color.green.getRGB(), false); - } - - } - - @SubscribeEvent - public void m(MouseEvent e) { - if (Utils.Player.isPlayerInGame() && e.button != -1) { - e.setCanceled(true); - } - - } -} diff --git a/src/main/java/keystrokesmod/client/module/modules/world/AntiBot.java b/src/main/java/keystrokesmod/client/module/modules/world/AntiBot.java index a956d308..23896dbe 100644 --- a/src/main/java/keystrokesmod/client/module/modules/world/AntiBot.java +++ b/src/main/java/keystrokesmod/client/module/modules/world/AntiBot.java @@ -4,7 +4,6 @@ import keystrokesmod.client.module.Module; import keystrokesmod.client.module.ModuleManager; import keystrokesmod.client.module.setting.impl.TickSetting; -import keystrokesmod.client.module.modules.player.Freecam; import keystrokesmod.client.utils.Utils; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -47,55 +46,52 @@ public void update() { } public static boolean bot(Entity en) { - if(!Utils.Player.isPlayerInGame() || mc.currentScreen != null) return false; - if (Freecam.en != null && Freecam.en == en) { - return true; - } else { - Module antiBot = Raven.moduleManager.getModuleByClazz(AntiBot.class); - if (antiBot != null && !antiBot.isEnabled()) { + if (!Utils.Player.isPlayerInGame() || mc.currentScreen != null) return false; + + Module antiBot = Raven.moduleManager.getModuleByClazz(AntiBot.class); + if (antiBot != null && !antiBot.isEnabled()) { return false; - } else if (!Utils.Client.isHyp()) { + } else if (!Utils.Client.isHyp()) { return false; - } else if (a.isToggled() && !newEnt.isEmpty() && newEnt.containsKey(en)) { + } else if (a.isToggled() && !newEnt.isEmpty() && newEnt.containsKey(en)) { return true; - } else if (en.getName().startsWith("§c")) { + } else if (en.getName().startsWith("§c")) { return true; + } else { + String n = en.getDisplayName().getUnformattedText(); + if (n.contains("§")) { + return n.contains("[NPC] "); } else { - String n = en.getDisplayName().getUnformattedText(); - if (n.contains("§")) { - return n.contains("[NPC] "); - } else { - if (n.isEmpty() && en.getName().isEmpty()) { + if (n.isEmpty() && en.getName().isEmpty()) { return true; - } - - if (n.length() == 10) { - int num = 0; - int let = 0; - char[] var4 = n.toCharArray(); + } - for (char c : var4) { - if (Character.isLetter(c)) { - if (Character.isUpperCase(c)) { - return false; - } + if (n.length() == 10) { + int num = 0; + int let = 0; + char[] var4 = n.toCharArray(); - ++let; - } else { - if (!Character.isDigit(c)) { - return false; - } + for (char c : var4) { + if (Character.isLetter(c)) { + if (Character.isUpperCase(c)) { + return false; + } - ++num; + ++let; + } else { + if (!Character.isDigit(c)) { + return false; } - } - return num >= 2 && let >= 2; + ++num; + } } - } - return false; + return num >= 2 && let >= 2; + } } + + return false; } } } diff --git a/src/main/java/keystrokesmod/client/utils/DebugInfoRenderer.java b/src/main/java/keystrokesmod/client/utils/DebugInfoRenderer.java deleted file mode 100644 index 32249281..00000000 --- a/src/main/java/keystrokesmod/client/utils/DebugInfoRenderer.java +++ /dev/null @@ -1,43 +0,0 @@ - -package keystrokesmod.client.utils; - -import keystrokesmod.client.main.Raven; -import keystrokesmod.client.module.modules.player.Freecam; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.ScaledResolution; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.TickEvent.Phase; -import net.minecraftforge.fml.common.gameevent.TickEvent.RenderTickEvent; - -import java.awt.*; - -public class DebugInfoRenderer extends net.minecraft.client.gui.Gui { - private static final Minecraft mc = Minecraft.getMinecraft(); - - @SubscribeEvent - public void onRenderTick(RenderTickEvent ev) { - if (Raven.debugger && ev.phase == Phase.END && Utils.Player.isPlayerInGame()) { - if (mc.currentScreen == null) { - ScaledResolution res = new ScaledResolution(mc); - double bps = Utils.Player.getPlayerBPS(Freecam.en == null ? mc.thePlayer : Freecam.en, 2); - int rgb; - if (bps < 10.0D) { - rgb = Color.green.getRGB(); - } else if (bps < 30.0D) { - rgb = Color.yellow.getRGB(); - } else if (bps < 60.0D) { - rgb = Color.orange.getRGB(); - } else if (bps < 160.0D) { - rgb = Color.red.getRGB(); - } else { - rgb = Color.black.getRGB(); - } - - String t = bps + "bps"; - int x = res.getScaledWidth() / 2 - mc.fontRendererObj.getStringWidth(t) / 2; - int y = res.getScaledHeight() / 2 + 15; - mc.fontRendererObj.drawString(t, (float)x, (float)y, rgb, false); - } - } - } -}