Skip to content
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

Update field order and fix enum values in CorrectPlayerMovePredictionPacket #259

Merged
merged 14 commits into from
Aug 13, 2024

Conversation

TobiasGrether
Copy link
Member

The field order in the CorrectPlayerMovePredictionPacket is wrong, the predictionType was moved to the front of the buffer and there was an additional field of type Vector2 for the VehicleRotation added.

Additionally, the predictionType Enum is corrected to be the other way around.

$result = new self;
$result->position = $position;
$result->delta = $delta;
$result->onGround = $onGround;
$result->tick = $tick;
$result->predictionType = $predictionType;
$result->vehicleRotation = $vehicleRotation;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is the check removed here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is the check removed here?

PHP-CS-Fixer complained about it, and whether its set is only relevant in the encoding process where it needs to be present

Copy link
Member

@dktapps dktapps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly OK, just a few minor nits

src/CorrectPlayerMovePredictionPacket.php Outdated Show resolved Hide resolved
src/CorrectPlayerMovePredictionPacket.php Outdated Show resolved Hide resolved
src/CorrectPlayerMovePredictionPacket.php Outdated Show resolved Hide resolved
src/CorrectPlayerMovePredictionPacket.php Outdated Show resolved Hide resolved
@dktapps dktapps merged commit a871e12 into master Aug 13, 2024
10 checks passed
@dktapps dktapps deleted the fix/movement-correction-packet branch August 13, 2024 18:25
dries-c added a commit to NetherGamesMC/BedrockProtocol that referenced this pull request Aug 14, 2024
commit 9422c97
Author: IvanCraft623 <ivancraft623@gmail.com>
Date:   Tue Aug 13 19:22:20 2024 -0500

    CS fix

commit 3b0e82e
Author: Dries C <coenendries3@gmail.com>
Date:   Wed Aug 14 02:07:07 2024 +0200

    Fix unread byte in InventoryTransactionPacket

commit b6b1ccf
Author: Dries C <coenendries3@gmail.com>
Date:   Tue Aug 13 16:32:28 2024 +0200

    Protocol changes for 1.21.20

commit a871e12
Author: Tobias Grether <me@tobiasgrether.com>
Date:   Tue Aug 13 20:25:54 2024 +0200

    Update field order and fix enum values in CorrectPlayerMovePredictionPacket (pmmp#259)

commit 5db8d10
Author: Dylan K. Taylor <dktapps@pmmp.io>
Date:   Tue Aug 13 17:21:12 2024 +0100

    Make use of new autogen features in PlayerAuthInputPacket

commit a61b555
Author: Dylan K. Taylor <dktapps@pmmp.io>
Date:   Tue Aug 13 17:20:20 2024 +0100

    Allow any static function to have a @generate-create-func tag
    this allows the creation of internal auto-generated constructors that aren't called create(), which is useful if the public create() wants to do extra validation without losing autogen capability.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants