I'm stumped.
The protocol documentation says ENTITY_VELOCITY packet measures velocity in 1/32000 blocks per tick (1/1600 blocks per second). Yet looking at the disassembled MC code looks like it's using 1/8000 blocks per tick (1/400 blocks per second). To top it off, ProtoProxy shows that the actual server comm sends really wild numbers - for a fully accelerated minecart on a power-rail loop, it will send values at about 10k (6.25 blocks per second by proto doc, 25 blocks per second by source). However, for a powered minecart that is going the same loop at the same speed it sends only values at about 3k (1.9 blocks per second by proto doc, 7.5 blocks per second by source). Now, a powered minecart going by its own force reports values about 1.3k (0.8 blocks per second by proto doc, 3.25 blocks per second by source).
Now which one do I trust when implementing minecart support in MCServer?!?
It's caused by the server broadcasting a chat message right at the moment when a new player was logging in, their protocol was not yet recognized but they were already sent that chat. The protocol recognizer crashed, because it didn't know what to do with it.
Strange thing is, the chat message shouldn't've been broadcast to that player, because they weren't yet logged in and we skip such players when broadcasting. I'll investigate more tomorrow.
The protocol documentation says ENTITY_VELOCITY packet measures velocity in 1/32000 blocks per tick (1/1600 blocks per second). Yet looking at the disassembled MC code looks like it's using 1/8000 blocks per tick (1/400 blocks per second). To top it off, ProtoProxy shows that the actual server comm sends really wild numbers - for a fully accelerated minecart on a power-rail loop, it will send values at about 10k (6.25 blocks per second by proto doc, 25 blocks per second by source). However, for a powered minecart that is going the same loop at the same speed it sends only values at about 3k (1.9 blocks per second by proto doc, 7.5 blocks per second by source). Now, a powered minecart going by its own force reports values about 1.3k (0.8 blocks per second by proto doc, 3.25 blocks per second by source).
Now which one do I trust when implementing minecart support in MCServer?!?
(02-24-2013, 10:04 PM)STR_Warrior Wrote: ... so i'm now waiting for the server to crash again ...You'll be waiting for some time to reproduce that. It's one of those hard-to-get timing bugs.
It's caused by the server broadcasting a chat message right at the moment when a new player was logging in, their protocol was not yet recognized but they were already sent that chat. The protocol recognizer crashed, because it didn't know what to do with it.
Strange thing is, the chat message shouldn't've been broadcast to that player, because they weren't yet logged in and we skip such players when broadcasting. I'll investigate more tomorrow.