Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @SubscribeEvent
- public void OnTick(final TickEvent e) {
- if (Utility.getMinecraft().gameSettings.keyBindForward.getIsKeyPressed() || Utility.getMinecraft().gameSettings.keyBindLeft.getIsKeyPressed() || Utility.getMinecraft().gameSettings.keyBindRight.getIsKeyPressed() || Utility.getMinecraft().gameSettings.keyBindBack.getIsKeyPressed()) {
- Utility.getMinecraft();
- final float rotationYaw = Minecraft.thePlayer.rotationYaw;
- Utility.getMinecraft();
- final float n = rotationYaw + ((Minecraft.thePlayer.moveForward < 0.0f) ? 180 : 0);
- Utility.getMinecraft();
- float n4;
- if (Minecraft.thePlayer.moveStrafing > 0.0f) {
- final float n2 = -90.0f;
- Utility.getMinecraft();
- float n3;
- if (Minecraft.thePlayer.moveForward < 0.0f) {
- n3 = -0.5f;
- }
- else {
- Utility.getMinecraft();
- n3 = ((Minecraft.thePlayer.moveForward > 0.0f) ? 0.5f : 1.0f);
- }
- n4 = n2 * n3;
- }
- else {
- n4 = 0.0f;
- }
- final float n5 = n + n4;
- Utility.getMinecraft();
- float n8;
- if (Minecraft.thePlayer.moveStrafing < 0.0f) {
- final float n6 = -90.0f;
- Utility.getMinecraft();
- float n7;
- if (Minecraft.thePlayer.moveForward < 0.0f) {
- n7 = -0.5f;
- }
- else {
- Utility.getMinecraft();
- n7 = ((Minecraft.thePlayer.moveForward > 0.0f) ? 0.5f : 1.0f);
- }
- n8 = n6 * n7;
- }
- else {
- n8 = 0.0f;
- }
- final float direction = n5 - n8;
- 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);
- Utility.getMinecraft();
- if (Minecraft.thePlayer.motionY == 0.33319999363422365 && (Utility.getMinecraft().gameSettings.keyBindForward.getIsKeyPressed() || Utility.getMinecraft().gameSettings.keyBindLeft.getIsKeyPressed() || Utility.getMinecraft().gameSettings.keyBindRight.getIsKeyPressed() || Utility.getMinecraft().gameSettings.keyBindBack.getIsKeyPressed())) {
- Utility.getMinecraft();
- if (Minecraft.thePlayer.isPotionActive(Potion.moveSpeed)) {
- Utility.getMinecraft();
- Minecraft.thePlayer.motionX = xDir * 1.34;
- Utility.getMinecraft();
- Minecraft.thePlayer.motionZ = zDir * 1.34;
- }
- else {
- Utility.getMinecraft();
- Minecraft.thePlayer.motionX = xDir * 1.261;
- Utility.getMinecraft();
- Minecraft.thePlayer.motionZ = zDir * 1.261;
- }
- }
- }
- }
- private boolean canSpeed() {
- Utility.getMinecraft();
- if (!Minecraft.thePlayer.isOnLadder()) {
- Utility.getMinecraft();
- if (!Minecraft.thePlayer.isInWater()) {
- Utility.getMinecraft();
- if (!Minecraft.thePlayer.isSneaking()) {
- Utility.getMinecraft();
- if (Minecraft.thePlayer.motionX != 0.0) {
- Utility.getMinecraft();
- if (Minecraft.thePlayer.motionZ != 0.0 && !LongCock.moveUtils.isOnLiquid()) {
- return true;
- }
- }
- }
- }
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement