aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/plugins/inventory.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-09-20 20:35:16 -1200
committermat <git@matdoes.dev>2025-09-20 20:35:16 -1200
commit585b51e91a5335eae37bc5af7c0111bb2092b156 (patch)
treec1559014df9db20dd625d9fe972d4e9f88317008 /azalea-client/src/plugins/inventory.rs
parentdb793448ff8e656ad80859835edc3b89cb547dd2 (diff)
downloadazalea-drasl-585b51e91a5335eae37bc5af7c0111bb2092b156.tar.xz
more accurate mining and impl PartialEq for packets
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 {