shoghicp/Minecraft-PHP-Client

Kicked for invalid packet ID after a short amount of time

Closed this issue · 2 comments

When connecting to my Craftbukkit++ server, after a short while (less than 30 seconds or so) I get disconnected with an invalid packet id error, the number seems to change every time, so far I have seen: 4e, 4b, 73, 95, 0e

I am launching the client with: php client.php --hide=sign,chat --server=minecraft.azelphur.com --port=25567 --username=Azelphur --password=secret

(Feel free to connect to that server to replicate the issue)

Here is an example log

     /   \
  /         \

/ MINECRAFT
/ PHP
|\ CLIENT /|
|. \ / .|
| ´. \ / .´ |
| ´. | .´ |
| ´. | .´ |
\ | /
\ | /
\ | /
\ | /

by @shoghicp
version 0.7.3 Alpha

[] Sending Handshake
[
] Server is Premium (SID: 956d8910785ffba)
[+] Logged into minecraft.net
[] Sending Login Request
[+] Login Request accepted
[
] EID: 945292
[] Seed: default
[
] Gamemode: survival
[*] Max players: 20
[+] Got position: (244.84924761687,71,118.57215801709)
[+] Got position: (244.84924761687,71,118.57215801709)
[+] Got position: (244.97305714068,71,118.62930087423)
[-] Kicked from server, "Bad packet id 76"

I'm making changes to parsing functions because sometimes bytes are lost.

expect a fix soon

Fixed the syncronization error. It was caused by reusing code and mispelling one variable