connection error instead of varint error
This commit is contained in:
parent
26a78af446
commit
abe738aad5
2 changed files with 4 additions and 4 deletions
|
@ -1,11 +1,11 @@
|
|||
use rust_mc_proto::{DataBufferReader, DataBufferWriter, MCConnTcp, Packet, ProtocolError};
|
||||
|
||||
fn main() -> Result<(), ProtocolError> {
|
||||
let mut conn = MCConnTcp::connect("mc.hypixel.net:25565")?; // connecting
|
||||
let mut conn = MCConnTcp::connect("localhost:25565")?; // connecting
|
||||
|
||||
conn.write_packet(&Packet::build(0x00, |packet| {
|
||||
packet.write_u16_varint(765)?; // protocol_version
|
||||
packet.write_string("mc.hypixel.net")?; // server_address
|
||||
packet.write_string("localhost")?; // server_address
|
||||
packet.write_unsigned_short(25565)?; // server_port
|
||||
packet.write_u8_varint(1) // next_state
|
||||
})?)?; // handshake packet
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue