diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2023-07-15 04:39:43 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-15 04:39:43 -0500 |
| commit | cde7e35046b726b07bf3e067c080b85a12b2fd74 (patch) | |
| tree | 9d517911cbaf14f007958a92392101f24ec14118 /azalea-client/src/packet_handling.rs | |
| parent | 148f20381750be3e2c38a6bdaf8d339113da1b39 (diff) | |
| download | azalea-drasl-cde7e35046b726b07bf3e067c080b85a12b2fd74.tar.xz | |
Attacking (#96)
* add Client::attack
* partially implement attack cooldowns
* attack speed modifiers
* don't care clippy
---------
Co-authored-by: mat <git@matdoes.dev>
Diffstat (limited to 'azalea-client/src/packet_handling.rs')
| -rw-r--r-- | azalea-client/src/packet_handling.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/azalea-client/src/packet_handling.rs b/azalea-client/src/packet_handling.rs index 4ceb3999..b4f4e045 100644 --- a/azalea-client/src/packet_handling.rs +++ b/azalea-client/src/packet_handling.rs @@ -574,13 +574,14 @@ fn process_packet_events(ecs: &mut World) { ClientboundGamePacket::AddEntity(p) => { debug!("Got add entity packet {:?}", p); + #[allow(clippy::type_complexity)] let mut system_state: SystemState<( Commands, Query<Option<&InstanceName>>, - ResMut<InstanceContainer>, + Res<InstanceContainer>, ResMut<EntityInfos>, )> = SystemState::new(ecs); - let (mut commands, mut query, mut instance_container, mut entity_infos) = + let (mut commands, mut query, instance_container, mut entity_infos) = system_state.get_mut(ecs); let instance_name = query.get_mut(player_entity).unwrap(); @@ -694,9 +695,8 @@ fn process_packet_events(ecs: &mut World) { ClientboundGamePacket::SetHealth(p) => { debug!("Got set health packet {:?}", p); - let mut system_state: SystemState<(Query<&mut Health>, EventWriter<DeathEvent>)> = - SystemState::new(ecs); - let (mut query, mut death_events) = system_state.get_mut(ecs); + let mut system_state: SystemState<Query<&mut Health>> = SystemState::new(ecs); + let mut query = system_state.get_mut(ecs); let mut health = query.get_mut(player_entity).unwrap(); **health = p.health; |
