aboutsummaryrefslogtreecommitdiff
path: root/azalea-core/src/cursor3d.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2025-08-14 20:40:13 -0500
committerGitHub <noreply@github.com>2025-08-14 20:40:13 -0500
commite74ed047dbaf3877db4a89a2d589e992abd0bb11 (patch)
tree0a728c8be167a1d59a5492ed9df666f41cf12e57 /azalea-core/src/cursor3d.rs
parent6695132ddb31780786c67b8b9ff5df8ab3891438 (diff)
downloadazalea-drasl-e74ed047dbaf3877db4a89a2d589e992abd0bb11.tar.xz
Sneaking (#237)
* start implementing sneaking * fix horizontal_collision being inverted and cleanup * clippy * change dimensions and eye height based on pose * proper support for automatically crouching in certain cases * fix anticheat issues * add line to changelog and update a comment
Diffstat (limited to 'azalea-core/src/cursor3d.rs')
-rw-r--r--azalea-core/src/cursor3d.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/azalea-core/src/cursor3d.rs b/azalea-core/src/cursor3d.rs
index dc96d890..91a14000 100644
--- a/azalea-core/src/cursor3d.rs
+++ b/azalea-core/src/cursor3d.rs
@@ -71,13 +71,13 @@ impl Cursor3d {
pub fn new(origin: BlockPos, end: BlockPos) -> Self {
let width = (end.x - origin.x + 1)
.try_into()
- .expect("Impossible width.");
+ .unwrap_or_else(|_| panic!("Impossible width, origin: {origin:?}, end: {end:?}"));
let height = (end.y - origin.y + 1)
.try_into()
- .expect("Impossible height.");
+ .unwrap_or_else(|_| panic!("Impossible height, origin: {origin:?}, end: {end:?}"));
let depth = (end.z - origin.z + 1)
.try_into()
- .expect("Impossible depth.");
+ .unwrap_or_else(|_| panic!("Impossible depth, origin: {origin:?}, end: {end:?}"));
Self {
index: 0,