iceiix / stevenarella

Multi-protocol Minecraft-compatible client written in Rust
Apache License 2.0
1.46k stars 60 forks source link

Error when trying to connect to an offline server. (1.12.2 and 1.18.2) #738

Open DearFox opened 2 years ago

DearFox commented 2 years ago

stevenarella.exe -u "UserName" -s "127.0.0.1:25566" [main.rs:254][INFO] Starting steven [main.rs:346][INFO] Shader version: #version 150 [main.rs:99][INFO] Detected server protocol version 340 [server/mod.rs:159][WARN] Server is running in offline mode [server/mod.rs:1939][INFO] Received chat message: UserName joined the game thread 'main' panicked at 'Err: Err("Failed to read all of packet 0x4, had 12 bytes left")', src\server\mod.rs:655:33 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

iceiix commented 2 years ago

Packet 0x04 is either, in protocol/src/protocol/versions/v1_12_2.rs:

            0x04 => SpawnPainting_VarInt

or protocol/src/protocol/versions/v1_18_2.rs:

            0x04 => SpawnPlayer_f64_NoMeta

if 1.18.2, this is the packet definition:

            packet SpawnPlayer_f64_NoMeta {
                field entity_id: VarInt =,
                field uuid: UUID =,
                field x: f64 =,
                field y: f64 =,
                field z: f64 =,
                field yaw: i8 =,
                field pitch: i8 =,
            }

Tested connecting to vanilla 1.18.2 server with cargo run --release -- -u "UserName" -s "127.0.0.1:25565", connected successfully no crash.

@DearFox Can you rerun with --network-debug and attach the full log output, and the file last-packet?