From 719379a8a76ab0685f2bd14bebe2f0cd1e97f06b Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Tue, 7 Mar 2023 14:14:36 -0600 Subject: Bevy 0.10 (#79) * replace 0.9.1 with 0.10.0 * start migrating to bevy .10 * well it compiles * doesn't immediately panic * remove unused imports * fmt * delete azalea-ecs * make RelativeEntityUpdate an EntityCommand * fix a doc test * explain what FixedUpdate does --- azalea-world/src/container.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'azalea-world/src/container.rs') diff --git a/azalea-world/src/container.rs b/azalea-world/src/container.rs index 74d70659..fdd89a75 100644 --- a/azalea-world/src/container.rs +++ b/azalea-world/src/container.rs @@ -1,5 +1,5 @@ use azalea_core::ResourceLocation; -use azalea_ecs::system::Resource; +use bevy_ecs::system::Resource; use log::error; use nohash_hasher::IntMap; use parking_lot::RwLock; @@ -8,7 +8,7 @@ use std::{ sync::{Arc, Weak}, }; -use crate::{ChunkStorage, World}; +use crate::{ChunkStorage, Instance}; /// A container of [`World`]s. Worlds are stored as a Weak pointer here, so /// if no clients are using a world it will be forgotten. @@ -26,7 +26,7 @@ pub struct WorldContainer { // telling them apart. We hope most servers are nice and don't do that though. It's only an // issue when there's multiple clients with the same WorldContainer in different worlds // anyways. - pub worlds: HashMap>>, + pub worlds: HashMap>>, } impl WorldContainer { @@ -37,7 +37,7 @@ impl WorldContainer { } /// Get a world from the container. - pub fn get(&self, name: &ResourceLocation) -> Option>> { + pub fn get(&self, name: &ResourceLocation) -> Option>> { self.worlds.get(name).and_then(|world| world.upgrade()) } @@ -49,7 +49,7 @@ impl WorldContainer { name: ResourceLocation, height: u32, min_y: i32, - ) -> Arc> { + ) -> Arc> { if let Some(existing_lock) = self.worlds.get(&name).and_then(|world| world.upgrade()) { let existing = existing_lock.read(); if existing.chunks.height != height { @@ -66,7 +66,7 @@ impl WorldContainer { } existing_lock.clone() } else { - let world = Arc::new(RwLock::new(World { + let world = Arc::new(RwLock::new(Instance { chunks: ChunkStorage::new(height, min_y), entities_by_chunk: HashMap::new(), entity_by_id: IntMap::default(), -- cgit v1.2.3