Исходник SunRise Elytra Fly [WexSide-ready]

Начинающий
Статус
Оффлайн
Регистрация
22 Янв 2023
Сообщения
5
Реакции[?]
0
Поинты[?]
0

Перед прочтением основного контента ниже, пожалуйста, обратите внимание на обновление внутри секции Майна на нашем форуме. У нас появились:

  • бесплатные читы для Майнкрафт — любое использование на свой страх и риск;
  • маркетплейс Майнкрафт — абсолютно любая коммерция, связанная с игрой, за исключением продажи читов (аккаунты, предоставления услуг, поиск кодеров читов и так далее);
  • приватные читы для Minecraft — в этом разделе только платные хаки для игры, покупайте группу "Продавец" и выставляйте на продажу свой софт;
  • обсуждения и гайды — всё тот же раздел с вопросами, но теперь модернизированный: поиск нужных хаков, пати с игроками-читерами и другая полезная информация.

Спасибо!

ElytraFly.java:
package ru.wendoxd.modules.impl.movement;

import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.inventory.ClickType;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.CPacketEntityAction;
import ru.wendoxd.events.Event;
import ru.wendoxd.events.impl.menu.EventSwapState;
import ru.wendoxd.modules.Module;
import ru.wendoxd.modules.impl.combat.Aura;
import ru.wendoxd.modules.impl.combat.TargetStrafe;
import ru.wendoxd.ui.menu.elements.Frame;
import ru.wendoxd.ui.menu.elements.tabelements.CheckBox;
import ru.wendoxd.ui.menu.elements.tabelements.PrimaryButton;
import ru.wendoxd.ui.menu.elements.tabelements.SelectBox;
import ru.wendoxd.ui.menu.elements.tabelements.Slider;
import ru.wendoxd.ui.menu.utils.MenuAPI;
import ru.wendoxd.utils.misc.ChatUtils;
import ru.wendoxd.utils.player.MoveUtils;

public class ElytraFly extends Module {
  int eIndex = -1;
 
  private static int boostTicks;
 
  private int lastSlot;
 
  private Frame ElytraFly_frame = new Frame("ElytraFly");
 
  public static Slider speed = new Slider("Speed", 2, 0.1D, 2.0D, 0.9D, () -> Boolean.valueOf(true));
 
  public Slider motion = new Slider("MotionY", 2, 0.0D, 1.0D, 0.3D, () -> Boolean.valueOf(true));
 
