Skip to content

feat(command): add //paste -r for random clipboard rotation - #3665

Open
someone005 wants to merge 1 commit into
IntellectualSites:mainfrom
someone005:paste-random-rotation
Open

someone005 wants to merge 1 commit into
IntellectualSites:mainfrom
someone005:paste-random-rotation

Conversation

@someone005

Copy link
Copy Markdown

Overview

Adds an option to randomly rotate the clipboard when using the //paste command.

Description

The //paste command currently has no option to paste an object rotated in a random direction. For example, when pasting a tree many times, players have to use //rotate before every single paste. This feature would help them, because they could just walk around and use a bound //paste -r command. The rotation is applied around the Y axis in 90 degree increments.

Submitter Checklist

  • Make sure you are opening from a topic branch (/feature/fix/docs/ branch (right side)) and not your main branch.
  • Ensure that the pull request title represents the desired changelog entry.
  • New public fields and methods are annotated with @since TODO.
  • I read and followed the contribution guidelines.

@someone005
someone005 requested a review from a team as a code owner September 24, 2026 11:33
@NotMyFault
NotMyFault requested review from a team and a balanced review from Copilot October 12, 2026 17:04

Copilot AI left a comment

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.

🟡 Changes recommended

Rotation history advances even when no paste occurs or the paste fails.

1 open finding
What changed in this PR

Adds random quarter-turn Y-axis rotation to //paste.

Changes:

  • Adds the -r paste option.
  • Temporarily composes and restores clipboard transforms.
  • Tracks the previous random rotation to avoid repetition.
File Description
LocalSession.java Stores the previous random paste rotation.
ClipboardCommands.java Implements random rotation for //paste.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@someone005
someone005 force-pushed the paste-random-rotation branch from 1e0a458 to 7e7b401 Compare October 13, 2026 07:21
@someone005
someone005 force-pushed the paste-random-rotation branch from 7e7b401 to cb9cb17 Compare October 19, 2026 08:23

@PierreSchwang PierreSchwang left a comment

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.

I feel like it would be sensible to use the Direction enum with the four cardinal directions instead of passing around a magic number

@someone005
someone005 force-pushed the paste-random-rotation branch from cb9cb17 to 744ee9c Compare November 6, 2026 14:07
@someone005
someone005 force-pushed the paste-random-rotation branch from 744ee9c to 2f036a0 Compare November 6, 2026 14:09
@someone005

Copy link
Copy Markdown
Author

I feel like it would be sensible to use the Direction enum with the four cardinal directions instead of passing around a magic number

Done 👍

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.

5 participants