Skip to main content

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.

TypePurpose
saturn:constantReturns the fixed value in the definition.
saturn:expressionEvaluates an exp4j expression; params can override expression parameters.
saturn:context_variableReads a context or registered formula variable; unknown variables can use a fallback value.
saturn:sumSums multiple number providers.
saturn:uniformSamples uniformly between the given minimum and maximum.
saturn:binomialGenerates a binomial random value from n trials and a per-trial probability p.
saturn:weighted_listSelects a value from distribution entries by weight.
saturn:conditionalChecks entity conditions in order and uses the value of the first matching branch.
saturn:jsCalls a callback registered by KubeJS and passes the params argument.