Package vazkii.botania.client.fx
Interface BoltParticleOptions.SpawnFunction
- Enclosing class:
BoltParticleOptions
public static interface BoltParticleOptions.SpawnFunction
A bolt's spawn function defines its spawn behavior (handled by the renderer). A spawn function generates a lower
and upper bound on a spawn delay (via
getSpawnDelayBounds()), for which an intermediate value is chosen randomly from a uniform distribution
(getSpawnDelay()). Spawn functions can also be defined as
'consecutive,' in which cases the Bolt Renderer will always begin rendering a new bolt instance when one expires.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BoltParticleOptions.SpawnFunctionWill re-spawn a bolt each time one expires.static final BoltParticleOptions.SpawnFunctionAllow for bolts to be spawned each update call without any delay. -
Method Summary
Modifier and TypeMethodDescriptiondelay(float delay) Spawn bolts with a specified constant delay.default floatgetSpawnDelay(Random rand) getSpawnDelayBounds(Random rand) default booleannoise(float delay, float noise) Spawns bolts with a specified delay and specified noise value, which will be randomly applied at either end of the delay bounds.
-
Field Details
-
NO_DELAY
Allow for bolts to be spawned each update call without any delay. -
CONSECUTIVE
Will re-spawn a bolt each time one expires.
-
-
Method Details
-
delay
Spawn bolts with a specified constant delay. -
noise
Spawns bolts with a specified delay and specified noise value, which will be randomly applied at either end of the delay bounds. -
getSpawnDelayBounds
-
getSpawnDelay
-
isConsecutive
default boolean isConsecutive()
-