  public Slider motion2 = new Slider(", 2, 0.0D, 1.0D, 0.3D, () -> Boolean.valueOf(true));
 
  private SelectBox mode = new SelectBox("Mode", new String[] { "Minced_Hard", "Minced_Safe", "Expensive", "NoomFast", "NoomKakish" }, () -> Boolean.valueOf(ElytraFly.isEnabled(true)));
 
  public static CheckBox ElytraFly = (new CheckBox("ElytraFly")).markArrayList("ElytraFly");
 
  protected void initSettings() {
    ElytraFly.markSetting("ElytraFly");
    this.ElytraFly_frame.register(new PrimaryButton[] { (PrimaryButton)ElytraFly, (PrimaryButton)this.mode, (PrimaryButton)speed, (PrimaryButton)this.motion, (PrimaryButton)this.motion2 });
    MenuAPI.movement.register(this.ElytraFly_frame);
  }
 
  public void onEvent(Event event) {
    if (ElytraFly.isEnabled(false) &&
      event instanceof ru.wendoxd.events.impl.player.EventUpdate)
      if (this.mode.get() == 2) {
        if (mc.player.onGround) {
          mc.player.jump();
          boostTicks = 0;
        }
        if (mc.player.ticksExisted % 2 == 0)
          mc.getConnection().sendPacket((Packet)new CPacketEntityAction((Entity)mc.player, CPacketEntityAction.Action.START_FALL_FLYING));
        if (mc.player.isAirBorne) {
          boostTicks++;
          if (!TargetStrafe.isTryingToTarget())
            MoveUtils.setSpeed(speed.getFloatValue());
          if (!mc.player.isSneaking() && mc.gameSettings.keyBindJump.pressed) {
            mc.player.motionY = this.motion.getFloatValue();
          } else if (mc.gameSettings.keyBindSneak.isKeyDown()) {
            mc.player.motionY = -this.motion.getFloatValue();
          } else {
            mc.player.motionY = (mc.player.ticksExisted % 2 != 0) ? -this.motion2.getFloatValue() : this.motion2.getFloatValue();
          }
        }
      } else if (this.mode.get() == 3) {
        if (mc.player.onGround) {
          mc.player.jump();
          boostTicks = 0;
        }
        if (mc.player.isAirBorne) {
          boostTicks++;
          mc.getConnection().sendPacket((Packet)new CPacketEntityAction((Entity)mc.player, CPacketEntityAction.Action.START_FALL_FLYING));
          if (boostTicks > 15) {
            mc.player.capabilities.isFlying = true;
            if (!TargetStrafe.isTryingToTarget())
              MoveUtils.setSpeed(speed.getFloatValue());
          }
        }
      } else if (this.mode.get() == 4) {
        if (mc.player.onGround) {
          mc.player.jump();
          boostTicks = 0;
        }
        if (mc.player.isAirBorne)
          mc.getConnection().sendPacket((Packet)new CPacketEntityAction((Entity)mc.player, CPacketEntityAction.Action.START_FALL_FLYING));
        if (mc.player.isElytraFlying()) {
          if (mc.player.ticksExisted % 2 == 0)
            boostTicks++;
          int max = 8;
          if (mc.player.ticksExisted % 4 == 0) {
            mc.player.motionY = -0.05D;
          } else {
            mc.player.motionY = 0.1D;
          }
          if (mc.gameSettings.keyBindJump.pressed)
            mc.player.motionY = 0.44999998807907104D;
          if (mc.gameSettings.keyBindSneak.pressed)
            mc.player.motionY = -0.44999998807907104D;
          if (boostTicks >= max)
            boostTicks = max + 1;
          if (!TargetStrafe.isTryingToTarget())
            MoveUtils.setSpeed(0.8F + (boostTicks / 10));
        }
      } else {
        if (mc.player.onGround)
          mc.player.jump();
        if (mc.player.isAirBorne)
          mc.getConnection().sendPacket((Packet)new CPacketEntityAction((Entity)mc.player, CPacketEntityAction.Action.START_FALL_FLYING));
        if (mc.player.isElytraFlying())
          if (this.mode.get() == 0) {
            this;
            boostTicks++;
            mc.player.capabilities.isFlying = true;
            mc.player.capabilities.allowFlying = true;
            if (!TargetStrafe.isTryingToTarget()) {
              this;
              if (boostTicks > 1) {
                mc.player.motionX *= 1.2D;
                mc.player.motionZ *= 1.2D;
              } else {
                mc.player.jumpMovementFactor = 0.25F;
              }
            }
            if (MoveUtils.getSpeed() > 4.0D) {
              this;
              boostTicks = 0;
            }
            MoveUtils.setSpeed((float)MoveUtils.getSpeed());
            if (!MoveUtils.isMoving()) {
              this;
              boostTicks = 0;
            }
            if (mc.gameSettings.keyBindJump.isKeyDown() || mc.player.isCollidedHorizontally) {
              mc.player.motionY = 0.25D;
            } else if (mc.gameSettings.keyBindSneak.isKeyDown()) {
              mc.player.motionY = -0.30000001192092896D;
            }
          } else if (this.mode.get() == 1) {
            mc.player.motionY = 0.012121209874749184D;
            boostTicks++;
            if (mc.gameSettings.keyBindJump.pressed) {
              boostTicks--;
              mc.player.motionY = 0.44999998807907104D;
            }
            if (mc.gameSettings.keyBindSneak.pressed) {
              boostTicks -= 2;
              mc.player.motionY = -0.25D;
            }
            MoveUtils.setSpeed(0.8F);
            boostTicks++;
            if (boostTicks > 5)
              MoveUtils.setSpeed(0.85F);
            if (boostTicks > 10)
              MoveUtils.setSpeed(1.0F);
            if (boostTicks > 15)
              MoveUtils.setSpeed(1.1F);
            if (boostTicks > 20)
              MoveUtils.setSpeed(1.2F);
            if (Aura.target != null)
              boostTicks -= 2;
            if (mc.player.isCollidedHorizontally)
              boostTicks = 0;
          } 
      } 
    if (event instanceof EventSwapState && (
      (EventSwapState)event).getCheckBox() == ElytraFly &&
      !((EventSwapState)event).getState()) {
      onswapdisable();
      ChatUtils.addChatMessage("Swap -> Chestplate");
      mc.player.capabilities.isFlying = false;
      mc.player.capabilities.allowFlying = false;
      if (this.mode.get() == 3) {
        this;
        boostTicks = 3;
      } else {
        boostTicks = 0;
      }
    }
    if (event instanceof EventSwapState && (
      (EventSwapState)event).getCheckBox() == ElytraFly && (
      (EventSwapState)event).getState()) {
      if (this.mode.get() == 3)
        mc.player.capabilities.setFlySpeed(0.06F);
      ChatUtils.addChatMessage("Swap -> Elytra");
      onswapenable();
    }
  }
 
  private int onswapdisable() {
    int eIndex = -1;
    for (int i = 0; i < 45; i++) {
      if (mc.player.inventory.getStackInSlot(i).getItem() == Items.ELYTRA && eIndex == -1) {
        mc.playerController.windowClick(0, 6, 1, ClickType.PICKUP, (EntityPlayer)mc.player);
        mc.playerController.windowClick(0, findarmor(), 0, ClickType.PICKUP, (EntityPlayer)mc.player);
        mc.playerController.windowClick(0, 6, 1, ClickType.PICKUP, (EntityPlayer)mc.player);
        return 0;
      }
    }
    return eIndex;
  }
 
  private int onswapenable() {
    int eIndex = -1;
    int slot = findElytraSlot();
    this.lastSlot = findFreeSlot();
    for (int i = 0; i < 45; i++) {
      if (mc.player.inventory.getStackInSlot(i).getItem() == Items.ELYTRA && eIndex == -1) {
        mc.playerController.windowClick(0, slot, 0, ClickType.PICKUP, (EntityPlayer)mc.player);
        mc.playerController.windowClick(0, 6, 0, ClickType.PICKUP, (EntityPlayer)mc.player);
        mc.playerController.windowClick(0, 9, 1, ClickType.PICKUP, (EntityPlayer)mc.player);
        return 0;
      }
    }
    return eIndex;
  }
 
  private int findElytraSlot() {
    for (int i = 0; i < 45; i++) {
      if (mc.player.inventoryContainer.getSlot(i).getStack() != null && mc.player.inventoryContainer.getSlot(i).getStack().getItem() == Items.ELYTRA)
        return i;
    }
    return -1;
  }
 
  private int findFreeSlot() {
    for (int i = 0; i < 45; i++) {
      if (mc.player.inventoryContainer.getSlot(i).getStack() == null || mc.player.inventoryContainer.getSlot(i).getStack().getItem() == Items.field_190931_a)
        return i;
    }
    return -1;
  }
 
  private int findarmor() {
    for (int i = 0; i < 45; i++) {
      if (mc.player.inventoryContainer.getSlot(i).getStack() != null && mc.player.inventoryContainer.getSlot(i).getStack().getUnlocalizedName().contains("chestplate"))
        return i;
    }
    return -1;
  }
}
 
Начинающий
Статус
Оффлайн
Регистрация
28 Июл 2022
Сообщения
205
Реакции[?]
2
Поинты[?]
0
ElytraFly.java:
package ru.wendoxd.modules.impl.movement;

import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.inventory.ClickType;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.CPacketEntityAction;
import ru.wendoxd.events.Event;
import ru.wendoxd.events.impl.menu.EventSwapState;
import ru.wendoxd.modules.Module;
import ru.wendoxd.modules.impl.combat.Aura;
import ru.wendoxd.modules.impl.combat.TargetStrafe;
import ru.wendoxd.ui.menu.elements.Frame;
import ru.wendoxd.ui.menu.elements.tabelements.CheckBox;
import ru.wendoxd.ui.menu.elements.tabelements.PrimaryButton;
import ru.wendoxd.ui.menu.elements.tabelements.SelectBox;
import ru.wendoxd.ui.menu.elements.tabelements.Slider;
import ru.wendoxd.ui.menu.utils.MenuAPI;
import ru.wendoxd.utils.misc.ChatUtils;
import ru.wendoxd.utils.player.MoveUtils;

public class ElytraFly extends Module {
  int eIndex = -1;

