Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
😝 mmc velo (stupid)
Browse files Browse the repository at this point in the history
you can use 0 100 on mmc velo mode and it will be perfectly fine for a while until it isnt fine
  • Loading branch information
Tryflle committed Nov 19, 2023
1 parent fcd62b1 commit 2f9dc32
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public Velocity() {

@SubscribeEvent
public void onPacket(me.tryfle.stormy.events.PacketEvent e) {
if (velomodes.getMode() != velomode.Normal) return;
if (velomodes.getMode() == velomode.Cancel || mc.thePlayer == null) return;
if (velomodes.getMode() == velomode.Minemen && mc.thePlayer.onGround) return;
if (!e.isOutgoing()) {
if (e.getPacket() instanceof S12PacketEntityVelocity) {
if (chance.getInput() != 100.0D) {
Expand All @@ -46,7 +47,7 @@ public void onPacket(me.tryfle.stormy.events.PacketEvent e) {
}

public void velo(me.tryfle.stormy.events.PacketEvent e) {
if (velomodes.getMode() != velomode.Normal) return;
if (velomodes.getMode() == velomode.Cancel) return;
S12PacketEntityVelocity packet = (S12PacketEntityVelocity) e.getPacket();
IS12PacketEntityVelocity accessorPacket = (IS12PacketEntityVelocity) packet;
accessorPacket.setMotionX((int) (packet.getMotionX() * horizontal.getInput()/100));
Expand All @@ -66,6 +67,6 @@ public void onPacketReceive(PacketEvent.Receive e) {
}

public enum velomode {
Normal, Cancel
Normal, Cancel, Minemen
}
}

0 comments on commit 2f9dc32

Please sign in to comment.