Contents
- Description
- Nested Class Summary
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- activate(Ref, ExecutionSupport, ComponentAccessor)
- deactivate(Ref, ExecutionSupport, ComponentAccessor)
- motionControllerChanged(Ref, NPCEntity, MotionController, ComponentAccessor)
- loaded(ExecutionSupport)
- registerWithSupport(ExecutionSupport)
- preComputeSteering(Ref, ExecutionSupport, InfoProvider, Store)
- computeSteering(Ref, ExecutionSupport, InfoProvider, double, Steering, ComponentAccessor)
- getState()
- getBlockHitCount()
- getBlockHit(int)
- getEntityHitCount()
- getEntityHit(int)
- onDebugFlagsChanged(EnumSet)
Class BodyMotionCharge
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.BodyMotionCharge
- All Implemented Interfaces:
BodyMotion, Motion, RoleStateChange, DebugSupport.DebugFlagsChangeListener, IAnnotatedComponent
public class BodyMotionCharge
extends BodyMotionBase
implements DebugSupport.DebugFlagsChangeListener
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(Ref<EntityStore> ref, ExecutionSupport executionSupport, ComponentAccessor<EntityStore> componentAccessor) Called to activate this motionbooleancomputeSteering(Ref<EntityStore> ref, ExecutionSupport executionSupport, InfoProvider sensorInfo, double dt, Steering desiredSteering, ComponentAccessor<EntityStore> componentAccessor) Calculate desired steering for MotionController.voiddeactivate(Ref<EntityStore> ref, ExecutionSupport executionSupport, ComponentAccessor<EntityStore> componentAccessor) Called to deactivate this motiongetBlockHit(int i) intgetEntityHit(int i) intgetState()voidloaded(ExecutionSupport executionSupport) voidmotionControllerChanged(Ref<EntityStore> ref, NPCEntity npcComponent, MotionController motionController, ComponentAccessor<EntityStore> componentAccessor) voidonDebugFlagsChanged(EnumSet<RoleDebugFlags> newFlags) voidpreComputeSteering(Ref<EntityStore> ref, ExecutionSupport executionSupport, InfoProvider sensorInfo, Store<EntityStore> store) Called before calculating the desired steering forMotionControllervoidregisterWithSupport(ExecutionSupport executionSupport) Methods 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 RoleStateChange
removed, spawned, teleported, unloaded
-
Constructor Details
-
BodyMotionCharge
-
-
Method Details
-
activate
public void activate(@Nonnull Ref<EntityStore> ref, @Nonnull ExecutionSupport executionSupport, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Description copied from interface:MotionCalled to activate this motion- Specified by:
activatein interfaceMotion- Parameters:
ref- The entity ref of the NPCexecutionSupport- TheExecutionSupportcomponentAccessor- The entity store for component access
-
deactivate
public void deactivate(@Nonnull Ref<EntityStore> ref, @Nonnull ExecutionSupport executionSupport, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Description copied from interface:MotionCalled to deactivate this motion- Specified by:
deactivatein interfaceMotion- Parameters:
ref- The entity refexecutionSupport- TheExecutionSupportcomponentAccessor- The component store for component access
-
motionControllerChanged
public void motionControllerChanged(@Nullable Ref<EntityStore> ref, @Nonnull NPCEntity npcComponent, MotionController motionController, @Nullable ComponentAccessor<EntityStore> componentAccessor) - Specified by:
motionControllerChangedin interfaceRoleStateChange
-
loaded
- Specified by:
loadedin interfaceRoleStateChange
-
registerWithSupport
- Specified by:
registerWithSupportin interfaceRoleStateChange
-
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- Specified by:
preComputeSteeringin interfaceMotion- 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.- Specified by:
computeSteeringin interfaceMotion- 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.
-
getState
-
getBlockHitCount
public int getBlockHitCount() -
getBlockHit
-
getEntityHitCount
public int getEntityHitCount() -
getEntityHit
-
onDebugFlagsChanged
- Specified by:
onDebugFlagsChangedin interfaceDebugSupport.DebugFlagsChangeListener
-