File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
crates/hyperion-inventory/src Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -295,9 +295,9 @@ impl PlayerInventory {
295
295
pub fn try_add_item ( & mut self , mut item : ItemStack ) -> AddItemResult {
296
296
let mut result = AddItemResult { remaining : None } ;
297
297
298
- // Try to add to hand slots (36-45) first, then the rest of the inventory (0 -35)
298
+ // Try to add to hot bar (36-45) first, then the rest of the inventory (9 -35)
299
299
// try to stack first
300
- for slot in ( 36 ..=45 ) . chain ( 0 ..36 ) {
300
+ for slot in ( 36 ..=44 ) . chain ( 9 ..36 ) {
301
301
let Ok ( add_slot) = self . try_add_to_slot ( slot, & mut item, false ) else {
302
302
unreachable ! ( "try_add_item should always return Ok" ) ;
303
303
} ;
@@ -310,9 +310,9 @@ impl PlayerInventory {
310
310
}
311
311
}
312
312
313
- // Try to add to hand slots (36-45 ) first, then the rest of the inventory (0 -35)
313
+ // Try to add to hot bar (36-44 ) first, then the rest of the inventory (9 -35)
314
314
// now try to add to empty slots
315
- for slot in ( 36 ..=45 ) . chain ( 0 ..36 ) {
315
+ for slot in ( 36 ..=44 ) . chain ( 9 ..36 ) {
316
316
let Ok ( add_slot) = self . try_add_to_slot ( slot, & mut item, true ) else {
317
317
unreachable ! ( "try_add_item should always return Ok" ) ;
318
318
} ;
You can’t perform that action at this time.
0 commit comments