mirror of
https://github.com/italicsjenga/valence.git
synced 2024-12-23 22:41:30 +11:00
Simplify position conversion
This commit is contained in:
parent
9ab54cc930
commit
7d55dfb964
|
@ -194,17 +194,11 @@ impl Config for Game {
|
||||||
{
|
{
|
||||||
let index = position.x as usize + position.z as usize * SIZE_X;
|
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] {
|
if !server.state.board[index] {
|
||||||
client.play_sound(
|
client.play_sound(
|
||||||
ident!("minecraft:block.note_block.banjo"),
|
ident!("minecraft:block.note_block.banjo"),
|
||||||
SoundCategory::Block,
|
SoundCategory::Block,
|
||||||
Vec3::<f64>::new(
|
Vec3::<i32>::from(position).as_(),
|
||||||
normal_position.x.into(),
|
|
||||||
normal_position.y.into(),
|
|
||||||
normal_position.z.into(),
|
|
||||||
),
|
|
||||||
0.5f32,
|
0.5f32,
|
||||||
1f32,
|
1f32,
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue