mirror of
https://github.com/LZStealth/armor-statues.git
synced 2025-08-10 20:45:53 +01:00
Initial commit for armor statues
This commit is contained in:
20
data/armor_statues/functions/item_frames/fixed.mcfunction
Normal file
20
data/armor_statues/functions/item_frames/fixed.mcfunction
Normal file
@@ -0,0 +1,20 @@
|
||||
#
|
||||
# Description: turns item frame invisible
|
||||
# Called by: armor_statues:if_trigger
|
||||
# Entity @s: item frame
|
||||
#
|
||||
# Makes item frame fixed
|
||||
#
|
||||
execute if entity @p[tag=as_selected,scores={if_invisible=2}] unless entity @s[tag=if_fixed] run title @a[tag=as_selected,tag=!as_chat] actionbar [{"text":"Item frame fixed","color":"dark_green"}]
|
||||
execute if entity @p[tag=as_selected,scores={if_invisible=2}] unless entity @s[tag=if_fixed] run tellraw @a[tag=as_selected,tag=as_chat] [{"text":"<Stick_God> ","color":"dark_green"},{"text":"Item frame fixed","color":"dark_red"}]
|
||||
#
|
||||
execute if entity @p[tag=as_selected,scores={if_invisible=2}] unless entity @s[tag=if_fixed] run data merge entity @s {Fixed:1b}
|
||||
execute if entity @p[tag=as_selected,scores={if_invisible=2}] unless entity @s[tag=if_fixed] run tag @s add if_fixed
|
||||
#
|
||||
# Unfixes item frame
|
||||
#
|
||||
execute if entity @p[tag=as_selected,scores={if_invisible=3}] if entity @s[tag=if_fixed] run title @a[tag=as_selected,tag=!as_chat] actionbar [{"text":"Item frame no longer fixed","color":"dark_green"}]
|
||||
execute if entity @p[tag=as_selected,scores={if_invisible=3}] if entity @s[tag=if_fixed] run tellraw @a[tag=as_selected,tag=as_chat] [{"text":"<Stick_God> ","color":"dark_green"},{"text":"Item frame no longer fixed","color":"dark_green"}]
|
||||
#
|
||||
execute if entity @p[tag=as_selected,scores={if_invisible=3}] if entity @s[tag=if_fixed] run data merge entity @s {Fixed:0b}
|
||||
execute if entity @p[tag=as_selected,scores={if_invisible=3}] if entity @s[tag=if_fixed] run tag @s remove if_fixed
|
@@ -0,0 +1,9 @@
|
||||
#
|
||||
# Description: turns item frame invisible if successful
|
||||
# Called by: armor_statues:if_trigger
|
||||
# Entity @s: item frame
|
||||
#
|
||||
# Makes item frame invisible
|
||||
#
|
||||
data merge entity @s {Invisible:1b}
|
||||
tag @s add if_invisible
|
@@ -0,0 +1,14 @@
|
||||
#
|
||||
# Description: turns item frame invisible
|
||||
# Called by: armor_statues:if_trigger
|
||||
# Entity @s: item frame
|
||||
#
|
||||
#
|
||||
# If no potion in hand, display failure message
|
||||
#
|
||||
execute if entity @p[tag=as_selected,predicate=!armor_statues:mainhand_potion,predicate=!armor_statues:offhand_potion] run title @a[tag=as_selected,tag=!as_chat] actionbar [{"text":"Requires invisibility potion in Mainhand or Offhand","color":"dark_red"}]
|
||||
execute if entity @p[tag=as_selected,predicate=!armor_statues:mainhand_potion,predicate=!armor_statues:offhand_potion] run tellraw @a[tag=as_selected,tag=as_chat] [{"text":"<Stick_God> ","color":"dark_green"},{"text":"Requires invisibility potion in Mainhand or Offhand","color":"dark_red"}]
|
||||
#
|
||||
# If player has a potion in hand, successfully trigger
|
||||
#
|
||||
execute unless entity @p[tag=as_selected,predicate=!armor_statues:mainhand_potion,predicate=!armor_statues:offhand_potion] run function armor_statues:item_frames/invisible_success
|
@@ -0,0 +1,7 @@
|
||||
#
|
||||
# Description: turns empty item frames visible
|
||||
# Called by: armor_statues:as_second
|
||||
# Entity @s: invisible item frame
|
||||
#
|
||||
execute as @s run data merge entity @s {Invisible:0b}
|
||||
execute as @s run tag @s remove if_invisible
|
Reference in New Issue
Block a user