pub struct AdvancementClientUpdate {
pub new_advancements: Vec<Entity>,
pub remove_advancements: Vec<Entity>,
pub progress: Vec<(Entity, Option<i64>)>,
pub force_tab_update: ForceTabUpdate,
pub reset: bool,
}
Fields§
§new_advancements: Vec<Entity>
Which advancement’s descriptions send to client
remove_advancements: Vec<Entity>
Which advancements remove from client
progress: Vec<(Entity, Option<i64>)>
Criteria progress update. If None then criteria is not done otherwise it is done
force_tab_update: ForceTabUpdate
Forces client to open a tab
reset: bool
Defines if other advancements should be removed. Also with this flag, client will not show a toast for advancements, which are completed. When the packet is sent, turns to false
Implementations§
source§impl AdvancementClientUpdate
impl AdvancementClientUpdate
sourcepub fn send_advancements(
&mut self,
root: Entity,
children_query: &Query<'_, '_, &Children>,
advancement_check_query: &Query<'_, '_, (), With<Advancement>>,
)
pub fn send_advancements( &mut self, root: Entity, children_query: &Query<'_, '_, &Children>, advancement_check_query: &Query<'_, '_, (), With<Advancement>>, )
Sends all advancements from the root
sourcepub fn remove_advancements(
&mut self,
root: Entity,
children_query: &Query<'_, '_, &Children>,
advancement_check_query: &Query<'_, '_, (), With<Advancement>>,
)
pub fn remove_advancements( &mut self, root: Entity, children_query: &Query<'_, '_, &Children>, advancement_check_query: &Query<'_, '_, (), With<Advancement>>, )
Removes all advancements from the root
sourcepub fn criteria_done(&mut self, criteria: Entity)
pub fn criteria_done(&mut self, criteria: Entity)
Marks criteria as done
sourcepub fn criteria_undone(&mut self, criteria: Entity)
pub fn criteria_undone(&mut self, criteria: Entity)
Marks criteria as undone
Trait Implementations§
source§impl Component for AdvancementClientUpdate
impl Component for AdvancementClientUpdate
source§const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
A constant indicating the storage type used for this component.
§fn register_component_hooks(_hooks: &mut ComponentHooks)
fn register_component_hooks(_hooks: &mut ComponentHooks)
Called when registering this component, allowing mutable access to its [
ComponentHooks
].source§impl Debug for AdvancementClientUpdate
impl Debug for AdvancementClientUpdate
Auto Trait Implementations§
impl Freeze for AdvancementClientUpdate
impl RefUnwindSafe for AdvancementClientUpdate
impl Send for AdvancementClientUpdate
impl Sync for AdvancementClientUpdate
impl Unpin for AdvancementClientUpdate
impl UnwindSafe for AdvancementClientUpdate
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<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere
C: Component,
fn component_ids( components: &mut Components, storages: &mut Storages, ids: &mut impl FnMut(ComponentId), )
unsafe fn from_components<T, F>(ctx: &mut T, func: &mut F) -> C
§fn get_component_ids(
components: &Components,
ids: &mut impl FnMut(Option<ComponentId>),
)
fn get_component_ids( components: &Components, ids: &mut impl FnMut(Option<ComponentId>), )
Gets this [
Bundle
]’s component ids. This will be None
if the component has not been registered.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<C> DynamicBundle for Cwhere
C: Component,
impl<C> DynamicBundle for Cwhere
C: Component,
fn get_components(self, func: &mut impl FnMut(StorageType, OwningPtr<'_>))
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates
Self
using data from the given [World
].