InGamePacketHandler: fix function ordering

This commit is contained in:
Dylan K. Taylor 2022-01-16 16:16:42 +00:00
parent 33421258b6
commit 853ecd2408
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -166,6 +166,12 @@ class InGamePacketHandler extends PacketHandler{
return false;
}
public function handleMovePlayer(MovePlayerPacket $packet) : bool{
//The client sends this every time it lands on the ground, even when using PlayerAuthInputPacket.
//Silence the debug spam that this causes.
return true;
}
private function resolveOnOffInputFlags(PlayerAuthInputPacket $packet, int $startFlag, int $stopFlag) : ?bool{
$enabled = $packet->hasFlag($startFlag);
if($enabled !== $packet->hasFlag($stopFlag)){
@ -175,12 +181,6 @@ class InGamePacketHandler extends PacketHandler{
return null;
}
public function handleMovePlayer(MovePlayerPacket $packet) : bool{
//The client sends this every time it lands on the ground, even when using PlayerAuthInputPacket.
//Silence the debug spam that this causes.
return true;
}
public function handlePlayerAuthInput(PlayerAuthInputPacket $packet) : bool{
$rawPos = $packet->getPosition();
foreach([$rawPos->x, $rawPos->y, $rawPos->z, $packet->getYaw(), $packet->getHeadYaw(), $packet->getPitch()] as $float){