content: package myau.module.modules;
  
  import myau.event.EventTarget;
  import myau.event.types.EventType;
  import myau.event.types.Priority;
  import myau.events.MoveInputEvent;
  import myau.events.TickEvent;
  import myau.module.Module;
  import myau.util.ItemUtil;
  import myau.util.MoveUtil;
  import myau.util.PlayerUtil;
  import myau.property.properties.BooleanProperty;
  import myau.property.properties.IntProperty;
  import net.minecraft.client.Minecraft;
  import org.apache.commons.lang3.RandomUtils;
  
  import java.util.Objects;
  
  public class Eagle extends Module {
      private static final Minecraft mc = Minecraft.getMinecraft();
      private int sneakDelay = 0;
      public final IntProperty minDelay = new IntProperty("min-delay", 2, 0, 10);
      public final IntProperty maxDelay = new IntProperty("max-delay", 3, 0, 10);
      public final BooleanProperty directionCheck = new BooleanProperty("direction-check", true);
      public final BooleanProperty pitchCheck = new BooleanProperty("pitch-check", true);
      public final BooleanProperty blocksOnly = new BooleanProperty("blocks-only", true);
  
      private boolean canMoveSafely() {
          double[] offset = MoveUtil.predictMovement();
          return PlayerUtil.canMove(mc.thePlayer.motionX + offset[0], mc.thePlayer.motionZ + offset[1]);
      }
  
      private boolean shouldSneak() {
          if (this.directionCheck.getValue() && mc.gameSettings.keyBindForward.isKeyDown()) {
              return false;
          } else if (this.pitchCheck.getValue() && mc.thePlayer.rotationPitch < 69.0F) {
              return false;
          } else {
              return (!this.blocksOnly.getValue() || ItemUtil.isHoldingBlock()) && mc.thePlayer.onGround;
          }
      }
  
      public Eagle() {
          super("Eagle", false);
      }
  
      @EventTarget(Priority.LOWEST)
      public void onTick(TickEvent event) {
          if (this.isEnabled() && event.getType() == EventType.PRE) {
              if (this.sneakDelay > 0) {
                  this.sneakDelay--;
              }
              if (this.sneakDelay == 0 && this.canMoveSafely()) {
                  this.sneakDelay = RandomUtils.nextInt(this.minDelay.getValue(), this.maxDelay.getValue() + 1);
              }
          }
      }
  
      @EventTarget(Priority.LOWEST)
      public void onMoveInput(MoveInputEvent event) {
          if (this.isEnabled() && mc.currentScreen == null && !mc.thePlayer.movementInput.sneak) {
              if (this.shouldSneak() && (this.sneakDelay > 0 || this.canMoveSafely())) {
                  mc.thePlayer.movementInput.sneak = true;
                  mc.thePlayer.movementInput.moveStrafe *= 0.3F;
                  mc.thePlayer.movementInput.moveForward *= 0.3F;
              }
          }
      }
  
      @Override
      public void onDisabled() {
          this.sneakDelay = 0;
      }
  
      @Override
      public void verifyValue(String name) {
          switch (name) {
              case "min-delay":
                  if (this.minDelay.getValue() > this.maxDelay.getValue()) {
                      this.maxDelay.setValue(this.minDelay.getValue());
                  }
                  break;
              case "max-delay":
                  if (this.minDelay.getValue() > this.maxDelay.getValue()) {
                      this.minDelay.setValue(this.maxDelay.getValue());
                  }
          }
      }
  
      @Override
      public String[] getSuffix() {
          return Objects.equals(this.minDelay.getValue(), this.maxDelay.getValue())
                  ? new String[]{this.minDelay.getValue().toString()}
                  : new String[]{String.format("%d-%d", this.minDelay.getValue(), this.maxDelay.getValue())};
      }
  }
  