Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.Eagler.Yay.module.modules.movement;
- import me.Eagler.Yay.module.*;
- import me.Eagler.Yay.utils.*;
- import java.awt.*;
- import java.util.*;
- import me.Eagler.Yay.*;
- import de.Hero.settings.*;
- import me.Eagler.Yay.gui.*;
- import net.minecraft.util.*;
- import net.minecraft.potion.*;
- import net.minecraft.client.entity.*;
- public class Speed extends Module
- {
- public static boolean isenabled;
- public static TimeHelper time;
- static {
- Speed.time = new TimeHelper();
- }
- public Speed() {
- super("Speed", Color.WHITE.getRGB(), 0, Module.Category.MOVEMENT);
- final ArrayList<String> options = new ArrayList<String>();
- options.add("AAC");
- options.add("NCPHop");
- options.add("YPort");
- options.add("Long");
- options.add("Mineplex");
- options.add("TestBhop")
- Yay.setmgr.rSetting(new Setting("SpeedMode", (Module)this, "AAC", (ArrayList)options));
- }
- public void onEnabled() {
- if (GuiLogin.rank.equalsIgnoreCase("bronze")) {
- Speed.mc.thePlayer.addChatComponentMessage((IChatComponent)new ChatComponentText(String.valueOf(Yay.getPrefix()) + "§cDies ist ein §7Silber §fFeature."));
- Speed.mc.thePlayer.addChatComponentMessage((IChatComponent)new ChatComponentText(String.valueOf(Yay.getPrefix()) + "§cUm deine Version zu §cupgraden melde dich auf §cSkype §cbei §cdem §cEntwickler."));
- this.setEnabled(false);
- }
- }
- public void onUpdate() {
- if (this.isEnabled()) {
- if (Yay.setmgr.getSettingByName("SpeedMode").getValString().equalsIgnoreCase("AAC")) {
- this.setTag("Speed §7AAC");
- if (Speed.mc.gameSettings.keyBindForward.pressed && !Speed.mc.thePlayer.isCollidedHorizontally) {
- Speed.mc.gameSettings.keyBindJump.pressed = false;
- if (Speed.mc.thePlayer.onGround) {
- Speed.mc.thePlayer.jump();
- Speed.mc.thePlayer.motionY = 0.41;
- Speed.mc.timer.timerSpeed = 1.0f;
- }
- else {
- Speed.mc.timer.timerSpeed = 1.01f;
- final EntityPlayerSP thePlayer = Speed.mc.thePlayer;
- thePlayer.motionX *= 1.00600004196167;
- final EntityPlayerSP thePlayer2 = Speed.mc.thePlayer;
- thePlayer2.motionZ *= 1.00600004196167;
- }
- }
- }
- else if (Yay.setmgr.getSettingByName("SpeedMode").getValString().equalsIgnoreCase("NCPHop")) {
- this.setTag("Speed §7NCPHop");
- Speed.mc.gameSettings.keyBindJump.pressed = false;
- if (Speed.mc.thePlayer == null || Speed.mc.theWorld == null) {
- return;
- }
- if (Speed.mc.thePlayer.onGround) {
- Speed.isenabled = true;
- }
- if ((Speed.mc.gameSettings.keyBindForward.pressed || Speed.mc.gameSettings.keyBindBack.pressed || Speed.mc.gameSettings.keyBindLeft.pressed || Speed.mc.gameSettings.keyBindRight.pressed) && Speed.mc.thePlayer.onGround && !Speed.mc.thePlayer.isCollidedHorizontally) {
- Speed.mc.thePlayer.distanceWalkedModified = 0.0f;
- Speed.mc.thePlayer.jump();
- Speed.isenabled = true;
- }
- if (Speed.mc.thePlayer.isAirBorne && !Speed.mc.gameSettings.keyBindJump.pressed) {
- Speed.mc.thePlayer.onGround = true;
- final EntityPlayerSP thePlayer3 = Speed.mc.thePlayer;
- thePlayer3.motionX *= 1.0;
- Speed.mc.thePlayer.onGround = false;
- final EntityPlayerSP thePlayer4 = Speed.mc.thePlayer;
- thePlayer4.motionZ *= 1.0;
- Speed.mc.thePlayer.onGround = true;
- Speed.isenabled = false;
- }
- }
- else if (Yay.setmgr.getSettingByName("SpeedMode").getValString().equalsIgnoreCase("YPort")) {
- this.setTag("Speed §7YPort");
- if (Speed.mc.gameSettings.keyBindForward.pressed && !Speed.mc.thePlayer.isCollidedHorizontally) {
- Speed.mc.gameSettings.keyBindJump.pressed = false;
- if (Speed.mc.thePlayer.onGround) {
- Speed.mc.thePlayer.jump();
- Speed.mc.timer.timerSpeed = 1.0f;
- }
- else {
- Speed.mc.thePlayer.motionY = -1.0;
- Speed.mc.timer.timerSpeed = 3.5f;
- }
- }
- }
- else if (Yay.setmgr.getSettingByName("SpeedMode").getValString().equalsIgnoreCase("Long")) {
- this.setTag("Speed §7Long");
- Speed.mc.gameSettings.keyBindJump.pressed = false;
- if (Speed.mc.gameSettings.keyBindForward.getIsKeyPressed() || Speed.mc.gameSettings.keyBindLeft.getIsKeyPressed() || Speed.mc.gameSettings.keyBindRight.getIsKeyPressed() || Speed.mc.gameSettings.keyBindBack.getIsKeyPressed()) {
- if (Speed.mc.thePlayer.onGround) {
- Speed.mc.thePlayer.jump();
- }
- final float direction = Speed.mc.thePlayer.rotationYaw + ((Speed.mc.thePlayer.moveForward < 0.0f) ? 180 : 0) + ((Speed.mc.thePlayer.moveStrafing > 0.0f) ? (-90.0f * ((Speed.mc.thePlayer.moveForward < 0.0f) ? -0.5f : ((Speed.mc.thePlayer.moveForward > 0.0f) ? 0.5f : 1.0f))) : 0.0f) - ((Speed.mc.thePlayer.moveStrafing < 0.0f) ? (-90.0f * ((Speed.mc.thePlayer.moveForward < 0.0f) ? -0.5f : ((Speed.mc.thePlayer.moveForward > 0.0f) ? 0.5f : 1.0f))) : 0.0f);
- final float xDir = (float)Math.cos((direction + 90.0f) * 3.141592653589793 / 180.0);
- final float zDir = (float)Math.sin((direction + 90.0f) * 3.141592653589793 / 180.0);
- if (Speed.mc.thePlayer.isCollidedVertically && (Speed.mc.gameSettings.keyBindForward.getIsKeyPressed() || Speed.mc.gameSettings.keyBindLeft.getIsKeyPressed() || Speed.mc.gameSettings.keyBindRight.getIsKeyPressed() || Speed.mc.gameSettings.keyBindBack.getIsKeyPressed())) {
- Speed.mc.thePlayer.motionX = xDir * 0.29f;
- Speed.mc.thePlayer.motionZ = zDir * 0.29f;
- }
- if (Speed.mc.thePlayer.motionY == 0.33319999363422365 && (Speed.mc.gameSettings.keyBindForward.getIsKeyPressed() || Speed.mc.gameSettings.keyBindLeft.getIsKeyPressed() || Speed.mc.gameSettings.keyBindRight.getIsKeyPressed() || Speed.mc.gameSettings.keyBindBack.getIsKeyPressed())) {
- if (Speed.mc.thePlayer.isPotionActive(Potion.moveSpeed)) {
- Speed.mc.thePlayer.motionX = xDir * 0.34;
- Speed.mc.thePlayer.motionZ = zDir * 0.34;
- }
- else {
- Speed.mc.thePlayer.motionX = xDir * 0.541;
- Speed.mc.thePlayer.motionZ = zDir * 0.541;
- }
- }
- }
- }
- else if (Yay.setmgr.getSettingByName("SpeedMode").getValString().equalsIgnoreCase("Mineplex")) {
- this.setTag("Speed §7Mineplex");
- Speed.mc.gameSettings.keyBindJump.pressed = false;
- if (Speed.mc.thePlayer == null || Speed.mc.theWorld == null) {
- return;
- }
- if (Speed.mc.thePlayer.onGround) {
- Speed.isenabled = true;
- }
- if ((Speed.mc.gameSettings.keyBindForward.pressed || Speed.mc.gameSettings.keyBindBack.pressed || Speed.mc.gameSettings.keyBindLeft.pressed || Speed.mc.gameSettings.keyBindRight.pressed) && Speed.mc.thePlayer.onGround && !Speed.mc.thePlayer.isCollidedHorizontally) {
- Speed.mc.thePlayer.distanceWalkedModified = 0.0f;
- Speed.mc.thePlayer.jump();
- Speed.isenabled = true;
- }
- if (Speed.mc.thePlayer.isAirBorne && !Speed.mc.gameSettings.keyBindJump.pressed) {
- Speed.mc.thePlayer.onGround = true;
- final EntityPlayerSP thePlayer5 = Speed.mc.thePlayer;
- thePlayer5.motionX *= 1.2;
- Speed.mc.thePlayer.onGround = false;
- final EntityPlayerSP thePlayer6 = Speed.mc.thePlayer;
- thePlayer6.motionZ *= 1.2;
- Speed.mc.thePlayer.onGround = true;
- Speed.isenabled = false;
- }
- }
- }
- }
- public void onUpdate() {
- if (this.isEnabled()) {
- if (Yay.setmgr.getSettingByName("SpeedMode").getValString().equalsIgnoreCase("TestBhop")) {
- this.setTag("Speed §7TestBhop");
- if (Speed.mc.gameSettings.keyBindForward.pressed && !Speed.mc.thePlayer.isCollidedHorizontally) {
- Speed.mc.gameSettings.keyBindJump.pressed = false;
- if (Speed.mc.thePlayer.onGround) {
- Speed.mc.thePlayer.jump();
- Speed.mc.thePlayer.motionY = 0.41;
- Speed.mc.timer.timerSpeed = 1.5f;
- Speed.mc.thePlayer.motionX = 0.5
- public void onDisabled() {
- Speed.mc.timer.timerSpeed = 1.0f;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement