From 32eece4d376263fd48c03d7a25c36c87072f8987 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 25 Aug 2023 04:44:20 -0500 Subject: implement stepping up stairs --- azalea/src/pathfinder/mod.rs | 48 ++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'azalea/src') diff --git a/azalea/src/pathfinder/mod.rs b/azalea/src/pathfinder/mod.rs index 78bde5f1..ae88b0cc 100644 --- a/azalea/src/pathfinder/mod.rs +++ b/azalea/src/pathfinder/mod.rs @@ -405,28 +405,28 @@ mod tests { ); } - // #[test] - // fn test_double_diagonal_with_walls() { - // let mut partial_chunks = PartialChunkStorage::default(); - // let mut simulation = setup_simulation( - // &mut partial_chunks, - // BlockPos::new(0, 71, 0), - // BlockPos::new(2, 71, 2), - // vec![ - // BlockPos::new(0, 70, 0), - // BlockPos::new(1, 70, 1), - // BlockPos::new(2, 70, 2), - // BlockPos::new(1, 72, 0), - // BlockPos::new(2, 72, 1), - // ], - // ); - // for i in 0..20 { - // simulation.tick(); - // info!("-- tick #{i} --") - // } - // assert_eq!( - // BlockPos::from(simulation.position()), - // BlockPos::new(2, 71, 2) - // ); - // } + #[test] + fn test_double_diagonal_with_walls() { + let mut partial_chunks = PartialChunkStorage::default(); + let mut simulation = setup_simulation( + &mut partial_chunks, + BlockPos::new(0, 71, 0), + BlockPos::new(2, 71, 2), + vec![ + BlockPos::new(0, 70, 0), + BlockPos::new(1, 70, 1), + BlockPos::new(2, 70, 2), + BlockPos::new(1, 72, 0), + BlockPos::new(2, 72, 1), + ], + ); + for i in 0..30 { + simulation.tick(); + info!("-- tick #{i} --") + } + assert_eq!( + BlockPos::from(simulation.position()), + BlockPos::new(2, 71, 2) + ); + } } -- cgit v1.2.3