Skip to content

Navigation Menu

Sign in
Sign up

fix look command offthread_repeat math and mounted rotation - #2836

Open
BehrRiley wants to merge 6 commits into
DenizenScript:dev from
BehrRiley:fix/teleport-and-rotation-mechanics
Open

fix look command offthread_repeat math and mounted rotation #2836
BehrRiley wants to merge 6 commits into
DenizenScript:dev from
BehrRiley:fix/teleport-and-rotation-mechanics

Conversation

@BehrRiley

@BehrRiley BehrRiley commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

This update resolves two distinct issues with the look command:

Problem

  • The offthread_repeat argument applied the total relative yaw and pitch repeatedly instead of splitting them into fractional step increments
  • Paper pull request Teleport rework PaperMC/Paper#13181 deprecated RETAIN_VEHICLE and tightened teleport and rotation restrictions, causing mounted entities and players to fail look updates

Solution

  • fixed the sub-tick step calculation so that offthread_repeat splits the relative yaw and pitch into fractional step increments instead of repeatedly applying the total distance
  • resolved client-side packet drops and Paper vehicle restrictions by temporarily unmounting entities during rotation updates and remounting them properly

Testing, References:

if (entity.isSpawned()) {
if (loc != null) {
NMSHandler.entityHelper.faceLocation(entity.getBukkitEntity(), loc);
org.bukkit.entity.Entity bukkitEntity = entity.getBukkitEntity();

@MC-Samuel MC-Samuel Jul 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can clean up FQN for these.


if (loc != null) {
NMSHandler.entityHelper.faceLocation(bukkitEntity, loc);
} else {

@MC-Samuel MC-Samuel Jul 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Newline after each }.

@MC-Samuel MC-Samuel Jul 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can make this else if (entity.isPlayer)) { and shift the below sections over.

if (entity.isSpawned()) {
Entity bukkitEntity = entity.getBukkitEntity();
Entity vehicle = bukkitEntity.getVehicle();

@mcmonkey4eva mcmonkey4eva Aug 25, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(minor format) bunch of stray newlines in here

Copy link
Copy Markdown
Contributor Author

@@ -125,37 +128,52 @@ public static void autoExecute(ScriptEntry scriptEntry,
final float pitchRaw = pitch == null ? 0 : pitch.asFloat();
for (EntityTag entity : entities) {
if (entity.isSpawned()) {

@MC-Samuel MC-Samuel Sep 3, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Early continue would look better rather than nesting.

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

Reviewers

@mcmonkey4eva mcmonkey4eva mcmonkey4eva left review comments
+1 more reviewer
@MC-Samuel MC-Samuel MC-Samuel left review comments
Reviewers whose approvals may not affect merge requirements

At least 2 approving reviews are required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /