mirror of
https://github.com/LZStealth/armor-statues.git
synced 2025-08-10 08:35:52 +01:00
Initial commit for armor statues
This commit is contained in:
22
data/armor_statues/functions/trigger/slots.mcfunction
Normal file
22
data/armor_statues/functions/trigger/slots.mcfunction
Normal file
@@ -0,0 +1,22 @@
|
||||
#
|
||||
# Description: Exchange items between equipment slots
|
||||
# Called by: armor_statues: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
|
Reference in New Issue
Block a user