Contents
- Description
- Nested Class Summary
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- activate()
- getWanderVerticalMovementRatio()
- getDesiredVerticalRange(Ref, ComponentAccessor)
- setMotionKind(MotionKind)
- constrainRotations(Role, TransformComponent)
- getCurrentMaxBodyRotationSpeed()
- canSteer(Ref, ComponentAccessor)
- inAir()
- inWater()
- onGround()
- getType()
- getSupportedMovementModes()
- getDefaultSpawnMovementModes()
- bisect(Ref, Vector3d, double, Vector3d, double, Vector3d, ComponentAccessor)
- bisect(Ref, Vector3d, Vector3d, Vector3d, ComponentAccessor)
- probeMove(Ref, ProbeMoveData, ComponentAccessor)
- spawned()
- getCurrentSpeed()
- getCurrentTurnRadius()
- getMaxClimbAngle()
- getMaxSinkAngle()
- getMaximumSpeed()
- isFastMotionKind(double)
- is2D()
- canRestAtPlace()
- getDesiredAltitudeWeight()
- getHeightOverGround()
- estimateVelocity(Steering, Vector3d)
- updateModelParameters(Ref, Model, Box, ComponentAccessor)
- relativeSwimDepthToBoundingBox(double, Box, float)
- relativeSwimDepthToHeight(double, Box, float)
- relativeSwimDepthToHeight(Ref, double, Model, Box, ComponentAccessor)
- getDampingDeceleration()
Class MotionControllerDive
java.lang.Object
com.hypixel.hytale.server.npc.movement.controllers.MotionControllerBase
com.hypixel.hytale.server.npc.movement.controllers.MotionControllerDive
- All Implemented Interfaces:
MotionController, DebugSupport.DebugFlagsChangeListener
-
Nested Class Summary
Nested classes/interfaces inherited from interface MotionController
MotionController.VerticalRange -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final Set<MovementMode> static final doublestatic final Set<MovementMode> static final StringFields inherited from class MotionControllerBase
BISECT_DIST, DEBUG_APPLIED_FORCES, DEFAULT_BLOCK_DRAG, DOT_PRODUCT_EPSILON, FILTER_COEFFICIENT, FORCE_SCALE -
Constructor Summary
ConstructorsConstructorDescriptionMotionControllerDive(BuilderSupport builderSupport, BuilderMotionControllerDive builder) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()doublebisect(Ref<EntityStore> ref, org.joml.Vector3d validPosition, double validDistance, org.joml.Vector3d invalidPosition, double invalidDistance, org.joml.Vector3d result, ComponentAccessor<EntityStore> componentAccessor) Bisect using PositionProbeWater#probePosition predicatedoublebisect(Ref<EntityStore> ref, org.joml.Vector3d validPosition, org.joml.Vector3d invalidPosition, org.joml.Vector3d result, ComponentAccessor<EntityStore> componentAccessor) Bisect using PositionProbeWater#probePosition predicatebooleanbooleancanSteer(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) voidconstrainRotations(Role role, TransformComponent transform) booleanestimateVelocity(Steering steering, org.joml.Vector3d velocityOut) doubledoubledoubledoubledoublegetDesiredVerticalRange(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) doublefloatdoublefloatgetType()doublebooleaninAir()booleaninWater()booleanis2D()booleanisFastMotionKind(double speed) booleanonGround()doubleprobeMove(Ref<EntityStore> ref, ProbeMoveData probeMoveData, ComponentAccessor<EntityStore> componentAccessor) static doublerelativeSwimDepthToBoundingBox(double swimDepth, Box boundingBox, float eyeHeight) static doublerelativeSwimDepthToHeight(double swimDepth, Box boundingBox, float eyeHeight) static doublerelativeSwimDepthToHeight(Ref<EntityStore> ref, double swimDepth, Model model, Box boundingBox, ComponentAccessor<EntityStore> componentAccessor) voidsetMotionKind(MotionKind motionKind) voidspawned()voidupdateModelParameters(Ref<EntityStore> ref, Model model, Box boundingBox, ComponentAccessor<EntityStore> componentAccessor) Methods inherited from class MotionControllerBase
addVelocity, applyRailStep, beforeInstructionMotion, beforeInstructionSensorsAndActions, bisect, bisect, canSteerFailReason, clearBlendHeading, clearExternalForces, clearExternalVelocity, clearRequirePreciseMovement, deactivate, enableHeadingBlending, enableHeadingBlending, getCollisionBoundingBox, getCombinedExternalVelocityLength, getComponentSelector, getEpsilonAngle, getEpsilonSpeed, getExternalVelocity, getGravity, getInvalidOverlapMaterials, getMotionKind, getNavState, getPitch, getPlanarComponentSelector, getRelaxedConstraints, getRole, getRoll, getTargetDeltaSquared, getThrottleDuration, getWorldAntiNormal, getWorldNormal, getYaw, isAvoidingBlockDamage, isForcePushed, isForceRecomputePath, isHorizontalIdle, isInProgress, isMovementBlocked, isObstructed, isProcessTriggersHasMoved, isRequiresPreciseMovement, isValidPosition, isValidPosition, moveEntity, onDebugFlagsChanged, postReadPosition, preScaleKnockback, probeMove, processTriggers, requirePreciseMovement, resetNavState, resetObstructedFlags, setComponentSelector, setDebugEntityId, setEnableBlockDamage, setEnableTriggers, setForceRecomputePath, setGravity, setHeadPitchAngleRange, setInertia, setKnockbackScale, setNavState, setRelaxedMoveConstraints, setRole, setUseFixedKnockback, setVelocity, setVelocity, standingOnBlockOfType, steer, steer0, touchesWater, translateToAccessiblePosition, updateMovementState, updatePhysicsValues, waypointDistance, waypointDistance, waypointDistanceSquared, waypointDistanceSquared, willReceiveBlockDamageMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MotionController
addVelocity, clearOverrides, getMaxClimbHeight, getMaxDropHeight, getSquaredDistance, matchesType
-
Field Details
-
TYPE
- See Also:
-
SUPPORTED_MOVEMENT_MODES
-
DEFAULT_SPAWN_MOVEMENT_MODES
-
COLLISION_MATERIALS_ACTIVE
public static final int COLLISION_MATERIALS_ACTIVE- See Also:
-
COLLISION_MATERIALS_PASSIVE
public static final int COLLISION_MATERIALS_PASSIVE- See Also:
-
DEFAULT_SWIM_DEPTH
public static final double DEFAULT_SWIM_DEPTH- See Also:
-
-
Constructor Details
-
MotionControllerDive
public MotionControllerDive(@Nonnull BuilderSupport builderSupport, @Nonnull BuilderMotionControllerDive builder)
-
-
Method Details
-
activate
public void activate()- Specified by:
activatein interfaceMotionController- Overrides:
activatein classMotionControllerBase
-
getWanderVerticalMovementRatio
public double getWanderVerticalMovementRatio() -
getDesiredVerticalRange
@Nonnull public MotionController.VerticalRange getDesiredVerticalRange(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
setMotionKind
- Overrides:
setMotionKindin classMotionControllerBase
-
constrainRotations
-
getCurrentMaxBodyRotationSpeed
public double getCurrentMaxBodyRotationSpeed() -
canSteer
public boolean canSteer(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
canSteerin interfaceMotionController- Overrides:
canSteerin classMotionControllerBase
-
inAir
public boolean inAir() -
inWater
public boolean inWater() -
onGround
public boolean onGround() -
getType
-
getSupportedMovementModes
-
getDefaultSpawnMovementModes
-
bisect
public double bisect(@Nonnull Ref<EntityStore> ref, @Nonnull org.joml.Vector3d validPosition, double validDistance, @Nonnull org.joml.Vector3d invalidPosition, double invalidDistance, @Nonnull org.joml.Vector3d result, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Bisect using PositionProbeWater#probePosition predicate- Parameters:
ref- The entity reference of the entityvalidPosition- Initial valid positionvalidDistance- Initial factorinvalidPosition- Final invalid positioninvalidDistance- Final factorresult- Iterated valid position closer to final positioncomponentAccessor- The component accessor for component access- Returns:
- lerp(standard_bisect_result, initial_factor, invalid_factor)
-
bisect
public double bisect(@Nonnull Ref<EntityStore> ref, @Nonnull org.joml.Vector3d validPosition, @Nonnull org.joml.Vector3d invalidPosition, @Nonnull org.joml.Vector3d result, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Bisect using PositionProbeWater#probePosition predicate- Parameters:
ref- The entity reference of the entityvalidPosition- Initial valid positioninvalidPosition- Final invalid positionresult- Iterated valid position closer to final positioncomponentAccessor- The component accessor for component access- Returns:
- Factor so that lerp(factor, validPosition, invalidPosition) equals result
-
probeMove
public double probeMove(@Nonnull Ref<EntityStore> ref, @Nonnull ProbeMoveData probeMoveData, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
spawned
public void spawned() -
getCurrentSpeed
public double getCurrentSpeed() -
getCurrentTurnRadius
public double getCurrentTurnRadius() -
getMaxClimbAngle
public float getMaxClimbAngle() -
getMaxSinkAngle
public float getMaxSinkAngle() -
getMaximumSpeed
public double getMaximumSpeed() -
isFastMotionKind
public boolean isFastMotionKind(double speed) -
is2D
public boolean is2D() -
canRestAtPlace
public boolean canRestAtPlace() -
getDesiredAltitudeWeight
public double getDesiredAltitudeWeight() -
getHeightOverGround
public double getHeightOverGround() -
estimateVelocity
-
updateModelParameters
public void updateModelParameters(Ref<EntityStore> ref, Model model, @Nonnull Box boundingBox, ComponentAccessor<EntityStore> componentAccessor) - Specified by:
updateModelParametersin interfaceMotionController- Overrides:
updateModelParametersin classMotionControllerBase
-
relativeSwimDepthToBoundingBox
public static double relativeSwimDepthToBoundingBox(double swimDepth, @Nullable Box boundingBox, float eyeHeight) -
relativeSwimDepthToHeight
public static double relativeSwimDepthToHeight(double swimDepth, @Nullable Box boundingBox, float eyeHeight) -
relativeSwimDepthToHeight
public static double relativeSwimDepthToHeight(@Nullable Ref<EntityStore> ref, double swimDepth, Model model, Box boundingBox, @Nullable ComponentAccessor<EntityStore> componentAccessor) -
getDampingDeceleration
public double getDampingDeceleration()
-