1
0
mirror of https://github.com/LZStealth/armor-statues.git synced 2025-06-07 05:06:45 +01:00
2021-04-17 12:07:53 +02:00

21 lines
752 B
MCFunction

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