From f57c18787e199ead0914707151ef139fff464566 Mon Sep 17 00:00:00 2001 From: cookiedragon234 Date: Sun, 27 Oct 2019 21:35:01 +0000 Subject: [PATCH] Add pulldown --- .../impl/management/ModuleManager.java | 1 + .../impl/module/movement/PullDownModule.java | 51 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 src/main/java/me/rigamortis/seppuku/impl/module/movement/PullDownModule.java diff --git a/src/main/java/me/rigamortis/seppuku/impl/management/ModuleManager.java b/src/main/java/me/rigamortis/seppuku/impl/management/ModuleManager.java index d89fbbc..85d7b8e 100644 --- a/src/main/java/me/rigamortis/seppuku/impl/management/ModuleManager.java +++ b/src/main/java/me/rigamortis/seppuku/impl/management/ModuleManager.java @@ -137,6 +137,7 @@ public final class ModuleManager { add(new DiscordBypassModule()); add(new HolesModule()); add(new SmallShieldModule()); + add(new PullDownModule()); this.loadExternalModules(); } diff --git a/src/main/java/me/rigamortis/seppuku/impl/module/movement/PullDownModule.java b/src/main/java/me/rigamortis/seppuku/impl/module/movement/PullDownModule.java new file mode 100644 index 0000000..5ffe0b3 --- /dev/null +++ b/src/main/java/me/rigamortis/seppuku/impl/module/movement/PullDownModule.java @@ -0,0 +1,51 @@ +package me.rigamortis.seppuku.impl.module.movement; + +import me.rigamortis.seppuku.api.event.EventStageable; +import me.rigamortis.seppuku.api.event.player.EventPlayerUpdate; +import me.rigamortis.seppuku.api.module.Module; +import me.rigamortis.seppuku.api.value.NumberValue; +import net.minecraft.client.Minecraft; +import team.stiff.pomelo.impl.annotated.handler.annotation.Listener; + +/** + * @author cookiedragon234 + * (cookiedragon234 owns me and all) + * also buy backdoored client kk thx + */ +public class PullDownModule extends Module +{ + public PullDownModule() + { + super("PullDown", new String[]{"FastFall"}, "Increase your downwards velocity when falling", "NONE", -1, ModuleType.MOVEMENT); + } + + public final NumberValue speed = new NumberValue<>("Speed", new String[]{"velocity"}, 10f, Float.class, 0f, 20f, 1f); + + @Listener + public void onUpdate(EventPlayerUpdate event) + { + if (event.getStage() == EventStageable.EventStage.PRE) + { + final Minecraft mc = Minecraft.getMinecraft(); + + // obvs dont do this when flying or when using elytras + if(mc.player.isElytraFlying() || mc.player.capabilities.isFlying || mc.player.onGround) return; + + // dont trigger when they could just be jumping, 3 blocks is maybe overkill? But its probably the best thing to do + boolean isBlockBelow = + !mc.world.isAirBlock(mc.player.getPosition().add(0, -1, 0)) + || + !mc.world.isAirBlock(mc.player.getPosition().add(0, -2, 0)) + || + !mc.world.isAirBlock(mc.player.getPosition().add(0, -3, 0)) + ; + + if(!isBlockBelow) + { + // Pull the player down + mc.player.motionY = -(speed.getFloat()); + // kk thx that ends epic module bsb on top + } + } + } +}