diff --git a/src/main/java/me/rigamortis/seppuku/impl/module/movement/ElytraFlyModule.java b/src/main/java/me/rigamortis/seppuku/impl/module/movement/ElytraFlyModule.java index 1d559da..dd38e9b 100644 --- a/src/main/java/me/rigamortis/seppuku/impl/module/movement/ElytraFlyModule.java +++ b/src/main/java/me/rigamortis/seppuku/impl/module/movement/ElytraFlyModule.java @@ -25,7 +25,7 @@ public final class ElytraFlyModule extends Module { public final Value mode = new Value("Mode", new String[]{"Mode", "M"}, "Mode to use for elytra flight.", Mode.VANILLA); private enum Mode { - VANILLA, PACKET, BYPASS + VANILLA, PACKET, BYPASS, CONTROL } public final Value speed = new Value("Speed", new String[]{"Spd"}, "Speed multiplier for elytra flight, higher values equals more speed.", 1.0f, 0.0f, 5.0f, 0.01f); @@ -159,6 +159,42 @@ public final class ElytraFlyModule extends Module { mc.player.motionZ = 0; } break; + case CONTROL: + if (mc.gameSettings.keyBindJump.isKeyDown()) { + mc.player.motionY = this.speed.getValue() / 2; + } else if (mc.gameSettings.keyBindSneak.isKeyDown()) { + mc.player.motionY = -this.speed.getValue() / 2; + } else { + mc.player.motionY = 0; + } + + if (mc.gameSettings.keyBindForward.isKeyDown()) { + mc.player.motionX = -Math.sin(rotationYaw) * this.speed.getValue(); + mc.player.motionZ = Math.cos(rotationYaw) * this.speed.getValue(); + } else if (mc.gameSettings.keyBindBack.isKeyDown()) { + mc.player.motionX = Math.sin(rotationYaw) * this.speed.getValue(); + mc.player.motionZ = -Math.cos(rotationYaw) * this.speed.getValue(); + } else if (mc.gameSettings.keyBindRight.isKeyDown()) { + if (rotationYaw/90%2==1) { + mc.player.motionX = Math.cos(rotationYaw) * this.speed.getValue(); + mc.player.motionZ = Math.sin(rotationYaw) * this.speed.getValue(); + } else { + mc.player.motionX = -Math.cos(rotationYaw) * this.speed.getValue(); + mc.player.motionZ = -Math.sin(rotationYaw) * this.speed.getValue(); + } + } else if (mc.gameSettings.keyBindLeft.isKeyDown()) { + if (rotationYaw/90%2==1) { + mc.player.motionX = -Math.cos(rotationYaw) * this.speed.getValue(); + mc.player.motionZ = -Math.sin(rotationYaw) * this.speed.getValue(); + } else { + mc.player.motionX = Math.cos(rotationYaw) * this.speed.getValue(); + mc.player.motionZ = Math.sin(rotationYaw) * this.speed.getValue(); + } + } else { + mc.player.motionX = 0; + mc.player.motionZ = 0; + } + break; } }