aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/packet_handling
diff options
context:
space:
mode:
authorShayne Hartford <shaybox@shaybox.com>2024-10-21 20:21:38 -0400
committerGitHub <noreply@github.com>2024-10-21 19:21:38 -0500
commitcd2f298a62819a3fabc52ef17560c2124a74d555 (patch)
tree3e32e4ccc7d9f095696c8e23b688b06cf1188f76 /azalea-client/src/packet_handling
parent5535877a4bddcdc30ef8f752a90e6845b308c3c2 (diff)
downloadazalea-drasl-cd2f298a62819a3fabc52ef17560c2124a74d555.tar.xz
Rename InventoryComponent to Inventory to match other components (#177)
(cherry picked from commit 266058a8d441169b46ef819595eee62337ab324c)
Diffstat (limited to 'azalea-client/src/packet_handling')
-rw-r--r--azalea-client/src/packet_handling/configuration.rs2
-rw-r--r--azalea-client/src/packet_handling/game.rs8
2 files changed, 4 insertions, 6 deletions
diff --git a/azalea-client/src/packet_handling/configuration.rs b/azalea-client/src/packet_handling/configuration.rs
index 1be34a12..de365394 100644
--- a/azalea-client/src/packet_handling/configuration.rs
+++ b/azalea-client/src/packet_handling/configuration.rs
@@ -123,7 +123,7 @@ pub fn process_packet_events(ecs: &mut World) {
.remove::<InConfigurationState>()
.insert(crate::JoinedClientBundle {
physics_state: crate::PhysicsState::default(),
- inventory: crate::inventory::InventoryComponent::default(),
+ inventory: crate::inventory::Inventory::default(),
tab_list: crate::local_player::TabList::default(),
current_sequence_number: crate::interact::CurrentSequenceNumber::default(),
last_sent_direction: crate::movement::LastSentLookDirection::default(),
diff --git a/azalea-client/src/packet_handling/game.rs b/azalea-client/src/packet_handling/game.rs
index daa420c3..13183e7a 100644
--- a/azalea-client/src/packet_handling/game.rs
+++ b/azalea-client/src/packet_handling/game.rs
@@ -39,8 +39,7 @@ use crate::{
chunks,
disconnect::DisconnectEvent,
inventory::{
- ClientSideCloseContainerEvent, InventoryComponent, MenuOpenedEvent,
- SetContainerContentEvent,
+ ClientSideCloseContainerEvent, Inventory, MenuOpenedEvent, SetContainerContentEvent,
},
local_player::{
GameProfileComponent, Hunger, InstanceHolder, LocalGameMode, PlayerAbilities, TabList,
@@ -1144,7 +1143,7 @@ pub fn process_packet_events(ecs: &mut World) {
debug!("Got container set content packet {p:?}");
let mut system_state: SystemState<(
- Query<&mut InventoryComponent>,
+ Query<&mut Inventory>,
EventWriter<SetContainerContentEvent>,
)> = SystemState::new(ecs);
let (mut query, mut events) = system_state.get_mut(ecs);
@@ -1183,8 +1182,7 @@ pub fn process_packet_events(ecs: &mut World) {
ClientboundGamePacket::ContainerSetSlot(p) => {
debug!("Got container set slot packet {p:?}");
- let mut system_state: SystemState<Query<&mut InventoryComponent>> =
- SystemState::new(ecs);
+ let mut system_state: SystemState<Query<&mut Inventory>> = SystemState::new(ecs);
let mut query = system_state.get_mut(ecs);
let mut inventory = query.get_mut(player_entity).unwrap();