aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/plugins/inventory.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-client/src/plugins/inventory.rs')
-rw-r--r--azalea-client/src/plugins/inventory.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/azalea-client/src/plugins/inventory.rs b/azalea-client/src/plugins/inventory.rs
index ecc8e826..8037f8fc 100644
--- a/azalea-client/src/plugins/inventory.rs
+++ b/azalea-client/src/plugins/inventory.rs
@@ -1,7 +1,4 @@
-use std::{
- cmp,
- collections::{HashMap, HashSet},
-};
+use std::{cmp, collections::HashSet};
use azalea_chat::FormattedText;
use azalea_entity::PlayerAbilities;
@@ -22,6 +19,7 @@ use azalea_registry::MenuKind;
use azalea_world::{InstanceContainer, InstanceName};
use bevy_app::{App, Plugin, Update};
use bevy_ecs::prelude::*;
+use indexmap::IndexMap;
use tracing::{error, warn};
use crate::{Client, packet::game::SendPacketEvent, respawn::perform_respawn};
@@ -869,9 +867,9 @@ pub fn handle_container_click_event(
let registry_holder = &instance.read().registries;
- // see which slots changed after clicking and put them in the hashmap
- // the server uses this to check if we desynced
- let mut changed_slots: HashMap<u16, HashedStack> = HashMap::new();
+ // see which slots changed after clicking and put them in the map the server
+ // uses this to check if we desynced
+ let mut changed_slots: IndexMap<u16, HashedStack> = IndexMap::new();
for (slot_index, old_slot) in old_slots.iter().enumerate() {
let new_slot = &new_slots[slot_index];
if old_slot != new_slot {