Class ActionSpawn
java.lang.Object
com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
com.hypixel.hytale.server.npc.corecomponents.ActionBase
com.hypixel.hytale.server.npc.corecomponents.lifecycle.ActionSpawn
- All Implemented Interfaces:
Action,RoleStateChange,IAnnotatedComponent,IComponentExecutionControl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanprotected final Stringprotected final booleanprotected final Stringprotected final booleanprotected final Vector3dprotected final intprotected final doubleprotected final doubleprotected intprotected final intprotected final doubleprotected final doubleprotected Ref<EntityStore> protected final float[]protected final booleanprotected final Vector3dprotected final intprotected final Vector3fprotected final floatprotected doubleprotected final floatprotected intprotected final Stringprotected final Stringprotected final doubleprotected final Vector3dprotected floatprotected floatFields inherited from class com.hypixel.hytale.server.npc.corecomponents.ActionBase
active, once, triggeredFields inherited from class com.hypixel.hytale.server.npc.corecomponents.AnnotatedComponentBase
indexFields inherited from interface com.hypixel.hytale.server.npc.instructions.Action
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionActionSpawn(BuilderActionSpawn builderActionSpawn, BuilderSupport builderSupport) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanExecute(Ref<EntityStore> ref, Role role, InfoProvider sensorInfo, double dt, Store<EntityStore> store) protected booleandeferredSpawning(Ref<EntityStore> ref, Role role, double dt, Store<EntityStore> store) booleanexecute(Ref<EntityStore> ref, Role role, InfoProvider sensorInfo, double dt, Store<EntityStore> store) protected voidjoinFlock(Ref<EntityStore> targetRef, Store<EntityStore> store) protected voidlaunchAtTarget(Ref<EntityStore> ref, Store<EntityStore> store) protected voidpostSpawn(NPCEntity npcComponent, Ref<EntityStore> ref, Store<EntityStore> store) protected booleantrySpawn(Ref<EntityStore> ref, SpawningContext spawningContext, Store<EntityStore> store) Methods inherited from class com.hypixel.hytale.server.npc.corecomponents.ActionBase
activate, clearOnce, deactivate, isActivated, isTriggered, processDelay, setOnceMethods 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.RoleStateChange
loaded, motionControllerChanged, registerWithSupport, removed, spawned, teleported, unloaded
-
Field Details
-
spawnDirection
protected final float spawnDirection -
spawnAngle
protected final float spawnAngle -
fanOut
protected final boolean fanOut -
minDistance
protected final double minDistance -
maxDistance
protected final double maxDistance -
kind
-
flock
-
roleIndex
protected final int roleIndex -
maxCount
protected final int maxCount -
minCount
protected final int minCount -
minDelay
protected final double minDelay -
maxDelay
protected final double maxDelay -
position
-
rotation
-
launchAtTarget
protected final boolean launchAtTarget -
pitchHigh
protected final boolean pitchHigh -
targetPosition
-
launchDirection
-
pitch
@Nullable protected final float[] pitch -
spread
protected final double spread -
joinFlock
protected final boolean joinFlock -
spawnState
-
spawnSubState
-
spawnsLeft
protected int spawnsLeft -
maxTries
protected int maxTries -
yaw0
protected float yaw0 -
yawIncrement
protected float yawIncrement -
spawnDelay
protected double spawnDelay -
parent
-
-
Constructor Details
-
ActionSpawn
public ActionSpawn(@Nonnull BuilderActionSpawn builderActionSpawn, @Nonnull BuilderSupport builderSupport)
-
-
Method Details
-
canExecute
public boolean canExecute(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nullable InfoProvider sensorInfo, double dt, @Nonnull Store<EntityStore> store) - Specified by:
canExecutein interfaceAction- Overrides:
canExecutein classActionBase
-
execute
public boolean execute(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nonnull InfoProvider sensorInfo, double dt, @Nonnull Store<EntityStore> store) - Specified by:
executein interfaceAction- Overrides:
executein classActionBase
-
trySpawn
protected boolean trySpawn(@Nonnull Ref<EntityStore> ref, @Nonnull SpawningContext spawningContext, @Nonnull Store<EntityStore> store) -
postSpawn
protected void postSpawn(@Nonnull NPCEntity npcComponent, @Nonnull Ref<EntityStore> ref, @Nonnull Store<EntityStore> store) -
joinFlock
-
launchAtTarget
-
deferredSpawning
protected boolean deferredSpawning(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, double dt, @Nonnull Store<EntityStore> store)
-