aboutsummaryrefslogtreecommitdiff
path: root/azalea/examples/testbot
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2025-12-09 13:29:59 -0600
committerGitHub <noreply@github.com>2025-12-09 13:29:59 -0600
commit26d619c9a329087a23d6577ee74bd764f50cd773 (patch)
tree8020fe902257764a23a445c6ed9987ea4848189d /azalea/examples/testbot
parent84cd261118c9d1e3145d4d1751c0d22098cd8cd8 (diff)
downloadazalea-drasl-26d619c9a329087a23d6577ee74bd764f50cd773.tar.xz
Enchantments (#286)
* start implementing enchants * store parsed registries * more work on enchants * implement deserializer for some entity effects * mostly working definitions for enchants * fix tests * detect equipment changes * fix errors * update changelog * fix some imports * remove outdated todo * add basic test for enchants applying attributes * use git simdnbt
Diffstat (limited to 'azalea/examples/testbot')
-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();