From be762fc5d37ba48386996afb4c5ba0c94aaf5883 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 10 Dec 2021 00:54:58 -0600 Subject: rust is driving me insane --- minecraft-protocol/src/connection.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'minecraft-protocol/src/connection.rs') diff --git a/minecraft-protocol/src/connection.rs b/minecraft-protocol/src/connection.rs index e5784eb6..ba27cdad 100644 --- a/minecraft-protocol/src/connection.rs +++ b/minecraft-protocol/src/connection.rs @@ -35,7 +35,7 @@ impl Connection { .expect("Error enabling tcp_nodelay"); Ok(Connection { - state: ConnectionProtocol::Handshaking, + state: ConnectionProtocol::Handshake, flow: PacketFlow::ClientToServer, stream, }) @@ -80,7 +80,7 @@ impl Connection { // write the packet id let mut id_and_data_buf = vec![]; - mc_buf::write_varint(&mut id_and_data_buf, packet.get_id() as i32); + mc_buf::write_varint(&mut id_and_data_buf, packet.id() as i32); packet.write(&mut id_and_data_buf); // write the packet data -- cgit v1.2.3