diff options
| author | mat <git@matdoes.dev> | 2023-10-07 15:27:21 -0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-10-07 15:27:21 -0500 |
| commit | 5d075abfc5d09bd881095b09c16b38c1a27fbb23 (patch) | |
| tree | cbd8e40bb55b45523e0ce1596cf1d02f1fbe2b41 /azalea-core | |
| parent | 3831bd6f9cded2831a173c317832dd5f03617b38 (diff) | |
| download | azalea-drasl-5d075abfc5d09bd881095b09c16b38c1a27fbb23.tar.xz | |
make pathfinder twice as fast :sunglasses:
Diffstat (limited to 'azalea-core')
| -rwxr-xr-x | azalea-core/src/position.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/azalea-core/src/position.rs b/azalea-core/src/position.rs index 630a3a55..e61756b0 100755 --- a/azalea-core/src/position.rs +++ b/azalea-core/src/position.rs @@ -334,7 +334,8 @@ impl Hash for ChunkSectionBlockPos { impl From<ChunkSectionBlockPos> for u16 { #[inline] fn from(pos: ChunkSectionBlockPos) -> Self { - (pos.z as u16) | ((pos.y as u16) << 4) | ((pos.x as u16) << 8) + // (pos.z as u16) | ((pos.y as u16) << 4) | ((pos.x as u16) << 8) + ((((pos.y as u16) << 4) | pos.z as u16) << 4) | pos.x as u16 } } impl nohash_hasher::IsEnabled for ChunkSectionBlockPos {} |
