Class MotionSequence<T extends Motion>
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<T>
- All Implemented Interfaces:
Motion,RoleStateChange,IAnnotatedComponent,IAnnotatedComponentCollection
- Direct Known Subclasses:
BodyMotionSequence,HeadMotionSequence
public abstract class MotionSequence<T extends Motion>
extends MotionBase
implements IAnnotatedComponentCollection
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Tprotected booleanprotected intprotected final booleanprotected final booleanprotected final T[]Fields inherited from class com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
parent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(Ref<EntityStore> ref, Role role, ComponentAccessor<EntityStore> componentAccessor) protected voidactivateNext(Ref<EntityStore> ref, int newIndex, Role role, ComponentAccessor<EntityStore> componentAccessor) intbooleancomputeSteering(Ref<EntityStore> ref, Role role, InfoProvider sensorInfo, double dt, Steering desiredSteering, ComponentAccessor<EntityStore> componentAccessor) voiddeactivate(Ref<EntityStore> ref, Role role, ComponentAccessor<EntityStore> componentAccessor) protected voiddoActivate(Ref<EntityStore> ref, Role role, ComponentAccessor<EntityStore> componentAccessor) getComponent(int index) voidvoidmotionControllerChanged(Ref<EntityStore> ref, NPCEntity npcComponent, com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, ComponentAccessor<EntityStore> componentAccessor) voidregisterWithSupport(Role role) voidvoidrestart()voidsetContext(IAnnotatedComponent parent, int index) voidvoidteleported(Role role, World from, World to) voidMethods inherited from class com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
getIndex, getInfo, getParentMethods 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.util.IAnnotatedComponent
getBreadCrumbs, getBreadCrumbs, getIndex, getInfo, getLabel, getParentMethods inherited from interface com.hypixel.hytale.server.npc.instructions.Motion
preComputeSteering
-
Field Details
-
looped
protected final boolean looped -
restartOnActivate
protected final boolean restartOnActivate -
steps
-
finished
protected boolean finished -
index
protected int index -
activeMotion
-
-
Constructor Details
-
MotionSequence
-
-
Method Details
-
activate
public void activate(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
deactivate
public void deactivate(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
deactivatein interfaceMotion
-
computeSteering
public boolean computeSteering(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nullable InfoProvider sensorInfo, double dt, @Nonnull Steering desiredSteering, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
computeSteeringin interfaceMotion
-
registerWithSupport
- Specified by:
registerWithSupportin interfaceRoleStateChange
-
motionControllerChanged
public void motionControllerChanged(@Nullable Ref<EntityStore> ref, @Nonnull NPCEntity npcComponent, com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, @Nullable ComponentAccessor<EntityStore> componentAccessor) - Specified by:
motionControllerChangedin interfaceRoleStateChange
-
loaded
- Specified by:
loadedin interfaceRoleStateChange
-
spawned
- Specified by:
spawnedin interfaceRoleStateChange
-
unloaded
- Specified by:
unloadedin interfaceRoleStateChange
-
removed
- Specified by:
removedin interfaceRoleStateChange
-
teleported
- Specified by:
teleportedin interfaceRoleStateChange
-
componentCount
public int componentCount()- Specified by:
componentCountin interfaceIAnnotatedComponentCollection
-
getComponent
- Specified by:
getComponentin interfaceIAnnotatedComponentCollection
-
setContext
- Specified by:
setContextin interfaceIAnnotatedComponent- Overrides:
setContextin classAnnotatedComponentBase
-
restart
public void restart() -
doActivate
protected void doActivate(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
activateNext
protected void activateNext(@Nonnull Ref<EntityStore> ref, int newIndex, @Nonnull Role role, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
-