Fix Spectate command #422

Open
Dueris wants to merge 1 commit from CraftCanvasMC/fix/spectate-command into ver/1.21.11
Dueris commented 2025-12-28 05:51:27 +01:00 (Migrated from github.com)

While probably not a necessary command to reimplement into Folia, it should probably be implemented for more Vanilla parity and such.

The fix introduced here essentially schedules the full method in a very similar way as the other command patches. The ServerPlayer#setCamera method is already patched to support off-region targets, so we schedule the method contents to the ServerPlayer spectator.

Ive tested this via the command below:

/spectate @e[limit=1,type=!player,sort=random] Dueris
While probably not a necessary command to reimplement into Folia, it should probably be implemented for more Vanilla parity and such. The fix introduced here essentially schedules the full method in a very similar way as the other command patches. The `ServerPlayer#setCamera` method is already patched to support off-region targets, so we schedule the method contents to the `ServerPlayer` spectator. Ive tested this via the command below: ``` /spectate @e[limit=1,type=!player,sort=random] Dueris ```
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin CraftCanvasMC/fix/spectate-command:CraftCanvasMC/fix/spectate-command
git switch CraftCanvasMC/fix/spectate-command

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch ver/1.21.11
git merge --no-ff CraftCanvasMC/fix/spectate-command
git switch CraftCanvasMC/fix/spectate-command
git rebase ver/1.21.11
git switch ver/1.21.11
git merge --ff-only CraftCanvasMC/fix/spectate-command
git switch CraftCanvasMC/fix/spectate-command
git rebase ver/1.21.11
git switch ver/1.21.11
git merge --no-ff CraftCanvasMC/fix/spectate-command
git switch ver/1.21.11
git merge --squash CraftCanvasMC/fix/spectate-command
git switch ver/1.21.11
git merge --ff-only CraftCanvasMC/fix/spectate-command
git switch ver/1.21.11
git merge CraftCanvasMC/fix/spectate-command
git push origin ver/1.21.11
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Minecraft/Folia!422
No description provided.