  private static int boostTicks;

  private int lastSlot;

  private Frame ElytraFly_frame = new Frame("ElytraFly");

  public static Slider speed = new Slider("Speed", 2, 0.1D, 2.0D, 0.9D, () -> Boolean.valueOf(true));

  public Slider motion = new Slider("MotionY", 2, 0.0D, 1.0D, 0.3D, () -> Boolean.valueOf(true));

  public Slider motion2 = new Slider(", 2, 0.0D, 1.0D, 0.3D, () -> Boolean.valueOf(true));

  private SelectBox mode = new SelectBox("Mode", new String[] { "Minced_Hard", "Minced_Safe", "Expensive", "NoomFast", "NoomKakish" }, () -> Boolean.valueOf(ElytraFly.isEnabled(true)));

  public static CheckBox ElytraFly = (new CheckBox("ElytraFly")).markArrayList("ElytraFly");

  protected void initSettings() {
    ElytraFly.markSetting("ElytraFly");
    this.ElytraFly_frame.register(new PrimaryButton[] { (PrimaryButton)ElytraFly, (PrimaryButton)this.mode, (PrimaryButton)speed, (PrimaryButton)this.motion, (PrimaryButton)this.motion2 });
    MenuAPI.movement.register(this.ElytraFly_frame);
  }

  public void onEvent(Event event) {
    if (ElytraFly.isEnabled(false) &&
      event instanceof ru.wendoxd.events.impl.player.EventUpdate)
      if (this.mode.get() == 2) {
        if (mc.player.onGround) {
          mc.player.jump();
          boostTicks = 0;
        }
        if (mc.player.ticksExisted % 2 == 0)
          mc.getConnection().sendPacket((Packet)new CPacketEntityAction((Entity)mc.player, CPacketEntityAction.Action.START_FALL_FLYING));
        if (mc.player.isAirBorne) {
          boostTicks++;
          if (!TargetStrafe.isTryingToTarget())
            MoveUtils.setSpeed(speed.getFloatValue());
          if (!mc.player.isSneaking() && mc.gameSettings.keyBindJump.pressed) {
            mc.player.motionY = this.motion.getFloatValue();
          } else if (mc.gameSettings.keyBindSneak.isKeyDown()) {
            mc.player.motionY = -this.motion.getFloatValue();
          } else {
            mc.player.motionY = (mc.player.ticksExisted % 2 != 0) ? -this.motion2.getFloatValue() : this.motion2.getFloatValue();
          }
        }
      } else if (this.mode.get() == 3) {
        if (mc.player.onGround) {
          mc.player.jump();
          boostTicks = 0;
        }
        if (mc.player.isAirBorne) {
          boostTicks++;
          mc.getConnection().sendPacket((Packet)new CPacketEntityAction((Entity)mc.player, CPacketEntityAction.Action.START_FALL_FLYING));
          if (boostTicks > 15) {
            mc.player.capabilities.isFlying = true;
            if (!TargetStrafe.isTryingToTarget())
              MoveUtils.setSpeed(speed.getFloatValue());
          }
        }
      } else if (this.mode.get() == 4) {
        if (mc.player.onGround) {
          mc.player.jump();
          boostTicks = 0;
        }
        if (mc.player.isAirBorne)
          mc.getConnection().sendPacket((Packet)new CPacketEntityAction((Entity)mc.player, CPacketEntityAction.Action.START_FALL_FLYING));
        if (mc.player.isElytraFlying()) {
          if (mc.player.ticksExisted % 2 == 0)
            boostTicks++;
          int max = 8;
          if (mc.player.ticksExisted % 4 == 0) {
            mc.player.motionY = -0.05D;
          } else {
            mc.player.motionY = 0.1D;
          }
          if (mc.gameSettings.keyBindJump.pressed)
            mc.player.motionY = 0.44999998807907104D;
          if (mc.gameSettings.keyBindSneak.pressed)
            mc.player.motionY = -0.44999998807907104D;
          if (boostTicks >= max)
            boostTicks = max + 1;
          if (!TargetStrafe.isTryingToTarget())
            MoveUtils.setSpeed(0.8F + (boostTicks / 10));
        }
      } else {
        if (mc.player.onGround)
          mc.player.jump();
        if (mc.player.isAirBorne)
          mc.getConnection().sendPacket((Packet)new CPacketEntityAction((Entity)mc.player, CPacketEntityAction.Action.START_FALL_FLYING));
        if (mc.player.isElytraFlying())
          if (this.mode.get() == 0) {
            this;
            boostTicks++;
            mc.player.capabilities.isFlying = true;
            mc.player.capabilities.allowFlying = true;
            if (!TargetStrafe.isTryingToTarget()) {
              this;
              if (boostTicks > 1) {
                mc.player.motionX *= 1.2D;
                mc.player.motionZ *= 1.2D;
              } else {
                mc.player.jumpMovementFactor = 0.25F;
              }
            }
            if (MoveUtils.getSpeed() > 4.0D) {
              this;
              boostTicks = 0;
            }
            MoveUtils.setSpeed((float)MoveUtils.getSpeed());
            if (!MoveUtils.isMoving()) {
              this;
              boostTicks = 0;
            }
            if (mc.gameSettings.keyBindJump.isKeyDown() || mc.player.isCollidedHorizontally) {
              mc.player.motionY = 0.25D;
            } else if (mc.gameSettings.keyBindSneak.isKeyDown()) {
              mc.player.motionY = -0.30000001192092896D;
            }
          } else if (this.mode.get() == 1) {
            mc.player.motionY = 0.012121209874749184D;
            boostTicks++;
            if (mc.gameSettings.keyBindJump.pressed) {
              boostTicks--;
              mc.player.motionY = 0.44999998807907104D;
            }
            if (mc.gameSettings.keyBindSneak.pressed) {
              boostTicks -= 2;
              mc.player.motionY = -0.25D;
            }
            MoveUtils.setSpeed(0.8F);
            boostTicks++;
            if (boostTicks > 5)
              MoveUtils.setSpeed(0.85F);
            if (boostTicks > 10)
              MoveUtils.setSpeed(1.0F);
            if (boostTicks > 15)
              MoveUtils.setSpeed(1.1F);
            if (boostTicks > 20)
              MoveUtils.setSpeed(1.2F);
            if (Aura.target != null)
              boostTicks -= 2;
            if (mc.player.isCollidedHorizontally)
              boostTicks = 0;
          }
      }
    if (event instanceof EventSwapState && (
      (EventSwapState)event).getCheckBox() == ElytraFly &&
      !((EventSwapState)event).getState()) {
      onswapdisable();
      ChatUtils.addChatMessage("Swap -> Chestplate");
      mc.player.capabilities.isFlying = false;
      mc.player.capabilities.allowFlying = false;
      if (this.mode.get() == 3) {
        this;
        boostTicks = 3;
      } else {
        boostTicks = 0;
      }
    }
    if (event instanceof EventSwapState && (
      (EventSwapState)event).getCheckBox() == ElytraFly && (
      (EventSwapState)event).getState()) {
      if (this.mode.get() == 3)
        mc.player.capabilities.setFlySpeed(0.06F);
      ChatUtils.addChatMessage("Swap -> Elytra");
      onswapenable();
    }
  }

  private int onswapdisable() {
    int eIndex = -1;
    for (int i = 0; i < 45; i++) {
      if (mc.player.inventory.getStackInSlot(i).getItem() == Items.ELYTRA && eIndex == -1) {
        mc.playerController.windowClick(0, 6, 1, ClickType.PICKUP, (EntityPlayer)mc.player);
        mc.playerController.windowClick(0, findarmor(), 0, ClickType.PICKUP, (EntityPlayer)mc.player);
        mc.playerController.windowClick(0, 6, 1, ClickType.PICKUP, (EntityPlayer)mc.player);
        return 0;
      }
    }
    return eIndex;
  }

  private int onswapenable() {
    int eIndex = -1;
    int slot = findElytraSlot();
    this.lastSlot = findFreeSlot();
    for (int i = 0; i < 45; i++) {
      if (mc.player.inventory.getStackInSlot(i).getItem() == Items.ELYTRA && eIndex == -1) {
        mc.playerController.windowClick(0, slot, 0, ClickType.PICKUP, (EntityPlayer)mc.player);
        mc.playerController.windowClick(0, 6, 0, ClickType.PICKUP, (EntityPlayer)mc.player);
        mc.playerController.windowClick(0, 9, 1, ClickType.PICKUP, (EntityPlayer)mc.player);
        return 0;
      }
    }
    return eIndex;
  }

  private int findElytraSlot() {
    for (int i = 0; i < 45; i++) {
      if (mc.player.inventoryContainer.getSlot(i).getStack() != null && mc.player.inventoryContainer.getSlot(i).getStack().getItem() == Items.ELYTRA)
        return i;
    }
    return -1;
  }

  private int findFreeSlot() {
    for (int i = 0; i < 45; i++) {
      if (mc.player.inventoryContainer.getSlot(i).getStack() == null || mc.player.inventoryContainer.getSlot(i).getStack().getItem() == Items.field_190931_a)
        return i;
    }
    return -1;
  }

  private int findarmor() {
    for (int i = 0; i < 45; i++) {
      if (mc.player.inventoryContainer.getSlot(i).getStack() != null && mc.player.inventoryContainer.getSlot(i).getStack().getUnlocalizedName().contains("chestplate"))
        return i;
    }
    return -1;
  }
}
Зачем сливать то что было в арбузе? срц же в общем доступе, темболее там вексайд реди
 
Начинающий
Статус
Оффлайн
Регистрация
22 Янв 2023
Сообщения
5
Реакции[?]
0
Поинты[?]
0
Начинающий
Статус
Оффлайн
Регистрация
29 Ноя 2022
Сообщения
369
Реакции[?]
11
Поинты[?]
1K
ElytraFly.java:
package ru.wendoxd.modules.impl.movement;

import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.inventory.ClickType;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.CPacketEntityAction;
import ru.wendoxd.events.Event;
import ru.wendoxd.events.impl.menu.EventSwapState;
import ru.wendoxd.modules.Module;
import ru.wendoxd.modules.impl.combat.Aura;
import ru.wendoxd.modules.impl.combat.TargetStrafe;
import ru.wendoxd.ui.menu.elements.Frame;
import ru.wendoxd.ui.menu.elements.tabelements.CheckBox;
import ru.wendoxd.ui.menu.elements.tabelements.PrimaryButton;
import ru.wendoxd.ui.menu.elements.tabelements.SelectBox;
import ru.wendoxd.ui.menu.elements.tabelements.Slider;
import ru.wendoxd.ui.menu.utils.MenuAPI;
import ru.wendoxd.utils.misc.ChatUtils;
import ru.wendoxd.utils.player.MoveUtils;

public class ElytraFly extends Module {
  int eIndex = -1;

