This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
forked from Strangerrrs/Raven-bS
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- [+] Add LowHop mode for Tower. - Thanks to @千夜小优. - [+] Add AutoHeal. - [+] Add HitSelect. - [+] Add SuperKnockback. - [+] Add Dynamic mode for Fakelag. - [※] Improve InvMove. - [※] Fix Criticals. - [+] Add showBPS option for LongJump. - [-] Remove WTap.
- Loading branch information
Showing
22 changed files
with
474 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
src/main/java/keystrokesmod/module/impl/combat/HitSelect.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package keystrokesmod.module.impl.combat; | ||
|
||
import keystrokesmod.event.PreUpdateEvent; | ||
import keystrokesmod.module.Module; | ||
import keystrokesmod.module.setting.impl.DescriptionSetting; | ||
import keystrokesmod.module.setting.impl.SliderSetting; | ||
import net.minecraftforge.event.entity.player.AttackEntityEvent; | ||
import net.minecraftforge.fml.common.eventhandler.EventPriority; | ||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
import static keystrokesmod.module.ModuleManager.hitSelect; | ||
|
||
public class HitSelect extends Module { | ||
private static long attackTime = -1; | ||
private final SliderSetting delay; | ||
private final SliderSetting chance; | ||
private static boolean currentShouldAttack = false; | ||
|
||
public HitSelect() { | ||
super("HitSelect", category.combat); | ||
this.registerSetting(new DescriptionSetting("chooses the best time to hit.")); | ||
this.registerSetting(delay = new SliderSetting("Delay", 500, 200, 750, 1)); | ||
this.registerSetting(chance = new SliderSetting("Chance", 80, 0, 100, 1)); | ||
} | ||
|
||
@SubscribeEvent(priority = EventPriority.LOWEST) | ||
public void onAttack(@NotNull AttackEntityEvent event) { | ||
attackTime = System.currentTimeMillis(); | ||
} | ||
|
||
@SubscribeEvent(priority = EventPriority.HIGHEST) | ||
public void onPreUpdate(PreUpdateEvent event) { | ||
currentShouldAttack = Math.random() > hitSelect.chance.getInput() || System.currentTimeMillis() - HitSelect.attackTime >= hitSelect.delay.getInput(); | ||
} | ||
|
||
public static boolean canAttack() { | ||
if (!hitSelect.isEnabled()) return true; | ||
if (currentShouldAttack) { | ||
HitSelect.attackTime = System.currentTimeMillis(); | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
|
||
public static boolean canSwing() { | ||
if (!hitSelect.isEnabled()) return true; | ||
return currentShouldAttack; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
src/main/java/keystrokesmod/module/impl/combat/SuperKnockback.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package keystrokesmod.module.impl.combat; | ||
|
||
import keystrokesmod.Raven; | ||
import keystrokesmod.module.Module; | ||
import keystrokesmod.module.impl.world.AntiBot; | ||
import keystrokesmod.module.setting.impl.ButtonSetting; | ||
import keystrokesmod.module.setting.impl.SliderSetting; | ||
import keystrokesmod.utility.Utils; | ||
import net.minecraft.client.settings.KeyBinding; | ||
import net.minecraft.entity.EntityLivingBase; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraftforge.event.entity.player.AttackEntityEvent; | ||
import net.minecraftforge.fml.common.eventhandler.EventPriority; | ||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; | ||
|
||
import java.util.concurrent.TimeUnit; | ||
|
||
public class SuperKnockback extends Module { | ||
private final SliderSetting chance; | ||
private final SliderSetting delay; | ||
private final SliderSetting rePressDelay; | ||
private long lastFinish = -1; | ||
private final ButtonSetting playersOnly; | ||
private final ButtonSetting sprintReset; | ||
private final ButtonSetting sneak; | ||
|
||
public SuperKnockback() { | ||
super("SuperKnockback", category.combat); | ||
this.registerSetting(chance = new SliderSetting("Chance", 100, 0, 100, 1, "%")); | ||
this.registerSetting(delay = new SliderSetting("Delay", 500, 200, 750, 1, "ms")); | ||
this.registerSetting(rePressDelay = new SliderSetting("Re-press delay", 100, 1, 500, 1, "ms")); | ||
this.registerSetting(playersOnly = new ButtonSetting("Players only", true)); | ||
this.registerSetting(sprintReset = new ButtonSetting("Sprint reset", true)); | ||
this.registerSetting(sneak = new ButtonSetting("Sneak", false)); | ||
} | ||
|
||
@SubscribeEvent(priority = EventPriority.HIGH) | ||
public void onAttack(AttackEntityEvent event) { | ||
final long currentTimeMillis = System.currentTimeMillis(); | ||
if (!Utils.nullCheck() || event.entityPlayer != mc.thePlayer || currentTimeMillis - lastFinish < delay.getInput()) return; | ||
if (playersOnly.isToggled() && !(event.target instanceof EntityPlayer)) return; | ||
else if (!(event.target instanceof EntityLivingBase)) return; | ||
if (((EntityLivingBase) event.target).deathTime != 0) return; | ||
if (AntiBot.isBot(event.target)) return; | ||
|
||
if (Math.random() > chance.getInput()) return; | ||
// code | ||
if (sprintReset.isToggled() && mc.gameSettings.keyBindForward.isKeyDown()) { | ||
KeyBinding.setKeyBindState(mc.gameSettings.keyBindForward.getKeyCode(), false); | ||
Raven.getExecutor().schedule(() -> KeyBinding.setKeyBindState(mc.gameSettings.keyBindForward.getKeyCode(), true), | ||
(long) rePressDelay.getInput(), TimeUnit.MILLISECONDS); | ||
} | ||
if (sneak.isToggled() && !mc.gameSettings.keyBindSneak.isKeyDown()) { | ||
KeyBinding.setKeyBindState(mc.gameSettings.keyBindSneak.getKeyCode(), true); | ||
Raven.getExecutor().schedule(() -> KeyBinding.setKeyBindState(mc.gameSettings.keyBindSneak.getKeyCode(), false), | ||
(long) rePressDelay.getInput(), TimeUnit.MILLISECONDS); | ||
} | ||
|
||
lastFinish = currentTimeMillis; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
38 changes: 33 additions & 5 deletions
38
src/main/java/keystrokesmod/module/impl/movement/InvMove.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.