diff options
| author | mat <git@matdoes.dev> | 2023-08-25 04:44:20 -0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-08-25 04:44:20 -0500 |
| commit | 32eece4d376263fd48c03d7a25c36c87072f8987 (patch) | |
| tree | ffaa78bf05d8fe1d83dc92e7fbb78bfaafc5d97e /azalea/src/pathfinder | |
| parent | 7df2256f35fdf6925e2499966774d3a9a861e69c (diff) | |
| download | azalea-drasl-32eece4d376263fd48c03d7a25c36c87072f8987.tar.xz | |
implement stepping up stairs
Diffstat (limited to 'azalea/src/pathfinder')
| -rw-r--r-- | azalea/src/pathfinder/mod.rs | 48 |
1 files changed, 24 insertions, 24 deletions
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) + ); + } } |
