From 73c810e2656ac587e980424c403be0ed701395fa Mon Sep 17 00:00:00 2001 From: xia__mc <108219418+xia-mc@users.noreply.github.com> Date: Fri, 2 Aug 2024 20:39:31 +0800 Subject: [PATCH] Release 1.21.0 (#690) Co-authored-by: Dylan <33008329+dylan0356@users.noreply.github.com> --- build.gradle | 2 +- gradlew | 0 .../components/impl/DescriptionComponent.java | 10 +- .../impl/entity/MixinEntityPlayerSP.java | 7 +- .../keystrokesmod/module/ModuleManager.java | 10 +- .../module/impl/client/Notifications.java | 5 + .../module/impl/combat/ArmedAura.java | 235 ++++++++++++ .../combat/autoclicker/NormalAutoClicker.java | 4 +- .../module/impl/fun/AntiAim.java | 51 +++ .../keystrokesmod/module/impl/fun/HitLog.java | 89 +++++ .../module/impl/fun/antiaim/Backward.java | 35 ++ .../module/impl/fun/{ => antiaim}/Spin.java | 140 ++++---- .../module/impl/movement/InvMove.java | 5 + .../module/impl/movement/NoSlow.java | 251 ++----------- .../module/impl/movement/Speed.java | 333 +----------------- .../module/impl/movement/fly/VulcanFly.java | 5 + .../impl/movement/noslow/CustomNoSlow.java | 156 ++++++++ .../impl/movement/noslow/HypixelNoSlow.java | 77 ++++ .../module/impl/movement/noslow/INoSlow.java | 17 + .../impl/movement/noslow/IntaveNoSlow.java | 58 +++ .../impl/movement/noslow/NCPNoSlow.java | 30 ++ .../impl/movement/noslow/OldGrimNoSlow.java | 28 ++ .../impl/movement/noslow/OldIntaveNoSlow.java | 28 ++ .../impl/movement/noslow/VanillaNoSlow.java | 15 + .../customnoslow/SimpleCustomNoSlow.java | 159 +++++++++ .../movement/phase/WatchdogAutoPhase.java | 8 +- .../impl/movement/speed/BlocksMCSpeed.java | 79 +++++ .../impl/movement/speed/GrimACSpeed.java | 51 +++ .../impl/movement/speed/HypixelASpeed.java | 73 ++++ ...{HypixelDSpeed.java => HypixelBSpeed.java} | 4 +- .../impl/movement/speed/LegitSpeed.java | 44 +++ .../impl/movement/speed/VanillaSpeed.java | 54 +++ .../impl/movement/speed/VulcanSpeed.java | 58 +++ .../module/impl/other/RotationHandler.java | 2 +- .../impl/{movement => player}/Timer.java | 4 +- .../module/impl/render/Watermark.java | 2 +- .../module/impl/world/Scaffold.java | 69 +++- .../module/impl/world/WaterBucket.java | 50 ++- .../module/setting/impl/ModeValue.java | 8 +- .../java/keystrokesmod/utility/MoveUtil.java | 9 + .../keystrokesmod/utility/RotationUtils.java | 11 +- .../stafflists/BlocksMCDefault.txt | 171 +++++++++ 42 files changed, 1772 insertions(+), 675 deletions(-) mode change 100644 => 100755 gradlew create mode 100644 src/main/java/keystrokesmod/module/impl/combat/ArmedAura.java create mode 100644 src/main/java/keystrokesmod/module/impl/fun/AntiAim.java create mode 100644 src/main/java/keystrokesmod/module/impl/fun/HitLog.java create mode 100644 src/main/java/keystrokesmod/module/impl/fun/antiaim/Backward.java rename src/main/java/keystrokesmod/module/impl/fun/{ => antiaim}/Spin.java (70%) create mode 100644 src/main/java/keystrokesmod/module/impl/movement/noslow/CustomNoSlow.java create mode 100644 src/main/java/keystrokesmod/module/impl/movement/noslow/HypixelNoSlow.java create mode 100644 src/main/java/keystrokesmod/module/impl/movement/noslow/INoSlow.java create mode 100644 src/main/java/keystrokesmod/module/impl/movement/noslow/IntaveNoSlow.java create mode 100644 src/main/java/keystrokesmod/module/impl/movement/noslow/NCPNoSlow.java create mode 100644 src/main/java/keystrokesmod/module/impl/movement/noslow/OldGrimNoSlow.java create mode 100644 src/main/java/keystrokesmod/module/impl/movement/noslow/OldIntaveNoSlow.java create mode 100644 src/main/java/keystrokesmod/module/impl/movement/noslow/VanillaNoSlow.java create mode 100644 src/main/java/keystrokesmod/module/impl/movement/noslow/customnoslow/SimpleCustomNoSlow.java create mode 100644 src/main/java/keystrokesmod/module/impl/movement/speed/BlocksMCSpeed.java create mode 100644 src/main/java/keystrokesmod/module/impl/movement/speed/GrimACSpeed.java create mode 100644 src/main/java/keystrokesmod/module/impl/movement/speed/HypixelASpeed.java rename src/main/java/keystrokesmod/module/impl/movement/speed/{HypixelDSpeed.java => HypixelBSpeed.java} (98%) create mode 100644 src/main/java/keystrokesmod/module/impl/movement/speed/LegitSpeed.java create mode 100644 src/main/java/keystrokesmod/module/impl/movement/speed/VanillaSpeed.java create mode 100644 src/main/java/keystrokesmod/module/impl/movement/speed/VulcanSpeed.java rename src/main/java/keystrokesmod/module/impl/{movement => player}/Timer.java (98%) diff --git a/build.gradle b/build.gradle index 8f0695f3..1750a352 100644 --- a/build.gradle +++ b/build.gradle @@ -24,7 +24,7 @@ apply plugin: 'java' group = "keystrokesmod" archivesBaseName = "raven-XD" -//version = "1.20-dev" +//version = "1.21-dev" compileJava { sourceCompatibility = '1.8' diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 diff --git a/src/main/java/keystrokesmod/clickgui/components/impl/DescriptionComponent.java b/src/main/java/keystrokesmod/clickgui/components/impl/DescriptionComponent.java index 4116ffd7..08a3b845 100644 --- a/src/main/java/keystrokesmod/clickgui/components/impl/DescriptionComponent.java +++ b/src/main/java/keystrokesmod/clickgui/components/impl/DescriptionComponent.java @@ -1,16 +1,22 @@ package keystrokesmod.clickgui.components.impl; import keystrokesmod.clickgui.components.Component; +import keystrokesmod.module.setting.Setting; import keystrokesmod.module.setting.impl.DescriptionSetting; import keystrokesmod.utility.Theme; import net.minecraft.client.Minecraft; +import org.jetbrains.annotations.Nullable; import org.lwjgl.opengl.GL11; -import java.awt.*; - public class DescriptionComponent extends Component { private final DescriptionSetting desc; + @Nullable + @Override + public Setting getSetting() { + return desc; + } + public DescriptionComponent(DescriptionSetting desc, ModuleComponent b, int o) { super(b); this.desc = desc; diff --git a/src/main/java/keystrokesmod/mixins/impl/entity/MixinEntityPlayerSP.java b/src/main/java/keystrokesmod/mixins/impl/entity/MixinEntityPlayerSP.java index 6f775b39..f81c7af2 100644 --- a/src/main/java/keystrokesmod/mixins/impl/entity/MixinEntityPlayerSP.java +++ b/src/main/java/keystrokesmod/mixins/impl/entity/MixinEntityPlayerSP.java @@ -283,13 +283,12 @@ public void onLivingUpdate() { boolean flag2 = this.movementInput.moveForward >= f; this.movementInput.updatePlayerMoveState(); boolean usingItemModified = this.isUsingItem() || (ModuleManager.killAura != null && ModuleManager.killAura.isEnabled() && ModuleManager.killAura.block.get() && ((Object) this) == Minecraft.getMinecraft().thePlayer && ModuleManager.killAura.rmbDown && ModuleManager.killAura.manualBlock.isToggled()); - boolean stopSprint = this.isUsingItem() && ModuleManager.noSlow != null && ModuleManager.noSlow.isEnabled() && NoSlow.slowed.getInput() == 80; + boolean stopSprint = this.isUsingItem() && ModuleManager.noSlow != null && ModuleManager.noSlow.isEnabled() && NoSlow.getForwardSlowed() == 0.8; if (usingItemModified && !this.isRiding()) { MovementInput var10000 = this.movementInput; - float slowed = NoSlow.getSlowed(); - var10000.moveStrafe *= slowed; + var10000.moveStrafe *= NoSlow.getStrafeSlowed(); var10000 = this.movementInput; - var10000.moveForward *= slowed; + var10000.moveForward *= NoSlow.getForwardSlowed(); if (stopSprint) { this.sprintToggleTimer = 0; } diff --git a/src/main/java/keystrokesmod/module/ModuleManager.java b/src/main/java/keystrokesmod/module/ModuleManager.java index c2bbf199..8ad9035c 100644 --- a/src/main/java/keystrokesmod/module/ModuleManager.java +++ b/src/main/java/keystrokesmod/module/ModuleManager.java @@ -31,7 +31,7 @@ public class ModuleManager { public static Module antiShuffle; public static Module commandLine; public static Module antiBot; - public static Module noSlow; + public static NoSlow noSlow; public static KillAura killAura; public static AutoClicker autoClicker; public static HitBox hitBox; @@ -102,6 +102,9 @@ public class ModuleManager { public static ExploitFixer exploitFixer; public static AutoRegister autoRegister; public static NoteBot noteBot; + public static ViewPackets viewPackets; + public static ArmedAura armedAura; + public static HitLog hitLog; public void register() { @@ -129,6 +132,7 @@ public void register() { this.addModule(new JumpReset()); this.addModule(killAura = new KillAura()); this.addModule(killAuraV2 = new KillAuraV2()); + this.addModule(armedAura = new ArmedAura()); this.addModule(moreKB = new MoreKB()); this.addModule(reach = new Reach()); this.addModule(new RodAimbot()); @@ -139,7 +143,8 @@ public void register() { this.addModule(new ExtraBobbing()); this.addModule(new FlameTrail()); this.addModule(new SlyPort()); - this.addModule(new Spin()); + this.addModule(new AntiAim()); + this.addModule(hitLog = new HitLog()); this.addModule(noteBot = new NoteBot()); // minigames @@ -183,6 +188,7 @@ public void register() { this.addModule(staffDetector = new StaffDetector()); this.addModule(new BedProximityAlert()); this.addModule(autoRegister = new AutoRegister()); + this.addModule(viewPackets = new ViewPackets()); // player this.addModule(new AntiAFK()); diff --git a/src/main/java/keystrokesmod/module/impl/client/Notifications.java b/src/main/java/keystrokesmod/module/impl/client/Notifications.java index 5b5d5902..99f539c5 100644 --- a/src/main/java/keystrokesmod/module/impl/client/Notifications.java +++ b/src/main/java/keystrokesmod/module/impl/client/Notifications.java @@ -28,6 +28,11 @@ public Notifications() { this.registerSetting(moduleToggled = new ButtonSetting("Module toggled", true)); } + @Override + public void onEnable() { + notifs.clear(); + } + public static void sendNotification(NotificationTypes notificationType, String message) { sendNotification(notificationType, message, 3000); } diff --git a/src/main/java/keystrokesmod/module/impl/combat/ArmedAura.java b/src/main/java/keystrokesmod/module/impl/combat/ArmedAura.java new file mode 100644 index 00000000..fa412d74 --- /dev/null +++ b/src/main/java/keystrokesmod/module/impl/combat/ArmedAura.java @@ -0,0 +1,235 @@ +package keystrokesmod.module.impl.combat; + +import akka.japi.Pair; +import keystrokesmod.event.PreUpdateEvent; +import keystrokesmod.event.RotationEvent; +import keystrokesmod.module.impl.client.Notifications; +import keystrokesmod.module.impl.combat.autoclicker.DragClickAutoClicker; +import keystrokesmod.module.impl.combat.autoclicker.IAutoClicker; +import keystrokesmod.module.impl.combat.autoclicker.NormalAutoClicker; +import keystrokesmod.module.impl.combat.autoclicker.RecordAutoClicker; +import keystrokesmod.module.impl.fun.HitLog; +import keystrokesmod.module.impl.other.RotationHandler; +import keystrokesmod.module.impl.other.SlotHandler; +import keystrokesmod.module.impl.other.anticheats.utils.world.PlayerRotation; +import keystrokesmod.module.impl.player.Blink; +import keystrokesmod.module.impl.world.AntiBot; +import keystrokesmod.module.setting.impl.ButtonSetting; +import keystrokesmod.module.setting.impl.ModeSetting; +import keystrokesmod.module.setting.impl.ModeValue; +import keystrokesmod.module.setting.impl.SliderSetting; +import keystrokesmod.script.classes.Vec3; +import keystrokesmod.utility.MoveUtil; +import keystrokesmod.utility.RotationUtils; +import keystrokesmod.utility.Utils; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemHoe; +import net.minecraft.item.ItemStack; +import net.minecraftforge.client.event.RenderWorldLastEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.apache.commons.lang3.tuple.Triple; +import org.jetbrains.annotations.NotNull; + +import java.util.Comparator; +import java.util.HashSet; +import java.util.Optional; +import java.util.Set; + +public class ArmedAura extends IAutoClicker { + private final ModeValue clickMode; + private final SliderSetting range; + private final ButtonSetting perfect; + private final ModeSetting moveFix; + private final ButtonSetting prediction; + private final ButtonSetting smart; + private final SliderSetting predictionTicks; + private final ButtonSetting drawPos; + private final ButtonSetting autoSwitch; + private final ButtonSetting fastFire; + private final SliderSetting fastFireAmount; + private final ButtonSetting targetInvisible; + private final ButtonSetting ignoreTeammates; + + private boolean targeted = false; + private Pair, Triple> target = null; + private boolean click = false; + private int predTicks = 0; + private net.minecraft.util.Vec3 pos = null; + private final Set fired = new HashSet<>(); + + public ArmedAura() { + super("ArmedAura", category.combat); + this.registerSetting(clickMode = new ModeValue("Click mode", this) + .add(new NormalAutoClicker("Normal", this, false, true)) + .add(new DragClickAutoClicker("Drag Click", this, false, true)) + .add(new RecordAutoClicker("Record", this, false, true)) + .setDefaultValue("Normal") + ); + this.registerSetting(range = new SliderSetting("Range", 50, 0, 100, 5)); + this.registerSetting(moveFix = new ModeSetting("Move fix", RotationHandler.MoveFix.MODES, 0)); + this.registerSetting(perfect = new ButtonSetting("Perfect", false)); + this.registerSetting(prediction = new ButtonSetting("Prediction", false)); + this.registerSetting(smart = new ButtonSetting("Smart", true, prediction::isToggled)); + this.registerSetting(predictionTicks = new SliderSetting("Prediction ticks", 2, 0, 10, 1, "ticks", () -> prediction.isToggled() && !smart.isToggled())); + this.registerSetting(drawPos = new ButtonSetting("Draw pos", false, prediction::isToggled)); + this.registerSetting(autoSwitch = new ButtonSetting("Auto switch", true)); + this.registerSetting(fastFire = new ButtonSetting("Fast fire", false, autoSwitch::isToggled)); + this.registerSetting(fastFireAmount = new SliderSetting("Fast fire amount", 1, 1, 4, 1, () -> autoSwitch.isToggled() && fastFire.isToggled())); + this.registerSetting(targetInvisible = new ButtonSetting("Target invisible", false)); + this.registerSetting(ignoreTeammates = new ButtonSetting("Ignore teammates", true)); + } + + @SubscribeEvent + public void onRotation(RotationEvent event) { + if (!targeted && !(perfect.isToggled() && mc.thePlayer.experience % 1 != 0)) { + final Optional, Triple>> target = mc.theWorld.playerEntities.parallelStream() + .filter(p -> p != mc.thePlayer) + .filter(p -> !AntiBot.isBot(p)) + .filter(p -> !Utils.isTeamMate(p) || !ignoreTeammates.isToggled()) + .filter(entity -> targetInvisible.isToggled() || !entity.isInvisible()) + .filter(p -> p.getDistanceToEntity(mc.thePlayer) < range.getInput()) + .map(p -> new Pair<>(p, doPrediction(Utils.getEyePos(p), new Vec3(p.motionX, p.motionY, p.motionZ)))) + .map(pair -> new Pair<>(pair, Triple.of(pair.second().distanceTo(Utils.getEyePos()), PlayerRotation.getYaw(pair.second()), PlayerRotation.getPitch(pair.second())))) + .filter(pair -> RotationUtils.rayCast(pair.second().getLeft(), pair.second().getMiddle(), pair.second().getRight()) == null) + .min(Comparator.comparingDouble(pair -> mc.thePlayer.getDistanceSqToEntity(pair.first().first()))); + if (target.isPresent()) { + if (SlotHandler.getHeldItem() != null && SlotHandler.getHeldItem().getItem() instanceof ItemHoe) { + event.setYaw(target.get().second().getMiddle()); + event.setPitch(target.get().second().getRight()); + event.setMoveFix(RotationHandler.MoveFix.values()[(int) moveFix.getInput()]); + pos = target.get().first().second().add(0, -target.get().first().first().getEyeHeight(), 0).toVec3(); + this.target = target.get(); + } + targeted = true; + } else { + targeted = false; + } + } + } + + @SubscribeEvent + public void onRenderWorldLast(RenderWorldLastEvent event) { + if (drawPos.isToggled() && prediction.isToggled() && pos != null) { + Blink.drawBox(pos); + } + } + + @SubscribeEvent + public void onPreUpdate(PreUpdateEvent event) { + if (targeted && autoSwitch.isToggled()) { + int bestArm = getBestArm(); + SlotHandler.setCurrentSlot(bestArm); + } + + if (SlotHandler.getHeldItem() == null || !(SlotHandler.getHeldItem().getItem() instanceof ItemHoe)) { + targeted = false; + return; + } + + if (targeted && click) { + Notifications.sendNotification(Notifications.NotificationTypes.INFO, "attack"); + mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, SlotHandler.getHeldItem()); + if (fastFire.isToggled() && autoSwitch.isToggled()) { + for (int i = 0; i < (int) fastFireAmount.getInput(); i++) { + int bestArm = getBestArm(); + SlotHandler.setCurrentSlot(bestArm); + mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, SlotHandler.getHeldItem()); + } + } + if (target != null) + HitLog.onAttack(predTicks, target.first().first(), Utils.getEyePos(target.first().first()), new Vec3(mc.thePlayer), RotationHandler.getRotationYaw(), RotationHandler.getRotationPitch()); + targeted = false; + } + } + + private int getBestArm() { + int arm = -1; + int level = -1; + for (int i = 0; i < 9; i++) { + ItemStack stack = mc.thePlayer.inventory.mainInventory[i]; + if (stack != null && stack.getItem() instanceof ItemHoe) { + if (fastFire.isToggled() && fired.contains(i)) + continue; + + int curLevel; + String name = ((ItemHoe) stack.getItem()).getMaterialName().toLowerCase(); + switch (name) { + default: + case "wood": + curLevel = 1; + break; + case "stone": + curLevel = 2; + break; + case "iron": + curLevel = 3; + break; + case "gold": + curLevel = 4; + break; + case "diamond": + curLevel = 5; + break; + } + + if (curLevel > level) { + level = curLevel; + arm = i; + } + } + } + + if (arm == -1 && !fired.isEmpty()) { + fired.clear(); + return getBestArm(); + } + fired.add(arm); + return arm; + } + + @Override + public void onUpdate() { + if (prediction.isToggled()) { + if (smart.isToggled()) { + predTicks = (int) Math.floor(mc.getNetHandler().getPlayerInfo(mc.thePlayer.getUniqueID()).getResponseTime() / 50.0); + } else { + predTicks = (int) predictionTicks.getInput(); + } + } else { + predTicks = 0; + } + } + + private @NotNull Vec3 doPrediction(@NotNull Vec3 pos, Vec3 motion) { + Vec3 result = new Vec3(pos.toVec3()); + for (int i = 0; i < predTicks; i++) { + result = result.add( + MoveUtil.predictedMotionXZ(motion.x(), i), + mc.thePlayer.onGround ? 0 : MoveUtil.predictedMotion(motion.y(), i), + MoveUtil.predictedMotionXZ(motion.z(), i) + ); + } + return result; + } + + @Override + public void onEnable() { + clickMode.enable(); + targeted = false; + click = false; + predTicks = 0; + fired.clear(); + pos = null; + } + + @Override + public void onDisable() { + clickMode.disable(); + } + + @Override + public boolean click() { + click = true; + return targeted; + } +} diff --git a/src/main/java/keystrokesmod/module/impl/combat/autoclicker/NormalAutoClicker.java b/src/main/java/keystrokesmod/module/impl/combat/autoclicker/NormalAutoClicker.java index 1529524e..1ced96c5 100644 --- a/src/main/java/keystrokesmod/module/impl/combat/autoclicker/NormalAutoClicker.java +++ b/src/main/java/keystrokesmod/module/impl/combat/autoclicker/NormalAutoClicker.java @@ -9,8 +9,8 @@ import org.jetbrains.annotations.NotNull; public class NormalAutoClicker extends SubMode { - private final SliderSetting minCPS = new SliderSetting("Min CPS", 8, 1, 20, 0.1); - private final SliderSetting maxCPS = new SliderSetting("Max CPS", 14, 1, 20, 0.1); + private final SliderSetting minCPS = new SliderSetting("Min CPS", 8, 1, 40, 0.1); + private final SliderSetting maxCPS = new SliderSetting("Max CPS", 14, 1, 40, 0.1); private final ButtonSetting butterFly = new ButtonSetting("Butterfly", true); private final boolean leftClick; private final boolean rightClick; diff --git a/src/main/java/keystrokesmod/module/impl/fun/AntiAim.java b/src/main/java/keystrokesmod/module/impl/fun/AntiAim.java new file mode 100644 index 00000000..73940f19 --- /dev/null +++ b/src/main/java/keystrokesmod/module/impl/fun/AntiAim.java @@ -0,0 +1,51 @@ +package keystrokesmod.module.impl.fun; + +import keystrokesmod.event.PreMotionEvent; +import keystrokesmod.event.RotationEvent; +import keystrokesmod.module.Module; +import keystrokesmod.module.impl.fun.antiaim.Backward; +import keystrokesmod.module.impl.fun.antiaim.Spin; +import keystrokesmod.module.impl.other.RotationHandler; +import keystrokesmod.module.setting.impl.ButtonSetting; +import keystrokesmod.module.setting.impl.ModeValue; +import net.minecraftforge.fml.common.eventhandler.EventPriority; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.jetbrains.annotations.NotNull; + +public class AntiAim extends Module { + private final ModeValue mode; + private final ButtonSetting cancelSprint; + private final ButtonSetting moveFix; + + public AntiAim() { + super("AntiAim", category.fun); + this.registerSetting(mode = new ModeValue("Mode", this) + .add(new Spin("Spin", this)) + .add(new Backward("Backward", this)) + ); + this.registerSetting(moveFix = new ButtonSetting("Move fix", false)); + this.registerSetting(cancelSprint = new ButtonSetting("Cancel sprint", false)); + } + + @Override + public void onEnable() { + mode.enable(); + } + + @Override + public void onDisable() { + mode.disable(); + } + + @SubscribeEvent + public void onRotation(@NotNull RotationEvent event) { + event.setMoveFix(moveFix.isToggled() ? RotationHandler.MoveFix.SILENT : RotationHandler.MoveFix.NONE); + } + + @SubscribeEvent(priority = EventPriority.HIGH) + public void onPreMotion(PreMotionEvent event) { + if (cancelSprint.isToggled()) { + event.setSprinting(false); + } + } +} diff --git a/src/main/java/keystrokesmod/module/impl/fun/HitLog.java b/src/main/java/keystrokesmod/module/impl/fun/HitLog.java new file mode 100644 index 00000000..6d8b2974 --- /dev/null +++ b/src/main/java/keystrokesmod/module/impl/fun/HitLog.java @@ -0,0 +1,89 @@ +package keystrokesmod.module.impl.fun; + +import keystrokesmod.Raven; +import keystrokesmod.event.ReceivePacketEvent; +import keystrokesmod.module.Module; +import keystrokesmod.module.ModuleManager; +import keystrokesmod.module.setting.impl.ButtonSetting; +import keystrokesmod.module.setting.impl.ModeSetting; +import keystrokesmod.module.setting.impl.SliderSetting; +import keystrokesmod.script.classes.Vec3; +import keystrokesmod.utility.RotationUtils; +import keystrokesmod.utility.Utils; +import lombok.AllArgsConstructor; +import lombok.Getter; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.network.play.server.S08PacketPlayerPosLook; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.jetbrains.annotations.NotNull; + +import java.util.concurrent.TimeUnit; + +public class HitLog extends Module { + private static final ModeSetting language = new ModeSetting("Language", new String[]{"English", "Chinese"}, 0); + private static final SliderSetting coolDown = new SliderSetting("CoolDown", 100, 0, 1000, 50); + private static long lastS08 = 0; + private static long lastAttack = 0; + + public HitLog() { + super("HitLog", category.fun); + this.registerSetting(language, coolDown); + } + + public static void onAttack(int predTicks, EntityPlayer target, Vec3 predHitPos, Vec3 selfPos, float yaw, float pitch) { + if (!ModuleManager.hitLog.isEnabled()) return; + if (target == null) return; + if (System.currentTimeMillis() - lastAttack < coolDown.getInput()) return; + lastAttack = System.currentTimeMillis(); + + Raven.getExecutor().schedule(() -> { + if (target.hurtTime == 0) { + Reason reason = Reason.UNKNOWN; + if (!target.getEntityBoundingBox().isVecInside(predHitPos.toVec3())) { + reason = Reason.PRED_FAIL; + } else if (Math.round(System.currentTimeMillis() - lastS08) <= predTicks) { + reason = Reason.WATCHDOG; + } else if (target.isBlocking()) { + reason = Reason.BLOCK; + } + + switch ((int) language.getInput()) { + case 0: + Utils.sendMessage("Miss "+ target.getName() + "'s head Cause " + reason.getEnglish() + " | Trying to predict " + predTicks + " ticks"); + break; + case 1: + Utils.sendMessage("空了 " + target.getName() + "的头部 原因 " + reason.getChinese() + " | 尝试预测 " + predTicks + " ticks"); + break; + } + } else { + switch ((int) language.getInput()) { + case 0: + Utils.sendMessage("Hit "+ target.getName() + "'s head | Trying to predict " + predTicks + " ticks | Health " + target.getHealth()); + break; + case 1: + Utils.sendMessage("命中 " + target.getName() + "的头部 | 尝试预测 " + predTicks + " ticks | 血量 " + target.getHealth()); + break; + } + } + }, predTicks * 50L, TimeUnit.MILLISECONDS); + } + + @SubscribeEvent + public void onReceivePacket(@NotNull ReceivePacketEvent event) { + if (event.getPacket() instanceof S08PacketPlayerPosLook) { + lastS08 = System.currentTimeMillis(); + } + } + + @AllArgsConstructor + @Getter + enum Reason { + UNKNOWN("Unknown", "未知"), + WATCHDOG("Watchdog", "Watchdog"), + PRED_FAIL("Predicted failed", "预测失败"), + BLOCK("Blocking", "格挡"); + + final String english; + final String chinese; + } +} diff --git a/src/main/java/keystrokesmod/module/impl/fun/antiaim/Backward.java b/src/main/java/keystrokesmod/module/impl/fun/antiaim/Backward.java new file mode 100644 index 00000000..5837feee --- /dev/null +++ b/src/main/java/keystrokesmod/module/impl/fun/antiaim/Backward.java @@ -0,0 +1,35 @@ +package keystrokesmod.module.impl.fun.antiaim; + +import keystrokesmod.event.RotationEvent; +import keystrokesmod.module.impl.fun.AntiAim; +import keystrokesmod.module.setting.impl.ButtonSetting; +import keystrokesmod.module.setting.impl.SliderSetting; +import keystrokesmod.module.setting.impl.SubMode; +import net.minecraftforge.fml.common.eventhandler.EventPriority; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.jetbrains.annotations.NotNull; + +public class Backward extends SubMode { + private final SliderSetting pitch; + private final ButtonSetting random; + private final SliderSetting randomValue; + + public Backward(String name, @NotNull AntiAim parent) { + super(name, parent); + this.registerSetting(pitch = new SliderSetting("Pitch", 90, -90, 90, 5)); + this.registerSetting(random = new ButtonSetting("Random", false)); + this.registerSetting(randomValue = new SliderSetting("Random", 8, 0, 20, 1, random::isToggled)); + } + + @SubscribeEvent(priority = EventPriority.HIGH) + public void onRotation(@NotNull RotationEvent event) { + float yaw = mc.thePlayer.rotationYaw + 180; + + if (random.isToggled()) { + yaw += (float) ((Math.random() - 0.5) * randomValue.getInput()); + } + + event.setYaw(yaw); + event.setPitch((float) pitch.getInput()); + } +} diff --git a/src/main/java/keystrokesmod/module/impl/fun/Spin.java b/src/main/java/keystrokesmod/module/impl/fun/antiaim/Spin.java similarity index 70% rename from src/main/java/keystrokesmod/module/impl/fun/Spin.java rename to src/main/java/keystrokesmod/module/impl/fun/antiaim/Spin.java index ac6ef8fc..ee1d3c39 100644 --- a/src/main/java/keystrokesmod/module/impl/fun/Spin.java +++ b/src/main/java/keystrokesmod/module/impl/fun/antiaim/Spin.java @@ -1,74 +1,66 @@ -package keystrokesmod.module.impl.fun; - -import keystrokesmod.event.PreMotionEvent; -import keystrokesmod.event.RotationEvent; -import keystrokesmod.module.Module; -import keystrokesmod.module.setting.impl.ButtonSetting; -import keystrokesmod.module.setting.impl.SliderSetting; -import net.minecraftforge.fml.common.eventhandler.EventPriority; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import org.jetbrains.annotations.NotNull; - - -public class Spin extends Module { - private final SliderSetting speed = new SliderSetting("Speed", 25, -30, 30, 1); - private final ButtonSetting constantPitch = new ButtonSetting("Constant pitch", true); - private final SliderSetting pitch = new SliderSetting("Pitch", 90, -90, 90, 5, constantPitch::isToggled); - private final ButtonSetting cancelSprint = new ButtonSetting("Cancel sprint", false); - - private Float lastYaw = null; - private Float lastPitch = null; - public boolean pitchReserve = false; - - public Spin() { - super("Spin", category.fun); - this.registerSetting(speed, constantPitch, pitch, cancelSprint); - } - - @SubscribeEvent(priority = EventPriority.HIGHEST) - public void onRotation(@NotNull RotationEvent event) { - if (lastYaw == null) { - lastYaw = event.getYaw(); - } - event.setYaw(lastYaw += (float) speed.getInput()); - - - if (constantPitch.isToggled()) { - event.setPitch((float) pitch.getInput()); - } else { - if (lastPitch == null) { - lastPitch = event.getPitch(); - } - - pitchCheck(); - lastPitch += (float) speed.getInput() * (pitchReserve ? -1 : 1); - pitchCheck(); - event.setPitch(lastPitch); - } - } - - private void pitchCheck() { - if (lastPitch >= 90) { - lastPitch = 90f; - pitchReserve = true; - } else if (lastPitch <= -90) { - lastPitch = -90f; - pitchReserve = false; - } - } - - @SubscribeEvent(priority = EventPriority.HIGHEST) - public void onPreMotion(PreMotionEvent event) { - if (cancelSprint.isToggled()) { - event.setSprinting(false); - } - } - - @Override - public void onDisable() { - lastYaw = null; - lastPitch = null; - pitchReserve = false; - } -} - +package keystrokesmod.module.impl.fun.antiaim; + +import keystrokesmod.event.RotationEvent; +import keystrokesmod.module.impl.fun.AntiAim; +import keystrokesmod.module.setting.impl.ButtonSetting; +import keystrokesmod.module.setting.impl.SliderSetting; +import keystrokesmod.module.setting.impl.SubMode; +import net.minecraftforge.fml.common.eventhandler.EventPriority; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.jetbrains.annotations.NotNull; + + +public class Spin extends SubMode { + private final SliderSetting speed = new SliderSetting("Speed", 25, -30, 30, 1); + private final ButtonSetting constantPitch = new ButtonSetting("Constant pitch", true); + private final SliderSetting pitch = new SliderSetting("Pitch", 90, -90, 90, 5, constantPitch::isToggled); + + private Float lastYaw = null; + private Float lastPitch = null; + public boolean pitchReserve = false; + + public Spin(String name, AntiAim parent) { + super(name, parent); + this.registerSetting(speed, constantPitch, pitch); + } + + @SubscribeEvent(priority = EventPriority.HIGH) + public void onRotation(@NotNull RotationEvent event) { + if (lastYaw == null) { + lastYaw = event.getYaw(); + } + event.setYaw(lastYaw += (float) speed.getInput()); + + + if (constantPitch.isToggled()) { + event.setPitch((float) pitch.getInput()); + } else { + if (lastPitch == null) { + lastPitch = event.getPitch(); + } + + pitchCheck(); + lastPitch += (float) speed.getInput() * (pitchReserve ? -1 : 1); + pitchCheck(); + event.setPitch(lastPitch); + } + } + + private void pitchCheck() { + if (lastPitch >= 90) { + lastPitch = 90f; + pitchReserve = true; + } else if (lastPitch <= -90) { + lastPitch = -90f; + pitchReserve = false; + } + } + + @Override + public void onDisable() { + lastYaw = null; + lastPitch = null; + pitchReserve = false; + } +} + diff --git a/src/main/java/keystrokesmod/module/impl/movement/InvMove.java b/src/main/java/keystrokesmod/module/impl/movement/InvMove.java index 4867120a..fc12ad7b 100644 --- a/src/main/java/keystrokesmod/module/impl/movement/InvMove.java +++ b/src/main/java/keystrokesmod/module/impl/movement/InvMove.java @@ -108,6 +108,11 @@ public void onSendPacket(SendPacketEvent event) { private void doInvMove() { if (allowSprint.isToggled()) { KeyBinding.setKeyBindState(mc.gameSettings.keyBindSprint.getKeyCode(), Keyboard.isKeyDown(mc.gameSettings.keyBindSprint.getKeyCode())); + + // If sprint is enabled, set the sprint key to true + if (sprint.isEnabled()) { + KeyBinding.setKeyBindState(mc.gameSettings.keyBindSprint.getKeyCode(), true); + } } if (allowSneak.isToggled()) { KeyBinding.setKeyBindState(mc.gameSettings.keyBindSneak.getKeyCode(), Keyboard.isKeyDown(mc.gameSettings.keyBindSneak.getKeyCode())); diff --git a/src/main/java/keystrokesmod/module/impl/movement/NoSlow.java b/src/main/java/keystrokesmod/module/impl/movement/NoSlow.java index 630c471a..499a72a7 100644 --- a/src/main/java/keystrokesmod/module/impl/movement/NoSlow.java +++ b/src/main/java/keystrokesmod/module/impl/movement/NoSlow.java @@ -1,243 +1,46 @@ package keystrokesmod.module.impl.movement; -import keystrokesmod.Raven; -import keystrokesmod.event.*; import keystrokesmod.module.Module; import keystrokesmod.module.ModuleManager; -import keystrokesmod.module.impl.other.SlotHandler; -import keystrokesmod.module.setting.impl.ButtonSetting; -import keystrokesmod.module.setting.impl.ModeSetting; -import keystrokesmod.module.setting.impl.SliderSetting; -import keystrokesmod.module.setting.utils.ModeOnly; -import keystrokesmod.utility.ContainerUtils; -import keystrokesmod.utility.MoveUtil; -import keystrokesmod.utility.PacketUtils; -import keystrokesmod.utility.Utils; -import net.minecraft.item.*; -import net.minecraft.network.play.client.C07PacketPlayerDigging; -import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement; -import net.minecraft.network.play.client.C09PacketHeldItemChange; -import net.minecraft.network.play.client.C0CPacketInput; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import java.util.Arrays; -import java.util.Objects; +import keystrokesmod.module.impl.movement.noslow.*; +import keystrokesmod.module.setting.impl.ModeValue; public class NoSlow extends Module { - public static ModeSetting mode; - public static SliderSetting slowed; - public static SliderSetting sneakSlowed; - public static ButtonSetting disableBow; - public static ButtonSetting disableSword; - public static ButtonSetting disablePotions; - public static ButtonSetting swordOnly; - public static ButtonSetting vanillaSword; - private final String[] modes = new String[]{"Vanilla", "Pre", "Post", "Alpha", "Old Intave", "Intave", "Polar", "GrimAC", "Blink", "Beta", "Sneak"}; - private boolean postPlace; - private static ModeOnly canChangeSpeed; - - private boolean lastUsingItem = false; - - private int offGroundTicks = 0; - private boolean send = false; + private final ModeValue mode; public NoSlow() { - super("NoSlow", Module.category.movement, 0); - this.registerSetting(mode = new ModeSetting("Mode", modes, 0)); - canChangeSpeed = new ModeOnly(mode, 5, 6, 7).reserve(); - this.registerSetting(slowed = new SliderSetting("Slow %", 5.0D, 0.0D, 100.0D, 1.0D, canChangeSpeed)); - this.registerSetting(sneakSlowed = new SliderSetting("Sneak slowed %", 0, 0, 100, 1, new ModeOnly(mode, 12))); - this.registerSetting(disableSword = new ButtonSetting("Disable sword", false)); - this.registerSetting(disableBow = new ButtonSetting("Disable bow", false, canChangeSpeed)); - this.registerSetting(disablePotions = new ButtonSetting("Disable potions", false)); - this.registerSetting(swordOnly = new ButtonSetting("Sword only", false)); - this.registerSetting(vanillaSword = new ButtonSetting("Vanilla sword", false)); + super("NoSlow", category.movement); + this.registerSetting(mode = new ModeValue("Mode", this) + .add(new VanillaNoSlow("Vanilla", this)) + .add(new HypixelNoSlow("Hypixel", this)) + .add(new NCPNoSlow("NCP", this)) + .add(new IntaveNoSlow("Intave", this)) + .add(new OldIntaveNoSlow("Old Intave", this)) + .add(new OldGrimNoSlow("Old Grim", this)) + .add(new CustomNoSlow("Custom", this)) + .setDefaultValue("Hypixel") + ); } @Override - public void onDisable() { - lastUsingItem = false; - offGroundTicks = 0; - send = false; - } - - @SubscribeEvent - public void onMoveInput(@NotNull MoveInputEvent event) { - if (mc.thePlayer.isUsingItem() && mode.getInput() == 10) { - event.setSneak(true); - event.setSneakSlowDownMultiplier(1 - sneakSlowed.getInput() / 100); - } + public void onEnable() { + mode.enable(); } - public void onUpdate() { - if (ModuleManager.bedAura.stopAutoblock) { - return; - } - postPlace = false; - if (vanillaSword.isToggled() && Utils.holdingSword()) { - return; - } - boolean apply = getSlowed() != 0.2f; - if (!apply || !mc.thePlayer.isUsingItem()) { - return; - } - switch ((int) mode.getInput()) { - case 1: - if (mc.thePlayer.ticksExisted % 3 == 0 && !Raven.badPacketsHandler.C07) { - mc.thePlayer.sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(SlotHandler.getHeldItem())); - } - break; - case 2: - postPlace = true; - break; - case 9: - case 3: - if (mc.thePlayer.ticksExisted % 3 == 0 && !Raven.badPacketsHandler.C07) { - mc.thePlayer.sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(new BlockPos(-1, -1, -1), 1, null, 0, 0, 0)); - } - break; - } - } - - @SubscribeEvent - public void onPostMotion(PostMotionEvent e) { - int input = (int) mode.getInput(); - if (input == 3 || input == 9) { - if (postPlace) { - if (mc.thePlayer.ticksExisted % 3 == 0 && !Raven.badPacketsHandler.C07) { - mc.thePlayer.sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(SlotHandler.getHeldItem())); - } - postPlace = false; - } - } - - } - - @SubscribeEvent - public void onPreMotion(PreMotionEvent event) { - if (!mc.thePlayer.isUsingItem()) { - if (lastUsingItem && mode.getInput() == 8) - ModuleManager.blink.disable(); - - lastUsingItem = false; - return; - } - - final Item item = Objects.requireNonNull(SlotHandler.getHeldItem()).getItem(); - switch ((int) mode.getInput()) { - case 4: - PacketUtils.sendPacket(new C09PacketHeldItemChange(mc.thePlayer.inventory.currentItem % 8 + 1)); - PacketUtils.sendPacket(new C09PacketHeldItemChange(mc.thePlayer.inventory.currentItem)); - break; - case 5: - if (!MoveUtil.isMoving()) return; - if (ContainerUtils.isRest(item)) { - if (!lastUsingItem) { - PacketUtils.sendPacket(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, EnumFacing.UP)); - } - } else { - if (item instanceof ItemSword) { - PacketUtils.sendPacket(new C08PacketPlayerBlockPlacement(SlotHandler.getHeldItem())); - } - } - break; - case 6: - if (ContainerUtils.isRest(item)) { - if (!lastUsingItem) { - PacketUtils.sendPacket(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, EnumFacing.UP)); - } - PacketUtils.sendPacket(new C0CPacketInput(0, 0.82f, false, false)); - } else { - if (item instanceof ItemSword) { - PacketUtils.sendPacket(new C08PacketPlayerBlockPlacement(SlotHandler.getHeldItem())); - PacketUtils.sendPacket(new C0CPacketInput(0, 0.82f, false, false)); - } - } - break; - case 7: - PacketUtils.sendPacket(new C09PacketHeldItemChange(mc.thePlayer.inventory.currentItem % 8 + 1)); - PacketUtils.sendPacket(new C09PacketHeldItemChange(mc.thePlayer.inventory.currentItem % 7 + 2)); - PacketUtils.sendPacket(new C09PacketHeldItemChange(mc.thePlayer.inventory.currentItem)); - break; - case 8: - if (ContainerUtils.isRest(item)) { - if (!lastUsingItem) { - ModuleManager.blink.enable(); - } - } - break; - } - - lastUsingItem = true; - } - - @SubscribeEvent - public void onPreMotion$Beta(PreMotionEvent event) { - if (mode.getInput() == 9) { - if (mc.thePlayer.onGround) { - offGroundTicks = 0; - } else { - offGroundTicks++; - } - - final @Nullable ItemStack item = SlotHandler.getHeldItem(); - if (offGroundTicks == 2 && send) { - send = false; - PacketUtils.sendPacketNoEvent(new C08PacketPlayerBlockPlacement( - new BlockPos(-1, -1, -1), - 255, item, - 0, 0, 0 - )); - - } else if (item != null && mc.thePlayer.isUsingItem() - && (ContainerUtils.isRest(item.getItem()) || item.getItem() instanceof ItemBow)) { - event.setPosY(event.getPosY() + 1E-14); - } - } - } - - @SubscribeEvent - public void onPacketSent(@NotNull SendPacketEvent event) { - if (mode.getInput() == 9) { - if (event.getPacket() instanceof C08PacketPlayerBlockPlacement && !mc.thePlayer.isUsingItem()) { - C08PacketPlayerBlockPlacement blockPlacement = (C08PacketPlayerBlockPlacement) event.getPacket(); - if (SlotHandler.getHeldItem() != null && blockPlacement.getPlacedBlockDirection() == 255 - && ContainerUtils.isRest(SlotHandler.getHeldItem().getItem()) && offGroundTicks < 2) { - if (mc.thePlayer.onGround) { - mc.thePlayer.setJumping(false); - mc.thePlayer.jump(); - } - send = true; - event.setCanceled(true); - } - } - } + @Override + public void onDisable() { + mode.disable(); } - public static float getSlowed() { - if (!mc.thePlayer.isUsingItem()) return (100.0F - 0.0F) / 100.0F; - if (SlotHandler.getHeldItem() == null || ModuleManager.noSlow == null || !ModuleManager.noSlow.isEnabled()) { - return 0.2f; - } - if (swordOnly.isToggled() && !(SlotHandler.getHeldItem().getItem() instanceof ItemSword)) { - return 0.2f; - } - if (SlotHandler.getHeldItem().getItem() instanceof ItemSword && disableSword.isToggled()) { - return 0.2f; - } if (SlotHandler.getHeldItem().getItem() instanceof ItemBow && (disableBow.isToggled() || Arrays.asList(5, 6).contains((int) mode.getInput()))) { - return 0.2f; - } else if (SlotHandler.getHeldItem().getItem() instanceof ItemPotion && !ItemPotion.isSplash(SlotHandler.getHeldItem().getItemDamage()) && disablePotions.isToggled()) { - return 0.2f; - } - return !canChangeSpeed.get() ? 1.0f : (100.0F - (float) slowed.getInput()) / 100.0F; + public static float getForwardSlowed() { + if (!mc.thePlayer.isUsingItem()) return 1; + if (!ModuleManager.noSlow.isEnabled()) return 0.2f; + return ((INoSlow) ModuleManager.noSlow.mode.getSubModeValues().get((int) ModuleManager.noSlow.mode.getInput())).getSlowdown(); } - @Override - public String getInfo() { - return modes[(int) mode.getInput()]; + public static float getStrafeSlowed() { + if (!mc.thePlayer.isUsingItem()) return 1; + if (!ModuleManager.noSlow.isEnabled()) return 0.2f; + return ((INoSlow) ModuleManager.noSlow.mode.getSubModeValues().get((int) ModuleManager.noSlow.mode.getInput())).getStrafeSlowdown(); } } diff --git a/src/main/java/keystrokesmod/module/impl/movement/Speed.java b/src/main/java/keystrokesmod/module/impl/movement/Speed.java index 8c1717a9..04d2774b 100644 --- a/src/main/java/keystrokesmod/module/impl/movement/Speed.java +++ b/src/main/java/keystrokesmod/module/impl/movement/Speed.java @@ -1,74 +1,33 @@ package keystrokesmod.module.impl.movement; -import keystrokesmod.event.PreMotionEvent; -import keystrokesmod.event.PrePlayerInputEvent; -import keystrokesmod.event.PreUpdateEvent; -import keystrokesmod.event.ReceivePacketEvent; import keystrokesmod.module.Module; -import keystrokesmod.module.impl.movement.speed.HypixelDSpeed; +import keystrokesmod.module.impl.movement.speed.*; import keystrokesmod.module.setting.impl.*; -import keystrokesmod.module.setting.utils.ModeOnly; import keystrokesmod.utility.*; -import net.minecraft.block.Block; -import net.minecraft.block.BlockAir; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.network.play.client.C0BPacketEntityAction; -import net.minecraft.network.play.server.S08PacketPlayerPosLook; -import net.minecraft.network.play.server.S12PacketEntityVelocity; -import net.minecraft.potion.Potion; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import org.jetbrains.annotations.NotNull; import static keystrokesmod.module.ModuleManager.scaffold; public class Speed extends Module { private final ModeValue mode; - private final SliderSetting vulcan$lowHop; - private final SliderSetting grimAC$boost; - private final ButtonSetting autoJump; private final ButtonSetting liquidDisable; private final ButtonSetting sneakDisable; private final ButtonSetting stopMotion; - private final ButtonSetting stopSprint; - private int offGroundTicks = 0; - public static int ticksSinceVelocity = Integer.MAX_VALUE; - - boolean strafe, cooldown = false; - int cooldownTicks = 0; - - double lastAngle = 0; - - private boolean reset; - private double speed; - - public TimerUtil timeUtil = new TimerUtil(); - public int ticks = 0; - private boolean start = false; + public int offGroundTicks = 0; public Speed() { super("Speed", Module.category.movement); this.registerSetting(mode = new ModeValue("Mode", this) - .add(new LiteralSubMode("Hypixel A", this)) - .add(new LiteralSubMode("BlocksMC", this)) - .add(new LiteralSubMode("Vulcan", this)) - .add(new LiteralSubMode("GrimAC", this)) - .add(new LiteralSubMode("Hypixel B", this)) - .add(new LiteralSubMode("Hypixel C", this)) - .add(new LiteralSubMode("Polar", this)) - .add(new HypixelDSpeed("Hypixel D", this)) + .add(new LegitSpeed("Legit", this)) + .add(new HypixelASpeed("HypixelA", this)) + .add(new HypixelBSpeed("HypixelB", this)) + .add(new VanillaSpeed("Vanilla", this)) + .add(new BlocksMCSpeed("BlocksMC", this)) + .add(new VulcanSpeed("Vulcan", this)) + .add(new GrimACSpeed("GrimAC", this)) ); - this.registerSetting(vulcan$lowHop = new SliderSetting("Low hop", 2, 0, 4, 1, "ticks", new ModeOnly(mode, 2))); - ModeOnly grimAC = new ModeOnly(mode, 3); - this.registerSetting(grimAC$boost = new SliderSetting("Boost", 4, 0, 10, 1, grimAC)); - this.registerSetting(autoJump = new ButtonSetting("Auto jump", false, new ModeOnly(mode, 3, 6))); this.registerSetting(liquidDisable = new ButtonSetting("Disable in liquid", true)); this.registerSetting(sneakDisable = new ButtonSetting("Disable while sneaking", true)); this.registerSetting(stopMotion = new ButtonSetting("Stop motion", false)); - this.registerSetting(stopSprint = new ButtonSetting("Stop sprint", false)); } @Override @@ -76,291 +35,27 @@ public String getInfo() { return mode.getSubModeValues().get((int) mode.getInput()).getInfo(); } - @SubscribeEvent - public void onPreMotion(PreMotionEvent event) { - if (stopSprint.isToggled()) { - event.setSprinting(false); - } - - if (noAction()) return; - if ((int) mode.getInput() == 1) { - if (!MoveUtil.isMoving()) { - event.setPosX(event.getPosX() + (Math.random() - 0.5) / 100); - event.setPosZ(event.getPosZ() + (Math.random() - 0.5) / 100); - } - - PacketUtils.sendPacketNoEvent(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.START_SPRINTING)); - } - } - @Override public void onEnable() { mode.enable(); - - ticksSinceVelocity = Integer.MAX_VALUE; - ticks = 0; - start = false; - } - - @SubscribeEvent - public void onPreUpdate(PreUpdateEvent event) { - switch ((int) mode.getInput()) { - case 4: - if ((mc.thePlayer.hurtTime > 0 && offGroundTicks != 0) || !MoveUtil.isMoving() || Utils.jumpDown()) { - Utils.resetTimer(); - return; - } - - switch (offGroundTicks) { - case 0: - mc.thePlayer.motionY = 0.42; - MoveUtil.strafe(mc.thePlayer.hurtTime > 0 ? 0.415 : 0.45); - Utils.getTimer().timerSpeed = 1.0f; - break; - case 10: - mc.thePlayer.motionY = -0.28; - MoveUtil.strafe(0.315); - Utils.getTimer().timerSpeed = 1.8f; - break; - case 11: - MoveUtil.strafe(); - Utils.getTimer().timerSpeed = 1.0f; - break; - case 12: - MoveUtil.stop(); - break; - } - break; - case 5: - if ((mc.thePlayer.hurtTime > 0 && offGroundTicks != 0) || !MoveUtil.isMoving() || Utils.jumpDown()) { - Utils.resetTimer(); - return; - } - - switch (offGroundTicks) { - case 0: - mc.thePlayer.motionY = 0.42; - MoveUtil.strafe(0.415); - case 1: - Utils.getTimer().timerSpeed = 1.0f; - break; - case 10: - mc.thePlayer.motionY = -0.3; - Utils.getTimer().timerSpeed = 1.6f; - break; - case 11: - MoveUtil.strafe(); - Utils.getTimer().timerSpeed = 1.0f; - break; - case 12: - Utils.getTimer().timerSpeed = 1.0f; - break; - } - break; - } } public void onUpdate() { - if (ticksSinceVelocity < Integer.MAX_VALUE) ticksSinceVelocity++; - if (mc.thePlayer.onGround) { offGroundTicks = 0; } else { offGroundTicks++; } - - if (noAction()) return; - switch ((int) mode.getInput()) { - case 0: - if (!Utils.jumpDown() && Utils.isMoving() && mc.currentScreen == null) { - mc.thePlayer.setSprinting(true); - if (mc.thePlayer.onGround) { - MoveUtil.strafe(MoveUtil.getAllowedHorizontalDistance() - Math.random() / 100f); - mc.thePlayer.jump(); - - double angle = Math.atan(mc.thePlayer.motionX / mc.thePlayer.motionZ) * (180 / Math.PI); - - if (Math.abs(lastAngle - angle) > 20 && ticksSinceVelocity > 20) { - int speed = mc.thePlayer.isPotionActive(Potion.moveSpeed) ? mc.thePlayer.getActivePotionEffect(Potion.moveSpeed).getAmplifier() + 1 : 0; - - switch (speed) { - case 0: - MoveUtil.moveFlying(-0.005); - break; - - case 1: - MoveUtil.moveFlying(-0.035); - break; - - default: - MoveUtil.moveFlying(-0.04); - break; - } - } - } - } - break; - case 3: - if (!Utils.nullCheck() || !MoveUtil.isMoving()) break; - if (mc.thePlayer.onGround && autoJump.isToggled()) { - mc.thePlayer.jump(); - } - - int collisions = 0; - AxisAlignedBB grimPlayerBox = mc.thePlayer.getEntityBoundingBox().expand(1.0, 1.0, 1.0); - for (Entity entity : mc.theWorld.loadedEntityList) { - if (canCauseSpeed(entity) && (grimPlayerBox.intersectsWith(entity.getEntityBoundingBox()))) { - collisions += 1; - } - } - double yaw = Math.toRadians(MoveYaw()); - double boost = grimAC$boost.getInput() / 100 * collisions; - mc.thePlayer.addVelocity(-Math.sin(yaw) * boost, 0.0, Math.cos(yaw) * boost); - break; - case 6: - if (mc.thePlayer.onGround && autoJump.isToggled() && MoveUtil.isMoving()) { - mc.thePlayer.jump(); - } - - if (start) { - - if (this.timeUtil.hasTimeElapsed(20)) { - start = false; - } - - if (mc.thePlayer.motionY <= -0.10) { - ticks++; - if (ticks % 2 == 0) { - mc.thePlayer.motionY = -0.1; - } else { - mc.thePlayer.motionY = -0.16; - } - mc.thePlayer.jumpMovementFactor = 0.0265f; - } else { - ticks = 0; - } - } - break; - } - } - - public static double MoveYaw(){ - return (MoveUtil.direction() * 180f / Math.PI); - } - - private boolean canCauseSpeed(Entity entity) { - return entity != mc.thePlayer && entity instanceof EntityLivingBase; } public boolean noAction() { - return ((mc.thePlayer.isInWater() - || mc.thePlayer.isInLava()) && liquidDisable.isToggled()) + return !Utils.nullCheck() + || ((mc.thePlayer.isInWater() || mc.thePlayer.isInLava()) + && liquidDisable.isToggled()) || (mc.thePlayer.isSneaking() && sneakDisable.isToggled()) || scaffold.isEnabled(); } - @SubscribeEvent - public void onPlayerInput(PrePlayerInputEvent event) { - if (noAction()) return; - - switch ((int) mode.getInput()) { - case 1: - final double base = MoveUtil.getAllowedHorizontalDistance(); - - if (!Utils.jumpDown() && Utils.isMoving() && mc.currentScreen == null) { - switch (offGroundTicks) { - case 0: - mc.thePlayer.motionY = MoveUtil.jumpBoostMotion(0.42f); - speed = base * 2.15; - break; - - case 1: - speed -= 0.8 * (speed - base); - break; - - default: - speed -= speed / MoveUtil.BUNNY_FRICTION; - break; - } - - reset = false; - } else if (!reset) { - speed = 0; - - reset = true; - speed = MoveUtil.getAllowedHorizontalDistance(); - } - - if (mc.thePlayer.isCollidedHorizontally || BlockUtils.getSurroundBlocks(mc.thePlayer).stream() - .map(BlockUtils::getBlockState) - .map(IBlockState::getBlock) - .allMatch(Block::isFullCube)) { - speed = MoveUtil.getAllowedHorizontalDistance(); - } - - event.setSpeed(Math.max(speed, base), Math.random() / 2000); - break; - case 2: - if (!MoveUtil.isMoving()) break; - switch (offGroundTicks) { - case 0: - mc.thePlayer.jump(); - - if (mc.thePlayer.isPotionActive(Potion.moveSpeed)) { - MoveUtil.strafe(0.6); - } else { - MoveUtil.strafe(0.485); - } - break; - - case 9: - if (!(blockRelativeToPlayer(0, mc.thePlayer.motionY, - 0) instanceof BlockAir)) { - MoveUtil.strafe(); - } - break; - - case 2: - case 1: - MoveUtil.strafe(); - break; - - case 5: - mc.thePlayer.motionY = MoveUtil.predictedMotion(mc.thePlayer.motionY, (int) vulcan$lowHop.getInput()); - break; - } - break; - } - } - - @SubscribeEvent - public void onReceivePacket(@NotNull ReceivePacketEvent event) { - if (noAction()) return; - - switch ((int) mode.getInput()) { - case 1: - if (event.getPacket() instanceof S08PacketPlayerPosLook) { - speed = 0; - } - break; - case 6: - if (event.getPacket() instanceof S12PacketEntityVelocity) { - - S12PacketEntityVelocity s = (S12PacketEntityVelocity) event.getPacket(); - - if (s.getEntityID() == mc.thePlayer.getEntityId()) { - start = true; - timeUtil.reset(); - } - - } - } - } - - public Block blockRelativeToPlayer(final double offsetX, final double offsetY, final double offsetZ) { - return mc.theWorld.getBlockState(new BlockPos(mc.thePlayer).add(offsetX, offsetY, offsetZ)).getBlock(); - } - @Override public void onDisable() { mode.disable(); @@ -368,10 +63,6 @@ public void onDisable() { if (stopMotion.isToggled()) { MoveUtil.stop(); } - cooldownTicks = 0; - cooldown = false; - strafe = false; - speed = 0; Utils.resetTimer(); } } diff --git a/src/main/java/keystrokesmod/module/impl/movement/fly/VulcanFly.java b/src/main/java/keystrokesmod/module/impl/movement/fly/VulcanFly.java index 73b9901f..5bc006c1 100644 --- a/src/main/java/keystrokesmod/module/impl/movement/fly/VulcanFly.java +++ b/src/main/java/keystrokesmod/module/impl/movement/fly/VulcanFly.java @@ -25,6 +25,11 @@ public VulcanFly(String name, @NotNull Fly parent) { this.registerSetting(timerSpeed = new SliderSetting("Timer speed", 2, 1.5, 5, 0.5, "x")); } + @Override + public void onDisable() { + Utils.resetTimer(); + } + @SubscribeEvent public void onBlockAABB(@NotNull BlockAABBEvent event) { if (BlockUtils.replaceable(event.getBlockPos())) { diff --git a/src/main/java/keystrokesmod/module/impl/movement/noslow/CustomNoSlow.java b/src/main/java/keystrokesmod/module/impl/movement/noslow/CustomNoSlow.java new file mode 100644 index 00000000..fee27535 --- /dev/null +++ b/src/main/java/keystrokesmod/module/impl/movement/noslow/CustomNoSlow.java @@ -0,0 +1,156 @@ +package keystrokesmod.module.impl.movement.noslow; + +import keystrokesmod.event.*; +import keystrokesmod.module.impl.movement.NoSlow; +import keystrokesmod.module.impl.movement.Sprint; +import keystrokesmod.module.impl.movement.noslow.customnoslow.SimpleCustomNoSlow; +import keystrokesmod.module.impl.other.SlotHandler; +import keystrokesmod.module.setting.impl.ButtonSetting; +import keystrokesmod.module.setting.impl.DescriptionSetting; +import keystrokesmod.module.setting.impl.ModeSetting; +import keystrokesmod.module.setting.impl.ModeValue; +import keystrokesmod.utility.ContainerUtils; +import keystrokesmod.utility.MoveUtil; +import keystrokesmod.utility.Utils; +import net.minecraft.item.ItemBow; +import net.minecraftforge.fml.common.eventhandler.EventPriority; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public class CustomNoSlow extends INoSlow { + private final ButtonSetting onlyWhileMove; + private final ButtonSetting startSlow; + public final ModeSetting switchMode; + public final ModeSetting slotMode; + private final ModeSetting mode; + private final ModeValue sword; + private final ModeValue bow; + private final ModeValue rest; + + private int usingTicks = 0; + + public CustomNoSlow(String name, @NotNull NoSlow parent) { + super(name, parent); + this.registerSetting(onlyWhileMove = new ButtonSetting("Only while move", false)); + this.registerSetting(startSlow = new ButtonSetting("Start slow", false)); + this.registerSetting(switchMode = new ModeSetting("Switch mode", new String[]{"PreAttack", "PostAttack", "PrePosition", "PostPosition"}, 0)); + this.registerSetting(slotMode = new ModeSetting("Slot mode", new String[]{"PreAttack", "PostAttack", "PrePosition", "PostPosition"}, 0)); + this.registerSetting(mode = new ModeSetting("Sprint mode", new String[]{"Legit", "LegitMotion", "AllDirection", "AllDirectionMotion"}, 0)); + this.registerSetting(new DescriptionSetting("Sword")); + this.registerSetting(sword = new ModeValue("Sword", this, () -> false).add(new SimpleCustomNoSlow("Sword", this))); + this.registerSetting(new DescriptionSetting("Bow")); + this.registerSetting(bow = new ModeValue("Bow", this, () -> false).add(new SimpleCustomNoSlow("Bow", this))); + this.registerSetting(new DescriptionSetting("Rest")); + this.registerSetting(rest = new ModeValue("Rest", this, () -> false).add(new SimpleCustomNoSlow("Rest", this))); + } + + @SubscribeEvent(priority = EventPriority.LOWEST) + public void onPreUpdate(PreUpdateEvent event) { + if (noAction()) return; + SimpleCustomNoSlow noSlow = getNoSlow(); + if (noSlow != null) + noSlow.onPreUpdate(event); + } + + @SubscribeEvent(priority = EventPriority.LOWEST) + public void onPostUpdate(PostUpdateEvent event) { + if (noAction()) return; + SimpleCustomNoSlow noSlow = getNoSlow(); + if (noSlow != null) + noSlow.onPostUpdate(event); + } + + @SubscribeEvent(priority = EventPriority.LOWEST) + public void onPreMotion(PreMotionEvent event) { + if (mc.thePlayer.isUsingItem()) { + usingTicks++; + + if (mode.getInput() == 1 || mode.getInput() == 3) + event.setSprinting(false); + if (mode.getInput() == 2 || mode.getInput() == 3) + Sprint.omni = true; + } else { + if (usingTicks > 0) { + Sprint.omni = false; + } + + usingTicks = 0; + } + + if (noAction()) return; + SimpleCustomNoSlow noSlow = getNoSlow(); + if (noSlow != null) + noSlow.onPreMotion(event); + } + + @SubscribeEvent(priority = EventPriority.LOWEST) + public void onPostMotion(PostMotionEvent event) { + if (noAction()) return; + SimpleCustomNoSlow noSlow = getNoSlow(); + if (noSlow != null) + noSlow.onPostMotion(event); + } + + @SubscribeEvent(priority = EventPriority.LOWEST) + public void onSendPacket(SendPacketEvent event) { + if (noAction()) return; + SimpleCustomNoSlow noSlow = getNoSlow(); + if (noSlow != null) + noSlow.onSendPacket(event); + } + + private boolean noAction() { + return onlyWhileMove.isToggled() && !MoveUtil.isMoving(); + } + + @Override + public void onEnable() { + sword.enable(); + bow.enable(); + rest.enable(); + } + + @Override + public void onDisable() { + sword.disable(); + bow.disable(); + rest.disable(); + + if (usingTicks > 0) { + Sprint.omni = false; + } + } + + private @Nullable SimpleCustomNoSlow getNoSlow() { + if (mc.thePlayer.isUsingItem() && SlotHandler.getHeldItem() != null) { + if (Utils.holdingSword()) + return (SimpleCustomNoSlow) sword.getSubModeValues().get(0); + else if (SlotHandler.getHeldItem().getItem() instanceof ItemBow) + return (SimpleCustomNoSlow) bow.getSubModeValues().get(0); + else if (ContainerUtils.isRest(SlotHandler.getHeldItem().getItem())) + return (SimpleCustomNoSlow) rest.getSubModeValues().get(0); + } + return null; + } + + @Override + public float getSlowdown() { + if (startSlow.isToggled() && usingTicks <= 1) return 0.2f; + + SimpleCustomNoSlow noSlow = getNoSlow(); + if (noSlow != null) + return noSlow.getForwardSlowed(); + return 0.2f; + } + + @Override + public float getStrafeSlowdown() { + if (startSlow.isToggled() && usingTicks <= 1) return 0.2f; + + SimpleCustomNoSlow noSlow = getNoSlow(); + if (noSlow != null) + return noSlow.getStrafeSlowed(); + return 0.2f; + } +} diff --git a/src/main/java/keystrokesmod/module/impl/movement/noslow/HypixelNoSlow.java b/src/main/java/keystrokesmod/module/impl/movement/noslow/HypixelNoSlow.java new file mode 100644 index 00000000..f9d48c28 --- /dev/null +++ b/src/main/java/keystrokesmod/module/impl/movement/noslow/HypixelNoSlow.java @@ -0,0 +1,77 @@ +package keystrokesmod.module.impl.movement.noslow; + +import keystrokesmod.Raven; +import keystrokesmod.event.PreMotionEvent; +import keystrokesmod.event.SendPacketEvent; +import keystrokesmod.module.impl.movement.NoSlow; +import keystrokesmod.module.impl.other.SlotHandler; +import keystrokesmod.utility.ContainerUtils; +import keystrokesmod.utility.PacketUtils; +import keystrokesmod.utility.Utils; +import net.minecraft.item.ItemBow; +import net.minecraft.item.ItemStack; +import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement; +import net.minecraft.util.BlockPos; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public class HypixelNoSlow extends INoSlow { + private int offGroundTicks = 0; + private boolean send = false; + + public HypixelNoSlow(String name, @NotNull NoSlow parent) { + super(name, parent); + } + + @Override + public void onUpdate() { + if (!mc.thePlayer.isUsingItem()) return; + if (mc.thePlayer.ticksExisted % 3 == 0 && !Raven.badPacketsHandler.C07) { + mc.thePlayer.sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(new BlockPos(-1, -1, -1), 1, null, 0, 0, 0)); + } + } + + @SubscribeEvent + public void onPreMotion(PreMotionEvent event) { + if (mc.thePlayer.onGround) { + offGroundTicks = 0; + } else { + offGroundTicks++; + } + + final @Nullable ItemStack item = SlotHandler.getHeldItem(); + if (offGroundTicks == 4 && send) { + send = false; + PacketUtils.sendPacketNoEvent(new C08PacketPlayerBlockPlacement( + new BlockPos(-1, -1, -1), + 255, item, + 0, 0, 0 + )); + + } else if (item != null && mc.thePlayer.isUsingItem() + && (ContainerUtils.isRest(item.getItem()) || item.getItem() instanceof ItemBow)) { + event.setPosY(event.getPosY() + 1E-14); + } + } + + @SubscribeEvent + public void onSendPacket(@NotNull SendPacketEvent event) { + if (event.getPacket() instanceof C08PacketPlayerBlockPlacement && !mc.thePlayer.isUsingItem()) { + C08PacketPlayerBlockPlacement blockPlacement = (C08PacketPlayerBlockPlacement) event.getPacket(); + if (SlotHandler.getHeldItem() != null && blockPlacement.getPlacedBlockDirection() == 255 + && ContainerUtils.isRest(SlotHandler.getHeldItem().getItem()) && offGroundTicks < 2) { + if (mc.thePlayer.onGround && !Utils.jumpDown()) { + mc.thePlayer.jump(); + } + send = true; + event.setCanceled(true); + } + } + } + + @Override + public float getSlowdown() { + return 1; + } +} diff --git a/src/main/java/keystrokesmod/module/impl/movement/noslow/INoSlow.java b/src/main/java/keystrokesmod/module/impl/movement/noslow/INoSlow.java new file mode 100644 index 00000000..9b46b5f4 --- /dev/null +++ b/src/main/java/keystrokesmod/module/impl/movement/noslow/INoSlow.java @@ -0,0 +1,17 @@ +package keystrokesmod.module.impl.movement.noslow; + +import keystrokesmod.module.impl.movement.NoSlow; +import keystrokesmod.module.setting.impl.SubMode; +import org.jetbrains.annotations.NotNull; + +public abstract class INoSlow extends SubMode { + public INoSlow(String name, @NotNull NoSlow parent) { + super(name, parent); + } + + public abstract float getSlowdown(); + + public float getStrafeSlowdown() { + return getSlowdown(); + } +} diff --git a/src/main/java/keystrokesmod/module/impl/movement/noslow/IntaveNoSlow.java b/src/main/java/keystrokesmod/module/impl/movement/noslow/IntaveNoSlow.java new file mode 100644 index 00000000..4a6e65d3 --- /dev/null +++ b/src/main/java/keystrokesmod/module/impl/movement/noslow/IntaveNoSlow.java @@ -0,0 +1,58 @@ +package keystrokesmod.module.impl.movement.noslow; + +import keystrokesmod.event.PreMotionEvent; +import keystrokesmod.module.ModuleManager; +import keystrokesmod.module.impl.movement.NoSlow; +import keystrokesmod.module.impl.other.SlotHandler; +import keystrokesmod.utility.ContainerUtils; +import keystrokesmod.utility.MoveUtil; +import keystrokesmod.utility.PacketUtils; +import net.minecraft.item.Item; +import net.minecraft.item.ItemSword; +import net.minecraft.network.play.client.C07PacketPlayerDigging; +import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.jetbrains.annotations.NotNull; + +public class IntaveNoSlow extends INoSlow { + private boolean lastUsingItem = false; + + public IntaveNoSlow(String name, @NotNull NoSlow parent) { + super(name, parent); + } + + @SubscribeEvent + public void onPreMotion(PreMotionEvent event) { + if (!mc.thePlayer.isUsingItem() || SlotHandler.getHeldItem() == null) { + lastUsingItem = false; + return; + } + + Item item = SlotHandler.getHeldItem().getItem(); + + if (!MoveUtil.isMoving()) return; + if (ContainerUtils.isRest(item)) { + if (!lastUsingItem) { + PacketUtils.sendPacket(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, EnumFacing.UP)); + } + } else { + if (item instanceof ItemSword) { + PacketUtils.sendPacket(new C08PacketPlayerBlockPlacement(SlotHandler.getHeldItem())); + } + } + + lastUsingItem = true; + } + + @Override + public void onDisable() { + lastUsingItem = false; + } + + @Override + public float getSlowdown() { + return 1; + } +} diff --git a/src/main/java/keystrokesmod/module/impl/movement/noslow/NCPNoSlow.java b/src/main/java/keystrokesmod/module/impl/movement/noslow/NCPNoSlow.java new file mode 100644 index 00000000..9ba9d89c --- /dev/null +++ b/src/main/java/keystrokesmod/module/impl/movement/noslow/NCPNoSlow.java @@ -0,0 +1,30 @@ +package keystrokesmod.module.impl.movement.noslow; + +import keystrokesmod.Raven; +import keystrokesmod.module.impl.movement.NoSlow; +import keystrokesmod.module.setting.impl.ButtonSetting; +import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement; +import net.minecraft.util.BlockPos; +import org.jetbrains.annotations.NotNull; + +public class NCPNoSlow extends INoSlow { + private final ButtonSetting oldHypixel; + + public NCPNoSlow(String name, @NotNull NoSlow parent) { + super(name, parent); + this.registerSetting(oldHypixel = new ButtonSetting("Old Hypixel", false)); + } + + @Override + public void onUpdate() { + if (!mc.thePlayer.isUsingItem()) return; + if (mc.thePlayer.ticksExisted % 3 == 0 && !Raven.badPacketsHandler.C07) { + mc.thePlayer.sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(new BlockPos(-1, -1, -1), 1, null, 0, 0, 0)); + } + } + + @Override + public float getSlowdown() { + return oldHypixel.isToggled() ? .95f : 1; + } +} \ No newline at end of file diff --git a/src/main/java/keystrokesmod/module/impl/movement/noslow/OldGrimNoSlow.java b/src/main/java/keystrokesmod/module/impl/movement/noslow/OldGrimNoSlow.java new file mode 100644 index 00000000..50ccd125 --- /dev/null +++ b/src/main/java/keystrokesmod/module/impl/movement/noslow/OldGrimNoSlow.java @@ -0,0 +1,28 @@ +package keystrokesmod.module.impl.movement.noslow; + +import keystrokesmod.event.PreMotionEvent; +import keystrokesmod.module.impl.movement.NoSlow; +import keystrokesmod.utility.PacketUtils; +import net.minecraft.network.play.client.C09PacketHeldItemChange; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.jetbrains.annotations.NotNull; + +public class OldGrimNoSlow extends INoSlow { + public OldGrimNoSlow(String name, @NotNull NoSlow parent) { + super(name, parent); + } + + @SubscribeEvent + public void onPreMotion(PreMotionEvent event) { + if (mc.thePlayer.isUsingItem()) { + PacketUtils.sendPacket(new C09PacketHeldItemChange(mc.thePlayer.inventory.currentItem % 8 + 1)); + PacketUtils.sendPacket(new C09PacketHeldItemChange(mc.thePlayer.inventory.currentItem % 7 + 2)); + PacketUtils.sendPacket(new C09PacketHeldItemChange(mc.thePlayer.inventory.currentItem)); + } + } + + @Override + public float getSlowdown() { + return 1; + } +} diff --git a/src/main/java/keystrokesmod/module/impl/movement/noslow/OldIntaveNoSlow.java b/src/main/java/keystrokesmod/module/impl/movement/noslow/OldIntaveNoSlow.java new file mode 100644 index 00000000..9875f91d --- /dev/null +++ b/src/main/java/keystrokesmod/module/impl/movement/noslow/OldIntaveNoSlow.java @@ -0,0 +1,28 @@ +package keystrokesmod.module.impl.movement.noslow; + +import keystrokesmod.event.PreMotionEvent; +import keystrokesmod.module.impl.movement.NoSlow; +import keystrokesmod.module.impl.other.SlotHandler; +import keystrokesmod.utility.PacketUtils; +import net.minecraft.network.play.client.C09PacketHeldItemChange; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.jetbrains.annotations.NotNull; + +public class OldIntaveNoSlow extends INoSlow { + public OldIntaveNoSlow(String name, @NotNull NoSlow parent) { + super(name, parent); + } + + @SubscribeEvent + public void onPreMotion(PreMotionEvent event) { + if (mc.thePlayer.isUsingItem()) { + PacketUtils.sendPacket(new C09PacketHeldItemChange(SlotHandler.getCurrentSlot() % 8 + 1)); + PacketUtils.sendPacket(new C09PacketHeldItemChange(SlotHandler.getCurrentSlot())); + } + } + + @Override + public float getSlowdown() { + return 1; + } +} diff --git a/src/main/java/keystrokesmod/module/impl/movement/noslow/VanillaNoSlow.java b/src/main/java/keystrokesmod/module/impl/movement/noslow/VanillaNoSlow.java new file mode 100644 index 00000000..3443dffd --- /dev/null +++ b/src/main/java/keystrokesmod/module/impl/movement/noslow/VanillaNoSlow.java @@ -0,0 +1,15 @@ +package keystrokesmod.module.impl.movement.noslow; + +import keystrokesmod.module.impl.movement.NoSlow; +import org.jetbrains.annotations.NotNull; + +public class VanillaNoSlow extends INoSlow { + public VanillaNoSlow(String name, @NotNull NoSlow parent) { + super(name, parent); + } + + @Override + public float getSlowdown() { + return 1; + } +} diff --git a/src/main/java/keystrokesmod/module/impl/movement/noslow/customnoslow/SimpleCustomNoSlow.java b/src/main/java/keystrokesmod/module/impl/movement/noslow/customnoslow/SimpleCustomNoSlow.java new file mode 100644 index 00000000..cb247446 --- /dev/null +++ b/src/main/java/keystrokesmod/module/impl/movement/noslow/customnoslow/SimpleCustomNoSlow.java @@ -0,0 +1,159 @@ +package keystrokesmod.module.impl.movement.noslow.customnoslow; + +import keystrokesmod.event.*; +import keystrokesmod.module.ModuleManager; +import keystrokesmod.module.impl.movement.noslow.CustomNoSlow; +import keystrokesmod.module.impl.other.SlotHandler; +import keystrokesmod.module.setting.impl.ButtonSetting; +import keystrokesmod.module.setting.impl.SliderSetting; +import keystrokesmod.module.setting.impl.SubMode; +import keystrokesmod.utility.PacketUtils; +import keystrokesmod.utility.Utils; +import net.minecraft.network.play.client.C07PacketPlayerDigging; +import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement; +import net.minecraft.network.play.client.C09PacketHeldItemChange; +import net.minecraft.network.play.client.C0CPacketInput; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.jetbrains.annotations.NotNull; + +public class SimpleCustomNoSlow extends SubMode { + private final ButtonSetting slowDown; + private final SliderSetting slowDownForward; + private final SliderSetting slowDownStrafe; + private final ButtonSetting switch1; + private final ButtonSetting slot; + private final ButtonSetting onGround; + private final ButtonSetting toggle; + private final ButtonSetting input; + private final ButtonSetting inputForwardLegit; + private final SliderSetting inputForward; + private final ButtonSetting inputStrafeLegit; + private final SliderSetting inputStrafe; + private final ButtonSetting inputJumpLegit; + private final ButtonSetting inputJump; + private final ButtonSetting inputSneakLegit; + private final ButtonSetting inputSneak; + private final ButtonSetting bug; + private final ButtonSetting timer; + private final SliderSetting timerValue; + private final ButtonSetting blink; + + public SimpleCustomNoSlow(String name, @NotNull CustomNoSlow parent) { + super(name, parent); + this.registerSetting(slowDown = new ButtonSetting("Slowdown", false)); + this.registerSetting(slowDownForward = new SliderSetting("SlowdownForward", 1, 0.2, 1, 0.01, slowDown::isToggled)); + this.registerSetting(slowDownStrafe = new SliderSetting("SlowdownStrafe", 1, 0.2, 1, 0.01, slowDown::isToggled)); + this.registerSetting(switch1 = new ButtonSetting("Switch", false)); + this.registerSetting(slot = new ButtonSetting("Slot", false)); + this.registerSetting(onGround = new ButtonSetting("OnGround", false)); + this.registerSetting(toggle = new ButtonSetting("Toggle", false)); + this.registerSetting(input = new ButtonSetting("Input", false)); + this.registerSetting(inputForwardLegit = new ButtonSetting("InputForwardLegit", false, input::isToggled)); + this.registerSetting(inputForward = new SliderSetting("InputForward", 1, -1, 1, 0.01, input::isToggled)); + this.registerSetting(inputStrafeLegit = new ButtonSetting("InputStrafeLegit", false, input::isToggled)); + this.registerSetting(inputStrafe = new SliderSetting("InputStrafe", 0, -1, 1, 0.01, input::isToggled)); + this.registerSetting(inputJumpLegit = new ButtonSetting("InputJumpLegit", false, input::isToggled)); + this.registerSetting(inputJump = new ButtonSetting("InputJump", false, input::isToggled)); + this.registerSetting(inputSneakLegit = new ButtonSetting("InputSneakLegit", false, input::isToggled)); + this.registerSetting(inputSneak = new ButtonSetting("InputSneak", false, input::isToggled)); + this.registerSetting(bug = new ButtonSetting("Bug", false)); + this.registerSetting(timer = new ButtonSetting("Timer", false)); + this.registerSetting(timerValue = new SliderSetting("Timer", 0.2, 0.1, 2, 0.01, timer::isToggled)); + this.registerSetting(blink = new ButtonSetting("Blink", false)); + } + + public void onPreUpdate(PreUpdateEvent event) { + if (switch1.isToggled() && parent.switchMode.getInput() == 0) { + PacketUtils.sendPacket(new C09PacketHeldItemChange(SlotHandler.getCurrentSlot() % 8 + 1)); + PacketUtils.sendPacket(new C09PacketHeldItemChange(SlotHandler.getCurrentSlot())); + } + if (slot.isToggled() && parent.switchMode.getInput() == 0) { + PacketUtils.sendPacket(new C09PacketHeldItemChange(SlotHandler.getCurrentSlot())); + } + } + + public void onPostUpdate(PostUpdateEvent event) { + if (switch1.isToggled() && parent.switchMode.getInput() == 1) { + PacketUtils.sendPacket(new C09PacketHeldItemChange(SlotHandler.getCurrentSlot() % 8 + 1)); + PacketUtils.sendPacket(new C09PacketHeldItemChange(SlotHandler.getCurrentSlot())); + } + if (slot.isToggled() && parent.switchMode.getInput() == 1) { + PacketUtils.sendPacket(new C09PacketHeldItemChange(SlotHandler.getCurrentSlot())); + } + } + + public void onPreMotion(PreMotionEvent event) { + if (switch1.isToggled() && parent.switchMode.getInput() == 2) { + PacketUtils.sendPacket(new C09PacketHeldItemChange(SlotHandler.getCurrentSlot() % 8 + 1)); + PacketUtils.sendPacket(new C09PacketHeldItemChange(SlotHandler.getCurrentSlot())); + } + if (slot.isToggled() && parent.switchMode.getInput() == 2) { + PacketUtils.sendPacket(new C09PacketHeldItemChange(SlotHandler.getCurrentSlot())); + } + if (onGround.isToggled()) { + event.setOnGround(true); + } + if (toggle.isToggled()) { + PacketUtils.sendPacket(new C08PacketPlayerBlockPlacement(SlotHandler.getHeldItem())); + } + if (input.isToggled()) { + PacketUtils.sendPacket(new C0CPacketInput( + inputForwardLegit.isToggled() ? mc.thePlayer.movementInput.moveForward : (float) inputForward.getInput(), + inputStrafeLegit.isToggled() ? mc.thePlayer.movementInput.moveStrafe : (float) inputStrafe.getInput(), + inputJumpLegit.isToggled() ? mc.thePlayer.movementInput.jump : inputJump.isToggled(), + inputSneakLegit.isToggled() ? mc.thePlayer.movementInput.sneak : inputSneak.isToggled() + )); + } + if (timer.isToggled()) { + if (mc.thePlayer.isUsingItem()) { + Utils.getTimer().timerSpeed = (float) timerValue.getInput(); + } else { + Utils.resetTimer(); + } + } + if (blink.isToggled()) { + if (mc.thePlayer.isUsingItem()) { + ModuleManager.blink.enable(); + } else { + ModuleManager.blink.disable(); + } + } + } + + public void onPostMotion(PostMotionEvent event) { + if (switch1.isToggled() && parent.switchMode.getInput() == 3) { + PacketUtils.sendPacket(new C09PacketHeldItemChange(SlotHandler.getCurrentSlot() % 8 + 1)); + PacketUtils.sendPacket(new C09PacketHeldItemChange(SlotHandler.getCurrentSlot())); + } + if (slot.isToggled() && parent.switchMode.getInput() == 3) { + PacketUtils.sendPacket(new C09PacketHeldItemChange(SlotHandler.getCurrentSlot())); + } + } + + @Override + public void onDisable() { + Utils.resetTimer(); + ModuleManager.blink.disable(); + } + + public void onSendPacket(@NotNull SendPacketEvent event) { + if (event.getPacket() instanceof C08PacketPlayerBlockPlacement && !event.isCanceled() && bug.isToggled()) { + C08PacketPlayerBlockPlacement packet = (C08PacketPlayerBlockPlacement) event.getPacket(); + if (!mc.thePlayer.isUsingItem()) { + event.setCanceled(true); + PacketUtils.sendPacketNoEvent(packet); + PacketUtils.sendPacketNoEvent(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, EnumFacing.DOWN)); + } + } + } + + public float getForwardSlowed() { + return slowDown.isToggled() ? (float) slowDownForward.getInput() : 0.2f; + } + + public float getStrafeSlowed() { + return slowDown.isToggled() ? (float) slowDownStrafe.getInput() : 0.2f; + } +} diff --git a/src/main/java/keystrokesmod/module/impl/movement/phase/WatchdogAutoPhase.java b/src/main/java/keystrokesmod/module/impl/movement/phase/WatchdogAutoPhase.java index 3aa67701..3ad64343 100644 --- a/src/main/java/keystrokesmod/module/impl/movement/phase/WatchdogAutoPhase.java +++ b/src/main/java/keystrokesmod/module/impl/movement/phase/WatchdogAutoPhase.java @@ -30,7 +30,7 @@ public void onPreUpdate(PreUpdateEvent event) { @SubscribeEvent public void onBlockAABBEvent(BlockAABBEvent event) { - if (phase && blink.isEnabled() && event.getBlock() instanceof BlockGlass) event.setCanceled(true); + if (phase && event.getBlock() instanceof BlockGlass) event.setBoundingBox(null); } @SubscribeEvent @@ -46,6 +46,7 @@ public void onPacketReceiveEvent(@NotNull ReceivePacketEvent event) { case "§r§r§r §r§f§lSkyWars Duel§r": case "§r§eCages opened! §r§cFIGHT!§r": phase = false; + blink.disable(); break; case "The game starts in 3 seconds!": @@ -57,4 +58,9 @@ public void onPacketReceiveEvent(@NotNull ReceivePacketEvent event) { } } } + + @Override + public void onDisable() { + blink.disable(); + } } \ No newline at end of file diff --git a/src/main/java/keystrokesmod/module/impl/movement/speed/BlocksMCSpeed.java b/src/main/java/keystrokesmod/module/impl/movement/speed/BlocksMCSpeed.java new file mode 100644 index 00000000..673d1b98 --- /dev/null +++ b/src/main/java/keystrokesmod/module/impl/movement/speed/BlocksMCSpeed.java @@ -0,0 +1,79 @@ +package keystrokesmod.module.impl.movement.speed; + +import keystrokesmod.event.PreMotionEvent; +import keystrokesmod.event.PrePlayerInputEvent; +import keystrokesmod.event.ReceivePacketEvent; +import keystrokesmod.module.impl.movement.Speed; +import keystrokesmod.module.setting.impl.SubMode; +import keystrokesmod.utility.MoveUtil; +import net.minecraft.network.play.server.S08PacketPlayerPosLook; +import net.minecraft.potion.Potion; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.jetbrains.annotations.NotNull; + +public class BlocksMCSpeed extends SubMode { + private boolean reset; + private double speed; + + public BlocksMCSpeed(String name, @NotNull Speed parent) { + super(name, parent); + } + + @SubscribeEvent + public void onPreMotion(PreMotionEvent event) { + if (parent.noAction()) return; + if (!MoveUtil.isMoving()) { + event.setPosX(event.getPosX() + (Math.random() - 0.5) / 3); + event.setPosZ(event.getPosZ() + (Math.random() - 0.5) / 3); + } + } + + @SubscribeEvent + public void onReceivePacket(@NotNull ReceivePacketEvent event) { + if (event.getPacket() instanceof S08PacketPlayerPosLook) { + speed = 0; + } + } + + @SubscribeEvent + public void onPrePlayerInput(PrePlayerInputEvent event) { + if (parent.noAction()) return; + final double base = MoveUtil.getAllowedHorizontalDistance(); + final boolean potionActive = mc.thePlayer.isPotionActive(Potion.moveSpeed); + + if (MoveUtil.isMoving()) { + switch (parent.offGroundTicks) { + case 0: + mc.thePlayer.motionY = MoveUtil.jumpBoostMotion(0.42f); + speed = base * (potionActive ? 1.4 : 2.15); + break; + + case 1: + speed -= 0.8 * (speed - base); + break; + + default: + speed -= speed / MoveUtil.BUNNY_FRICTION; + break; + } + + reset = false; + } else if (!reset) { + speed = 0; + + reset = true; + speed = MoveUtil.getAllowedHorizontalDistance(); + } + + if (mc.thePlayer.isCollidedHorizontally) { + speed = MoveUtil.getAllowedHorizontalDistance(); + } + + event.setSpeed(Math.max(speed, base), Math.random() / 2000); + } + + @Override + public void onDisable() { + speed = 0; + } +} diff --git a/src/main/java/keystrokesmod/module/impl/movement/speed/GrimACSpeed.java b/src/main/java/keystrokesmod/module/impl/movement/speed/GrimACSpeed.java new file mode 100644 index 00000000..177f6e99 --- /dev/null +++ b/src/main/java/keystrokesmod/module/impl/movement/speed/GrimACSpeed.java @@ -0,0 +1,51 @@ +package keystrokesmod.module.impl.movement.speed; + +import keystrokesmod.module.impl.movement.Speed; +import keystrokesmod.module.setting.impl.ButtonSetting; +import keystrokesmod.module.setting.impl.DescriptionSetting; +import keystrokesmod.module.setting.impl.SliderSetting; +import keystrokesmod.module.setting.impl.SubMode; +import keystrokesmod.utility.MoveUtil; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.AxisAlignedBB; +import org.jetbrains.annotations.NotNull; + +public class GrimACSpeed extends SubMode { + private final SliderSetting amount; + private final ButtonSetting autoJump; + + public GrimACSpeed(String name, @NotNull Speed parent) { + super(name, parent); + this.registerSetting(new DescriptionSetting("Only works on 1.9+")); + this.registerSetting(amount = new SliderSetting("Amount", 4, 0, 10, 1)); + this.registerSetting(autoJump = new ButtonSetting("Auto jump", true)); + } + + @Override + public void onUpdate() { + if (parent.noAction() || !MoveUtil.isMoving()) return; + if (mc.thePlayer.onGround && autoJump.isToggled()) { + mc.thePlayer.jump(); + } + + int collisions = 0; + AxisAlignedBB grimPlayerBox = mc.thePlayer.getEntityBoundingBox().expand(1.0, 1.0, 1.0); + for (Entity entity : mc.theWorld.loadedEntityList) { + if (canCauseSpeed(entity) && (grimPlayerBox.intersectsWith(entity.getEntityBoundingBox()))) { + collisions += 1; + } + } + double yaw = Math.toRadians(MoveYaw()); + double boost = amount.getInput() / 100 * collisions; + mc.thePlayer.addVelocity(-Math.sin(yaw) * boost, 0.0, Math.cos(yaw) * boost); + } + + private boolean canCauseSpeed(Entity entity) { + return entity != mc.thePlayer && entity instanceof EntityLivingBase; + } + + public static double MoveYaw(){ + return (MoveUtil.direction() * 180f / Math.PI); + } +} diff --git a/src/main/java/keystrokesmod/module/impl/movement/speed/HypixelASpeed.java b/src/main/java/keystrokesmod/module/impl/movement/speed/HypixelASpeed.java new file mode 100644 index 00000000..317643ef --- /dev/null +++ b/src/main/java/keystrokesmod/module/impl/movement/speed/HypixelASpeed.java @@ -0,0 +1,73 @@ +package keystrokesmod.module.impl.movement.speed; + +import keystrokesmod.event.PrePlayerInputEvent; +import keystrokesmod.event.ReceivePacketEvent; +import keystrokesmod.module.impl.movement.Speed; +import keystrokesmod.module.setting.impl.SubMode; +import keystrokesmod.utility.MoveUtil; +import keystrokesmod.utility.Utils; +import net.minecraft.network.play.server.S12PacketEntityVelocity; +import net.minecraft.potion.Potion; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.jetbrains.annotations.NotNull; + +public class HypixelASpeed extends SubMode { + private double lastAngle = 999; + public static int ticksSinceVelocity = 0; + + public HypixelASpeed(String name, @NotNull Speed parent) { + super(name, parent); + } + + @Override + public void onEnable() { + ticksSinceVelocity = 0; + } + + @SubscribeEvent + public void onPrePlayerInput(PrePlayerInputEvent event) { + if (parent.noAction()) return; + + if (!Utils.jumpDown() && Utils.isMoving() && mc.currentScreen == null) { + mc.thePlayer.setSprinting(true); + if (mc.thePlayer.onGround) { + MoveUtil.strafe(MoveUtil.getAllowedHorizontalDistance() - Math.random() / 100f); + mc.thePlayer.jump(); + + double angle = Math.atan(mc.thePlayer.motionX / mc.thePlayer.motionZ) * (180 / Math.PI); + + if (lastAngle != 999 && Math.abs(lastAngle - angle) > 20 && ticksSinceVelocity > 20) { + int speed = mc.thePlayer.isPotionActive(Potion.moveSpeed) ? mc.thePlayer.getActivePotionEffect(Potion.moveSpeed).getAmplifier() + 1 : 0; + + switch (speed) { + case 0: + MoveUtil.moveFlying(-0.005); + break; + + case 1: + MoveUtil.moveFlying(-0.035); + break; + + default: + MoveUtil.moveFlying(-0.04); + break; + } + } + lastAngle = angle; + } + } + } + + @Override + public void onUpdate() { + if (ticksSinceVelocity < Integer.MAX_VALUE) + ticksSinceVelocity++; + } + + @SubscribeEvent + public void onReceivePacket(@NotNull ReceivePacketEvent event) { + if (event.getPacket() instanceof S12PacketEntityVelocity) { + ticksSinceVelocity = 0; + } + } +} diff --git a/src/main/java/keystrokesmod/module/impl/movement/speed/HypixelDSpeed.java b/src/main/java/keystrokesmod/module/impl/movement/speed/HypixelBSpeed.java similarity index 98% rename from src/main/java/keystrokesmod/module/impl/movement/speed/HypixelDSpeed.java rename to src/main/java/keystrokesmod/module/impl/movement/speed/HypixelBSpeed.java index 238ecc7e..9a0522a2 100644 --- a/src/main/java/keystrokesmod/module/impl/movement/speed/HypixelDSpeed.java +++ b/src/main/java/keystrokesmod/module/impl/movement/speed/HypixelBSpeed.java @@ -33,7 +33,7 @@ * @see hackclient.rise.nb * @author Alan34 */ -public class HypixelDSpeed extends SubMode { +public class HypixelBSpeed extends SubMode { private final ModeSetting mode = new ModeSetting("Mode", new String[]{"Ground Strafe", "Autism"}, 0); public final ButtonSetting fastFall = new ButtonSetting("Fast Fall", false, new ModeOnly(mode, 1)); public final SliderSetting ticksToGlide = new SliderSetting("Ticks to Glide", 29, 1, 29, 1, new ModeOnly(mode, 1)); @@ -45,7 +45,7 @@ public class HypixelDSpeed extends SubMode { private int offGroundTicks = 0; - public HypixelDSpeed(String name, Speed parent) { + public HypixelBSpeed(String name, Speed parent) { super(name, parent); this.registerSetting(mode, fastFall, ticksToGlide); } diff --git a/src/main/java/keystrokesmod/module/impl/movement/speed/LegitSpeed.java b/src/main/java/keystrokesmod/module/impl/movement/speed/LegitSpeed.java new file mode 100644 index 00000000..ccc6a9d2 --- /dev/null +++ b/src/main/java/keystrokesmod/module/impl/movement/speed/LegitSpeed.java @@ -0,0 +1,44 @@ +package keystrokesmod.module.impl.movement.speed; + +import keystrokesmod.event.*; +import keystrokesmod.module.impl.movement.Speed; +import keystrokesmod.module.impl.other.RotationHandler; +import keystrokesmod.module.setting.impl.ButtonSetting; +import keystrokesmod.module.setting.impl.SubMode; +import keystrokesmod.utility.MoveUtil; +import keystrokesmod.utility.Utils; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.jetbrains.annotations.NotNull; + +public class LegitSpeed extends SubMode { + private final ButtonSetting rotation; + private final ButtonSetting cpuSpeedUpExploit; + + public LegitSpeed(String name, @NotNull Speed parent) { + super(name, parent); + this.registerSetting(rotation = new ButtonSetting("Rotation", false)); + this.registerSetting(cpuSpeedUpExploit = new ButtonSetting("CPU SpeedUp Exploit", true)); + } + + @SubscribeEvent + public void onPreUpdate(@NotNull PreUpdateEvent event) { + if (!mc.thePlayer.onGround && rotation.isToggled()) { + RotationHandler.setRotationYaw(mc.thePlayer.moveStrafing > 0 ? mc.thePlayer.rotationYaw - 45 : mc.thePlayer.rotationYaw + 45); + RotationHandler.setMoveFix(RotationHandler.MoveFix.SILENT); + } + + if (cpuSpeedUpExploit.isToggled()) + Utils.getTimer().timerSpeed = 1.004f; + } + + @SubscribeEvent + public void onMove(MoveInputEvent event) { + if (MoveUtil.isMoving()) + event.setJump(true); + } + + @Override + public void onDisable() { + Utils.resetTimer(); + } +} diff --git a/src/main/java/keystrokesmod/module/impl/movement/speed/VanillaSpeed.java b/src/main/java/keystrokesmod/module/impl/movement/speed/VanillaSpeed.java new file mode 100644 index 00000000..22fc55b7 --- /dev/null +++ b/src/main/java/keystrokesmod/module/impl/movement/speed/VanillaSpeed.java @@ -0,0 +1,54 @@ +package keystrokesmod.module.impl.movement.speed; + +import keystrokesmod.event.PreMotionEvent; +import keystrokesmod.module.impl.client.Notifications; +import keystrokesmod.module.impl.movement.Speed; +import keystrokesmod.module.setting.impl.ButtonSetting; +import keystrokesmod.module.setting.impl.SliderSetting; +import keystrokesmod.module.setting.impl.SubMode; +import keystrokesmod.utility.MoveUtil; +import keystrokesmod.utility.Utils; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.jetbrains.annotations.NotNull; + +public class VanillaSpeed extends SubMode { + private final SliderSetting horizonSpeed; + private final ButtonSetting autoJump; + private final SliderSetting verticalSpeed; + private final ButtonSetting fastStop; + + private static boolean warning = false; + + public VanillaSpeed(String name, @NotNull Speed parent) { + super(name, parent); + this.registerSetting(horizonSpeed = new SliderSetting("Horizon speed", 1, 0.1, 5, 0.1)); + this.registerSetting(autoJump = new ButtonSetting("Auto jump", true)); + this.registerSetting(verticalSpeed = new SliderSetting("Vertical speed", 1, 0.1, 3, 0.1, autoJump::isToggled)); + this.registerSetting(fastStop = new ButtonSetting("Fast stop", false)); + } + + @Override + public void onEnable() { + if (Utils.isHypixel() && !warning) { + warning = true; + Notifications.sendNotification(Notifications.NotificationTypes.WARN, "Vanilla Speed on Hypixel may result a ban!"); + parent.disable(); + } + } + + @SubscribeEvent + public void onPreMotion(PreMotionEvent event) { + if (MoveUtil.isMoving()) { + if (autoJump.isToggled() && mc.thePlayer.onGround) { + mc.thePlayer.jump(); + mc.thePlayer.motionY = verticalSpeed.getInput() * MoveUtil.jumpMotion(); + MoveUtil.strafe(); + } else { + MoveUtil.strafe(horizonSpeed.getInput() * MoveUtil.getAllowedHorizontalDistance()); + } + } else { + if (fastStop.isToggled()) + MoveUtil.stop(); + } + } +} diff --git a/src/main/java/keystrokesmod/module/impl/movement/speed/VulcanSpeed.java b/src/main/java/keystrokesmod/module/impl/movement/speed/VulcanSpeed.java new file mode 100644 index 00000000..fed5db48 --- /dev/null +++ b/src/main/java/keystrokesmod/module/impl/movement/speed/VulcanSpeed.java @@ -0,0 +1,58 @@ +package keystrokesmod.module.impl.movement.speed; + +import keystrokesmod.event.PrePlayerInputEvent; +import keystrokesmod.module.impl.movement.Speed; +import keystrokesmod.module.setting.impl.SliderSetting; +import keystrokesmod.module.setting.impl.SubMode; +import keystrokesmod.utility.MoveUtil; +import net.minecraft.block.Block; +import net.minecraft.block.BlockAir; +import net.minecraft.potion.Potion; +import net.minecraft.util.BlockPos; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.jetbrains.annotations.NotNull; + +public class VulcanSpeed extends SubMode { + private final SliderSetting lowHop; + + public VulcanSpeed(String name, @NotNull Speed parent) { + super(name, parent); + this.registerSetting(lowHop = new SliderSetting("Low hop", 2, 0, 4, 1)); + } + + @SubscribeEvent + public void onPrePlayerInput(PrePlayerInputEvent event) { + if (!MoveUtil.isMoving()) return; + switch (parent.offGroundTicks) { + case 0: + mc.thePlayer.jump(); + + if (mc.thePlayer.isPotionActive(Potion.moveSpeed)) { + MoveUtil.strafe(0.6); + } else { + MoveUtil.strafe(0.485); + } + break; + + case 9: + if (!(blockRelativeToPlayer(0, mc.thePlayer.motionY, + 0) instanceof BlockAir)) { + MoveUtil.strafe(); + } + break; + + case 2: + case 1: + MoveUtil.strafe(); + break; + + case 5: + mc.thePlayer.motionY = MoveUtil.predictedMotion(mc.thePlayer.motionY, (int) lowHop.getInput()); + break; + } + } + + public Block blockRelativeToPlayer(final double offsetX, final double offsetY, final double offsetZ) { + return mc.theWorld.getBlockState(new BlockPos(mc.thePlayer).add(offsetX, offsetY, offsetZ)).getBlock(); + } +} diff --git a/src/main/java/keystrokesmod/module/impl/other/RotationHandler.java b/src/main/java/keystrokesmod/module/impl/other/RotationHandler.java index 84e10d0c..8ae40154 100644 --- a/src/main/java/keystrokesmod/module/impl/other/RotationHandler.java +++ b/src/main/java/keystrokesmod/module/impl/other/RotationHandler.java @@ -98,7 +98,7 @@ public static float getRotationPitch() { */ @SubscribeEvent(priority = EventPriority.HIGHEST) public void onPreMotion(MoveInputEvent event) { - if (isSet) { + if (isSet && mc.currentScreen == null) { float viewYaw = RotationUtils.normalize(mc.thePlayer.rotationYaw); float viewPitch = RotationUtils.normalize(mc.thePlayer.rotationPitch); switch ((int) smoothBack.getInput()) { diff --git a/src/main/java/keystrokesmod/module/impl/movement/Timer.java b/src/main/java/keystrokesmod/module/impl/player/Timer.java similarity index 98% rename from src/main/java/keystrokesmod/module/impl/movement/Timer.java rename to src/main/java/keystrokesmod/module/impl/player/Timer.java index 6ad7c96a..b525e61a 100644 --- a/src/main/java/keystrokesmod/module/impl/movement/Timer.java +++ b/src/main/java/keystrokesmod/module/impl/player/Timer.java @@ -1,4 +1,4 @@ -package keystrokesmod.module.impl.movement; +package keystrokesmod.module.impl.player; import keystrokesmod.clickgui.ClickGui; import keystrokesmod.module.Module; @@ -28,7 +28,7 @@ public class Timer extends Module { private int enableTicks; public Timer() { - super("Timer", Module.category.movement, 0); + super("Timer", category.player, 0); this.registerSetting(mode = new ModeSetting("Mode", new String[]{"Normal", "Balance", "Hypixel", "None"}, 0)); final ModeOnly mode1 = new ModeOnly(mode, 1); this.registerSetting(speed = new SliderSetting("Speed", 1.00, 0.01, 10.0, 0.01, new ModeOnly(mode, 0, 1))); diff --git a/src/main/java/keystrokesmod/module/impl/render/Watermark.java b/src/main/java/keystrokesmod/module/impl/render/Watermark.java index 621dbd29..f6a8f780 100644 --- a/src/main/java/keystrokesmod/module/impl/render/Watermark.java +++ b/src/main/java/keystrokesmod/module/impl/render/Watermark.java @@ -28,7 +28,7 @@ import java.util.Objects; public class Watermark extends Module { - public static final String VERSION = "1.20.0"; + public static final String VERSION = "1.21.0"; public static final HashMap WATERMARK = new HashMap<>(); public static String customName = "CustomClient"; diff --git a/src/main/java/keystrokesmod/module/impl/world/Scaffold.java b/src/main/java/keystrokesmod/module/impl/world/Scaffold.java index a2d60295..28582e24 100644 --- a/src/main/java/keystrokesmod/module/impl/world/Scaffold.java +++ b/src/main/java/keystrokesmod/module/impl/world/Scaffold.java @@ -5,10 +5,8 @@ import keystrokesmod.mixins.impl.client.KeyBindingAccessor; import keystrokesmod.module.ModuleManager; import keystrokesmod.module.impl.client.Notifications; -import keystrokesmod.module.impl.combat.autoclicker.DragClickAutoClicker; import keystrokesmod.module.impl.combat.autoclicker.IAutoClicker; import keystrokesmod.module.impl.combat.autoclicker.NormalAutoClicker; -import keystrokesmod.module.impl.combat.autoclicker.RecordAutoClicker; import keystrokesmod.module.impl.other.RotationHandler; import keystrokesmod.module.impl.other.SlotHandler; import keystrokesmod.module.impl.other.anticheats.utils.world.PlayerRotation; @@ -57,10 +55,16 @@ public class Scaffold extends IAutoClicker { private final ButtonSetting recycleRotation; private final ButtonSetting sneak; private final SliderSetting sneakEveryBlocks; + private final ButtonSetting jump; + private final SliderSetting jumpEveryBlocks; private final SliderSetting sneakTime; private final ButtonSetting rotateWithMovement; private final ButtonSetting staticYaw; private final ButtonSetting reserveYaw; + private final ButtonSetting staticPitch; + private final ButtonSetting staticPitchOnJump; + private final SliderSetting straightPitch; + private final SliderSetting diagonalPitch; private final ModeSetting precision; private final ButtonSetting autoSwap; private final ButtonSetting useBiggestStack; @@ -98,6 +102,7 @@ public class Scaffold extends IAutoClicker { private int add = 0; private int sameY$bridged = 1; private int sneak$bridged = 0; + private int jump$bridged = 0; private boolean placedUp; private int offGroundTicks = 0; private boolean telly$noBlockPlace = false; @@ -124,11 +129,17 @@ public Scaffold() { this.registerSetting(rayCast = new ButtonSetting("Ray cast", false)); this.registerSetting(recycleRotation = new ButtonSetting("Recycle rotation", false)); this.registerSetting(sneak = new ButtonSetting("Sneak", false)); - this.registerSetting(sneakEveryBlocks = new SliderSetting("Sneak every blocks", 1, 1, 10, 1, sneak::isToggled)); + this.registerSetting(sneakEveryBlocks = new SliderSetting("Sneak every blocks", 0, 1, 10, 1, sneak::isToggled)); this.registerSetting(sneakTime = new SliderSetting("Sneak time", 50, 0, 500, 10, "ms", sneak::isToggled)); + this.registerSetting(jump = new ButtonSetting("Jump", false)); + this.registerSetting(jumpEveryBlocks = new SliderSetting("Jump every blocks", 0, 1, 10, 1, jump::isToggled)); this.registerSetting(rotateWithMovement = new ButtonSetting("Rotate with movement", true)); this.registerSetting(staticYaw = new ButtonSetting("Static yaw", false)); this.registerSetting(reserveYaw = new ButtonSetting("Reserve yaw", false)); + this.registerSetting(staticPitch = new ButtonSetting("Static pitch", false)); + this.registerSetting(staticPitchOnJump = new ButtonSetting("Static pitch on jump", false, staticPitch::isToggled)); + this.registerSetting(straightPitch = new SliderSetting("Straight pitch", 75.7, 45, 90, 0.1, staticPitch::isToggled)); + this.registerSetting(diagonalPitch = new SliderSetting("Diagonal pitch", 75.6, 45, 90, 0.1, staticPitch::isToggled)); this.registerSetting(autoSwap = new ButtonSetting("AutoSwap", true)); this.registerSetting(useBiggestStack = new ButtonSetting("Use biggest stack", true, autoSwap::isToggled)); this.registerSetting(delayOnJump = new ButtonSetting("Delay on jump", true)); @@ -178,6 +189,8 @@ public void onEnable() { lastSlot = -1; startPos = mc.thePlayer.posY; + sneak$bridged = 0; + jump$bridged = 0; } @SubscribeEvent @@ -242,6 +255,32 @@ public void onRotation(RotationEvent event) { lastPitch = event.getPitch(); } + if (staticYaw.isToggled()) { + float delta = yaw % 45; + if (delta > 22.5 && delta <= 45) + yaw += 45 - delta; + else if (delta < -22.5 && delta >= -45) + yaw -= 45 + delta; + else if (delta <= 22.5 && delta > 0) + yaw -= delta; + else if (delta >= -22.5 && delta < 0) + yaw -= delta; + } + + if (reserveYaw.isToggled()) + yaw += 180; + + if (staticPitch.isToggled() && (staticPitchOnJump.isToggled() || mc.thePlayer.onGround)) { + double direction = MoveUtil.direction(); + double movingYaw = Math.round(direction / 45) * 45; + boolean isMovingStraight = movingYaw % 90 == 0f; + + if (isMovingStraight) + pitch = (float) straightPitch.getInput(); + else + pitch = (float) diagonalPitch.getInput(); + } + event.setYaw(lastYaw = instant ? yaw : AimSimulator.rotMove(yaw, lastYaw, (float) aimSpeed.getInput())); event.setPitch(lastPitch = instant ? pitch : AimSimulator.rotMove(pitch, lastPitch, (float) aimSpeed.getInput())); event.setMoveFix(moveFix.isToggled() ? RotationHandler.MoveFix.SILENT : RotationHandler.MoveFix.NONE); @@ -510,7 +549,7 @@ else if (fastScaffold.getInput() == 4 || fastScaffold.getInput() == 5) { if (recycleRotation.isToggled()) { Optional> placeSide = RotationUtils.getPlaceSide(targetPos); if (placeSide.isPresent()) { -// rayCasted = new MovingObjectPosition(placeSide.get().getRight().toVec3(), placeSide.get().getMiddle(), placeSide.get().getLeft()); + rayCasted = new MovingObjectPosition(placeSide.get().getRight().toVec3(), placeSide.get().getMiddle(), placeSide.get().getLeft()); placeYaw = PlayerRotation.getYaw(placeSide.get().getRight()); placePitch = PlayerRotation.getPitch(placeSide.get().getRight()); break; @@ -758,15 +797,7 @@ else if (moveStrafe < 0.0) { } } - if (reserveYaw.isToggled()) - yaw += 180; - - float finalYaw = mc.thePlayer.rotationYaw + yaw; - if (staticYaw.isToggled()) { - finalYaw -= finalYaw % 45; - } - - return finalYaw; + return mc.thePlayer.rotationYaw + yaw; } private @Nullable EnumFacingOffset getEnumFacing(final Vec3 position) { @@ -816,6 +847,14 @@ public void place(MovingObjectPosition block, boolean extra) { } } + if (jump.isToggled()) { + if (jump$bridged >= jumpEveryBlocks.getInput()) { + jump$bridged = 0; + if (mc.thePlayer.onGround) + mc.thePlayer.jump(); + } + } + ItemStack heldItem = SlotHandler.getHeldItem(); if (heldItem == null || !(heldItem.getItem() instanceof ItemBlock)) { return; @@ -823,7 +862,8 @@ public void place(MovingObjectPosition block, boolean extra) { if (rayCast.isToggled()) { MovingObjectPosition hitResult = RotationUtils.rayCast(4.5, RotationHandler.getRotationYaw(), RotationHandler.getRotationPitch()); - if (hitResult != null && hitResult.getBlockPos().equals(block.getBlockPos()) && hitResult.sideHit == block.sideHit) { + if (hitResult != null && hitResult.getBlockPos().equals(block.getBlockPos())) { + block.sideHit = hitResult.sideHit; block.hitVec = hitResult.hitVec; } else { return; @@ -839,6 +879,7 @@ public void place(MovingObjectPosition block, boolean extra) { if (mc.playerController.onPlayerRightClick(mc.thePlayer, mc.theWorld, heldItem, block.getBlockPos(), block.sideHit, block.hitVec)) { sneak$bridged++; + jump$bridged++; if (silentSwing.isToggled()) { mc.thePlayer.sendQueue.addToSendQueue(new C0APacketAnimation()); } diff --git a/src/main/java/keystrokesmod/module/impl/world/WaterBucket.java b/src/main/java/keystrokesmod/module/impl/world/WaterBucket.java index 22e39c86..eeb48cee 100644 --- a/src/main/java/keystrokesmod/module/impl/world/WaterBucket.java +++ b/src/main/java/keystrokesmod/module/impl/world/WaterBucket.java @@ -1,12 +1,13 @@ package keystrokesmod.module.impl.world; -import keystrokesmod.event.PreMotionEvent; +import keystrokesmod.event.PreUpdateEvent; +import keystrokesmod.event.RotationEvent; import keystrokesmod.module.Module; +import keystrokesmod.module.impl.other.RotationHandler; import keystrokesmod.module.impl.other.SlotHandler; -import keystrokesmod.module.impl.other.anticheats.utils.world.PlayerMove; import keystrokesmod.module.setting.impl.ButtonSetting; import keystrokesmod.module.setting.impl.SliderSetting; -import keystrokesmod.utility.MoveUtil; +import keystrokesmod.utility.AimSimulator; import keystrokesmod.utility.RotationUtils; import keystrokesmod.utility.Utils; import net.minecraft.entity.player.InventoryPlayer; @@ -18,43 +19,54 @@ import org.jetbrains.annotations.NotNull; public class WaterBucket extends Module { - private final SliderSetting latency; + private final SliderSetting aimSpeed; private final SliderSetting minDistance; private final ButtonSetting silentAim; private final ButtonSetting switchToItem; + private float lastPitch = -1; + public WaterBucket() { super("Water bucket", category.world, 0); - this.registerSetting(latency = new SliderSetting("Latency compensation", 0, 0, 200, 50)); + this.registerSetting(aimSpeed = new SliderSetting("Aim speed", 5, 5, 10, 0.1)); this.registerSetting(minDistance = new SliderSetting("Min distance", 3, 0, 20, 0.5)); this.registerSetting(silentAim = new ButtonSetting("Silent aim", true)); this.registerSetting(switchToItem = new ButtonSetting("Switch to item", true)); } @SubscribeEvent - public void onPreMotion(@NotNull PreMotionEvent e) { - double extraDistance = 0; - if (latency.getInput() > 0) { - for (int i = 0; i < (int) latency.getInput() / 50; i++) { - extraDistance += PlayerMove.predictedMotion(mc.thePlayer.motionY, i); + public void onPreUpdate(@NotNull PreUpdateEvent event) { + if (inPosition()) { + MovingObjectPosition rayCast = RotationUtils.rayCast(mc.playerController.getBlockReachDistance(), RotationHandler.getRotationYaw(), RotationHandler.getRotationPitch()); + if (rayCast != null && rayCast.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && holdWaterBucket(switchToItem.isToggled())) { + sendPlace(); } } + } - MovingObjectPosition rayCast = RotationUtils.rayCast(mc.playerController.getBlockReachDistance() + extraDistance, e.getYaw(), 90); - if (inPosition() && rayCast != null && rayCast.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && holdWaterBucket(switchToItem.isToggled())) { - if (silentAim.isToggled()) { - e.setPitch(90); - } - else { - mc.thePlayer.rotationPitch = 90; + @SubscribeEvent + public void onRotation(RotationEvent event) { + if (inPosition()) { + if (lastPitch == -1) { + lastPitch = event.getPitch(); } - sendPlace(); + + lastPitch = AimSimulator.rotMove(90, lastPitch, (float) aimSpeed.getInput()); + if (silentAim.isToggled()) + event.setPitch(lastPitch); + else + mc.thePlayer.rotationPitch = lastPitch; } } + @Override + public void onEnable() { + lastPitch = -1; + } + private boolean inPosition() { return !mc.thePlayer.capabilities.isFlying && !mc.thePlayer.capabilities.isCreativeMode - && !mc.thePlayer.onGround && !mc.thePlayer.isInWater() && mc.thePlayer.fallDistance >= minDistance.getInput(); + && !mc.thePlayer.onGround && !mc.thePlayer.isInWater() && mc.thePlayer.fallDistance >= minDistance.getInput() && !Utils.overVoid(); } private boolean holdWaterBucket(boolean setSlot) { diff --git a/src/main/java/keystrokesmod/module/setting/impl/ModeValue.java b/src/main/java/keystrokesmod/module/setting/impl/ModeValue.java index 6dc92762..6c96adf4 100644 --- a/src/main/java/keystrokesmod/module/setting/impl/ModeValue.java +++ b/src/main/java/keystrokesmod/module/setting/impl/ModeValue.java @@ -22,11 +22,15 @@ public class ModeValue extends Setting implements InputSetting { private final List> subModes = new ArrayList<>(); private int selected = 0; public ModeValue(String settingName, Module parent) { - super(settingName, () -> true); + this(settingName, parent, () -> true); + } + + public ModeValue(String settingName, Module parent, Supplier visibleCheck) { + super(settingName, visibleCheck); this.settingName = settingName; this.parent = parent; - } + public ModeValue add(final SubMode subMode) { if (subMode == null) return this; diff --git a/src/main/java/keystrokesmod/utility/MoveUtil.java b/src/main/java/keystrokesmod/utility/MoveUtil.java index 1911a6a6..5bc10e37 100644 --- a/src/main/java/keystrokesmod/utility/MoveUtil.java +++ b/src/main/java/keystrokesmod/utility/MoveUtil.java @@ -265,4 +265,13 @@ public static double predictedMotion(final double motion, final int ticks) { public static double jumpMotion() { return jumpBoostMotion(JUMP_HEIGHT); } + + public static double predictedMotionXZ(double motion, int tick) { + for (int i = 0; i < tick; i++) { + motion /= 0.5; + if (motion < 0.005) + return 0; + } + return motion; + } } diff --git a/src/main/java/keystrokesmod/utility/RotationUtils.java b/src/main/java/keystrokesmod/utility/RotationUtils.java index c4f3062b..a7fa63b4 100644 --- a/src/main/java/keystrokesmod/utility/RotationUtils.java +++ b/src/main/java/keystrokesmod/utility/RotationUtils.java @@ -145,16 +145,21 @@ public static float angle(final double n, final double n2) { return (float) (Math.atan2(n - mc.thePlayer.posX, n2 - mc.thePlayer.posZ) * 57.295780181884766 * -1.0); } - public static MovingObjectPosition rayCast(final double distance, final float yaw, final float pitch) { - final Vec3 getPositionEyes = mc.thePlayer.getPositionEyes(1.0f); + public static MovingObjectPosition rayCast(final Vec3 from, final double distance, final float yaw, final float pitch) { final float n4 = -yaw * 0.017453292f; final float n5 = -pitch * 0.017453292f; final float cos = MathHelper.cos(n4 - 3.1415927f); final float sin = MathHelper.sin(n4 - 3.1415927f); final float n6 = -MathHelper.cos(n5); final Vec3 vec3 = new Vec3(sin * n6, MathHelper.sin(n5), cos * n6); - return mc.theWorld.rayTraceBlocks(getPositionEyes, getPositionEyes.addVector(vec3.xCoord * distance, vec3.yCoord * distance, vec3.zCoord * distance), false, false, false); + return mc.theWorld.rayTraceBlocks(from, from.addVector(vec3.xCoord * distance, vec3.yCoord * distance, vec3.zCoord * distance), false, false, false); } + + public static MovingObjectPosition rayCast(final double distance, final float yaw, final float pitch) { + final Vec3 getPositionEyes = mc.thePlayer.getPositionEyes(1.0f); + return rayCast(getPositionEyes, distance, yaw, pitch); + } + public static MovingObjectPosition rayTraceCustom(double blockReachDistance, float yaw, float pitch) { final Vec3 vec3 = mc.thePlayer.getPositionEyes(1.0F); final Vec3 vec31 = getVectorForRotation(pitch, yaw); diff --git a/src/main/resources/assets/keystrokesmod/stafflists/BlocksMCDefault.txt b/src/main/resources/assets/keystrokesmod/stafflists/BlocksMCDefault.txt index fdb3122d..7849a874 100644 --- a/src/main/resources/assets/keystrokesmod/stafflists/BlocksMCDefault.txt +++ b/src/main/resources/assets/keystrokesmod/stafflists/BlocksMCDefault.txt @@ -693,4 +693,175 @@ yzed Iv2a _sadeq 1Meran +A2boD +vFahad_ +mufazzz +arbde +Webmasters +Vampirec +zAtTiLq +DirectPlan +PeerfectRod_ +1F5aMH___3oo +Aliiyah +deficency +EyesO_Diamond +F2rris +1flyn +Nadaa +Morninng +KinderBueno__ +bestleso +Reflxctively +ImMEHDI_ +Ixfaris_0 +Aymann_ +xfahadq +BoMshary +1Adam__ +ALMARDAWI +Postme +xL2d +DrugsOverdose +Om2r +0ayt +5ald_KSA +GsMrxDJ +GsOMAR +TryLat3rjAs +Ruwq +teddynicelol +MightyM7MD +itsjust24 +Jrx7 +Mwl4 +m7mdxjw +Jxicide +Vengeant +kieax +Mr_1990 +JustRois_ +CASHFL0WW +A3loosh +Neeres +luqqr +_1Dark +Werthly +1Khalid +LovelyMaram +dxs7 +1Az_ +0Strong +Y2sF +Morgan_So +z1HypersXz +MILG511 +tHeViZi +_Lsantoss +MVP11 +MightyFiras +xVerif +1Sharlock +whahahahahahaha +wallacce +BPEJ +GymIsTherapy +0Leqf +Ditraghxel +Claegness +catbisou +Attraactive +M5CS_ +Xx_ZeroMc_xX +_IxM +yyodey +K2reem +Dfivz +KingH0 +Time98 +rosulate +glowingsunsets +Yarin +OnlyK1nq +YOUVA +I_Shling +0PvP_ +FANOR_SYR +NamikazeMin4to +Bradenton +Watchdog +2lbk +m7xar +1LoST_ +Rikoshy +GsYousef +iidouble +5bzzz +Just_XYZ +TruthZ_ +Ovqrn +9lrv +_iMuslim_ +5loo +PavleDjajic +D7iiem +SweetyAlice +7amze__ +D_1V +Abo_3losh +Lyrnxx +1Pre +Peree +Everlqst +Gaboo6 +FastRank +Erosiion +EgaSS +Vanitas_0 +PoisonL +1Prometheus_ +Pogor +ixstorm_ +1MSA +AnotherHero +D3vi1Joex +38l_ba6n +izLORDeX +RAGHAVV +Impassivelly +Reixo +NotriousAsser +DasPukas_ +1Abd2llah +swhq +1ith +ArabPixel +Majd83 +Mxhesh +LIONMohamed +4T0_ +Mc_Suchter +Mo3Az1 +B7rl +TheCre4tor +ln5b +BasilFoto +einmeterhecht +BeFriends +1Sweet +Ev2n +xMz7 +xiDayzer +mohmad_q8 +Ceulla +Nshme +Firas +e9_ +1LaB +Bunkrat +0HqSon_ +0bowskills +Iv2a +_sadeq +1Meran A2boD \ No newline at end of file