aboutsummaryrefslogtreecommitdiff
path: root/azalea/examples
diff options
context:
space:
mode:
Diffstat (limited to 'azalea/examples')
-rw-r--r--azalea/examples/testbot/commands/debug.rs18
1 files changed, 17 insertions, 1 deletions
diff --git a/azalea/examples/testbot/commands/debug.rs b/azalea/examples/testbot/commands/debug.rs
index 91f7dc61..dfd055ea 100644
--- a/azalea/examples/testbot/commands/debug.rs
+++ b/azalea/examples/testbot/commands/debug.rs
@@ -14,7 +14,7 @@ use azalea::{
world::MinecraftEntityId,
};
use azalea_core::hit_result::HitResult;
-use azalea_entity::{EntityKindComponent, EntityUuid, metadata};
+use azalea_entity::{Attributes, EntityKindComponent, EntityUuid, metadata};
use azalea_inventory::components::MaxStackSize;
use azalea_world::InstanceContainer;
use bevy_app::AppExit;
@@ -232,6 +232,22 @@ pub fn register(commands: &mut CommandDispatcher<Mutex<CommandSource>>) {
1
}));
+ commands.register(literal("enchants").executes(|ctx: &Ctx| {
+ let source = ctx.source.lock();
+ source.bot.with_registry_holder(|r| {
+ let enchants = &r.enchantment;
+ println!("enchants: {enchants:?}");
+ });
+ 1
+ }));
+
+ commands.register(literal("attributes").executes(|ctx: &Ctx| {
+ let source = ctx.source.lock();
+ let attributes = source.bot.component::<Attributes>();
+ println!("attributes: {attributes:?}");
+ 1
+ }));
+
commands.register(literal("debugecsleak").executes(|ctx: &Ctx| {
let source = ctx.source.lock();