  private static int boostTicks;

  private int lastSlot;

  private Frame ElytraFly_frame = new Frame("ElytraFly");

  public static Slider speed = new Slider("Speed", 2, 0.1D, 2.0D, 0.9D, () -> Boolean.valueOf(true));

  public Slider motion = new Slider("MotionY", 2, 0.0D, 1.0D, 0.3D, () -> Boolean.valueOf(true));

  public Slider motion2 = new Slider(", 2, 0.0D, 1.0D, 0.3D, () -> Boolean.valueOf(true));

  private SelectBox mode = new SelectBox("Mode", new String[] { "Minced_Hard", "Minced_Safe", "Expensive", "NoomFast", "NoomKakish" }, () -> Boolean.valueOf(ElytraFly.isEnabled(true)));

  public static CheckBox ElytraFly = (new CheckBox("ElytraFly")).markArrayList("ElytraFly");

  protected void initSettings() {
    ElytraFly.markSetting("ElytraFly");
    this.ElytraFly_frame.register(new PrimaryButton[] { (PrimaryButton)ElytraFly, (PrimaryButton)this.mode, (PrimaryButton)speed, (PrimaryButton)this.motion, (PrimaryButton)this.motion2 });
    MenuAPI.movement.register(this.ElytraFly_frame);
  }

  public void onEvent(Event event) {
    if (ElytraFly.isEnabled(false) &&
      event instanceof ru.wendoxd.events.impl.player.EventUpdate)
      if (this.mode.get() == 2) {
        if (mc.player.onGround) {
          mc.player.jump();
          boostTicks = 0;
        }
        if (mc.player.ticksExisted % 2 == 0)
          mc.getConnection().sendPacket((Packet)new CPacketEntityAction((Entity)mc.player, CPacketEntityAction.Action.START_FALL_FLYING));
        if (mc.player.isAirBorne) {
          boostTicks++;
          if (!TargetStrafe.isTryingToTarget())
            MoveUtils.setSpeed(speed.getFloatValue());
          if (!mc.player.isSneaking() && mc.gameSettings.keyBindJump.pressed) {
            mc.player.motionY = this.motion.getFloatValue();
          } else if (mc.gameSettings.keyBindSneak.isKeyDown()) {
            mc.player.motionY = -this.motion.getFloatValue();
          } else {
            mc.player.motionY = (mc.player.ticksExisted % 2 != 0) ? -this.motion2.getFloatValue() : this.motion2.getFloatValue();
          }
        }
      } else if (this.mode.get() == 3) {
        if (mc.player.onGround) {
          mc.player.jump();
          boostTicks = 0;
        }
        if (mc.player.isAirBorne) {
          boostTicks++;
          mc.getConnection().sendPacket((Packet)new CPacketEntityAction((Entity)mc.player, CPacketEntityAction.Action.START_FALL_FLYING));
          if (boostTicks > 15) {
            mc.player.capabilities.isFlying = true;
            if (!TargetStrafe.isTryingToTarget())
              MoveUtils.setSpeed(speed.getFloatValue());
          }
        }
      } else if (this.mode.get() == 4) {
        if (mc.player.onGround) {
          mc.player.jump();
          boostTicks = 0;
        }
        if (mc.player.isAirBorne)
          mc.getConnection().sendPacket((Packet)new CPacketEntityAction((Entity)mc.player, CPacketEntityAction.Action.START_FALL_FLYING));
        if (mc.player.isElytraFlying()) {
          if (mc.player.ticksExisted % 2 == 0)
            boostTicks++;
          int max = 8;
          if (mc.player.ticksExisted % 4 == 0) {
            mc.player.motionY = -0.05D;
          } else {
            mc.player.motionY = 0.1D;
          }
          if (mc.gameSettings.keyBindJump.pressed)
            mc.player.motionY = 0.44999998807907104D;
          if (mc.gameSettings.keyBindSneak.pressed)
            mc.player.motionY = -0.44999998807907104D;
          if (boostTicks >= max)
            boostTicks = max + 1;
          if (!TargetStrafe.isTryingToTarget())
            MoveUtils.setSpeed(0.8F + (boostTicks / 10));
        }
      } else {
        if (mc.player.onGround)
          mc.player.jump();
        if (mc.player.isAirBorne)
          mc.getConnection().sendPacket((Packet)new CPacketEntityAction((Entity)mc.player, CPacketEntityAction.Action.START_FALL_FLYING));
        if (mc.player.isElytraFlying())
          if (this.mode.get() == 0) {
            this;
            boostTicks++;
            mc.player.capabilities.isFlying = true;
            mc.player.capabilities.allowFlying = true;
            if (!TargetStrafe.isTryingToTarget()) {
              this;
              if (boostTicks > 1) {
                mc.player.motionX *= 1.2D;
                mc.player.motionZ *= 1.2D;
              } else {
                mc.player.jumpMovementFactor = 0.25F;
              }
            }
            if (MoveUtils.getSpeed() > 4.0D) {
              this;
              boostTicks = 0;
            }
            MoveUtils.setSpeed((float)MoveUtils.getSpeed());
            if (!MoveUtils.isMoving()) {
              this;
              boostTicks = 0;
            }
            if (mc.gameSettings.keyBindJump.isKeyDown() || mc.player.isCollidedHorizontally) {
              mc.player.motionY = 0.25D;
            } else if (mc.gameSettings.keyBindSneak.isKeyDown()) {
              mc.player.motionY = -0.30000001192092896D;
            }
          } else if (this.mode.get() == 1) {
            mc.player.motionY = 0.012121209874749184D;
            boostTicks++;
            if (mc.gameSettings.keyBindJump.pressed) {
              boostTicks--;
              mc.player.motionY = 0.44999998807907104D;
            }
            if (mc.gameSettings.keyBindSneak.pressed) {
              boostTicks -= 2;
              mc.player.motionY = -0.25D;
            }
            MoveUtils.setSpeed(0.8F);
            boostTicks++;
            if (boostTicks > 5)
              MoveUtils.setSpeed(0.85F);
            if (boostTicks > 10)
              MoveUtils.setSpeed(1.0F);
            if (boostTicks > 15)
              MoveUtils.setSpeed(1.1F);
            if (boostTicks > 20)
              MoveUtils.setSpeed(1.2F);
            if (Aura.target != null)
              boostTicks -= 2;
            if (mc.player.isCollidedHorizontally)
              boostTicks = 0;
          }
      }
    if (event instanceof EventSwapState && (
      (EventSwapState)event).getCheckBox() == ElytraFly &&
      !((EventSwapState)event).getState()) {
      onswapdisable();
      ChatUtils.addChatMessage("Swap -> Chestplate");
      mc.player.capabilities.isFlying = false;
      mc.player.capabilities.allowFlying = false;
      if (this.mode.get() == 3) {
        this;
        boostTicks = 3;
      } else {
        boostTicks = 0;
      }
    }
    if (event instanceof EventSwapState && (
      (EventSwapState)event).getCheckBox() == ElytraFly && (
      (EventSwapState)event).getState()) {
      if (this.mode.get() == 3)
        mc.player.capabilities.setFlySpeed(0.06F);
      ChatUtils.addChatMessage("Swap -> Elytra");
      onswapenable();
    }
  }

  private int onswapdisable() {
    int eIndex = -1;
    for (int i = 0; i < 45; i++) {
      if (mc.player.inventory.getStackInSlot(i).getItem() == Items.ELYTRA && eIndex == -1) {
        mc.playerController.windowClick(0, 6, 1, ClickType.PICKUP, (EntityPlayer)mc.player);
        mc.playerController.windowClick(0, findarmor(), 0, ClickType.PICKUP, (EntityPlayer)mc.player);
        mc.playerController.windowClick(0, 6, 1, ClickType.PICKUP, (EntityPlayer)mc.player);
        return 0;
      }
    }
    return eIndex;
  }

  private int onswapenable() {
    int eIndex = -1;
    int slot = findElytraSlot();
    this.lastSlot = findFreeSlot();
    for (int i = 0; i < 45; i++) {
      if (mc.player.inventory.getStackInSlot(i).getItem() == Items.ELYTRA && eIndex == -1) {
        mc.playerController.windowClick(0, slot, 0, ClickType.PICKUP, (EntityPlayer)mc.player);
        mc.playerController.windowClick(0, 6, 0, ClickType.PICKUP, (EntityPlayer)mc.player);
        mc.playerController.windowClick(0, 9, 1, ClickType.PICKUP, (EntityPlayer)mc.player);
        return 0;
      }
    }
    return eIndex;
  }

  private int findElytraSlot() {
    for (int i = 0; i < 45; i++) {
      if (mc.player.inventoryContainer.getSlot(i).getStack() != null && mc.player.inventoryContainer.getSlot(i).getStack().getItem() == Items.ELYTRA)
        return i;
    }
    return -1;
  }

  private int findFreeSlot() {
    for (int i = 0; i < 45; i++) {
      if (mc.player.inventoryContainer.getSlot(i).getStack() == null || mc.player.inventoryContainer.getSlot(i).getStack().getItem() == Items.field_190931_a)
        return i;
    }
    return -1;
  }

  private int findarmor() {
    for (int i = 0; i < 45; i++) {
      if (mc.player.inventoryContainer.getSlot(i).getStack() != null && mc.player.inventoryContainer.getSlot(i).getStack().getUnlocalizedName().contains("chestplate"))
        return i;
    }
    return -1;
  }
}
пиздец......... ливни с форума
 
Сверху Снизу