Class AimingData
java.lang.Object
com.hypixel.hytale.server.npc.util.AimingData
- All Implemented Interfaces:
ExtraInfoProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleprivate BallisticDataprivate doubleprivate doubleprivate doubleprivate booleanprivate booleanprivate booleanstatic final doublestatic final doublestatic final doublestatic final doublestatic final doubleprivate intprivate final float[]private booleanprivate Ref<EntityStore> private booleanprivate final float[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidbooleancomputeSolution(double x, double y, double z, double vx, double vy, double vz) protected booleancomputeStaticSolution(double dx, double dy) doubledoublefloatgetPitch()floatgetPitch(boolean flatTrajectory) getType()floatgetYaw()floatgetYaw(boolean flatTrajectory) booleanbooleanbooleanisClaimedBy(int id) booleanbooleanisOnTarget(float yaw, float pitch, double hitAngle) voidrelease()voidrequireBallistic(BallisticData ballisticData) voidvoidsetChargeDistance(double chargeDistance) voidsetDepthOffset(double depthOffset, boolean pitchAdjustOffset) voidsetDesiredHitAngle(double desiredHitAngle) voidsetHaveAttacked(boolean haveAttacked) voidsetOrientation(float yaw, float pitch) voidsetTarget(Ref<EntityStore> ref) voidsetUseFlatTrajectory(boolean useFlatTrajectory) voidtryClaim(int id)
-
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
-
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
-
owner
private int owner
-
-
Constructor Details
-
AimingData
public AimingData()
-
-
Method Details
-
isHaveAttacked
public boolean isHaveAttacked() -
setHaveAttacked
public void setHaveAttacked(boolean haveAttacked) -
requireBallistic
-
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
-
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
- Specified by:
getTypein interfaceExtraInfoProvider
-
setDepthOffset
public void setDepthOffset(double depthOffset, boolean pitchAdjustOffset) -
getTarget
-
setTarget
-
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)
-