diff options
Diffstat (limited to 'azalea-client/src/test_simulation.rs')
| -rw-r--r-- | azalea-client/src/test_simulation.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/azalea-client/src/test_simulation.rs b/azalea-client/src/test_simulation.rs index 4dec01b4..53e4110e 100644 --- a/azalea-client/src/test_simulation.rs +++ b/azalea-client/src/test_simulation.rs @@ -20,6 +20,7 @@ use azalea_registry::{DimensionType, EntityKind}; use azalea_world::palette::{PalettedContainer, PalettedContainerKind}; use azalea_world::{Chunk, Instance, MinecraftEntityId, Section}; use bevy_app::App; +use bevy_ecs::component::Mutable; use bevy_ecs::{prelude::*, schedule::ExecutorKind}; use parking_lot::RwLock; use simdnbt::owned::{NbtCompound, NbtTag}; @@ -109,7 +110,10 @@ impl Simulation { pub fn has_component<T: Component>(&self) -> bool { self.app.world().get::<T>(self.entity).is_some() } - pub fn with_component_mut<T: Component>(&mut self, f: impl FnOnce(&mut T)) { + pub fn with_component_mut<T: Component<Mutability = Mutable>>( + &mut self, + f: impl FnOnce(&mut T), + ) { f(&mut self .app .world_mut() |
