mirror of
https://github.com/LZStealth/armor-statues.git
synced 2025-06-08 05:26:43 +01:00

-Changed how custom naming works: you can no longer set names to be visible/invisible from the book. Since armor stands retain their names in 1.19.4 you can rename an armor stand item and place it and it will automatically become visible. -Changed 'pointing' function for head and body: Both will now 'face' the player. -Added in has visible fire setting -Added in Pointer Wand: You can obtain this by renaming a stick 'Statues' or by using the trigger in the book: /trigger pointer_wand. -Face an armor stand to enter edit mode -r-click on a joint to first set the appendage to a neutral position, then to point towards the player. -r-click on the base to rotate it facing the player -l-click on the head to make the armor stand visible/invisible -l-click on the arms to make them visible/invisible -l-click on the base to make it visible/invisible -l-click on the body to cycle through the preset poses -Added in Adjustment Wand: You can obtain this by renaming a warped fungus on a stick 'Statues' or by using the trigger in the book: /trigger adjustment_wand. -Shift+r-click to change modes between X/Y/Z -l or r click on a joint to rotate in the positive or negative rotations -l or r click the base to move the stand in the negative or positive direction
43 lines
2.8 KiB
MCFunction
43 lines
2.8 KiB
MCFunction
#
|
|
# Description: Check for players with trigger score set
|
|
# Called by: #minecraft:load
|
|
# Entity @s: none
|
|
#
|
|
schedule function armor_statues:3_second 3s
|
|
#
|
|
# Tags item frames with a book in them
|
|
#
|
|
execute if score #animate_trigger as_angle matches 1.. as @e[type=#armor_statues:item_frames,tag=!as_animatable,predicate=armor_statues:item_frame_with_book] run tag @s add as_animatable
|
|
# Untags
|
|
execute if score #animate_trigger as_angle matches 1.. as @e[type=#armor_statues:item_frames,tag=as_animatable,predicate=!armor_statues:item_frame_with_book] run tag @s remove as_animatable
|
|
#
|
|
# Turns invisible armor stands visible if they don't have any items, customNameVisible, aren't locked, are markers, or invulnerable
|
|
#
|
|
execute as @e[type=minecraft:armor_stand, tag=as_invisible, nbt={Invisible:1b}, nbt=!{Invulnerable:1b}, nbt=!{Marker:1b}, nbt=!{HandItems:[ {Count:1b} ]}, nbt=!{ArmorItems:[ {Count:1b} ]}, nbt=!{CustomNameVisible:1b}, tag=!as_locked] run function armor_statues:set_visible
|
|
#
|
|
# Unlocks tool rack armor stands if the tripwire hook is broken
|
|
#
|
|
execute as @e[type=minecraft:armor_stand, tag=as_tool_rack, nbt=!{Small:1b}] at @s unless block ~ ~1 ~ minecraft:tripwire_hook run function armor_statues:remove_tool_rack
|
|
execute as @e[type=minecraft:armor_stand, tag=as_tool_rack, nbt={Small:1b}] at @s anchored eyes unless block ^ ^ ^ minecraft:tripwire_hook run function armor_statues:remove_tool_rack
|
|
#
|
|
# Sets an armor stand to interactable if player is holding a wand
|
|
#
|
|
execute as @a[predicate=armor_statues:holding_wand] at @s positioned ^ ^ ^3 as @e[type=minecraft:armor_stand,distance=..3,tag=!as_locked,tag=!as_interactable,nbt=!{Marker:1b},nbt=!{Invulnerable:1b},nbt={Small:0b}] at @s run function armor_statues:interactions/setup
|
|
execute as @a[predicate=armor_statues:holding_wand] at @s positioned ^ ^ ^3 as @e[type=minecraft:armor_stand,distance=..3,tag=!as_locked,tag=!as_interactable,nbt=!{Marker:1b},nbt=!{Invulnerable:1b},nbt={Small:1b}] at @s run function armor_statues:interactions/setup_small
|
|
#
|
|
# Resets interactable armor stands
|
|
#
|
|
execute as @e[type=minecraft:armor_stand,tag=as_interactable] at @s unless entity @p[predicate=armor_statues:holding_wand,distance=..4] run function armor_statues:interactions/reset_armor_stand
|
|
#
|
|
# Resets stray interactable and block entities
|
|
#
|
|
execute as @e[type=#armor_statues:interactable,type=!minecraft:armor_stand,tag=as_interactable] at @s unless entity @p[predicate=armor_statues:holding_wand,distance=..8] run kill @s
|
|
#
|
|
# turns armor stands with names visible
|
|
#
|
|
execute as @e[type=minecraft:armor_stand,nbt=!{CustomNameVisible:1b}, nbt=!{Marker:1b}, nbt=!{Invulnerable:1b}] if data entity @s CustomName run data merge entity @s {CustomNameVisible:1b}
|
|
#
|
|
# re-enables triggers
|
|
#
|
|
scoreboard players enable * pointer_wand
|
|
scoreboard players enable * adjustment_wand |