Number provider
A NumberProvider can be written as a number, a formula string, or an object with a type from this section. Game-time fields default to ticks; 20 ticks is usually one second.
| Type | Purpose |
|---|---|
saturn:constant | Returns the fixed value in the definition. |
saturn:expression | Evaluates an exp4j expression; params can override expression parameters. |
saturn:context_variable | Reads a context or registered formula variable; unknown variables can use a fallback value. |
saturn:sum | Sums multiple number providers. |
saturn:uniform | Samples uniformly between the given minimum and maximum. |
saturn:binomial | Generates a binomial random value from n trials and a per-trial probability p. |
saturn:weighted_list | Selects a value from distribution entries by weight. |
saturn:conditional | Checks entity conditions in order and uses the value of the first matching branch. |
saturn:js | Calls a callback registered by KubeJS and passes the params argument. |