fix(player): fix timestamp notify pm4#218
Conversation
|
The change must be made to the registered default handler in PlayerNetworkHandlerRegistry instead. PlayStation (and I suspect other OSes) have different offset value and this would affect them. $this->registerDefault(new ClosurePlayerNetworkHandler(static function(Closure $then) : NetworkStackLatencyEntry{
+ $timestamp = mt_rand();
+ return new NetworkStackLatencyEntry($timestamp * 1000000, $then, $timestamp);
- return new NetworkStackLatencyEntry(mt_rand() * 1000 /* TODO: remove this hack */, $then);
})); |
|
Addressed in 363c211 |
|
What is the solution for this error for players playing on console?
|
I've highlighted this in #216 (comment). At the moment, I do not have access to a PlayStation and therefore cannot test a solution. I would suggest trying the same fix for Windows 10 users to see if it works for PlayStation users as well: protected function onEnable() : void{
if(!InvMenuHandler::isRegistered()){
InvMenuHandler::register($this);
}
+ // possible solution for playstation users:
+ $registry = InvMenuHandler::getPlayerManager()->getNetworkHandlerRegistry();
+ $registry->register(DeviceOS::PLAYSTATION, $registry->get(DeviceOS::WINDOWS_10));
} |
So, I tried multiple situations with a PS4 player.
We all love mojang weird protocol changes.. |
Thank you for testing, I expected the fix to be something like that. You're welcome to open a PR that addresses the issue on PlayStation🙂 |
Fix the menu dont send... Quickfix: multitply 1000000 for the stored timestamp