Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Speed
package me.Eagler.Yay.module.modules.movement; import de.Hero.settings.Setting; import de.Hero.settings.SettingsManager; import java.awt.Color; import java.util.ArrayList; import me.Eagler.Yay.Yay; import me.Eagler.Yay.gui.GuiLogin; import me.Eagler.Yay.module.Module; import me.Eagler.Yay.module.Module.Category; import me.Eagler.Yay.utils.TimeHelper; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.settings.GameSettings; import net.minecraft.client.settings.KeyBinding; import net.minecraft.util.ChatComponentText; public class Speed extends Module { public static boolean isenabled; public static TimeHelper time = new TimeHelper(); public Speed() { super("Speed", Color.WHITE.getRGB(), 0, Module.Category.MOVEMENT); ArrayList<String> options = new ArrayList(); options.add("AAC"); options.add("NCPHop"); options.add("YPort"); options.add("Long"); options.add("Mineplex"); Yay.setmgr.rSetting(new Setting("SpeedMode", this, "AAC", options)); } public void onEnabled() { if (GuiLogin.rank.equalsIgnoreCase("bronze")) { mcthePlayer.addChatComponentMessage(new ChatComponentText(Yay.getPrefix() + "§cDies ist ein §7Silber §fFeature.")); mcthePlayer.addChatComponentMessage(new ChatComponentText(Yay.getPrefix() + "§cUm deine Version zu §cupgraden melde dich auf §cSkype §cbei §cdem §cEntwickler.")); setEnabled(false); } } public void onUpdate() { if (isEnabled()) { if (Yay.setmgr.getSettingByName("SpeedMode").getValString().equalsIgnoreCase("AAC")) { setTag("Speed §7AAC"); if ((mcgameSettings.keyBindForward.pressed) && (!mcthePlayer.isCollidedHorizontally)) { mcgameSettings.keyBindJump.pressed = false; if (mcthePlayer.onGround) { mcthePlayer.jump(); mcthePlayer.motionY = 0.41D; mctimer.timerSpeed = 1.0F; } else { mctimer.timerSpeed = 1.01F; mcthePlayer.motionX *= 1.00600004196167D; mcthePlayer.motionZ *= 1.00600004196167D; } } } else if (Yay.setmgr.getSettingByName("SpeedMode").getValString().equalsIgnoreCase("NCPHop")) { setTag("Speed §7NCPHop"); mcgameSettings.keyBindJump.pressed = false; if ((mcthePlayer == null) || (mctheWorld == null)) { return; } if (mcthePlayer.onGround) { isenabled = true; } if (((mcgameSettings.keyBindForward.pressed) || (mcgameSettings.keyBindBack.pressed) || (mcgameSettings.keyBindLeft.pressed) || (mcgameSettings.keyBindRight.pressed)) && (mcthePlayer.onGround) && (!mcthePlayer.isCollidedHorizontally)) { mcthePlayer.distanceWalkedModified = 0.0F; mcthePlayer.jump(); isenabled = true; } if ((mcthePlayer.isAirBorne) && (!mcgameSettings.keyBindJump.pressed)) { mcthePlayer.onGround = true; mcthePlayer.motionX *= 1.0D; mcthePlayer.onGround = false; mcthePlayer.motionZ *= 1.0D; mcthePlayer.onGround = true; isenabled = false; } } else if (Yay.setmgr.getSettingByName("SpeedMode").getValString().equalsIgnoreCase("YPort")) { setTag("Speed §7YPort"); if ((mcgameSettings.keyBindForward.pressed) && (!mcthePlayer.isCollidedHorizontally)) { mcgameSettings.keyBindJump.pressed = false; if (mcthePlayer.onGround) { mcthePlayer.jump(); mctimer.timerSpeed = 1.0F; } else { mcthePlayer.motionY = -1.0D; mctimer.timerSpeed = 3.5F; } } } else if (Yay.setmgr.getSettingByName("SpeedMode").getValString().equalsIgnoreCase("Long")) { setTag("Speed §7Long"); mcgameSettings.keyBindJump.pressed = false; if ((mcgameSettings.keyBindForward.getIsKeyPressed()) || (mcgameSettings.keyBindLeft.getIsKeyPressed()) || (mcgameSettings.keyBindRight.getIsKeyPressed()) || (mcgameSettings.keyBindBack.getIsKeyPressed())) { if (mcthePlayer.onGround) { mcthePlayer.jump(); } float direction = mcthePlayer.rotationYaw + (mcthePlayer.moveForward < 0.0F ? 180 : 0) + (mcthePlayer.moveStrafing > 0.0F ? -90.0F * (mcthePlayer.moveForward > 0.0F ? 0.5F : mcthePlayer.moveForward < 0.0F ? -0.5F : 1.0F) : 0.0F) - (mcthePlayer.moveStrafing < 0.0F ? -90.0F * (mcthePlayer.moveForward > 0.0F ? 0.5F : mcthePlayer.moveForward < 0.0F ? -0.5F : 1.0F) : 0.0F); float xDir = (float)Math.cos((direction + 90.0F) * 3.141592653589793D / 180.0D); float zDir = (float)Math.sin((direction + 90.0F) * 3.141592653589793D / 180.0D); if ((mcthePlayer.isCollidedVertically) && ((mcgameSettings.keyBindForward.getIsKeyPressed()) || (mcgameSettings.keyBindLeft.getIsKeyPressed()) || (mcgameSettings.keyBindRight.getIsKeyPressed()) || (mcgameSettings.keyBindBack.getIsKeyPressed()))) { mcthePlayer.motionX = (xDir * 0.29F); mcthePlayer.motionZ = (zDir * 0.29F); } if ((mcthePlayer.motionY == 0.33319999363422365D) && ((mcgameSettings.keyBindForward.getIsKeyPressed()) || (mcgameSettings.keyBindLeft.getIsKeyPressed()) || (mcgameSettings.keyBindRight.getIsKeyPressed()) || (mcgameSettings.keyBindBack.getIsKeyPressed()))) { if (mcthePlayer.isPotionActive(net.minecraft.potion.Potion.moveSpeed)) { mcthePlayer.motionX = (xDir * 0.34D); mcthePlayer.motionZ = (zDir * 0.34D); } else { mcthePlayer.motionX = (xDir * 0.541D); mcthePlayer.motionZ = (zDir * 0.541D); } } } } else if (Yay.setmgr.getSettingByName("SpeedMode").getValString().equalsIgnoreCase("Mineplex")) { setTag("Speed §7Mineplex"); mcgameSettings.keyBindJump.pressed = false; if ((mcthePlayer == null) || (mctheWorld == null)) { return; } if (mcthePlayer.onGround) { isenabled = true; } if (((mcgameSettings.keyBindForward.pressed) || (mcgameSettings.keyBindBack.pressed) || (mcgameSettings.keyBindLeft.pressed) || (mcgameSettings.keyBindRight.pressed)) && (mcthePlayer.onGround) && (!mcthePlayer.isCollidedHorizontally)) { mcthePlayer.distanceWalkedModified = 0.0F; mcthePlayer.jump(); isenabled = true; } if ((mcthePlayer.isAirBorne) && (!mcgameSettings.keyBindJump.pressed)) { mcthePlayer.onGround = true; mcthePlayer.motionX *= 1.2D; mcthePlayer.onGround = false; mcthePlayer.motionZ *= 1.2D; mcthePlayer.onGround = true; isenabled = false; } } } } public void onDisabled() { mctimer.timerSpeed = 1.0F; } }
run
|
edit
|
history
|
help
0
assign
Alllocate and release memory
pourWater
1
luas
jb14 isEven Links
Just numbers
class and name
Геттеры и сеттеры для класса Dog
jb12.0 threads.enums