dantaeusb-mc / Zetter

Minecraft Painting Mod
https://zetter.gallery/wiki/zetter
Mozilla Public License 2.0
11 stars 5 forks source link

Synchronize Actions and Snapshots from the end #86

Open dantaeusb opened 1 year ago

dantaeusb commented 1 year ago

Currently, we sync actions and snapshots from the beginning of history lists, but if the player opened the painting screen recently and pressed undo. This might undo one of the first actions, theoretically leading to potential damage to the whole painting.

I think it is reasonable to sync from the end, plus, in that case, sync attribute introduced in 0.19.1 might not be actually needed, as we will have snapshot before the last action.

dantaeusb commented 1 year ago

This will require though to keep range of sync actions, thus increasing the complexity too. And we will have to prioritize new actions before first. It's not breaking, but probably one of the first things to improve.