ActionSpawn

public class ActionSpawn extends ActionBase

Class ActionSpawn. Provides actionspawn functionality for the Hytale server.

java.lang.Object > ActionBase > ActionSpawn

Field Summary

spawnsLeft

protected int spawnsLeft

Field spawnsLeft.

maxTries

protected int maxTries

Field maxTries.

yaw0

protected float yaw0

Field yaw0.

yawIncrement

protected float yawIncrement

Field yawIncrement.

spawnDelay

protected double spawnDelay

Field spawnDelay.

parent

protected Ref parent

Field parent.

distanceRange

final double[] distanceRange

Field distanceRange.

countRange

final int[] countRange

Field countRange.

delayRange

final double[] delayRange

Field delayRange.

spawningContext

final SpawningContext spawningContext

Field spawningContext.

roleBuilder

final Builder roleBuilder

Field roleBuilder.

world

final World world

Field world.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

modelComponent

final ModelComponent modelComponent

Field modelComponent.

position

final Vector3d position

Field position.

bodyRotation

final Vector3f bodyRotation

Field bodyRotation.

eyeHeight

final float eyeHeight

Field eyeHeight.

distance

final double distance

Field distance.

flockDefinition

final FlockAsset flockDefinition

Field flockDefinition.

parentNpcComponent

final NPCEntity parentNpcComponent

Field parentNpcComponent.

npcComponent

final NPCEntity npcComponent

Field npcComponent.

role

final Role role

Field role.

activeMotionController

final MotionController activeMotionController

Field activeMotionController.

endVelocity

final double endVelocity

Field endVelocity.

acceleration

final double acceleration

Field acceleration.

v0

final double v0

Field v0.

height

final double height

Field height.

gravity

final double gravity

Field gravity.

throwSpeed

final double throwSpeed

Field throwSpeed.

heading

final float heading

Field heading.

Method Detail

ActionSpawn

public public ActionSpawn (@Nonnull final BuilderActionSpawn builderActionSpawn, @Nonnull final BuilderSupport builderSupport)

Method ActionSpawn.

Parameters:
@Nonnull final BuilderActionSpawn builderActionSpawn
@Nonnull final BuilderSupport builderSupport

canExecute

public boolean canExecute (@Nonnull final Ref ref, @Nonnull final Role role, @Nullable final InfoProvider sensorInfo, final double dt, @Nonnull final Store store)

Method canExecute.

Parameters:
@Nonnull final Ref ref
@Nonnull final Role role
@Nullable final InfoProvider sensorInfo
final double dt
@Nonnull final Store store

execute

public boolean execute (@Nonnull final Ref ref, @Nonnull final Role role, @Nonnull final InfoProvider sensorInfo, final double dt, @Nonnull final Store store)

Method execute.

Parameters:
@Nonnull final Ref ref
@Nonnull final Role role
@Nonnull final InfoProvider sensorInfo
final double dt
@Nonnull final Store store

if

public else if (this.fanOut)

Method if.

Parameters:
this.fanOut this.fanOut

trySpawn

protected boolean trySpawn (@Nonnull final Ref ref, @Nonnull final SpawningContext spawningContext, @Nonnull final Store store)

Method trySpawn.

Parameters:
@Nonnull final Ref ref
@Nonnull final SpawningContext spawningContext
@Nonnull final Store store

postSpawn

protected void postSpawn (@Nonnull final NPCEntity npcComponent, @Nonnull final Ref ref, @Nonnull final Store store)

Method postSpawn.

Parameters:
@Nonnull final NPCEntity npcComponent
@Nonnull final Ref ref
@Nonnull final Store store

joinFlock

protected void joinFlock (@Nonnull final Ref targetRef, @Nonnull final Store store)

Method joinFlock.

Parameters:
@Nonnull final Ref targetRef
@Nonnull final Store store

launchAtTarget

protected void launchAtTarget (@Nonnull final Ref ref, @Nonnull final Store store)

Method launchAtTarget.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store

IllegalStateException

public new IllegalStateException (String.format("Error in computing pitch with distance %s, height %s, and speed %s despite ensuring possible throw speed", distance, height, throwSpeed)

Method IllegalStateException.

Parameters:
height %s
and speed %s despite ensuring possible throw speed"
distance distance
height height
throwSpeed throwSpeed

deferredSpawning

protected boolean deferredSpawning (@Nonnull final Ref ref, @Nonnull final Role role, final double dt, @Nonnull final Store store)

Method deferredSpawning.

Parameters:
@Nonnull final Ref ref
@Nonnull final Role role
final double dt
@Nonnull final Store store