Change slot command

This commit is contained in:
ErrorNoInternet 2023-01-17 22:36:16 +08:00
parent c302b2e80a
commit b8b077a813
Signed by untrusted user who does not match committer: ErrorNoInternet
GPG Key ID: 2486BFB7B1E6A4A3

View File

@ -412,8 +412,8 @@ pub async fn process_command(
client client
.write_packet(ServerboundGamePacket::SetCarriedItem( .write_packet(ServerboundGamePacket::SetCarriedItem(
game::serverbound_set_carried_item_packet::ServerboundSetCarriedItemPacket { game::serverbound_set_carried_item_packet::ServerboundSetCarriedItemPacket {
slot: match segments[0].parse() { slot: match segments[0].parse::<i8>() {
Ok(number) => number, Ok(number) => (number-1) as u16,
Err(error) => return format!("Unable to parse slot: {}", error), Err(error) => return format!("Unable to parse slot: {}", error),
}, },
}, },