From 5d075abfc5d09bd881095b09c16b38c1a27fbb23 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 7 Oct 2023 15:27:21 -0500 Subject: make pathfinder twice as fast :sunglasses: --- azalea-core/src/position.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'azalea-core/src') 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 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 {} -- cgit v1.2.3