Contents
- Description
- Nested Class Summary
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- getRole()
- setRole(Role)
- setDebugEntityId(int)
- setInertia(double)
- setKnockbackScale(double)
- setUseFixedKnockback(boolean)
- updateModelParameters(Ref, Model, Box, ComponentAccessor)
- setHeadPitchAngleRange(float[])
- postReadPosition(Ref, ComponentAccessor)
- moveEntity(Ref, double, ComponentAccessor)
- getYaw()
- getPitch()
- getRoll()
- touchesWater(boolean, ComponentAccessor)
- updateMovementState(Ref, MovementStates, Steering, Vector3d, ComponentAccessor)
- steer(Ref, Role, Steering, Steering, double, ComponentAccessor)
- steer0(Ref, Role, Steering, Steering, double, ComponentAccessor)
- probeMove(Ref, Vector3dc, Vector3dc, ProbeMoveData, ComponentAccessor)
- applyRailStep(Ref, Role, Vector3dc, RailStepConfig, RailStepResult, ComponentAccessor)
- isInProgress()
- isObstructed()
- getNavState()
- getThrottleDuration()
- getTargetDeltaSquared()
- setNavState(NavState, double, double)
- isForceRecomputePath()
- setForceRecomputePath(boolean)
- beforeInstructionSensorsAndActions(double)
- beforeInstructionMotion(double)
- isHorizontalIdle(double)
- isForcePushed()
- canSteer(Ref, ComponentAccessor)
- canSteerFailReason(Ref, ComponentAccessor)
- isMovementBlocked(Ref, ComponentAccessor)
- bisect(Vector3d, Vector3d, T, BiPredicate, Vector3d)
- bisect(Vector3d, Vector3d, T, BiPredicate, double, Vector3d)
- getExternalVelocity()
- getCombinedExternalVelocityLength()
- clearExternalForces()
- addVelocity(Vector3d, VelocityConfig, float)
- preScaleKnockback(Vector3dc)
- setVelocity(Vector3dc, VelocityConfig, boolean)
- setVelocity(Vector3dc, VelocityConfig, boolean, float)
- clearExternalVelocity()
- setEnableTriggers(boolean)
- setEnableBlockDamage(boolean)
- willReceiveBlockDamage()
- isAvoidingBlockDamage()
- processTriggers(Ref, CollisionResult, double, ComponentAccessor)
- isProcessTriggersHasMoved()
- onDebugFlagsChanged(EnumSet)
- activate()
- resetNavState()
- resetObstructedFlags()
- deactivate()
- getEpsilonSpeed()
- getEpsilonAngle()
- getComponentSelector()
- getPlanarComponentSelector()
- setComponentSelector(Vector3d)
- getWorldNormal()
- getWorldAntiNormal()
- waypointDistance(Vector3dc, Vector3dc)
- waypointDistanceSquared(Vector3dc, Vector3dc)
- waypointDistance(Ref, Vector3d, ComponentAccessor)
- waypointDistanceSquared(Ref, Vector3d, ComponentAccessor)
- isValidPosition(Vector3dc, ComponentAccessor)
- isValidPosition(Vector3dc, CollisionResult, ComponentAccessor)
- getInvalidOverlapMaterials()
- getMotionKind()
- setMotionKind(MotionKind)
- getGravity()
- setGravity(double)
- translateToAccessiblePosition(Vector3d, Box, double, double, ComponentAccessor)
- getCollisionBoundingBox()
- standingOnBlockOfType(int)
- requirePreciseMovement(Vector3d)
- clearRequirePreciseMovement()
- isRequiresPreciseMovement()
- enableHeadingBlending(double, Vector3d, double)
- enableHeadingBlending()
- clearBlendHeading()
- setRelaxedMoveConstraints(EnumSet)
- getRelaxedConstraints()
- updatePhysicsValues(PhysicsValues)
Class MotionControllerBase
java.lang.Object
com.hypixel.hytale.server.npc.movement.controllers.MotionControllerBase
- All Implemented Interfaces:
MotionController, DebugSupport.DebugFlagsChangeListener
- Direct Known Subclasses:
MotionControllerDive, MotionControllerFly, MotionControllerWalk
-
Nested Class Summary
Nested classes/interfaces inherited from interface MotionController
MotionController.VerticalRange -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doublestatic final booleanstatic final doublestatic final doublestatic final doublestatic final double -
Constructor Summary
ConstructorsConstructorDescriptionMotionControllerBase(BuilderSupport builderSupport, BuilderMotionControllerBase builder) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()voidaddVelocity(org.joml.Vector3d velocity, VelocityConfig velocityConfig, float preMultiplier) voidapplyRailStep(Ref<EntityStore> ref, Role role, org.joml.Vector3dc translation, RailStepConfig config, RailStepResult result, ComponentAccessor<EntityStore> componentAccessor) Apply a "rail-mode" step: translates the entity bytranslationwithout running the normal physics pipeline (no gravity, no speed caps, no appliedVelocities).voidbeforeInstructionMotion(double physicsTickDuration) voidbeforeInstructionSensorsAndActions(double physicsTickDuration) <T> doublebisect(org.joml.Vector3d validPosition, org.joml.Vector3d invalidPosition, T t, BiPredicate<T, org.joml.Vector3d> validate, double maxDistance, org.joml.Vector3d result) Find valid movement position using recursive midpoint testing between (valid) initial position and (invalid) computed position<T> doublebisect(org.joml.Vector3d validPosition, org.joml.Vector3d invalidPosition, T t, BiPredicate<T, org.joml.Vector3d> validate, org.joml.Vector3d result) Find valid movement position using recursive midpoint testing between (valid) initial position and (invalid) computed positionbooleancanSteer(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) canSteerFailReason(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) IfMotionController.canSteer(Ref, ComponentAccessor)returns false, this method can be called to get a human-readable reason for why the motion controller cannot steer.voidvoidClears all external force/knockback velocities currently tracked by this motion controller.voidvoidvoidvoidvoidenableHeadingBlending(double heading, org.joml.Vector3d targetPosition, double blendLevel) doubleorg.joml.Vector3dfloatdoubleorg.joml.Vector3dReturns only the controller's external velocity accumulator.doubleintfloatgetPitch()org.joml.Vector3dgetRole()floatgetRoll()doubledoubleorg.joml.Vector3dcorg.joml.Vector3dcfloatgetYaw()booleanbooleanbooleanbooleanisHorizontalIdle(double speed) booleanbooleanisMovementBlocked(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) booleanbooleanbooleanbooleanisValidPosition(org.joml.Vector3dc position, ComponentAccessor<EntityStore> componentAccessor) booleanisValidPosition(org.joml.Vector3dc position, CollisionResult collisionResult, ComponentAccessor<EntityStore> componentAccessor) voidmoveEntity(Ref<EntityStore> ref, double dt, ComponentAccessor<EntityStore> componentAccessor) voidonDebugFlagsChanged(EnumSet<RoleDebugFlags> newFlags) voidpostReadPosition(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) org.joml.Vector3dpreScaleKnockback(org.joml.Vector3dc velocity) doubleprobeMove(Ref<EntityStore> ref, org.joml.Vector3dc position, org.joml.Vector3dc direction, ProbeMoveData probeMoveData, ComponentAccessor<EntityStore> componentAccessor) voidprocessTriggers(Ref<EntityStore> ref, CollisionResult collisionResult, double t, ComponentAccessor<EntityStore> componentAccessor) voidrequirePreciseMovement(org.joml.Vector3d positionHint) voidvoidvoidsetComponentSelector(org.joml.Vector3d componentSelector) voidsetDebugEntityId(int entityId) voidsetEnableBlockDamage(boolean enableBlockDamage) voidsetEnableTriggers(boolean enableTriggers) voidsetForceRecomputePath(boolean recomputePath) voidsetGravity(double gravity) voidsetHeadPitchAngleRange(float[] headPitchAngleRange) voidsetInertia(double inertia) voidsetKnockbackScale(double knockbackScale) voidsetMotionKind(MotionKind motionKind) voidsetNavState(NavState navState, double throttleDuration, double targetDeltaSquared) voidsetRelaxedMoveConstraints(EnumSet<RelaxedConstraint> constraints) voidvoidsetUseFixedKnockback(boolean useFixedKnockback) voidsetVelocity(org.joml.Vector3dc velocity, VelocityConfig velocityConfig, boolean ignoreDamping) voidsetVelocity(org.joml.Vector3dc velocity, VelocityConfig velocityConfig, boolean ignoreDamping, float preMultiplier) booleanstandingOnBlockOfType(int blockSet) doublesteer(Ref<EntityStore> ref, Role role, Steering bodySteering, Steering headSteering, double interval, ComponentAccessor<EntityStore> componentAccessor) Compute velocity vector from steering and move entity.doublesteer0(Ref<EntityStore> ref, Role role, Steering bodySteering, Steering headSteering, double interval, ComponentAccessor<EntityStore> componentAccessor) booleantouchesWater(boolean defaultValue, ComponentAccessor<EntityStore> componentAccessor) Determines whether the entity associated with this motion controller is touching water.booleantranslateToAccessiblePosition(org.joml.Vector3d position, Box boundingBox, double minYValue, double maxYValue, ComponentAccessor<EntityStore> componentAccessor) voidupdateModelParameters(Ref<EntityStore> ref, Model model, Box boundingBox, ComponentAccessor<EntityStore> componentAccessor) voidupdateMovementState(Ref<EntityStore> ref, MovementStates movementStates, Steering steering, org.joml.Vector3d velocity, ComponentAccessor<EntityStore> componentAccessor) voidupdatePhysicsValues(PhysicsValues values) doublewaypointDistance(Ref<EntityStore> ref, org.joml.Vector3d p, ComponentAccessor<EntityStore> componentAccessor) doublewaypointDistance(org.joml.Vector3dc p, org.joml.Vector3dc q) doublewaypointDistanceSquared(Ref<EntityStore> ref, org.joml.Vector3d p, ComponentAccessor<EntityStore> componentAccessor) doublewaypointDistanceSquared(org.joml.Vector3dc p, org.joml.Vector3dc q) booleanMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MotionController
addVelocity, canRestAtPlace, clearOverrides, constrainRotations, estimateVelocity, getCurrentMaxBodyRotationSpeed, getCurrentSpeed, getCurrentTurnRadius, getDefaultSpawnMovementModes, getDesiredAltitudeWeight, getDesiredVerticalRange, getHeightOverGround, getMaxClimbAngle, getMaxClimbHeight, getMaxDropHeight, getMaximumSpeed, getMaxSinkAngle, getSquaredDistance, getSupportedMovementModes, getType, getWanderVerticalMovementRatio, inAir, inWater, is2D, matchesType, onGround, probeMove, spawned
-
Field Details
-
FORCE_SCALE
public static final double FORCE_SCALE- See Also:
-
BISECT_DIST
public static final double BISECT_DIST- See Also:
-
FILTER_COEFFICIENT
public static final double FILTER_COEFFICIENT- See Also:
-
DOT_PRODUCT_EPSILON
public static final double DOT_PRODUCT_EPSILON- See Also:
-
DEFAULT_BLOCK_DRAG
public static final double DEFAULT_BLOCK_DRAG- See Also:
-
DEBUG_APPLIED_FORCES
public static final boolean DEBUG_APPLIED_FORCES- See Also:
-
-
Constructor Details
-
MotionControllerBase
public MotionControllerBase(@Nonnull BuilderSupport builderSupport, @Nonnull BuilderMotionControllerBase builder)
-
-
Method Details
-
getRole
- Specified by:
getRolein interfaceMotionController
-
setRole
- Specified by:
setRolein interfaceMotionController
-
setDebugEntityId
public void setDebugEntityId(int entityId) - Specified by:
setDebugEntityIdin interfaceMotionController
-
setInertia
public void setInertia(double inertia) - Specified by:
setInertiain interfaceMotionController
-
setKnockbackScale
public void setKnockbackScale(double knockbackScale) - Specified by:
setKnockbackScalein interfaceMotionController
-
setUseFixedKnockback
public void setUseFixedKnockback(boolean useFixedKnockback) - Specified by:
setUseFixedKnockbackin interfaceMotionController
-
updateModelParameters
public void updateModelParameters(Ref<EntityStore> ref, Model model, @Nonnull Box boundingBox, ComponentAccessor<EntityStore> componentAccessor) - Specified by:
updateModelParametersin interfaceMotionController
-
setHeadPitchAngleRange
public void setHeadPitchAngleRange(float[] headPitchAngleRange) - Specified by:
setHeadPitchAngleRangein interfaceMotionController
-
postReadPosition
public void postReadPosition(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) -
moveEntity
public void moveEntity(@Nonnull Ref<EntityStore> ref, double dt, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
getYaw
public float getYaw() -
getPitch
public float getPitch() -
getRoll
public float getRoll() -
touchesWater
public boolean touchesWater(boolean defaultValue, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Determines whether the entity associated with this motion controller is touching water.- Parameters:
defaultValue- The default value to return if the chunk is not loaded.componentAccessor- TheComponentAccessor<EntityStore>for component access.- Returns:
trueif the entity is touching water,falseotherwise.
-
updateMovementState
public void updateMovementState(@Nonnull Ref<EntityStore> ref, @Nonnull MovementStates movementStates, @Nonnull Steering steering, @Nonnull org.joml.Vector3d velocity, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
updateMovementStatein interfaceMotionController
-
steer
public double steer(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nonnull Steering bodySteering, @Nonnull Steering headSteering, double interval, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Description copied from interface:MotionControllerCompute velocity vector from steering and move entity.Might do partial move when entity gets blocked. Time remaining to simulate is returned in this case else value <=0.
- Specified by:
steerin interfaceMotionController- Parameters:
ref- The index of the NPC entityrole- The NPC rolebodySteering- Desired body steering to performheadSteering- Desired head steering to performinterval- Time interval to compute movementcomponentAccessor- The archetype chunk of this tick- Returns:
- Time interval left to simulate when motion was blocked.
-
steer0
public double steer0(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nonnull Steering bodySteering, @Nonnull Steering headSteering, double interval, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
probeMove
public double probeMove(@Nonnull Ref<EntityStore> ref, @Nonnull org.joml.Vector3dc position, @Nonnull org.joml.Vector3dc direction, @Nonnull ProbeMoveData probeMoveData, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
probeMovein interfaceMotionController
-
applyRailStep
public void applyRailStep(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nonnull org.joml.Vector3dc translation, @Nonnull RailStepConfig config, @Nonnull RailStepResult result, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Description copied from interface:MotionControllerApply a "rail-mode" step: translates the entity bytranslationwithout running the normal physics pipeline (no gravity, no speed caps, no appliedVelocities). Block collisions that do not matchRailStepConfig.ignoredBlockFilterclamp the motion and flag the controller as obstructed. Filter-rejected blocks and (whenRailStepConfig.candidateEntitiesis non-null) entity hits are reported back viaresult. Triggers / damage blocks still fire through the normal pipeline.- Specified by:
applyRailStepin interfaceMotionController- Parameters:
ref- the NPC entity reference.role- the NPC role.translation- requested world-space translation for this step.config- per-step configuration, owned by the caller.result- output carrier for obstruction / pass-through / entity hits, cleared by this method.componentAccessor- component accessor for this tick.
-
isInProgress
public boolean isInProgress()- Specified by:
isInProgressin interfaceMotionController
-
isObstructed
public boolean isObstructed()- Specified by:
isObstructedin interfaceMotionController
-
getThrottleDuration
public double getThrottleDuration()- Specified by:
getThrottleDurationin interfaceMotionController
-
getTargetDeltaSquared
public double getTargetDeltaSquared()- Specified by:
getTargetDeltaSquaredin interfaceMotionController
-
isForceRecomputePath
public boolean isForceRecomputePath()- Specified by:
isForceRecomputePathin interfaceMotionController
-
setForceRecomputePath
public void setForceRecomputePath(boolean recomputePath) - Specified by:
setForceRecomputePathin interfaceMotionController
-
beforeInstructionSensorsAndActions
public void beforeInstructionSensorsAndActions(double physicsTickDuration) - Specified by:
beforeInstructionSensorsAndActionsin interfaceMotionController
-
beforeInstructionMotion
public void beforeInstructionMotion(double physicsTickDuration) - Specified by:
beforeInstructionMotionin interfaceMotionController
-
isHorizontalIdle
public boolean isHorizontalIdle(double speed) -
isForcePushed
public boolean isForcePushed()- Specified by:
isForcePushedin interfaceMotionController- Returns:
truewhen an external velocity source (knockback, applied velocity, etc.) is currently acting on the controller, so callers that own per-tick motion can hand control back to the regular steer pipeline.
-
canSteer
public boolean canSteer(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
canSteerin interfaceMotionController
-
canSteerFailReason
@Nullable public String canSteerFailReason(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Description copied from interface:MotionControllerIfMotionController.canSteer(Ref, ComponentAccessor)returns false, this method can be called to get a human-readable reason for why the motion controller cannot steer.- Specified by:
canSteerFailReasonin interfaceMotionController- Parameters:
ref- NPC entity referencecomponentAccessor- Accessor to get components of the NPC entity- Returns:
- A human-readable reason for why the motion controller cannot steer, or null if the motion controller can steer
-
isMovementBlocked
public boolean isMovementBlocked(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
bisect
public <T> double bisect(@Nonnull org.joml.Vector3d validPosition, @Nonnull org.joml.Vector3d invalidPosition, @Nonnull T t, @Nonnull BiPredicate<T, org.joml.Vector3d> validate, @Nonnull org.joml.Vector3d result) Find valid movement position using recursive midpoint testing between (valid) initial position and (invalid) computed position- Parameters:
validPosition- Start position (should be valid)invalidPosition- Computed new position (should be invalid)validate- Predicate returning true if a position is valid or false if invalidresult- Computed valid result- Returns:
- Returns factor so that result is lerp(factor, valid, invalid)
-
bisect
public <T> double bisect(@Nonnull org.joml.Vector3d validPosition, @Nonnull org.joml.Vector3d invalidPosition, @Nonnull T t, @Nonnull BiPredicate<T, org.joml.Vector3d> validate, double maxDistance, @Nonnull org.joml.Vector3d result) Find valid movement position using recursive midpoint testing between (valid) initial position and (invalid) computed position- Parameters:
validPosition- Start position (should be valid)invalidPosition- Computed new position (should be invalid)validate- Predicate returning true if a position is valid or false if invalidmaxDistance- Bisection stops when maximum error between valid and invalid position is less than distanceresult- Computed valid result- Returns:
- Returns factor so that result is lerp(factor, valid, invalid)
-
getExternalVelocity
@Nonnull public org.joml.Vector3d getExternalVelocity()Description copied from interface:MotionControllerReturns only the controller's external velocity accumulator.This intentionally excludes split/applied velocities.
- Specified by:
getExternalVelocityin interfaceMotionController
-
getCombinedExternalVelocityLength
public double getCombinedExternalVelocityLength()- Specified by:
getCombinedExternalVelocityLengthin interfaceMotionController- Returns:
- Length of the vector sum of
forceVelocityand all active applied velocities.
-
clearExternalForces
public void clearExternalForces()Description copied from interface:MotionControllerClears all external force/knockback velocities currently tracked by this motion controller.- Specified by:
clearExternalForcesin interfaceMotionController
-
addVelocity
public void addVelocity(@Nonnull org.joml.Vector3d velocity, VelocityConfig velocityConfig, float preMultiplier) - Specified by:
addVelocityin interfaceMotionController
-
preScaleKnockback
public org.joml.Vector3d preScaleKnockback(@Nonnull org.joml.Vector3dc velocity) - Specified by:
preScaleKnockbackin interfaceMotionController
-
setVelocity
public void setVelocity(@Nonnull org.joml.Vector3dc velocity, @Nullable VelocityConfig velocityConfig, boolean ignoreDamping) - Specified by:
setVelocityin interfaceMotionController
-
setVelocity
public void setVelocity(@Nonnull org.joml.Vector3dc velocity, @Nullable VelocityConfig velocityConfig, boolean ignoreDamping, float preMultiplier) - Specified by:
setVelocityin interfaceMotionController
-
clearExternalVelocity
public void clearExternalVelocity() -
setEnableTriggers
public void setEnableTriggers(boolean enableTriggers) -
setEnableBlockDamage
public void setEnableBlockDamage(boolean enableBlockDamage) -
willReceiveBlockDamage
public boolean willReceiveBlockDamage()- Specified by:
willReceiveBlockDamagein interfaceMotionController
-
isAvoidingBlockDamage
public boolean isAvoidingBlockDamage()- Specified by:
isAvoidingBlockDamagein interfaceMotionController
-
processTriggers
public void processTriggers(@Nonnull Ref<EntityStore> ref, @Nonnull CollisionResult collisionResult, double t, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
isProcessTriggersHasMoved
public boolean isProcessTriggersHasMoved() -
onDebugFlagsChanged
- Specified by:
onDebugFlagsChangedin interfaceDebugSupport.DebugFlagsChangeListener- Specified by:
onDebugFlagsChangedin interfaceMotionController
-
activate
public void activate()- Specified by:
activatein interfaceMotionController
-
resetObstructedFlags
public void resetObstructedFlags() -
deactivate
public void deactivate()- Specified by:
deactivatein interfaceMotionController
-
getEpsilonSpeed
public double getEpsilonSpeed() -
getEpsilonAngle
public float getEpsilonAngle() -
getComponentSelector
@Nonnull public org.joml.Vector3d getComponentSelector()- Specified by:
getComponentSelectorin interfaceMotionController
-
getPlanarComponentSelector
@Nonnull public org.joml.Vector3d getPlanarComponentSelector()- Specified by:
getPlanarComponentSelectorin interfaceMotionController
-
setComponentSelector
public void setComponentSelector(@Nonnull org.joml.Vector3d componentSelector) - Specified by:
setComponentSelectorin interfaceMotionController
-
getWorldNormal
public org.joml.Vector3dc getWorldNormal()- Specified by:
getWorldNormalin interfaceMotionController
-
getWorldAntiNormal
public org.joml.Vector3dc getWorldAntiNormal()- Specified by:
getWorldAntiNormalin interfaceMotionController
-
waypointDistance
public double waypointDistance(@Nonnull org.joml.Vector3dc p, @Nonnull org.joml.Vector3dc q) - Specified by:
waypointDistancein interfaceMotionController
-
waypointDistanceSquared
public double waypointDistanceSquared(@Nonnull org.joml.Vector3dc p, @Nonnull org.joml.Vector3dc q) - Specified by:
waypointDistanceSquaredin interfaceMotionController
-
waypointDistance
public double waypointDistance(@Nonnull Ref<EntityStore> ref, @Nonnull org.joml.Vector3d p, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
waypointDistancein interfaceMotionController
-
waypointDistanceSquared
public double waypointDistanceSquared(@Nonnull Ref<EntityStore> ref, @Nonnull org.joml.Vector3d p, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
waypointDistanceSquaredin interfaceMotionController
-
isValidPosition
public boolean isValidPosition(@Nonnull org.joml.Vector3dc position, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
isValidPositionin interfaceMotionController
-
isValidPosition
public boolean isValidPosition(@Nonnull org.joml.Vector3dc position, @Nonnull CollisionResult collisionResult, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
getInvalidOverlapMaterials
public int getInvalidOverlapMaterials() -
getMotionKind
-
setMotionKind
-
getGravity
public double getGravity()- Specified by:
getGravityin interfaceMotionController
-
setGravity
public void setGravity(double gravity) -
translateToAccessiblePosition
public boolean translateToAccessiblePosition(org.joml.Vector3d position, Box boundingBox, double minYValue, double maxYValue, ComponentAccessor<EntityStore> componentAccessor) - Specified by:
translateToAccessiblePositionin interfaceMotionController
-
getCollisionBoundingBox
- Specified by:
getCollisionBoundingBoxin interfaceMotionController
-
standingOnBlockOfType
public boolean standingOnBlockOfType(int blockSet) - Specified by:
standingOnBlockOfTypein interfaceMotionController
-
requirePreciseMovement
public void requirePreciseMovement(@Nullable org.joml.Vector3d positionHint) - Specified by:
requirePreciseMovementin interfaceMotionController
-
clearRequirePreciseMovement
public void clearRequirePreciseMovement() -
isRequiresPreciseMovement
public boolean isRequiresPreciseMovement() -
enableHeadingBlending
public void enableHeadingBlending(double heading, @Nullable org.joml.Vector3d targetPosition, double blendLevel) - Specified by:
enableHeadingBlendingin interfaceMotionController
-
enableHeadingBlending
public void enableHeadingBlending()- Specified by:
enableHeadingBlendingin interfaceMotionController
-
clearBlendHeading
public void clearBlendHeading() -
setRelaxedMoveConstraints
- Specified by:
setRelaxedMoveConstraintsin interfaceMotionController
-
getRelaxedConstraints
- Specified by:
getRelaxedConstraintsin interfaceMotionController
-
updatePhysicsValues
- Specified by:
updatePhysicsValuesin interfaceMotionController
-