Skip to content

Conversation

@Argmaster
Copy link
Collaborator

@Argmaster Argmaster commented Mar 23, 2025

This pull request adds /undo command which can be used to revert changes done to world with world editing commands.

Related to: #1214
Related to: #1238

@Argmaster Argmaster changed the title [WorldEdit] Add undo and redo commands [CubyzEdit] Add undo and redo commands Mar 23, 2025
@Argmaster Argmaster changed the title [CubyzEdit] Add undo and redo commands Add undo and redo commands Mar 23, 2025
@Argmaster Argmaster marked this pull request as ready for review March 23, 2025 02:55
@Argmaster Argmaster mentioned this pull request Mar 24, 2025
@Argmaster Argmaster changed the title Add undo and redo commands Add /undo and /redo commands Mar 24, 2025
@Argmaster Argmaster mentioned this pull request Mar 24, 2025
@Argmaster Argmaster changed the title Add /undo and /redo commands Add /undo command Mar 24, 2025
}
if(source.worldEditData.undoHistory.pop()) |action| {
action.blueprint.paste(action.position);
source.sendMessage("#00ff00Un-done last {s}.", .{action.message});
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to also print the position?

Copy link
Collaborator Author

@Argmaster Argmaster Mar 24, 2025

Choose a reason for hiding this comment

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

Not really, it might be confusing, especially for brushes, cause brushes are applied from center while undo position for them will be min x min y min z. That reminds me that @min can be used on vectors.

Argmaster and others added 2 commits March 24, 2025 21:32
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
@IntegratedQuantum IntegratedQuantum merged commit 12d05a0 into PixelGuys:master Mar 24, 2025
1 check 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