1
0
mirror of https://github.com/LZStealth/armor-statues.git synced 2025-06-07 17:16:44 +01:00
2023-06-12 21:22:39 -07:00

21 lines
790 B
MCFunction

#
# Description: Undo last armor stand action
# Called by: as_statue:repeat/undo_redo
# Entity @s: player
#
# Copies current state to redo states
#
function armor_statues:repeat/save_redo_state
#
# Copies last undo state to armor stand
#
data modify entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_selected] {} merge from storage customizable_armor_stands:book_storage SavedItem.tag.UndoStates[0]
data modify entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_selected] Pose set from storage customizable_armor_stands:book_storage SavedItem.tag.UndoStates[0].Pose
#
# Deletes undo state state
#
data remove storage customizable_armor_stands:book_storage SavedItem.tag.UndoStates[0]
#
# Modifies book data
#
execute as @s run function armor_statues:storage_out