diff options
| author | mat <git@matdoes.dev> | 2023-10-07 17:29:07 -0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-10-07 17:29:07 -0500 |
| commit | 44fda05893f5a3b95822b796fd0148d990f4c631 (patch) | |
| tree | 9374919b8a15255758a4c62f4d46e845881d2dbc /azalea/src/pathfinder/mod.rs | |
| parent | 78856fbefe900d23719cb049bd63840d56a093fd (diff) | |
| download | azalea-drasl-44fda05893f5a3b95822b796fd0148d990f4c631.tar.xz | |
3 block jumps and other parkour
Diffstat (limited to 'azalea/src/pathfinder/mod.rs')
| -rw-r--r-- | azalea/src/pathfinder/mod.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/azalea/src/pathfinder/mod.rs b/azalea/src/pathfinder/mod.rs index a12d6731..8a84b5e9 100644 --- a/azalea/src/pathfinder/mod.rs +++ b/azalea/src/pathfinder/mod.rs @@ -883,4 +883,27 @@ mod tests { BlockPos::new(0, 68, 3) ); } + + #[test] + fn test_2_gap_ascend_thrice() { + let mut partial_chunks = PartialChunkStorage::default(); + let mut simulation = setup_simulation( + &mut partial_chunks, + BlockPos::new(0, 71, 0), + BlockPos::new(3, 74, 0), + vec![ + BlockPos::new(0, 70, 0), + BlockPos::new(0, 71, 3), + BlockPos::new(3, 72, 3), + BlockPos::new(3, 73, 0), + ], + ); + for _ in 0..60 { + simulation.tick(); + } + assert_eq!( + BlockPos::from(simulation.position()), + BlockPos::new(3, 74, 0) + ); + } } |
