1
0
mirror of https://github.com/LZStealth/armor-statues.git synced 2025-06-08 05:26:43 +01:00
MukiTanuki 1b6d7ed463 1.19.4 update
-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
2023-04-01 15:08:16 -07:00

21 lines
823 B
MCFunction

#
# Description: Adjust rotation of armor stand
# Called by: armor_statues:trigger
# Entity @s: armor stand
#
# Note: The function is being executed at the location of the armor stand so @p is not necessarily the original player
#
# Rotate the armor stand to face the selected player
#
tp @s ~ ~ ~ facing entity @a[distance=..7,tag=as_selected,limit=1]
#
# If stand is required to face away from the player, add 180 to the rotation
#
execute if entity @s[scores={as_trigger=125}] store result score @s as_pose run data get entity @s Rotation[0] 1
execute if entity @s[scores={as_trigger=125}] run scoreboard players add @s as_pose 180
execute if entity @s[scores={as_trigger=125}] store result entity @s Rotation[0] float 1 run scoreboard players get @s as_pose
#
# Tag the armor stand as modified
#
tag @s add as_modified