Contents
Class BodyMotionSequence
java.lang.Object
com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
com.hypixel.hytale.server.npc.corecomponents.MotionBase
com.hypixel.hytale.server.npc.corecomponents.utility.MotionSequence<BodyMotion>
com.hypixel.hytale.server.npc.corecomponents.utility.BodyMotionSequence
- All Implemented Interfaces:
BodyMotion, Motion, RoleStateChange, IAnnotatedComponent, IAnnotatedComponentCollection
public class BodyMotionSequence
extends MotionSequence<BodyMotion>
implements BodyMotion, IAnnotatedComponentCollection
-
Constructor Summary
ConstructorsConstructorDescriptionBodyMotionSequence(BuilderBodyMotionSequence builder, BuilderSupport support) -
Method Summary
Modifier and TypeMethodDescription<T extends BodyMotion>
TfindWrappedBodyMotion(Class<T> clazz) Search for a wrapped body motion of the given type, looking through wrapper body motions such asBodyMotionTimerandBodyMotionSequence.Return Motion which actually generated the steering valueMethods inherited from class MotionSequence
activate, componentCount, computeSteering, deactivate, getComponent, loaded, motionControllerChanged, registerWithSupport, removed, restart, setContext, spawned, teleported, unloadedMethods inherited from class AnnotatedComponentBase
getIndex, getInfo, getParentMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BodyMotion
getDesiredTargetDistance, getDesiredTargetEntity, getRelaxedConstraintsMethods inherited from interface IAnnotatedComponent
getBreadCrumbs, getBreadCrumbs, getIndex, getInfo, getLabel, getParent, setContextMethods inherited from interface IAnnotatedComponentCollection
componentCount, getComponentMethods inherited from interface Motion
activate, computeSteering, deactivate, preComputeSteeringMethods inherited from interface RoleStateChange
loaded, motionControllerChanged, registerWithSupport, removed, spawned, teleported, unloaded
-
Constructor Details
-
BodyMotionSequence
public BodyMotionSequence(@Nonnull BuilderBodyMotionSequence builder, @Nonnull BuilderSupport support)
-
-
Method Details
-
getSteeringMotion
Description copied from interface:BodyMotionReturn Motion which actually generated the steering valueMotions can be wrappers around other motions (like MotionTimer). This method returns the actually executed motion generating the steering value in #computeSteering.
- Specified by:
getSteeringMotionin interfaceBodyMotion- Returns:
- Motion generating the steering value
-
findWrappedBodyMotion
Description copied from interface:BodyMotionSearch for a wrapped body motion of the given type, looking through wrapper body motions such asBodyMotionTimerandBodyMotionSequence.The default implementation uses
BodyMotion.getSteeringMotion()to unwrap a single level of wrapping, which handles timers correctly at any depth sincegetSteeringMotion()is recursive. Wrapper types that aggregate multiple motions (e.g. sequences) should override to search their children.- Specified by:
findWrappedBodyMotionin interfaceBodyMotion- Parameters:
clazz- the type to look for- Returns:
- the first wrapped instance of the given type, or
nullif none found
-