Class AimingData

java.lang.Object
com.hypixel.hytale.server.npc.util.AimingData
All Implemented Interfaces:
ExtraInfoProvider

public class AimingData extends Object implements ExtraInfoProvider
  • Field Details

    • MIN_MOVE_SPEED_STATIC

      public static final double MIN_MOVE_SPEED_STATIC
      See Also:
    • MIN_MOVE_SPEED_STATIC_2

      public static final double MIN_MOVE_SPEED_STATIC_2
      See Also:
    • MIN_AIMING_DISTANCE

      public static final double MIN_AIMING_DISTANCE
      See Also:
    • MIN_AIMING_DISTANCE_2

      public static final double MIN_AIMING_DISTANCE_2
      See Also:
    • MIN_AIR_TIME

      public static final double MIN_AIR_TIME
      See Also:
    • ANGLE_EPSILON

      public static final double ANGLE_EPSILON
      See Also:
    • ballisticData

      @Nullable private BallisticData ballisticData
    • useFlatTrajectory

      private boolean useFlatTrajectory
    • depthOffset

      private double depthOffset
    • pitchAdjustOffset

      private boolean pitchAdjustOffset
    • haveSolution

      private boolean haveSolution
    • haveOrientation

      private boolean haveOrientation
    • haveAttacked

      private boolean haveAttacked
    • chargeDistance

      private double chargeDistance
    • desiredHitAngle

      private double desiredHitAngle
    • pitch

      private final float[] pitch
    • yaw

      private final float[] yaw
    • target

      @Nullable private Ref<EntityStore> target
    • owner

      private int owner
  • Constructor Details

    • AimingData

      public AimingData()
  • Method Details

    • isHaveAttacked

      public boolean isHaveAttacked()
    • setHaveAttacked

      public void setHaveAttacked(boolean haveAttacked)
    • requireBallistic

      public void requireBallistic(@Nonnull BallisticData ballisticData)
    • requireCloseCombat

      public void requireCloseCombat()
    • getPitch

      public float getPitch()
    • getPitch

      public float getPitch(boolean flatTrajectory)
    • getYaw

      public float getYaw()
    • getYaw

      public float getYaw(boolean flatTrajectory)
    • isBallistic

      public boolean isBallistic()
    • getBallisticData

      @Nullable public BallisticData getBallisticData()
    • setUseFlatTrajectory

      public void setUseFlatTrajectory(boolean useFlatTrajectory)
    • setChargeDistance

      public void setChargeDistance(double chargeDistance)
    • getChargeDistance

      public double getChargeDistance()
    • setDesiredHitAngle

      public void setDesiredHitAngle(double desiredHitAngle)
    • getDesiredHitAngle

      public double getDesiredHitAngle()
    • getType

      @Nonnull public Class<AimingData> getType()
      Specified by:
      getType in interface ExtraInfoProvider
    • setDepthOffset

      public void setDepthOffset(double depthOffset, boolean pitchAdjustOffset)
    • getTarget

      @Nullable public Ref<EntityStore> getTarget()
    • setTarget

      public void setTarget(Ref<EntityStore> ref)
    • haveOrientation

      public boolean haveOrientation()
    • setOrientation

      public void setOrientation(float yaw, float pitch)
    • clearSolution

      public void clearSolution()
    • computeSolution

      public boolean computeSolution(double x, double y, double z, double vx, double vy, double vz)
    • isOnTarget

      public boolean isOnTarget(float yaw, float pitch, double hitAngle)
    • tryClaim

      public void tryClaim(int id)
    • isClaimedBy

      public boolean isClaimedBy(int id)
    • release

      public void release()
    • clear

      public void clear()
    • computeStaticSolution

      protected boolean computeStaticSolution(double dx, double dy)