Skip to content

Commit

Permalink
Reverse unrelated fix + nit
Browse files Browse the repository at this point in the history
  • Loading branch information
Bafbi committed Aug 10, 2023
1 parent c906a18 commit c87ad8d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/valence_inventory/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1235,11 +1235,11 @@ fn handle_update_selected_slot(
// The client is trying to interact with a slot that does not exist, ignore.
continue;
}
held.held_item_slot = convert_hotbar_slot_id(pkt.slot);
held.held_item_slot = convert_hotbar_slot_id(pkt.slot as u16);

events.send(UpdateSelectedSlotEvent {
client: packet.client,
slot: pkt.slot as u8,
slot: pkt.slot,
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ use super::*;
#[derive(Copy, Clone, Debug, Encode, Decode, Packet)]
#[packet(id = packet_id::UPDATE_SELECTED_SLOT_C2S)]
pub struct UpdateSelectedSlotC2s {
pub slot: u16,
pub slot: u8,
}
2 changes: 1 addition & 1 deletion examples/boss_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ fn setup(
layer: EntityLayerId(layer_id),
..Default::default()
},
BossBarTitle("BigCow".color(NamedColor::Red)),
BossBarTitle("Louis XVI".color(NamedColor::Red)),
BossBarHealth(0.5),
BossBarStyle {
color: BossBarColor::Red,
Expand Down

0 comments on commit c87ad8d

Please sign in to comment.