This repository has been archived by the owner on Mar 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Snoworange420
committed
Dec 9, 2022
1 parent
25e0a7a
commit 17288a0
Showing
5 changed files
with
103 additions
and
33 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
62 changes: 62 additions & 0 deletions
62
src/main/java/com/snoworange/mousse/module/modules/movement/MotionTP32k.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,62 @@ | ||
package com.snoworange.mousse.module.modules.movement; | ||
|
||
import com.snoworange.mousse.module.Category; | ||
import com.snoworange.mousse.module.Module; | ||
import com.snoworange.mousse.setting.settings.BooleanSetting; | ||
import com.snoworange.mousse.setting.settings.NumberSetting; | ||
import net.minecraft.network.play.client.CPacketPlayer; | ||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; | ||
import net.minecraftforge.fml.common.gameevent.TickEvent; | ||
|
||
public class MotionTP32k extends Module { | ||
|
||
public MotionTP32k() { | ||
super("32kMotionTP", "just modifies your motionY and stuff so you rubberband", Category.MOVEMENT); | ||
} | ||
|
||
public boolean startFlag; | ||
public int delay = 0; | ||
|
||
BooleanSetting invalidpacket; | ||
NumberSetting teleportDelay; | ||
|
||
@Override | ||
public void onEnable() { | ||
super.onEnable(); | ||
|
||
startFlag = false; | ||
} | ||
|
||
@Override | ||
public void onDisable() { | ||
super.onDisable(); | ||
|
||
startFlag = true; | ||
delay = 0; | ||
} | ||
|
||
@Override | ||
public void init() { | ||
super.init(); | ||
|
||
teleportDelay = new NumberSetting("Motion Length Ticks", 5, 0, 1, 1); | ||
invalidpacket = new BooleanSetting("Invalid Packet", false); | ||
addSetting(teleportDelay, invalidpacket); | ||
} | ||
|
||
@SubscribeEvent | ||
public void onTick(TickEvent.ClientTickEvent event) { | ||
|
||
if (startFlag) { | ||
mc.player.motionY = 4; | ||
|
||
++delay; | ||
|
||
if (delay >= teleportDelay.getValue()) { | ||
startFlag = false; | ||
|
||
if (invalidpacket.isEnable()) mc.player.connection.sendPacket(new CPacketPlayer.Position(mc.player.posX, 1337.0, mc.player.posZ, mc.player.onGround)); | ||
} | ||
} | ||
} | ||
} |
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