Minetest-WorldEdit icon indicating copy to clipboard operation
Minetest-WorldEdit copied to clipboard

Undo

Open fireglow opened this issue 10 years ago • 15 comments

Hi, I think a undo function to rollback the last change made by WorldEdit would be a good addition to the tool. Thank you for considering it :-)

fireglow avatar May 19 '14 00:05 fireglow

Hi fireglow, I think that's a good idea. Expect to see it in the next version!

Uberi avatar May 23 '14 20:05 Uberi

Cool, I'm looking forward to it :)

fireglow avatar May 27 '14 11:05 fireglow

still waiting :D

JuniorJPDJ avatar Mar 14 '15 14:03 JuniorJPDJ

How would you code a rollback/undo feature ? I was thinking about saving to disk affected areas and keeping a defined number of undo files per player.

pyrollo avatar Jul 28 '16 14:07 pyrollo

undo is very important, especially if importing a large schematic and is placed wrong.

LoneStar- avatar Jul 23 '17 22:07 LoneStar-

FYI: I've made a we_undo mod: https://github.com/HybridDog/we_undo

HybridDog avatar Nov 19 '17 07:11 HybridDog

Minecraftian WorldEdit had an undo/redo feature. I haven't ever checked though what happens when multiple people operate on the same area and perform undoing/redoing like: player A undoes, player B undoes, player A redoes, player B redoes. Will it result in state just before undoing?

Also it's open-source, so maybe a good source to see and learn.

beyondlimits avatar Feb 01 '19 07:02 beyondlimits

My mod saves the differences compressed in memory; it does not save the state before and after but only the difference to before (or after in case of redo). A journal list for each player stores the differences for multiple undoing and redoing. When multiple players undo changes at the same positions, the journal for the redo command remembers the current nodes when undo is applied. e.g. air -> B sets wood -> A sets stone stone, A undoes -> wood, B undoes -> air, A redoes -> stone, B redoes -> wood It does not result in the state before undoing; otherwise B's redoing would need to do nothing or be blocked.

HybridDog avatar Feb 01 '19 17:02 HybridDog

Please put @HybridDog s undo mod into we, but it should be improved so it can undo everything

niwla23 avatar Apr 11 '19 12:04 niwla23

It's a very useful functionality. I think it should be included.

AFCMS avatar May 11 '20 13:05 AFCMS

The undo feature is a must have when using worldedit. I didn't know of the existence of @HybridDog undo mod and it would have saved me multiple times hours of work when building. This feature should be present in worldedit without the need of installing another mod. Hope it will be added soon

Anulo2 avatar Jul 28 '20 08:07 Anulo2

+1: I also would like to see the undo feature native in this mod.

Git-Forked avatar Feb 15 '21 11:02 Git-Forked

especially for schematics its very nice to have the undo feature (sadly not working with HybridDogs extention :( ).. i'd love to see this included and optimized into we

vraisunge avatar Mar 13 '21 16:03 vraisunge

I'd like to see this undo feature too. It's almost impossible to get large things right the first try and it's more logical to use //undo than to have to set everything to air. It has been about 7 years since this issue was opened, is this ever going to be added?

AmyMoriyama avatar Jul 12 '21 22:07 AmyMoriyama

especially for schematics its very nice to have the undo feature (sadly not working with HybridDogs extention :( ).

I've implemented undoing for //mtschemplace and //load in we_undo by now.

HybridDog avatar Jul 29 '21 19:07 HybridDog