From 7d55dfb96474031033ff220bbeb995182dceb5c3 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 5 Sep 2022 22:12:28 -0700 Subject: [PATCH] Simplify position conversion --- examples/conway.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/examples/conway.rs b/examples/conway.rs index ba88a1e..b200255 100644 --- a/examples/conway.rs +++ b/examples/conway.rs @@ -194,17 +194,11 @@ impl Config for Game { { let index = position.x as usize + position.z as usize * SIZE_X; - let normal_position = Into::>::into(position); - if !server.state.board[index] { client.play_sound( ident!("minecraft:block.note_block.banjo"), SoundCategory::Block, - Vec3::::new( - normal_position.x.into(), - normal_position.y.into(), - normal_position.z.into(), - ), + Vec3::::from(position).as_(), 0.5f32, 1f32, );