customize armor stands

This commit is contained in:
Daniel Løvbrøtte Olsen
2020-03-19 15:59:23 +01:00
parent 53d88fc3be
commit a8bfeda4bd
89 changed files with 2499 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
#
# Description: Exchange items between equipment slots
# Called by: as:trigger
# Entity @s: armor stand
#
# Creates temporary storage
#
#data modify storage customizable_armor_stands:slot_storage {} set value {Slots:[{}, {}]}
#
# Copy item from main hand to temporary storage
#
data modify storage customizable_armor_stands:slot_storage Slot set from entity @s HandItems[0]
#
# Copy item from off hand or head to main hand
#
execute if entity @s[scores={as_trigger=161}] run data modify entity @s HandItems[0] set from entity @s HandItems[1]
execute if entity @s[scores={as_trigger=162}] run data modify entity @s HandItems[0] set from entity @s ArmorItems[3]
#
# Copy item from temporary storage to off hand or head
#
execute if entity @s[scores={as_trigger=161}] run data modify entity @s HandItems[1] set from storage customizable_armor_stands:slot_storage Slot
execute if entity @s[scores={as_trigger=162}] run data modify entity @s ArmorItems[3] set from storage customizable_armor_stands:slot_storage Slot