Contents
Class BodyMotionAimCharge
java.lang.Object
com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
com.hypixel.hytale.server.npc.corecomponents.MotionBase
com.hypixel.hytale.server.npc.corecomponents.BodyMotionBase
com.hypixel.hytale.server.npc.corecomponents.combat.BodyMotionAimCharge
- All Implemented Interfaces:
BodyMotion, Motion, RoleStateChange, IAnnotatedComponent
-
Constructor Summary
ConstructorsConstructorDescriptionBodyMotionAimCharge(BuilderBodyMotionAimCharge builder, BuilderSupport support) -
Method Summary
Modifier and TypeMethodDescriptionbooleancomputeSteering(Ref<EntityStore> ref, ExecutionSupport executionSupport, InfoProvider sensorInfo, double dt, Steering desiredSteering, ComponentAccessor<EntityStore> componentAccessor) Calculate desired steering for MotionController.voidpreComputeSteering(Ref<EntityStore> ref, ExecutionSupport executionSupport, InfoProvider sensorInfo, Store<EntityStore> store) Called before calculating the desired steering forMotionControllerMethods inherited from class AnnotatedComponentBase
getIndex, getInfo, getParent, setContextMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BodyMotion
findWrappedBodyMotion, getDesiredTargetDistance, getDesiredTargetEntity, getRelaxedConstraints, getSteeringMotionMethods inherited from interface IAnnotatedComponent
getBreadCrumbs, getBreadCrumbs, getIndex, getInfo, getLabel, getParent, setContextMethods inherited from interface Motion
activate, deactivateMethods inherited from interface RoleStateChange
loaded, motionControllerChanged, registerWithSupport, removed, spawned, teleported, unloaded
-
Constructor Details
-
BodyMotionAimCharge
public BodyMotionAimCharge(@Nonnull BuilderBodyMotionAimCharge builder, @Nonnull BuilderSupport support)
-
-
Method Details
-
preComputeSteering
public void preComputeSteering(@Nonnull Ref<EntityStore> ref, @Nonnull ExecutionSupport executionSupport, @Nullable InfoProvider sensorInfo, @Nonnull Store<EntityStore> store) Description copied from interface:MotionCalled before calculating the desired steering forMotionController- Parameters:
ref- The entity ref of the NPCexecutionSupport- TheExecutionSupportsensorInfo- TheInfoProviderstore- The entity store for component access
-
computeSteering
public boolean computeSteering(@Nonnull Ref<EntityStore> ref, @Nonnull ExecutionSupport executionSupport, @Nullable InfoProvider sensorInfo, double dt, @Nonnull Steering desiredSteering, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Description copied from interface:MotionCalculate desired steering for MotionController.- Parameters:
ref- The entity refexecutionSupport- TheExecutionSupportsensorInfo- SensorInfo with PositionProvider, PathProvider, etc. if requireddt- The interval in seconds for this calculationdesiredSteering- The computed steering force for the MotionControllercomponentAccessor- The entity store- Returns:
falsewhen the end condition has been reached,trueif must be called again to reach end condition or is infinite.
-