Enum minecraft_json::minecraft::common::NumberProvider [−][src]
pub enum NumberProvider<I> { Constant { value: I, }, Uniform { min: Box<NumberProviderValue<I>>, max: Box<NumberProviderValue<I>>, }, Binomial { min: Box<NumberProviderValue<isize>>, max: Box<NumberProviderValue<Number>>, }, Score { target: ScoreboardNameProvider, score: String, scale: Option<Number>, }, }
Expand description
Loot tables use number providers in some places that accept an int or float. They can either be defined as a constant value or as an object.
Variants
A constant value.
A random number following a uniform distribution between two values (inclusive).
Show fields
Fields of Uniform
min: Box<NumberProviderValue<I>>
Number provider. The minimum value.
max: Box<NumberProviderValue<I>>
Number provider. The maximum value.
A random number following a binomial distribution.
Show fields
Fields of Binomial
min: Box<NumberProviderValue<isize>>
Number provider. The amount of trials.
max: Box<NumberProviderValue<Number>>
Number provider. The probability of success on an individual trial.
A scoreboard value.
Show fields
Fields of Score
target: ScoreboardNameProvider
Scoreboard name provider.
score: String
The scoreboard objective.
scale: Option<Number>
Optional. Scale to multiply the score before returning it.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.