Class MotionTimer<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.timer.MotionTimer<T>
- All Implemented Interfaces:
Motion,RoleStateChange,IAnnotatedComponent
- Direct Known Subclasses:
BodyMotionTimer,HeadMotionTimer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleprotected final doubleprotected final doubleprotected final Tprotected doubleFields inherited from class com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
index, parent -
Constructor Summary
ConstructorsConstructorDescriptionMotionTimer(BuilderMotionTimer<T> builder, BuilderSupport builderSupport, T motion) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(Ref<EntityStore> ref, Role role, ComponentAccessor<EntityStore> componentAccessor) booleancomputeSteering(Ref<EntityStore> ref, Role support, InfoProvider sensorInfo, double dt, Steering desiredSteering, ComponentAccessor<EntityStore> componentAccessor) voiddeactivate(Ref<EntityStore> ref, Role role, ComponentAccessor<EntityStore> componentAccessor) voidvoidmotionControllerChanged(Ref<EntityStore> ref, NPCEntity npcComponent, com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, ComponentAccessor<EntityStore> componentAccessor) voidregisterWithSupport(Role role) voidvoidvoidteleported(Role role, World from, World to) voidMethods inherited from class com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
getIndex, getInfo, getParent, setContextMethods 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, getParent, setContextMethods inherited from interface com.hypixel.hytale.server.npc.instructions.Motion
preComputeSteering
-
Field Details
-
motion
-
atLeastSeconds
protected final double atLeastSeconds -
atMostSeconds
protected final double atMostSeconds -
activeTime
protected double activeTime -
timeToLive
protected double timeToLive
-
-
Constructor Details
-
MotionTimer
public MotionTimer(@Nonnull BuilderMotionTimer<T> builder, @Nonnull BuilderSupport builderSupport, T motion)
-
-
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) -
computeSteering
public boolean computeSteering(@Nonnull Ref<EntityStore> ref, @Nonnull Role support, @Nullable InfoProvider sensorInfo, double dt, @Nonnull Steering desiredSteering, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
registerWithSupport
-
motionControllerChanged
public void motionControllerChanged(@Nullable Ref<EntityStore> ref, @Nonnull NPCEntity npcComponent, com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, @Nullable ComponentAccessor<EntityStore> componentAccessor) -
loaded
-
spawned
-
unloaded
-
removed
-
teleported
-