diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2026-01-13 10:51:30 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-13 10:51:30 -0600 |
| commit | d5fa5e32b37754b3b5c136e58821e48cd3b7c2ff (patch) | |
| tree | ea04702f96ad170fb1d90e5ed2dc875ae8166495 /azalea/examples/testbot/commands/debug.rs | |
| parent | efb36d5fc0fe56a98f5795c53dfa109887cd5aae (diff) | |
| download | azalea-drasl-d5fa5e32b37754b3b5c136e58821e48cd3b7c2ff.tar.xz | |
Rename Instance to World (#304)
Diffstat (limited to 'azalea/examples/testbot/commands/debug.rs')
| -rw-r--r-- | azalea/examples/testbot/commands/debug.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/azalea/examples/testbot/commands/debug.rs b/azalea/examples/testbot/commands/debug.rs index 1f9d5e5d..57d9ff1f 100644 --- a/azalea/examples/testbot/commands/debug.rs +++ b/azalea/examples/testbot/commands/debug.rs @@ -15,7 +15,7 @@ use azalea::{ use azalea_core::hit_result::HitResult; use azalea_entity::{EntityKindComponent, metadata}; use azalea_inventory::components::MaxStackSize; -use azalea_world::InstanceContainer; +use azalea_world::Worlds; use bevy_app::AppExit; use bevy_ecs::{message::Messages, query::With, world::EntityRef}; use parking_lot::Mutex; @@ -331,16 +331,16 @@ pub fn register(commands: &mut CommandDispatcher<Mutex<CommandSource>>) { // info.layout().size()).unwrap(); match name.as_ref() { - "azalea_world::container::InstanceContainer" => { - let instance_container = ecs.resource::<InstanceContainer>(); + "azalea_world::container::Worlds" => { + let worlds = ecs.resource::<Worlds>(); - for (instance_name, instance) in &instance_container.instances { - writeln!(report, "- Name: {instance_name}").unwrap(); - writeln!(report, "- Reference count: {}", instance.strong_count()) + for (world_name, world) in &worlds.map { + writeln!(report, "- Name: {world_name}").unwrap(); + writeln!(report, "- Reference count: {}", world.strong_count()) .unwrap(); - if let Some(instance) = instance.upgrade() { - let instance = instance.read(); - let strong_chunks = instance + if let Some(world) = world.upgrade() { + let world = world.read(); + let strong_chunks = world .chunks .map .iter() @@ -350,13 +350,13 @@ pub fn register(commands: &mut CommandDispatcher<Mutex<CommandSource>>) { report, "- Chunks: {} strongly referenced, {} in map", strong_chunks, - instance.chunks.map.len() + world.chunks.map.len() ) .unwrap(); writeln!( report, "- Entities: {}", - instance.entities_by_chunk.len() + world.entities_by_chunk.len() ) .unwrap(); } |
