Struct minecraft_json::minecraft::data::advancement::Advancement [−][src]
pub struct Advancement { pub display: Option<Box<Display>>, pub parent: Option<String>, pub criteria: BTreeMap<String, Criterion>, pub requirements: Vec<Vec<String>>, pub rewards: Option<Rewards>, }
Expand description
An advancement JSON file.
Fields
display: Option<Box<Display>>
The optional display data.
parent: Option<String>
The optional parent advancement directory of this advancement. If this field is absent, this advancement is a root advancement. Circular references cause a loading failure.
criteria: BTreeMap<String, Criterion>
The required criteria that have to be met.
- Key: A name given to the criterion (can be any string, must be unique).
- Value:
trigger
: The trigger and conditions for this advancement; specifies what the game should check for the advancement.conditions
: All the conditions that need to be met when the trigger gets activated.
requirements: Vec<Vec<String>>
An optional list of requirements (all the <criteriaNames>
). If all criteria are required,
this may be omitted. With multiple criteria: requirements contains a list of lists with
criteria (all criteria need to be mentioned). If all of the lists each have any criteria
met, the advancement is complete. (basically AND grouping of OR groups)
rewards: Option<Rewards>
An optional object representing the rewards provided when this advancement is obtained.
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 !=
.