Class MotionControllerFly
java.lang.Object
com.hypixel.hytale.server.npc.movement.controllers.MotionControllerBase
com.hypixel.hytale.server.npc.movement.controllers.MotionControllerFly
- All Implemented Interfaces:
com.hypixel.hytale.server.npc.movement.controllers.MotionController
-
Nested Class Summary
Nested classes/interfaces inherited from class com.hypixel.hytale.server.npc.movement.controllers.MotionControllerBase
MotionControllerBase.AppliedVelocityNested classes/interfaces inherited from interface com.hypixel.hytale.server.npc.movement.controllers.MotionController
com.hypixel.hytale.server.npc.movement.controllers.MotionController.VerticalRange -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final doubleprotected final booleanstatic final intstatic final intprotected doublestatic final doubleprotected final doubleprotected double[]protected final doubleprotected final doubleprotected floatprotected doubleprotected final Vector3dprotected intprotected intprotected final floatprotected final doubleprotected final doubleprotected final doubleprotected final floatprotected final floatprotected final floatprotected final doubleprotected final doubleprotected final floatprotected final doubleprotected final doubleprotected doubleprotected final PositionProbeAirprotected final PositionProbeAirprotected final floatprotected final doubleprotected final doubleprotected final doublestatic final Stringprotected final com.hypixel.hytale.server.npc.movement.controllers.MotionController.VerticalRangeFields inherited from class com.hypixel.hytale.server.npc.movement.controllers.MotionControllerBase
appliedForce, appliedVelocities, BISECT_DIST, bisectInvalidPosition, bisectValidPosition, blendHeading, blendHeadingPosition, blendLevelAtTargetPosition, cachedMovementBlocked, collisionBoundingBox, collisionResult, componentSelector, DEBUG_APPLIED_FORCES, debugModeBlockCollisions, debugModeCollisions, debugModeMove, debugModeOverlaps, debugModeProbeBlockCollisions, debugModeSteer, debugModeValidateMath, debugModeValidatePositions, DEFAULT_BLOCK_DRAG, DOT_PRODUCT_EPSILON, effectHorizontalSpeedMultiplier, enableBlockDamage, enableTriggers, entity, epsilonAngle, epsilonSpeed, fastMotionKind, fastMotionThreshold, fastMotionThresholdRange, FILTER_COEFFICIENT, FORCE_SCALE, forceVelocity, forceVelocityDamping, gravity, haveBlendHeadingPosition, havePreciseMovementTarget, horizontalIdleKind, idleMotionKind, ignoreDamping, inertia, isAvoidingBlockDamage, isBlendingHeading, isObstructed, isReceivingBlockDamage, isRelaxedMoveConstraints, knockbackScale, lastMovementStateUpdatedMotionKind, lastValidPosition, LOGGER, maxHeadRotationSpeed, maxHorizontalSpeed, motionKind, movementSettings, moveSpeed, navState, planarComponentSelector, position, preciseMovementTarget, previousMotionKind, previousSpeed, recomputePath, requiresDepthProbing, requiresPreciseMovement, role, targetDeltaSquared, throttleDuration, translation, type, worldAntiNormal, worldNormal -
Constructor Summary
ConstructorsConstructorDescriptionMotionControllerFly(BuilderSupport builderSupport, BuilderMotionControllerFly builder) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanAct(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) booleanvoidprotected doublecomputeMaxSpeedFromPitch(double pitch) protected doublecomputeMove(Ref<EntityStore> ref, Role role, Steering steering, double dt, Vector3d translation, ComponentAccessor<EntityStore> componentAccessor) voidconstrainRotations(Role role, TransformComponent transform) protected voiddampForceVelocity(Vector3d forceVelocity, double forceVelocityDamping, double interval, ComponentAccessor<EntityStore> componentAccessor) protected doubledoMove(Ref<EntityStore> ref, Vector3d position, Vector3d translation, PositionProbeAir moveProbe, ProbeMoveData probeMoveData, ComponentAccessor<EntityStore> componentAccessor) booleanestimateVelocity(Steering steering, Vector3d velocityOut) protected doubleexecuteMove(Ref<EntityStore> ref, Role role, double dt, Vector3d translation, ComponentAccessor<EntityStore> componentAccessor) doubledoubledoubledoubledoublecom.hypixel.hytale.server.npc.movement.controllers.MotionController.VerticalRangegetDesiredVerticalRange(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) doublefloatdoublefloatdoublegetType()doublebooleaninAir()booleaninWater()booleanis2D()booleanisFastMotionKind(double speed) booleanisHorizontalIdle(double speed) booleanonGround()doubleprobeMove(Ref<EntityStore> ref, ProbeMoveData probeMoveData, ComponentAccessor<EntityStore> componentAccessor) voidsetDesiredAltitudeOverride(double[] desiredAltitudeOverride) private voidsetDirectionFromTranslation(Steering steering, Vector3d translation) protected booleanprotected booleanvoidspawned()voidtakeOff(Ref<EntityStore> ref, double speed, ComponentAccessor<EntityStore> componentAccessor) Methods inherited from class com.hypixel.hytale.server.npc.movement.controllers.MotionControllerBase
activate, addForce, adjustReadPosition, adjustWritePosition, beforeInstructionMotion, beforeInstructionSensorsAndActions, bisect, bisect, blendBodyYaw, calculatePitch, calculateRoll, calculateYaw, clearBlendHeading, clearForce, clearRequireDepthProbing, clearRequirePreciseMovement, deactivate, dumpCollisionResults, enableHeadingBlending, enableHeadingBlending, forceVelocity, getComponentSelector, getEpsilonAngle, getEpsilonSpeed, getForce, getGravity, getInvalidOverlapMaterials, getMotionKind, getNavState, getPitch, getPlanarComponentSelector, getRole, getRoll, getTargetDeltaSquared, getThrottleDuration, getWorldAntiNormal, getWorldNormal, getYaw, isAlive, isAvoidingBlockDamage, isDebugMode, isForceRecomputePath, isInProgress, isMovementBlocked, isObstructed, isProcessTriggersHasMoved, isRelaxedMoveConstraints, isRequiresDepthProbing, isRequiresPreciseMovement, isValidPosition, isValidPosition, moveEntity, postExecuteMove, postReadPosition, probeMove, processTriggers, readEntityPosition, requireDepthProbing, requirePreciseMovement, resetNavState, resetObstructedFlags, saveMotionKind, setAvoidingBlockDamage, setComponentSelector, setEnableBlockDamage, setEnableTriggers, setForceRecomputePath, setGravity, setInertia, setKnockbackScale, setMotionKind, setNavState, setRelaxedMoveConstraints, setRole, standingOnBlockOfType, steer, steer0, switchedToMotionKind, touchesWater, translateToAccessiblePosition, updateAscendingStates, updateDescendingStates, updateDroppingStates, updateFlyingStates, updateModelParameters, updateMovementState, updateMovingStates, updatePhysicsValues, updateStandingStates, updateSwimmingStates, waypointDistance, waypointDistance, waypointDistanceSquared, waypointDistanceSquared, willReceiveBlockDamageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hypixel.hytale.server.npc.movement.controllers.MotionController
getSquaredDistance, matchesType
-
Field Details
-
TYPE
- See Also:
-
DAMPING_FACTOR
public static final double DAMPING_FACTOR- See Also:
-
COLLISION_MATERIALS_PASSIVE
public static final int COLLISION_MATERIALS_PASSIVE- See Also:
-
COLLISION_MATERIALS_ACTIVE
public static final int COLLISION_MATERIALS_ACTIVE- See Also:
-
minAirSpeed
protected final double minAirSpeed -
maxClimbSpeed
protected final double maxClimbSpeed -
maxSinkSpeed
protected final double maxSinkSpeed -
maxFallSpeed
protected final double maxFallSpeed -
maxSinkSpeedFluid
protected final double maxSinkSpeedFluid -
maxClimbAngle
protected final float maxClimbAngle -
maxSinkAngle
protected final float maxSinkAngle -
acceleration
protected final double acceleration -
deceleration
protected final double deceleration -
sinkRatio
protected final double sinkRatio- See Also:
-
desiredAltitudeWeight
protected final double desiredAltitudeWeight -
maxTurnSpeed
protected final float maxTurnSpeed -
maxRollAngle
protected final float maxRollAngle -
maxRollSpeed
protected final float maxRollSpeed -
rollDamping
protected final float rollDamping -
fastFlyThreshold
protected final double fastFlyThreshold -
minHeightOverGround
protected final double minHeightOverGround -
maxHeightOverGround
protected final double maxHeightOverGround -
autoLevel
protected final boolean autoLevel -
sinMaxClimbAngle
protected final double sinMaxClimbAngle -
sinMaxSinkAngle
protected final double sinMaxSinkAngle -
verticalRange
protected final com.hypixel.hytale.server.npc.movement.controllers.MotionController.VerticalRange verticalRange -
moveProbe
-
probeMoveProbe
-
lastVerticalPositionX
protected int lastVerticalPositionX -
lastVerticalPositionZ
protected int lastVerticalPositionZ -
lastVelocity
-
lastSpeed
protected double lastSpeed -
lastRoll
protected float lastRoll -
currentRelativeSpeed
protected double currentRelativeSpeed -
minSpeedAfterForceSquared
protected double minSpeedAfterForceSquared -
desiredAltitudeOverride
@Nullable protected double[] desiredAltitudeOverride
-
-
Constructor Details
-
MotionControllerFly
public MotionControllerFly(@Nonnull BuilderSupport builderSupport, @Nonnull BuilderMotionControllerFly builder)
-
-
Method Details
-
getType
-
computeMove
protected double computeMove(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nonnull Steering steering, double dt, @Nonnull Vector3d translation, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
computeMovein classMotionControllerBase
-
setDirectionFromTranslation
-
probeMove
public double probeMove(@Nonnull Ref<EntityStore> ref, @Nonnull ProbeMoveData probeMoveData, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
isFastMotionKind
public boolean isFastMotionKind(double speed) - Specified by:
isFastMotionKindin classMotionControllerBase
-
getDesiredVerticalRange
public com.hypixel.hytale.server.npc.movement.controllers.MotionController.VerticalRange getDesiredVerticalRange(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
getWanderVerticalMovementRatio
public double getWanderVerticalMovementRatio() -
doMove
protected double doMove(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3d position, @Nonnull Vector3d translation, @Nonnull PositionProbeAir moveProbe, @Nullable ProbeMoveData probeMoveData, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
executeMove
protected double executeMove(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, double dt, @Nonnull Vector3d translation, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
executeMovein classMotionControllerBase
-
constrainRotations
-
getCurrentMaxBodyRotationSpeed
public double getCurrentMaxBodyRotationSpeed() -
dampForceVelocity
protected void dampForceVelocity(@Nonnull Vector3d forceVelocity, double forceVelocityDamping, double interval, ComponentAccessor<EntityStore> componentAccessor) - Overrides:
dampForceVelocityin classMotionControllerBase
-
shouldDampenAppliedVelocitiesY
protected boolean shouldDampenAppliedVelocitiesY()- Overrides:
shouldDampenAppliedVelocitiesYin classMotionControllerBase
-
shouldAlwaysUseGroundResistance
protected boolean shouldAlwaysUseGroundResistance()- Overrides:
shouldAlwaysUseGroundResistancein classMotionControllerBase
-
spawned
public void spawned() -
canAct
public boolean canAct(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
canActin interfacecom.hypixel.hytale.server.npc.movement.controllers.MotionController- Overrides:
canActin classMotionControllerBase
-
inAir
public boolean inAir() -
onGround
public boolean onGround() -
inWater
public boolean inWater() -
getCurrentSpeed
public double getCurrentSpeed() -
getCurrentTurnRadius
public double getCurrentTurnRadius() -
getMaxClimbAngle
public float getMaxClimbAngle() -
getMaxSinkAngle
public float getMaxSinkAngle() -
getMaximumSpeed
public double getMaximumSpeed() -
is2D
public boolean is2D() -
canRestAtPlace
public boolean canRestAtPlace() -
getDesiredAltitudeWeight
public double getDesiredAltitudeWeight() -
getHeightOverGround
public double getHeightOverGround() -
isHorizontalIdle
public boolean isHorizontalIdle(double speed) - Overrides:
isHorizontalIdlein classMotionControllerBase
-
estimateVelocity
-
clearOverrides
public void clearOverrides() -
setDesiredAltitudeOverride
public void setDesiredAltitudeOverride(double[] desiredAltitudeOverride) -
takeOff
public void takeOff(@Nonnull Ref<EntityStore> ref, double speed, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
getMinSpeedAfterForceSquared
public double getMinSpeedAfterForceSquared() -
getDampingDeceleration
public double getDampingDeceleration() -
computeMaxSpeedFromPitch
protected double computeMaxSpeedFromPitch(double pitch)
-