-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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