aboutsummaryrefslogtreecommitdiff
path: root/azalea-world/src/world.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2023-03-07 14:14:36 -0600
committerGitHub <noreply@github.com>2023-03-07 14:14:36 -0600
commit719379a8a76ab0685f2bd14bebe2f0cd1e97f06b (patch)
treece5d6c62bc36fb1d1ec31083bc8e81a0109c12df /azalea-world/src/world.rs
parentbf4ff517890cad3ff4e36b4b78959504192e5374 (diff)
downloadazalea-drasl-719379a8a76ab0685f2bd14bebe2f0cd1e97f06b.tar.xz
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
Diffstat (limited to 'azalea-world/src/world.rs')
-rw-r--r--azalea-world/src/world.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/azalea-world/src/world.rs b/azalea-world/src/world.rs
index 8f1b2179..41d83082 100644
--- a/azalea-world/src/world.rs
+++ b/azalea-world/src/world.rs
@@ -5,7 +5,7 @@ use crate::{
ChunkStorage, PartialChunkStorage, WorldContainer,
};
use azalea_core::ChunkPos;
-use azalea_ecs::{
+use bevy_ecs::{
entity::Entity,
query::{Changed, With, Without},
system::{Commands, Query, Res, ResMut},
@@ -172,7 +172,7 @@ pub fn update_uuid_index(
/// A world where the chunks are stored as weak pointers. This is used for
/// shared worlds.
#[derive(Default, Debug)]
-pub struct World {
+pub struct Instance {
pub chunks: ChunkStorage,
/// An index of all the entities we know are in the chunks of the world
@@ -182,7 +182,7 @@ pub struct World {
pub entity_by_id: IntMap<MinecraftEntityId, Entity>,
}
-impl World {
+impl Instance {
/// Get an ECS [`Entity`] from a Minecraft entity ID.
pub fn entity_by_id(&self, entity_id: &MinecraftEntityId) -> Option<Entity> {
self.entity_by_id.get(entity_id).copied()
@@ -236,7 +236,7 @@ pub fn update_entity_by_id_index(
}
}
-impl From<ChunkStorage> for World {
+impl From<ChunkStorage> for Instance {
/// Make an empty world from this `ChunkStorage`. This is meant to be a
/// convenience function for tests.
fn from(chunks: ChunkStorage) -> Self {