Minecraft: Java Edition 26.3 rewritten from scratch in Rust, checked against vanilla with 281 differential harnesses. Get it with the Horizon launcher.
Rust differential-testinggame-enginegamedevlinuxminecraftminecraft-javareimplementationrustvoxelvulkanwgpu
Attack swap: pass the clip closure by value (clippy)
Evrim Cicek0d75e2e5193c
diff --git a/crates/horizon-client/src/game/hand.rs b/crates/horizon-client/src/game/hand.rsindex d8d08c405..e473931cc 100644--- a/crates/horizon-client/src/game/hand.rs+++ b/crates/horizon-client/src/game/hand.rs@@ -281,7 +281,7 @@ impl Game<'_> {.map(|hit| Vec3::new(hit.point[0], hit.point[1], hit.point[2]))};let movement = self.known_player_movement();- let nearest = super::spear::hits_in_reach(&boxes, eye, look, movement, reach, &clip)+ let nearest = super::spear::hits_in_reach(&boxes, eye, look, movement, reach, clip).into_iter().map(|(i, at)| (i, eye.distance_squared(at).sqrt())).reduce(|a, b| if b.1 < a.1 { b } else { a });