From 26d619c9a329087a23d6577ee74bd764f50cd773 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Tue, 9 Dec 2025 13:29:59 -0600 Subject: 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 --- azalea/examples/testbot/commands/debug.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'azalea/examples') 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>) { 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::(); + println!("attributes: {attributes:?}"); + 1 + })); + commands.register(literal("debugecsleak").executes(|ctx: &Ctx| { let source = ctx.source.lock(); -- cgit v1.2.3