Skip to content

Commit

Permalink
Simplify position conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
rj00a committed Sep 6, 2022
1 parent 9ab54cc commit 7d55dfb
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions examples/conway.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,17 +194,11 @@ impl Config for Game {
{
let index = position.x as usize + position.z as usize * SIZE_X;

let normal_position = Into::<Vec3<i32>>::into(position);

if !server.state.board[index] {
client.play_sound(
ident!("minecraft:block.note_block.banjo"),
SoundCategory::Block,
Vec3::<f64>::new(
normal_position.x.into(),
normal_position.y.into(),
normal_position.z.into(),
),
Vec3::<i32>::from(position).as_(),
0.5f32,
1f32,
);
Expand Down

0 comments on commit 7d55dfb

Please sign in to comment.