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 BuilderActionSpawnbuilderActionSpawn@Nonnull final BuilderSupportbuilderSupport
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 Refref@Nonnull final Rolerole@Nullable final InfoProvidersensorInfofinal doubledt@Nonnull final Storestore
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 Refref@Nonnull final Rolerole@Nonnull final InfoProvidersensorInfofinal doubledt@Nonnull final Storestore
if
public
else
if
(this.fanOut)
Method if.
- Parameters:
this.fanOutthis.fanOut
trySpawn
protected
boolean
trySpawn
(@Nonnull final Ref ref, @Nonnull final SpawningContext spawningContext, @Nonnull final Store store)
Method trySpawn.
- Parameters:
@Nonnull final Refref@Nonnull final SpawningContextspawningContext@Nonnull final Storestore
postSpawn
protected
void
postSpawn
(@Nonnull final NPCEntity npcComponent, @Nonnull final Ref ref, @Nonnull final Store store)
Method postSpawn.
- Parameters:
@Nonnull final NPCEntitynpcComponent@Nonnull final Refref@Nonnull final Storestore
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%sand speed %s despite ensuring possible throwspeed"distancedistanceheightheightthrowSpeedthrowSpeed
deferredSpawning
protected
boolean
deferredSpawning
(@Nonnull final Ref ref, @Nonnull final Role role, final double dt, @Nonnull final Store store)
Method deferredSpawning.
- Parameters:
@Nonnull final Refref@Nonnull final Rolerolefinal doubledt@Nonnull final Storestore