aboutsummaryrefslogtreecommitdiff
path: root/azalea-world/src/world.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2023-11-18 20:44:49 -0600
committermat <git@matdoes.dev>2023-11-18 20:44:49 -0600
commitf0b58c7e748e1e94ad0dd08124cfc186e865709c (patch)
treee57770be77d78262f89cc146179122a0b849c6c2 /azalea-world/src/world.rs
parent000abfa13665abccf543b875d10c8c2a48dd75be (diff)
downloadazalea-drasl-f0b58c7e748e1e94ad0dd08124cfc186e865709c.tar.xz
share registries in swarms and fix some bugs
Diffstat (limited to 'azalea-world/src/world.rs')
-rw-r--r--azalea-world/src/world.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/azalea-world/src/world.rs b/azalea-world/src/world.rs
index a41b2530..7b6854f7 100644
--- a/azalea-world/src/world.rs
+++ b/azalea-world/src/world.rs
@@ -1,6 +1,7 @@
use crate::{iterators::ChunkIterator, palette::Palette, ChunkStorage, PartialChunkStorage};
use azalea_block::{BlockState, BlockStates, FluidState};
use azalea_core::position::{BlockPos, ChunkPos};
+use azalea_core::registry_holder::RegistryHolder;
use bevy_ecs::{component::Component, entity::Entity};
use derive_more::{Deref, DerefMut};
use nohash_hasher::IntMap;
@@ -87,6 +88,8 @@ pub struct Instance {
/// An index of Minecraft entity IDs to Azalea ECS entities. You should
/// avoid using this and instead use `azalea_entity::EntityIdIndex`
pub entity_by_id: IntMap<MinecraftEntityId, Entity>,
+
+ pub registries: RegistryHolder,
}
impl Instance {
@@ -237,6 +240,7 @@ impl From<ChunkStorage> for Instance {
chunks,
entities_by_chunk: HashMap::new(),
entity_by_id: IntMap::default(),
+ registries: RegistryHolder::default(),
}
}
}