From f03e0c22355778a9863cccb5a59d852278d60701 Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 24 Dec 2024 08:48:36 +0000 Subject: fix parsing Dust particle and treat waterlogged blocks as liquid in pathfinder --- azalea/examples/testbot/commands/debug.rs | 15 +++++++++++++++ 1 file changed, 15 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 ae0808cb..ab323b2f 100644 --- a/azalea/examples/testbot/commands/debug.rs +++ b/azalea/examples/testbot/commands/debug.rs @@ -5,6 +5,7 @@ use azalea::{ entity::{LookDirection, Position}, interact::HitResultComponent, world::MinecraftEntityId, + BlockPos, }; use parking_lot::Mutex; @@ -102,4 +103,18 @@ pub fn register(commands: &mut CommandDispatcher>) { 1 })); + + commands.register(literal("getblock").then(argument("x", integer()).then( + argument("y", integer()).then(argument("z", integer()).executes(|ctx: &Ctx| { + let source = ctx.source.lock(); + let x = get_integer(ctx, "x").unwrap(); + let y = get_integer(ctx, "y").unwrap(); + let z = get_integer(ctx, "z").unwrap(); + println!("getblock xyz {x} {y} {z}"); + let block_pos = BlockPos::new(x, y, z); + let block = source.bot.world().read().get_block_state(&block_pos); + source.reply(&format!("Block at {block_pos:?} is {block:?}")); + 1 + })), + ))); } -- cgit v1.2.3