Skip to content

Expose relative parameters to setRotation#13901

Open
Clexus wants to merge 4 commits into
PaperMC:mainfrom
Clexus:expose
Open

Expose relative parameters to setRotation#13901
Clexus wants to merge 4 commits into
PaperMC:mainfrom
Clexus:expose

Conversation

@Clexus
Copy link
Copy Markdown
Contributor

@Clexus Clexus commented May 22, 2026

More like a QoL update

@Clexus Clexus requested a review from a team as a code owner May 22, 2026 10:26
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue May 22, 2026
Copy link
Copy Markdown
Contributor

@lynxplay lynxplay left a comment

Choose a reason for hiding this comment

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

Wouldn't this just be addRotation?
Which, fair addition, I am just not very happy with the method name and parameters, they look to be copying internals one to one and seem very clunky.

//edit:
Might not have said this nicely, there is obviously a different in the method as ServerPlayer makes use of those booleans to send the relative update packet instead. This is purely about naming of the API method.

@Clexus
Copy link
Copy Markdown
Contributor Author

Clexus commented May 22, 2026

Wouldn't this just be addRotation? Which, fair addition, I am just not very happy with the method name and parameters, they look to be copying internals one to one and seem very clunky.

//edit: Might not have said this nicely, there is obviously a different in the method as ServerPlayer makes use of those booleans to send the relative update packet instead. This is purely about naming of the API method.

if renamed to addRotation, the relative parameters will look more confusing, or you mean method like addRotation(yaw, pitch)?
I'd prefer just keep it. I added a note, which may be better

@Warriorrrr
Copy link
Copy Markdown
Member

I could maybe see a use case for being able to set one part of the rotation relative and the other absolute, which wouldn't be possible with just an addRotation(yaw, pitch) method. I'm not immediately a fan of the current proposed method since I dislike having ambiguous boolean parameters in methods, something like a setRotation(Something.relative(2f), Something.absolute(90f)) could fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

3 participants