forked from Strangerrrs/Raven-bS
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
523 additions
and
299 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
38 changes: 38 additions & 0 deletions
38
src/main/java/keystrokesmod/module/impl/exploit/Regen.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,38 @@ | ||
package keystrokesmod.module.impl.exploit; | ||
|
||
import keystrokesmod.event.PreMotionEvent; | ||
import keystrokesmod.module.Module; | ||
import keystrokesmod.module.setting.impl.ButtonSetting; | ||
import keystrokesmod.module.setting.impl.SliderSetting; | ||
import keystrokesmod.utility.PacketUtils; | ||
import net.minecraft.network.play.client.C03PacketPlayer; | ||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; | ||
|
||
public class Regen extends Module { | ||
private final SliderSetting speed; | ||
private final SliderSetting minHealth; | ||
private final ButtonSetting notInAir; | ||
private final ButtonSetting groundSpoof; | ||
|
||
public Regen() { | ||
super("Regen", category.exploit); | ||
this.registerSetting(speed = new SliderSetting("Speed", 10, 1, 200, 1, "x")); | ||
this.registerSetting(minHealth = new SliderSetting("Min health", 15, 5, 40, 1)); | ||
this.registerSetting(notInAir = new ButtonSetting("Not in air", false)); | ||
this.registerSetting(groundSpoof = new ButtonSetting("Ground spoof", false)); | ||
} | ||
|
||
@SubscribeEvent | ||
public void onPreMotion(PreMotionEvent event) { | ||
if (mc.thePlayer.getHealth() > minHealth.getInput()) return; | ||
if (notInAir.isToggled() && !mc.thePlayer.onGround) return; | ||
|
||
for (int i = 0; i < speed.getInput(); i++) { | ||
if (groundSpoof.isToggled()) { | ||
PacketUtils.sendPacket(new C03PacketPlayer(true)); | ||
} else { | ||
PacketUtils.sendPacket(new C03PacketPlayer(event.isOnGround())); | ||
} | ||
} | ||
} | ||
} |
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.