From 23b7f20a0d88b54d430820baeb4a6da0316a009a Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Mon, 4 Aug 2025 20:43:10 -0500 Subject: Default components (#232) * add default components * remove debug prints * clippy * use default components * fix tests --- azalea/examples/testbot/commands/debug.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'azalea/examples/testbot/commands/debug.rs') diff --git a/azalea/examples/testbot/commands/debug.rs b/azalea/examples/testbot/commands/debug.rs index d721fddc..d0d72b40 100644 --- a/azalea/examples/testbot/commands/debug.rs +++ b/azalea/examples/testbot/commands/debug.rs @@ -10,10 +10,12 @@ use azalea::{ interact::pick::HitResultComponent, packet::game, pathfinder::{ExecutingPath, Pathfinder}, + prelude::ContainerClientExt, world::MinecraftEntityId, }; use azalea_core::hit_result::HitResult; use azalea_entity::EntityKindComponent; +use azalea_inventory::components::MaxStackSize; use azalea_world::InstanceContainer; use bevy_ecs::event::Events; use parking_lot::Mutex; @@ -191,6 +193,16 @@ pub fn register(commands: &mut CommandDispatcher>) { source.reply("Ok!"); 1 })); + commands.register(literal("maxstacksize").executes(|ctx: &Ctx| { + let source = ctx.source.lock(); + let max_stack_size = source + .bot + .get_held_item() + .get_component::() + .map_or(-1, |s| s.count); + source.reply(format!("{max_stack_size}")); + 1 + })); commands.register(literal("debugecsleak").executes(|ctx: &Ctx| { let source = ctx.source.lock(); -- cgit v1.2.3