From 0d16f01571ec8315f3979eae46981e559ade1cf9 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Fri, 10 Jan 2025 16:45:27 -0600 Subject: Fluid physics (#199) * start implementing fluid physics * Initial implementation of fluid pushing * different travel function in water * bubble columns * jumping in water * cleanup * change ultrawarm to be required * fix for clippy --- azalea/examples/testbot/commands/debug.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'azalea/examples') diff --git a/azalea/examples/testbot/commands/debug.rs b/azalea/examples/testbot/commands/debug.rs index 0718bcab..1e0846f4 100644 --- a/azalea/examples/testbot/commands/debug.rs +++ b/azalea/examples/testbot/commands/debug.rs @@ -114,7 +114,20 @@ pub fn register(commands: &mut CommandDispatcher>) { 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:?}")); + source.reply(&format!("Block at {block_pos} is {block:?}")); + 1 + })), + ))); + commands.register(literal("getfluid").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!("getfluid xyz {x} {y} {z}"); + let block_pos = BlockPos::new(x, y, z); + let block = source.bot.world().read().get_fluid_state(&block_pos); + source.reply(&format!("Fluid at {block_pos} is {block:?}")); 1 })), ))); -- cgit v1.2.3