pub struct Advancement {
pub(crate) key: Identifier,
pub(crate) parent: Option<Identifier>,
pub(crate) criteria: BTreeMap<String, Box<dyn AnyCriterion>>,
pub(crate) display: Option<DisplayInfo>,
pub(crate) send_telemetry_event: bool,
pub(crate) requirements: AdvancementRequirement,
pub(crate) rewards: AdvancementRewards,
}Fields§
§key: Identifier§parent: Option<Identifier>§criteria: BTreeMap<String, Box<dyn AnyCriterion>>§display: Option<DisplayInfo>§send_telemetry_event: bool§requirements: AdvancementRequirement§rewards: AdvancementRewardsImplementations§
Source§impl Advancement
impl Advancement
pub const fn is_root(&self) -> bool
pub fn name(&self) -> TextComponent
pub fn decorate_name(&self) -> Option<TextComponent>
pub const fn key(&self) -> &Identifier
pub fn has_criterion(&self, criterion: &str) -> bool
pub fn get_criterion(&self, criterion: &str) -> Option<&dyn AnyCriterion>
pub fn criteria_ids(&self) -> impl IntoIterator<Item = &str>
pub const fn requirements(&self) -> &AdvancementRequirement
pub const fn display(&self) -> Option<&DisplayInfo>
pub const fn rewards(&self) -> &AdvancementRewards
pub const fn send_telemetry_event(&self) -> bool
pub const fn parent(&self) -> Option<&Identifier>
Trait Implementations§
Source§impl Debug for Advancement
impl Debug for Advancement
Source§impl Default for Advancement
impl Default for Advancement
Source§impl Display for Advancement
impl Display for Advancement
impl Eq for Advancement
Source§impl Hash for Advancement
impl Hash for Advancement
Source§impl Ord for Advancement
impl Ord for Advancement
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for Advancement
impl PartialEq for Advancement
Auto Trait Implementations§
impl !RefUnwindSafe for Advancement
impl !UnwindSafe for Advancement
impl Freeze for Advancement
impl Send for Advancement
impl Sync for Advancement
impl Unpin for Advancement
impl UnsafeUnpin for Advancement
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>