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

Handle player packet id 0x23 #163

Merged
merged 3 commits into from
Oct 21, 2024
Merged

Conversation

tuttarealstep
Copy link
Contributor

mc-source-code/DecompilerMC/
mc-source-code/src/
mc-source-code/target/
mc-source-code/
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why you modified the .gitignore ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry I've used the "decompile.sh" file and that folder for save researches, to prevent any accidental upload I've changed to include any file and subfolder

let mut abilities = self.abilities.lock().await;

// Set the flying ability
abilities.flying = player_abilities.flags & 0x02 != 0 && abilities.allow_flying;
Copy link
Collaborator

Choose a reason for hiding this comment

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

The abilities have allow_flying as well, Should should set them and not check if they true in the packet

Copy link
Contributor Author

@tuttarealstep tuttarealstep Oct 20, 2024

Choose a reason for hiding this comment

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

I've seen that this packet is sent by the client only when the player starts/stops flying and is not sending the allow_flying property. I've implemented the same check that vanilla does (bit mask 0x02 on the Flags field of the packed and the additional check on the player allow_flying flag) to set the flying property

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, Just looked at vanilla code and your right!, nvm then

@Snowiiii
Copy link
Collaborator

Looks good then.
Thanks @tuttarealstep

@Snowiiii Snowiiii merged commit 8381324 into Pumpkin-MC:master Oct 21, 2024
8 checks passed
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.

2 participants