aboutsummaryrefslogtreecommitdiff
path: root/azalea-world
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2024-02-25 16:53:08 -0600
committermat <git@matdoes.dev>2024-02-25 16:53:08 -0600
commit018ab55bdb02e7774044198c8a30e0d02a7c6e29 (patch)
treeca9eb536985833eb158383153a322adfacf86267 /azalea-world
parent13426b035e43c4435854f175155439ab28a18544 (diff)
downloadazalea-drasl-018ab55bdb02e7774044198c8a30e0d02a7c6e29.tar.xz
optimize physics
Diffstat (limited to 'azalea-world')
-rw-r--r--azalea-world/Cargo.toml2
-rw-r--r--azalea-world/src/container.rs3
2 files changed, 3 insertions, 2 deletions
diff --git a/azalea-world/Cargo.toml b/azalea-world/Cargo.toml
index b2d9b9df..20e3a261 100644
--- a/azalea-world/Cargo.toml
+++ b/azalea-world/Cargo.toml
@@ -19,7 +19,6 @@ azalea-inventory = { version = "0.9.0", path = "../azalea-inventory" }
azalea-registry = { path = "../azalea-registry", version = "0.9.0" }
bevy_ecs = "0.13.0"
derive_more = { version = "0.99.17", features = ["deref", "deref_mut"] }
-enum-as-inner = "0.6.0"
tracing = "0.1.40"
nohash-hasher = "0.2.0"
once_cell = "1.19.0"
@@ -28,6 +27,7 @@ thiserror = "1.0.57"
uuid = "1.7.0"
serde_json = "1.0.113"
serde = "1.0.196"
+rustc-hash = "1.1.0"
[dev-dependencies]
azalea-client = { path = "../azalea-client" }
diff --git a/azalea-world/src/container.rs b/azalea-world/src/container.rs
index 0b68ead6..69b8f908 100644
--- a/azalea-world/src/container.rs
+++ b/azalea-world/src/container.rs
@@ -3,6 +3,7 @@ use bevy_ecs::{component::Component, system::Resource};
use derive_more::{Deref, DerefMut};
use nohash_hasher::IntMap;
use parking_lot::RwLock;
+use rustc_hash::FxHashMap;
use std::{
collections::HashMap,
sync::{Arc, Weak},
@@ -27,7 +28,7 @@ pub struct InstanceContainer {
// 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 instances: HashMap<ResourceLocation, Weak<RwLock<Instance>>>,
+ pub instances: FxHashMap<ResourceLocation, Weak<RwLock<Instance>>>,
}
impl InstanceContainer {