aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/test_utils/simulation.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2026-01-13 10:51:30 -0600
committerGitHub <noreply@github.com>2026-01-13 10:51:30 -0600
commitd5fa5e32b37754b3b5c136e58821e48cd3b7c2ff (patch)
treeea04702f96ad170fb1d90e5ed2dc875ae8166495 /azalea-client/src/test_utils/simulation.rs
parentefb36d5fc0fe56a98f5795c53dfa109887cd5aae (diff)
downloadazalea-drasl-d5fa5e32b37754b3b5c136e58821e48cd3b7c2ff.tar.xz
Rename Instance to World (#304)
Diffstat (limited to 'azalea-client/src/test_utils/simulation.rs')
-rw-r--r--azalea-client/src/test_utils/simulation.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/azalea-client/src/test_utils/simulation.rs b/azalea-client/src/test_utils/simulation.rs
index 0e480b92..ce4c919d 100644
--- a/azalea-client/src/test_utils/simulation.rs
+++ b/azalea-client/src/test_utils/simulation.rs
@@ -31,7 +31,7 @@ use azalea_registry::{
data::{Biome, DimensionKind},
identifier::Identifier,
};
-use azalea_world::{Chunk, Instance, Section, palette::PalettedContainer};
+use azalea_world::{Chunk, Section, World, palette::PalettedContainer};
use bevy_app::App;
use bevy_ecs::{
component::Mutable,
@@ -45,7 +45,7 @@ use uuid::Uuid;
use crate::{
InConfigState, LocalPlayerBundle, connection::RawConnection, disconnect::DisconnectEvent,
- local_player::InstanceHolder, packet::game::SendGamePacketEvent, player::GameProfileComponent,
+ local_player::WorldHolder, packet::game::SendGamePacketEvent, player::GameProfileComponent,
};
/// A way to simulate a client in a server, used for some internal tests.
@@ -175,15 +175,15 @@ impl Simulation {
}
pub fn chunk(&self, chunk_pos: ChunkPos) -> Option<Arc<RwLock<Chunk>>> {
- self.component::<InstanceHolder>()
- .instance
+ self.component::<WorldHolder>()
+ .shared
.read()
.chunks
.get(&chunk_pos)
}
pub fn get_block_state(&self, pos: BlockPos) -> Option<BlockState> {
- self.component::<InstanceHolder>()
- .instance
+ self.component::<WorldHolder>()
+ .shared
.read()
.get_block_state(pos)
}
@@ -287,12 +287,12 @@ fn create_local_player_bundle(
let raw_connection = RawConnection::new_networkless(connection_protocol);
- let instance = Instance::default();
- let instance_holder = InstanceHolder::new(entity, Arc::new(RwLock::new(instance)));
+ let world = World::default();
+ let world_holder = WorldHolder::new(entity, Arc::new(RwLock::new(world)));
let local_player_bundle = LocalPlayerBundle {
raw_connection,
- instance_holder,
+ world_holder,
metadata: PlayerMetadataBundle::default(),
};