mirror of
https://github.com/italicsjenga/valence.git
synced 2025-01-11 07:11:30 +11:00
Swing correct hand
This commit is contained in:
parent
3ac711ca74
commit
bfba7a1d11
|
@ -7,7 +7,7 @@ use std::sync::Mutex;
|
|||
use log::LevelFilter;
|
||||
use num::Integer;
|
||||
use rayon::iter::{IndexedParallelIterator, IntoParallelRefMutIterator, ParallelIterator};
|
||||
use valence::client::{ClientEvent, ClientId, GameMode};
|
||||
use valence::client::{ClientEvent, ClientId, GameMode, Hand};
|
||||
use valence::config::{Config, ServerListPing};
|
||||
use valence::entity::meta::Pose;
|
||||
use valence::entity::EntityData;
|
||||
|
@ -218,9 +218,12 @@ impl Config for Game {
|
|||
e.set_sprinting(false);
|
||||
}
|
||||
}
|
||||
ClientEvent::ArmSwing(_) => {
|
||||
ClientEvent::ArmSwing(hand) => {
|
||||
if let EntityData::Player(e) = player.data_mut() {
|
||||
e.trigger_swing_main_arm();
|
||||
match hand {
|
||||
Hand::Main => e.trigger_swing_main_arm(),
|
||||
Hand::Off => e.trigger_swing_offhand(),
|
||||
}
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
|
|
|
@ -1207,7 +1207,9 @@ fn to_biome_registry_item(biome: &Biome, id: i32) -> BiomeRegistryBiome {
|
|||
},
|
||||
particle: biome.particle.as_ref().map(|p| BiomeParticle {
|
||||
probability: p.probability,
|
||||
options: BiomeParticleOptions { kind: p.kind.clone() },
|
||||
options: BiomeParticleOptions {
|
||||
kind: p.kind.clone(),
|
||||
},
|
||||
}),
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue