mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
Fix example in azalea-world
This commit is contained in:
parent
3b93fc6412
commit
8e1537ab3b
1 changed files with 11 additions and 6 deletions
|
@ -327,14 +327,19 @@ impl WeakEntityStorage {
|
|||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// let mut storage = EntityStorage::new();
|
||||
/// storage.insert(
|
||||
/// # use std::sync::Arc;
|
||||
/// # use azalea_world::{PartialEntityStorage, entity::{EntityData, EntityMetadata, metadata}};
|
||||
/// # use azalea_core::Vec3;
|
||||
/// # use uuid::Uuid;
|
||||
/// #
|
||||
/// let mut storage = PartialEntityStorage::default();
|
||||
/// storage.insert(
|
||||
/// 0,
|
||||
/// Arc::new(EntityData::new(
|
||||
/// uuid,
|
||||
/// EntityData::new(
|
||||
/// Uuid::nil(),
|
||||
/// Vec3::default(),
|
||||
/// EntityMetadata::Player(metadata::Player::default()),
|
||||
/// )),
|
||||
/// EntityMetadata::Player(metadata::Player::default()),
|
||||
/// ),
|
||||
/// );
|
||||
/// for entity in storage.shared.read().entities() {
|
||||
/// if let Some(entity) = entity.upgrade() {
|
||||
|
|
Loading…
Add table
Reference in a new issue