mirror of
https://github.com/LZStealth/armor-statues.git
synced 2025-10-21 15:22:14 +01:00
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
This commit is contained in:
@@ -5,14 +5,16 @@
|
||||
#
|
||||
execute as @p[tag=as_selected] run function armor_statues:storage_in
|
||||
#
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.SavedPose set value {Pose: {RightArm: [0f, 0f, 0f], LeftLeg: [0f, 0f, 0f], Head: [0f, 0f, 0f], LeftArm: [0f, 0f, 0f], RightLeg: [0f, 0f, 0f], Body: [0f, 0f, 0f]}, NoBasePlate:0b, ShowArms:0b, Small:0b, Invisible:0b, CustomNameVisible:0b}
|
||||
#data modify storage customizable_armor_stands:book_storage SavedItem.tag.SavedPose set value {Pose: {RightArm: [0f, 0f, 0f], LeftLeg: [0f, 0f, 0f], Head: [0f, 0f, 0f], LeftArm: [0f, 0f, 0f], RightLeg: [0f, 0f, 0f], Body: [0f, 0f, 0f]}, NoBasePlate:0b, ShowArms:0b, Small:0b, Invisible:0b, CustomNameVisible:0b }
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.SavedPose set value {Pose: {RightArm: [0f, 0f, 0f], LeftLeg: [0f, 0f, 0f], Head: [0f, 0f, 0f], LeftArm: [0f, 0f, 0f], RightLeg: [0f, 0f, 0f], Body: [0f, 0f, 0f]}, NoBasePlate:0b, ShowArms:0b, Small:0b, Invisible:0b, HasVisualFire:0b}
|
||||
#
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.SavedPose.Pose merge from entity @s Pose
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.SavedPose.NoBasePlate set from entity @s NoBasePlate
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.SavedPose.ShowArms set from entity @s ShowArms
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.SavedPose.Small set from entity @s Small
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.SavedPose.Invisible set from entity @s Invisible
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.SavedPose.CustomNameVisible set from entity @s CustomNameVisible
|
||||
#data modify storage customizable_armor_stands:book_storage SavedItem.tag.SavedPose.CustomNameVisible set from entity @s CustomNameVisible
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.SavedPose.HasVisualFire set from entity @s HasVisualFire
|
||||
#
|
||||
execute as @p[tag=as_selected] run function armor_statues:storage_out
|
||||
#
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# Rotate the armor stand to face the selected player
|
||||
#
|
||||
tp @s ~ ~ ~ facing entity @a[distance=..3,tag=as_selected,limit=1]
|
||||
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
|
||||
#
|
||||
|
@@ -6,11 +6,11 @@
|
||||
# Summons temp armor stand
|
||||
#
|
||||
# Head
|
||||
execute if score @s as_trigger matches 1160 rotated ~ 0 run summon minecraft:armor_stand ^ ^-0.1875 ^ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["as_temp_armor_stand"],DisabledSlots:4144959,Silent:1b}
|
||||
execute if score @s as_trigger matches 1166 rotated ~ 0 run summon minecraft:armor_stand ^ ^-0.1875 ^ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["as_temp_armor_stand"],DisabledSlots:4144959,Silent:1b}
|
||||
execute if score @s as_trigger matches 1160 rotated ~ 0 run summon minecraft:armor_stand ^ ^ ^ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["as_temp_armor_stand"],DisabledSlots:4144959,Silent:1b}
|
||||
execute if score @s as_trigger matches 1166 rotated ~ 0 run summon minecraft:armor_stand ^ ^ ^ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["as_temp_armor_stand"],DisabledSlots:4144959,Silent:1b}
|
||||
# Body
|
||||
execute if score @s as_trigger matches 1161 rotated ~ 0 run summon minecraft:armor_stand ^ ^-0.125 ^ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["as_temp_armor_stand"],DisabledSlots:4144959,Silent:1b}
|
||||
execute if score @s as_trigger matches 1167 rotated ~ 0 run summon minecraft:armor_stand ^ ^-0.125 ^ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["as_temp_armor_stand"],DisabledSlots:4144959,Silent:1b}
|
||||
execute if score @s as_trigger matches 1161 rotated ~ 0 run summon minecraft:armor_stand ^ ^ ^ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["as_temp_armor_stand"],DisabledSlots:4144959,Silent:1b}
|
||||
execute if score @s as_trigger matches 1167 rotated ~ 0 run summon minecraft:armor_stand ^ ^ ^ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["as_temp_armor_stand"],DisabledSlots:4144959,Silent:1b}
|
||||
# Right Arm
|
||||
execute if score @s as_trigger matches 1162 rotated ~ 0 run summon minecraft:armor_stand ^-0.34375 ^-0.1875 ^ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["as_temp_armor_stand"],DisabledSlots:4144959,Silent:1b}
|
||||
execute if score @s as_trigger matches 1168 rotated ~ 0 run summon minecraft:armor_stand ^-0.34375 ^-0.1875 ^ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["as_temp_armor_stand"],DisabledSlots:4144959,Silent:1b}
|
||||
@@ -33,19 +33,31 @@ execute store result score #selected_as_x as_angle run data get entity @s Rotati
|
||||
execute store result score #selected_as_z as_angle run data get entity @s Rotation[1] 1000
|
||||
scoreboard players operation #temp_as_x as_angle -= #selected_as_x as_angle
|
||||
# Appendage offset
|
||||
scoreboard players operation #temp_as_z as_angle -= #var90000 as_angle
|
||||
# Head rotation offset
|
||||
execute if score @s as_trigger matches 1160 run scoreboard players operation #temp_as_z as_angle += #var180000 as_angle
|
||||
execute if score @s as_trigger matches 1166 run scoreboard players operation #temp_as_z as_angle += #var180000 as_angle
|
||||
execute if score @s as_trigger matches 1162..1165 run scoreboard players operation #temp_as_z as_angle -= #var90000 as_angle
|
||||
execute if score @s as_trigger matches 1168..1171 run scoreboard players operation #temp_as_z as_angle -= #var90000 as_angle
|
||||
# Head rotation offset (UNUSED)
|
||||
#execute if score @s as_trigger matches 1160 run scoreboard players operation #temp_as_z as_angle += #var180000 as_angle
|
||||
#execute if score @s as_trigger matches 1166 run scoreboard players operation #temp_as_z as_angle += #var180000 as_angle
|
||||
#
|
||||
execute if score #temp_as_x as_angle matches 180000.. run scoreboard players operation #temp_as_x as_angle -= #var360000 as_angle
|
||||
execute if score #temp_as_x as_angle matches ..-180000 run scoreboard players operation #temp_as_x as_angle += #var360000 as_angle
|
||||
execute if score #temp_as_x as_angle matches 90000.. run scoreboard players operation #temp_as_z as_angle *= #var-1 as_angle
|
||||
execute if score #temp_as_x as_angle matches ..-90000 run scoreboard players operation #temp_as_z as_angle *= #var-1 as_angle
|
||||
execute if score #temp_as_x as_angle matches 90000.. run scoreboard players operation #temp_as_x as_angle -= #var180000 as_angle
|
||||
execute if score #temp_as_x as_angle matches ..-90000 run scoreboard players operation #temp_as_x as_angle += #var180000 as_angle
|
||||
# Mirror rotation so arms and legs rotate facing the right
|
||||
#
|
||||
execute if score @s as_trigger matches 1162..1165 if score #temp_as_x as_angle matches 180000.. run scoreboard players operation #temp_as_x as_angle -= #var360000 as_angle
|
||||
execute if score @s as_trigger matches 1162..1165 if score #temp_as_x as_angle matches ..-180000 run scoreboard players operation #temp_as_x as_angle += #var360000 as_angle
|
||||
execute if score @s as_trigger matches 1162..1165 if score #temp_as_x as_angle matches 90000.. run scoreboard players operation #temp_as_z as_angle *= #var-1 as_angle
|
||||
execute if score @s as_trigger matches 1162..1165 if score #temp_as_x as_angle matches ..-90000 run scoreboard players operation #temp_as_z as_angle *= #var-1 as_angle
|
||||
execute if score @s as_trigger matches 1162..1165 if score #temp_as_x as_angle matches 90000.. run scoreboard players operation #temp_as_x as_angle -= #var180000 as_angle
|
||||
execute if score @s as_trigger matches 1162..1165 if score #temp_as_x as_angle matches ..-90000 run scoreboard players operation #temp_as_x as_angle += #var180000 as_angle
|
||||
#
|
||||
execute if score @s as_trigger matches 1168..1171 if score #temp_as_x as_angle matches 180000.. run scoreboard players operation #temp_as_x as_angle -= #var360000 as_angle
|
||||
execute if score @s as_trigger matches 1168..1171 if score #temp_as_x as_angle matches ..-180000 run scoreboard players operation #temp_as_x as_angle += #var360000 as_angle
|
||||
execute if score @s as_trigger matches 1168..1171 if score #temp_as_x as_angle matches 90000.. run scoreboard players operation #temp_as_z as_angle *= #var-1 as_angle
|
||||
execute if score @s as_trigger matches 1168..1171 if score #temp_as_x as_angle matches ..-90000 run scoreboard players operation #temp_as_z as_angle *= #var-1 as_angle
|
||||
execute if score @s as_trigger matches 1168..1171 if score #temp_as_x as_angle matches 90000.. run scoreboard players operation #temp_as_x as_angle -= #var180000 as_angle
|
||||
execute if score @s as_trigger matches 1168..1171 if score #temp_as_x as_angle matches ..-90000 run scoreboard players operation #temp_as_x as_angle += #var180000 as_angle
|
||||
# unused
|
||||
#scoreboard players operation #temp_as_x as_angle *= #var-1 as_angle
|
||||
#scoreboard players operation #temp_as_z as_angle *= #var-1 as_angle
|
||||
#
|
||||
data modify storage customizable_armor_stands:appendage appendage set value [0f,0f,0f]
|
||||
execute store result storage customizable_armor_stands:appendage appendage[1] float 0.001 run scoreboard players get #temp_as_x as_angle
|
||||
execute store result storage customizable_armor_stands:appendage appendage[0] float 0.001 run scoreboard players get #temp_as_z as_angle
|
||||
|
@@ -6,11 +6,11 @@
|
||||
# Summons temp armor stand
|
||||
#
|
||||
# Head
|
||||
execute if score @s as_trigger matches 1160 rotated ~ 0 run summon minecraft:armor_stand ^ ^-0.28125 ^ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["as_temp_armor_stand"],DisabledSlots:4144959,Silent:1b}
|
||||
execute if score @s as_trigger matches 1166 rotated ~ 0 run summon minecraft:armor_stand ^ ^-0.28125 ^ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["as_temp_armor_stand"],DisabledSlots:4144959,Silent:1b}
|
||||
execute if score @s as_trigger matches 1160 rotated ~ 0 run summon minecraft:armor_stand ^ ^ ^ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["as_temp_armor_stand"],DisabledSlots:4144959,Silent:1b}
|
||||
execute if score @s as_trigger matches 1166 rotated ~ 0 run summon minecraft:armor_stand ^ ^ ^ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["as_temp_armor_stand"],DisabledSlots:4144959,Silent:1b}
|
||||
# Body
|
||||
execute if score @s as_trigger matches 1161 rotated ~ 0 run summon minecraft:armor_stand ^ ^-0.25 ^ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["as_temp_armor_stand"],DisabledSlots:4144959,Silent:1b}
|
||||
execute if score @s as_trigger matches 1167 rotated ~ 0 run summon minecraft:armor_stand ^ ^-0.25 ^ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["as_temp_armor_stand"],DisabledSlots:4144959,Silent:1b}
|
||||
execute if score @s as_trigger matches 1161 rotated ~ 0 run summon minecraft:armor_stand ^ ^ ^ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["as_temp_armor_stand"],DisabledSlots:4144959,Silent:1b}
|
||||
execute if score @s as_trigger matches 1167 rotated ~ 0 run summon minecraft:armor_stand ^ ^ ^ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["as_temp_armor_stand"],DisabledSlots:4144959,Silent:1b}
|
||||
# Right Arm
|
||||
execute if score @s as_trigger matches 1162 rotated ~ 0 run summon minecraft:armor_stand ^-0.171875 ^-0.28125 ^ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["as_temp_armor_stand"],DisabledSlots:4144959,Silent:1b}
|
||||
execute if score @s as_trigger matches 1168 rotated ~ 0 run summon minecraft:armor_stand ^-0.171875 ^-0.28125 ^ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["as_temp_armor_stand"],DisabledSlots:4144959,Silent:1b}
|
||||
@@ -33,19 +33,31 @@ execute store result score #selected_as_x as_angle run data get entity @s Rotati
|
||||
execute store result score #selected_as_z as_angle run data get entity @s Rotation[1] 1000
|
||||
scoreboard players operation #temp_as_x as_angle -= #selected_as_x as_angle
|
||||
# Appendage offset
|
||||
scoreboard players operation #temp_as_z as_angle -= #var90000 as_angle
|
||||
# Head rotation offset
|
||||
execute if score @s as_trigger matches 1160 run scoreboard players operation #temp_as_z as_angle += #var180000 as_angle
|
||||
execute if score @s as_trigger matches 1166 run scoreboard players operation #temp_as_z as_angle += #var180000 as_angle
|
||||
execute if score @s as_trigger matches 1162..1165 run scoreboard players operation #temp_as_z as_angle -= #var90000 as_angle
|
||||
execute if score @s as_trigger matches 1168..1171 run scoreboard players operation #temp_as_z as_angle -= #var90000 as_angle
|
||||
# Head rotation offset (UNUSED)
|
||||
#execute if score @s as_trigger matches 1160 run scoreboard players operation #temp_as_z as_angle += #var180000 as_angle
|
||||
#execute if score @s as_trigger matches 1166 run scoreboard players operation #temp_as_z as_angle += #var180000 as_angle
|
||||
#
|
||||
execute if score #temp_as_x as_angle matches 180000.. run scoreboard players operation #temp_as_x as_angle -= #var360000 as_angle
|
||||
execute if score #temp_as_x as_angle matches ..-180000 run scoreboard players operation #temp_as_x as_angle += #var360000 as_angle
|
||||
execute if score #temp_as_x as_angle matches 90000.. run scoreboard players operation #temp_as_z as_angle *= #var-1 as_angle
|
||||
execute if score #temp_as_x as_angle matches ..-90000 run scoreboard players operation #temp_as_z as_angle *= #var-1 as_angle
|
||||
execute if score #temp_as_x as_angle matches 90000.. run scoreboard players operation #temp_as_x as_angle -= #var180000 as_angle
|
||||
execute if score #temp_as_x as_angle matches ..-90000 run scoreboard players operation #temp_as_x as_angle += #var180000 as_angle
|
||||
# Mirror rotation so arms and legs rotate facing the right
|
||||
#
|
||||
execute if score @s as_trigger matches 1162..1165 if score #temp_as_x as_angle matches 180000.. run scoreboard players operation #temp_as_x as_angle -= #var360000 as_angle
|
||||
execute if score @s as_trigger matches 1162..1165 if score #temp_as_x as_angle matches ..-180000 run scoreboard players operation #temp_as_x as_angle += #var360000 as_angle
|
||||
execute if score @s as_trigger matches 1162..1165 if score #temp_as_x as_angle matches 90000.. run scoreboard players operation #temp_as_z as_angle *= #var-1 as_angle
|
||||
execute if score @s as_trigger matches 1162..1165 if score #temp_as_x as_angle matches ..-90000 run scoreboard players operation #temp_as_z as_angle *= #var-1 as_angle
|
||||
execute if score @s as_trigger matches 1162..1165 if score #temp_as_x as_angle matches 90000.. run scoreboard players operation #temp_as_x as_angle -= #var180000 as_angle
|
||||
execute if score @s as_trigger matches 1162..1165 if score #temp_as_x as_angle matches ..-90000 run scoreboard players operation #temp_as_x as_angle += #var180000 as_angle
|
||||
#
|
||||
execute if score @s as_trigger matches 1168..1171 if score #temp_as_x as_angle matches 180000.. run scoreboard players operation #temp_as_x as_angle -= #var360000 as_angle
|
||||
execute if score @s as_trigger matches 1168..1171 if score #temp_as_x as_angle matches ..-180000 run scoreboard players operation #temp_as_x as_angle += #var360000 as_angle
|
||||
execute if score @s as_trigger matches 1168..1171 if score #temp_as_x as_angle matches 90000.. run scoreboard players operation #temp_as_z as_angle *= #var-1 as_angle
|
||||
execute if score @s as_trigger matches 1168..1171 if score #temp_as_x as_angle matches ..-90000 run scoreboard players operation #temp_as_z as_angle *= #var-1 as_angle
|
||||
execute if score @s as_trigger matches 1168..1171 if score #temp_as_x as_angle matches 90000.. run scoreboard players operation #temp_as_x as_angle -= #var180000 as_angle
|
||||
execute if score @s as_trigger matches 1168..1171 if score #temp_as_x as_angle matches ..-90000 run scoreboard players operation #temp_as_x as_angle += #var180000 as_angle
|
||||
# unused
|
||||
#scoreboard players operation #temp_as_x as_angle *= #var-1 as_angle
|
||||
#scoreboard players operation #temp_as_z as_angle *= #var-1 as_angle
|
||||
#
|
||||
data modify storage customizable_armor_stands:appendage appendage set value [0f,0f,0f]
|
||||
execute store result storage customizable_armor_stands:appendage appendage[1] float 0.001 run scoreboard players get #temp_as_x as_angle
|
||||
execute store result storage customizable_armor_stands:appendage appendage[0] float 0.001 run scoreboard players get #temp_as_z as_angle
|
||||
|
@@ -15,8 +15,10 @@ execute if entity @s[scores={as_trigger=9}] run data merge entity @s {Invisible:
|
||||
execute if entity @s[scores={as_trigger=9}] run tag @s remove as_invisible
|
||||
execute if entity @s[scores={as_trigger=10}] run data merge entity @s {Invisible:1b}
|
||||
execute if entity @s[scores={as_trigger=10}] run tag @s add as_invisible
|
||||
execute if entity @s[scores={as_trigger=11}] run data merge entity @s {CustomNameVisible:1b}
|
||||
execute if entity @s[scores={as_trigger=12}] run data merge entity @s {CustomNameVisible:0b}
|
||||
#execute if entity @s[scores={as_trigger=11}] run data merge entity @s {CustomNameVisible:1b}
|
||||
#execute if entity @s[scores={as_trigger=12}] run data merge entity @s {CustomNameVisible:0b}
|
||||
execute if entity @s[scores={as_trigger=13}] run data merge entity @s {HasVisualFire:1b}
|
||||
execute if entity @s[scores={as_trigger=14}] run data merge entity @s {HasVisualFire:0b}
|
||||
#
|
||||
# Tag the armor stand as modified
|
||||
#
|
||||
|
Reference in New Issue
Block a user