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:
35
data/armor_statues/functions/interactions/attack.mcfunction
Normal file
35
data/armor_statues/functions/interactions/attack.mcfunction
Normal file
@@ -0,0 +1,35 @@
|
||||
#
|
||||
# Description: Adjust armor stand pose
|
||||
# Called by: advancement: armor_statues:attack_interaction
|
||||
# Entity @s: player
|
||||
#
|
||||
# tag setup
|
||||
tag @s add as_selected
|
||||
tag @e[type=minecraft:interaction, distance=..6, nbt={attack:{}}, tag=as_interactable] add as_selected_interaction
|
||||
# Stores uuid to select entities
|
||||
scoreboard players operation #uuid_selector as_uuid1 = @e[type=minecraft:interaction, tag=as_selected_interaction, sort=nearest, limit=1] as_uuid1
|
||||
scoreboard players operation #uuid_selector as_uuid2 = @e[type=minecraft:interaction, tag=as_selected_interaction, sort=nearest, limit=1] as_uuid2
|
||||
scoreboard players operation #uuid_selector as_uuid3 = @e[type=minecraft:interaction, tag=as_selected_interaction, sort=nearest, limit=1] as_uuid3
|
||||
scoreboard players operation #uuid_selector as_uuid4 = @e[type=minecraft:interaction, tag=as_selected_interaction, sort=nearest, limit=1] as_uuid4
|
||||
# Selects entities from their stored uuid
|
||||
function armor_statues:select_by_uuid
|
||||
tag @e[type=armor_stand, tag=as_uuid_selected, sort=nearest, limit=1] add as_selected
|
||||
tag @e[tag=as_uuid_selected] remove as_uuid_selected
|
||||
#
|
||||
# pointing wand interaction
|
||||
#
|
||||
execute as @s[predicate=armor_statues:holding_pointer] run function armor_statues:interactions/attack_pointer
|
||||
#
|
||||
# adjust wand interaction
|
||||
#
|
||||
execute as @s[predicate=armor_statues:holding_adjustment] run function armor_statues:interactions/attack_adjust
|
||||
# Resets interaction
|
||||
execute as @e[type=minecraft:interaction, tag=as_selected_interaction] run function armor_statues:interactions/reset_interaction
|
||||
#execute as @e[type=minecraft:interaction, distance=..6, nbt={attack:{}}] run function armor_statues:interactions/reset_interaction
|
||||
scoreboard players set @s as_trigger 0
|
||||
scoreboard players enable @s as_trigger
|
||||
# resets tags
|
||||
tag @e[tag=as_selected] remove as_selected
|
||||
tag @e[type=minecraft:interaction, tag=as_selected_interaction] remove as_selected_interaction
|
||||
# Resets advancement
|
||||
advancement revoke @s only armor_statues:attack_interaction
|
@@ -0,0 +1,52 @@
|
||||
#
|
||||
# Description: adjusting pose
|
||||
# Called by: advancement: armor_statues:interactions/interact
|
||||
# Entity @s: player
|
||||
#
|
||||
scoreboard players set #wand_type as_angle 0
|
||||
# gets current wand type
|
||||
execute store result score #wand_type as_angle run data get entity @s SelectedItem.tag.type
|
||||
#
|
||||
# sets score according to marker
|
||||
#
|
||||
# X axis
|
||||
execute if score #wand_type as_angle matches 0 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_head_interactable] run scoreboard players set @s as_trigger 60
|
||||
execute if score #wand_type as_angle matches 0 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] run scoreboard players set @s as_trigger 66
|
||||
execute if score #wand_type as_angle matches 0 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_right_arm_interactable] run scoreboard players set @s as_trigger 72
|
||||
execute if score #wand_type as_angle matches 0 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_left_arm_interactable] run scoreboard players set @s as_trigger 78
|
||||
execute if score #wand_type as_angle matches 0 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_right_leg_interactable] run scoreboard players set @s as_trigger 84
|
||||
execute if score #wand_type as_angle matches 0 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_left_leg_interactable] run scoreboard players set @s as_trigger 90
|
||||
execute if score #wand_type as_angle matches 0 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_base_interactable] run scoreboard players set @s as_trigger 1102
|
||||
# Y axis
|
||||
execute if score #wand_type as_angle matches 1 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_head_interactable] run scoreboard players set @s as_trigger 62
|
||||
execute if score #wand_type as_angle matches 1 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] run scoreboard players set @s as_trigger 68
|
||||
execute if score #wand_type as_angle matches 1 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_right_arm_interactable] run scoreboard players set @s as_trigger 74
|
||||
execute if score #wand_type as_angle matches 1 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_left_arm_interactable] run scoreboard players set @s as_trigger 80
|
||||
execute if score #wand_type as_angle matches 1 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_right_leg_interactable] run scoreboard players set @s as_trigger 86
|
||||
execute if score #wand_type as_angle matches 1 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_left_leg_interactable] run scoreboard players set @s as_trigger 92
|
||||
execute if score #wand_type as_angle matches 1 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_base_interactable] run scoreboard players set @s as_trigger 106
|
||||
# Z axis
|
||||
execute if score #wand_type as_angle matches 2 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_head_interactable] run scoreboard players set @s as_trigger 64
|
||||
execute if score #wand_type as_angle matches 2 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] run scoreboard players set @s as_trigger 70
|
||||
execute if score #wand_type as_angle matches 2 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_right_arm_interactable] run scoreboard players set @s as_trigger 76
|
||||
execute if score #wand_type as_angle matches 2 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_left_arm_interactable] run scoreboard players set @s as_trigger 82
|
||||
execute if score #wand_type as_angle matches 2 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_right_leg_interactable] run scoreboard players set @s as_trigger 88
|
||||
execute if score #wand_type as_angle matches 2 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_left_leg_interactable] run scoreboard players set @s as_trigger 94
|
||||
execute if score #wand_type as_angle matches 2 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_base_interactable] run scoreboard players set @s as_trigger 1108
|
||||
#
|
||||
scoreboard players operation @e[type=minecraft:armor_stand,tag=as_selected,limit=1,sort=nearest] as_trigger = @s as_trigger
|
||||
#
|
||||
# Adjust pose function
|
||||
#
|
||||
execute if entity @s[scores={as_trigger=60..95}] as @e[type=armor_stand,tag=as_selected] run function armor_statues:trigger/adjust
|
||||
# nudge function
|
||||
execute if entity @s[scores={as_trigger=101..112}] as @e[type=armor_stand,tag=as_selected] run function armor_statues:trigger/position
|
||||
execute if entity @s[scores={as_trigger=101..112}] as @e[type=armor_stand,tag=as_selected,nbt={Small:0b}] at @s run function armor_statues:interactions/readjust_interactions
|
||||
execute if entity @s[scores={as_trigger=101..112}] as @e[type=armor_stand,tag=as_selected,nbt={Small:1b}] at @s run function armor_statues:interactions/readjust_interactions_small
|
||||
execute if entity @s[scores={as_trigger=1100..1129}] as @e[type=armor_stand,tag=as_selected] at @s run function armor_statues:trigger/position_relative
|
||||
execute if entity @s[scores={as_trigger=1100..1129}] as @e[type=armor_stand,tag=as_selected,nbt={Small:0b}] at @s run function armor_statues:interactions/readjust_interactions
|
||||
execute if entity @s[scores={as_trigger=100..1129}] as @e[type=armor_stand,tag=as_selected,nbt={Small:1b}] at @s run function armor_statues:interactions/readjust_interactions_small
|
||||
# turn off gravity if adjust Y
|
||||
execute if entity @s[scores={as_trigger=106..107}] as @e[type=armor_stand,tag=as_selected] run data merge entity @s {NoGravity:1b}
|
||||
# Plays sound
|
||||
execute if entity @s[scores={as_trigger=1..}] run playsound minecraft:item.spyglass.use neutral @a ~ ~ ~ 1 1.5
|
@@ -0,0 +1,55 @@
|
||||
#
|
||||
# Description: Adjust armor stand pose
|
||||
# Called by: armor_statues:interactions/attack
|
||||
# Entity @s: player
|
||||
#
|
||||
#
|
||||
# sets score according to marker
|
||||
#
|
||||
# Stand visible
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_head_interactable] if entity @e[type=armor_stand,tag=as_selected, tag=as_selected, sort=nearest, limit=1, nbt={Invisible:0b}] run scoreboard players set @s as_trigger 10
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_head_interactable] if entity @e[type=armor_stand,tag=as_selected, tag=as_selected, sort=nearest, limit=1, nbt={Invisible:1b}] run scoreboard players set @s as_trigger 9
|
||||
# Base visible
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_base_interactable] if entity @e[type=armor_stand,tag=as_selected, tag=as_selected, sort=nearest, limit=1, nbt={NoBasePlate:0b}] run scoreboard players set @s as_trigger 2
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_base_interactable] if entity @e[type=armor_stand,tag=as_selected, tag=as_selected, sort=nearest, limit=1, nbt={NoBasePlate:1b}] run scoreboard players set @s as_trigger 1
|
||||
# ShowArms - attack arms
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_right_arm_interactable] if entity @e[type=armor_stand,tag=as_selected, tag=as_selected, sort=nearest, limit=1, nbt={ShowArms:0b}] run scoreboard players set @s as_trigger 3
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_right_arm_interactable] if entity @e[type=armor_stand,tag=as_selected, tag=as_selected, sort=nearest, limit=1, nbt={ShowArms:1b}] run scoreboard players set @s as_trigger 4
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_left_arm_interactable] if entity @e[type=armor_stand,tag=as_selected, tag=as_selected, sort=nearest, limit=1, nbt={ShowArms:0b}] run scoreboard players set @s as_trigger 3
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_left_arm_interactable] if entity @e[type=armor_stand,tag=as_selected, tag=as_selected, sort=nearest, limit=1, nbt={ShowArms:1b}] run scoreboard players set @s as_trigger 4
|
||||
# Set preset pose- attack body
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] run scoreboard players add @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose 1
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] if score @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose matches 21.. run scoreboard players set @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose 1
|
||||
# poses
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] if score @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose matches 1 run scoreboard players set @s as_trigger 20
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] if score @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose matches 2 run scoreboard players set @s as_trigger 21
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] if score @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose matches 3 run scoreboard players set @s as_trigger 22
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] if score @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose matches 4 run scoreboard players set @s as_trigger 23
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] if score @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose matches 5 run scoreboard players set @s as_trigger 24
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] if score @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose matches 6 run scoreboard players set @s as_trigger 25
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] if score @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose matches 7 run scoreboard players set @s as_trigger 26
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] if score @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose matches 8 run scoreboard players set @s as_trigger 27
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] if score @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose matches 9 run scoreboard players set @s as_trigger 28
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] if score @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose matches 10 run scoreboard players set @s as_trigger 29
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] if score @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose matches 11 run scoreboard players set @s as_trigger 30
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] if score @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose matches 12 run scoreboard players set @s as_trigger 31
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] if score @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose matches 13 run scoreboard players set @s as_trigger 32
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] if score @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose matches 14 run scoreboard players set @s as_trigger 33
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] if score @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose matches 15 run scoreboard players set @s as_trigger 34
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] if score @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose matches 16 run scoreboard players set @s as_trigger 35
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] if score @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose matches 17 run scoreboard players set @s as_trigger 36
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] if score @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose matches 18 run scoreboard players set @s as_trigger 37
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] if score @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose matches 19 run scoreboard players set @s as_trigger 38
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] if score @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] as_current_pose matches 20 run scoreboard players set @s as_trigger 39
|
||||
#
|
||||
scoreboard players operation @e[type=minecraft:armor_stand,tag=as_selected,limit=1,sort=nearest] as_trigger = @s as_trigger
|
||||
# Plays sound
|
||||
execute if entity @s[scores={as_trigger=1..}] run playsound minecraft:item.spyglass.use neutral @a ~ ~ ~ 1 1.5
|
||||
#
|
||||
# Settings function
|
||||
#
|
||||
execute if entity @s[scores={as_trigger=1..12}] as @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] run function armor_statues:trigger/settings
|
||||
#
|
||||
# Preset function
|
||||
#
|
||||
execute if entity @s[scores={as_trigger=20..39}] as @e[type=armor_stand,tag=as_selected, sort=nearest, limit=1] run function armor_statues:trigger/presets
|
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Description: Sets up base interaction for interactions
|
||||
# Called by: armor_statues:interactions/setup
|
||||
# Entity @s: interaction
|
||||
#
|
||||
tag @s add as_interactable
|
||||
tag @s add as_base_interactable
|
||||
execute store result score @s as_uuid1 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[0]
|
||||
execute store result score @s as_uuid2 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[1]
|
||||
execute store result score @s as_uuid3 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[2]
|
||||
execute store result score @s as_uuid4 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[3]
|
||||
data merge entity @s {width: 0.25f, height: 0.25f, response:1b}
|
||||
# fixes rotation
|
||||
teleport @s ~ ~ ~ ~ ~
|
||||
# nbt for block display
|
||||
data merge entity @s[type=minecraft:block_display] {block_state: {Name: "minecraft:black_stained_glass"}, transformation: {translation: [-0.125f, 0.0f, -0.125f], scale: [0.25f, 0.25f, 0.25f]}}
|
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Description: Sets up base interaction for interactions
|
||||
# Called by: armor_statues:interactions/setup
|
||||
# Entity @s: interaction
|
||||
#
|
||||
tag @s add as_interactable
|
||||
tag @s add as_base_interactable
|
||||
execute store result score @s as_uuid1 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[0]
|
||||
execute store result score @s as_uuid2 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[1]
|
||||
execute store result score @s as_uuid3 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[2]
|
||||
execute store result score @s as_uuid4 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[3]
|
||||
data merge entity @s {width: 0.125f, height: 0.125f, response:1b}
|
||||
# fixes rotation
|
||||
teleport @s ~ ~ ~ ~ ~
|
||||
# nbt for block display
|
||||
data merge entity @s[type=minecraft:block_display] {block_state: {Name: "minecraft:black_stained_glass"}, transformation: {translation: [-0.0625f, 0.0f, -0.0625f], scale: [0.125f, 0.125f, 0.125f]}}
|
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Description: Sets up body interaction for interactions
|
||||
# Called by: armor_statues:interactions/setup
|
||||
# Entity @s: interaction
|
||||
#
|
||||
tag @s add as_interactable
|
||||
tag @s add as_body_interactable
|
||||
execute store result score @s as_uuid1 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[0]
|
||||
execute store result score @s as_uuid2 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[1]
|
||||
execute store result score @s as_uuid3 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[2]
|
||||
execute store result score @s as_uuid4 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[3]
|
||||
data merge entity @s {width: 0.25f, height: 0.25f, response:1b}
|
||||
# fixes rotation
|
||||
teleport @s ~ ~ ~ ~ ~
|
||||
# nbt for block display
|
||||
data merge entity @s[type=minecraft:block_display] {block_state: {Name: "minecraft:white_stained_glass"}, transformation: {translation: [-0.125f, 0.0f, -0.125f], scale: [0.25f, 0.25f, 0.25f]}}
|
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Description: Sets up body interaction for interactions
|
||||
# Called by: armor_statues:interactions/setup
|
||||
# Entity @s: interaction
|
||||
#
|
||||
tag @s add as_interactable
|
||||
tag @s add as_body_interactable
|
||||
execute store result score @s as_uuid1 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[0]
|
||||
execute store result score @s as_uuid2 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[1]
|
||||
execute store result score @s as_uuid3 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[2]
|
||||
execute store result score @s as_uuid4 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[3]
|
||||
data merge entity @s {width: 0.125f, height: 0.125f, response:1b}
|
||||
# fixes rotation
|
||||
teleport @s ~ ~ ~ ~ ~
|
||||
# nbt for block display
|
||||
data merge entity @s[type=minecraft:block_display] {block_state: {Name: "minecraft:white_stained_glass"}, transformation: {translation: [-0.0625f, 0.0f, -0.0625f], scale: [0.125f, 0.125f, 0.125f]}}
|
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Description: Sets up head interaction for interactions
|
||||
# Called by: armor_statues:interactions/setup
|
||||
# Entity @s: interaction
|
||||
#
|
||||
tag @s add as_interactable
|
||||
tag @s add as_head_interactable
|
||||
execute store result score @s as_uuid1 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[0]
|
||||
execute store result score @s as_uuid2 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[1]
|
||||
execute store result score @s as_uuid3 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[2]
|
||||
execute store result score @s as_uuid4 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[3]
|
||||
data merge entity @s {width: 0.38f, height: 0.38f, response:1b}
|
||||
# fixes rotation
|
||||
teleport @s ~ ~ ~ ~ ~
|
||||
# nbt for block display
|
||||
data merge entity @s[type=minecraft:block_display] {block_state: {Name: "minecraft:blue_stained_glass"}, transformation: {translation: [-0.19f, 0.0f, -0.19f], scale: [0.38f, 0.38f, 0.38f]}}
|
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Description: Sets up head interaction for interactions
|
||||
# Called by: armor_statues:interactions/setup
|
||||
# Entity @s: interaction
|
||||
#
|
||||
tag @s add as_interactable
|
||||
tag @s add as_head_interactable
|
||||
execute store result score @s as_uuid1 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[0]
|
||||
execute store result score @s as_uuid2 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[1]
|
||||
execute store result score @s as_uuid3 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[2]
|
||||
execute store result score @s as_uuid4 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[3]
|
||||
data merge entity @s {width: 0.19f, height: 0.19f, response:1b}
|
||||
# fixes rotation
|
||||
teleport @s ~ ~ ~ ~ ~
|
||||
# nbt for block display
|
||||
data merge entity @s[type=minecraft:block_display] {block_state: {Name: "minecraft:blue_stained_glass"}, transformation: {translation: [-0.095f, 0.0f, -0.095f], scale: [0.19f, 0.19f, 0.19f]}}
|
@@ -0,0 +1,52 @@
|
||||
#
|
||||
# Description: Adjust armor stand pose
|
||||
# Called by: advancement: armor_statues:use_interaction
|
||||
# Entity @s: player
|
||||
#
|
||||
# tag setup
|
||||
tag @s add as_selected
|
||||
tag @e[type=minecraft:interaction, distance=..6, nbt={interaction:{}}, tag=as_interactable] add as_selected_interaction
|
||||
# Stores uuid to select entities
|
||||
scoreboard players operation #uuid_selector as_uuid1 = @e[type=minecraft:interaction, tag=as_selected_interaction, sort=nearest, limit=1] as_uuid1
|
||||
scoreboard players operation #uuid_selector as_uuid2 = @e[type=minecraft:interaction, tag=as_selected_interaction, sort=nearest, limit=1] as_uuid2
|
||||
scoreboard players operation #uuid_selector as_uuid3 = @e[type=minecraft:interaction, tag=as_selected_interaction, sort=nearest, limit=1] as_uuid3
|
||||
scoreboard players operation #uuid_selector as_uuid4 = @e[type=minecraft:interaction, tag=as_selected_interaction, sort=nearest, limit=1] as_uuid4
|
||||
# Selects entities from their stored uuid
|
||||
function armor_statues:select_by_uuid
|
||||
tag @e[type=armor_stand, tag=as_uuid_selected, sort=nearest, limit=1] add as_selected
|
||||
tag @e[tag=as_uuid_selected] remove as_uuid_selected
|
||||
#
|
||||
# Checks if used last used on same entity
|
||||
#
|
||||
execute store result score #uuid_matcher1 as_uuid1 run data get entity @s SelectedItem.tag.LastUsed[0]
|
||||
execute store result score #uuid_matcher1 as_uuid2 run data get entity @s SelectedItem.tag.LastUsed[1]
|
||||
execute store result score #uuid_matcher1 as_uuid3 run data get entity @s SelectedItem.tag.LastUsed[2]
|
||||
execute store result score #uuid_matcher1 as_uuid4 run data get entity @s SelectedItem.tag.LastUsed[3]
|
||||
execute store result score #uuid_matcher2 as_uuid1 run data get entity @e[type=minecraft:interaction, tag=as_selected_interaction, sort=nearest, limit=1] UUID[0]
|
||||
execute store result score #uuid_matcher2 as_uuid2 run data get entity @e[type=minecraft:interaction, tag=as_selected_interaction, sort=nearest, limit=1] UUID[1]
|
||||
execute store result score #uuid_matcher2 as_uuid3 run data get entity @e[type=minecraft:interaction, tag=as_selected_interaction, sort=nearest, limit=1] UUID[2]
|
||||
execute store result score #uuid_matcher2 as_uuid4 run data get entity @e[type=minecraft:interaction, tag=as_selected_interaction, sort=nearest, limit=1] UUID[3]
|
||||
execute if score #uuid_matcher1 as_uuid1 = #uuid_matcher2 as_uuid1 if score #uuid_matcher1 as_uuid2 = #uuid_matcher2 as_uuid2 if score #uuid_matcher1 as_uuid3 = #uuid_matcher2 as_uuid3 if score #uuid_matcher1 as_uuid4 = #uuid_matcher2 as_uuid4 run tag @e[type=minecraft:interaction, tag=as_selected_interaction, sort=nearest, limit=1] add as_last_used
|
||||
#
|
||||
# Stores last interaction to wand
|
||||
#
|
||||
execute as @e[type=minecraft:interaction, tag=as_selected_interaction, sort=nearest, limit=1] run item modify entity @p[tag=as_selected] weapon.mainhand armor_statues:wand
|
||||
#
|
||||
# pointing wand interaction
|
||||
#
|
||||
execute as @s[predicate=armor_statues:holding_pointer] run function armor_statues:interactions/interact_pointer
|
||||
#
|
||||
# adjustment wand interaction
|
||||
#
|
||||
execute as @s[predicate=armor_statues:holding_adjustment] run function armor_statues:interactions/interact_adjust
|
||||
# Resets interaction
|
||||
execute as @e[type=minecraft:interaction, tag=as_selected_interaction] run function armor_statues:interactions/reset_interaction
|
||||
#execute as @e[type=minecraft:interaction, distance=..6, nbt={attack:{}}] run function armor_statues:interactions/reset_interaction
|
||||
scoreboard players set @e[tag=as_selected] as_trigger 0
|
||||
scoreboard players enable @s as_trigger
|
||||
# resets tags
|
||||
tag @e[tag=as_selected] remove as_selected
|
||||
tag @e[type=minecraft:interaction, tag=as_last_used] remove as_last_used
|
||||
tag @e[type=minecraft:interaction, tag=as_selected_interaction] remove as_selected_interaction
|
||||
# Resets advancement
|
||||
advancement revoke @s only armor_statues:use_interaction
|
@@ -0,0 +1,52 @@
|
||||
#
|
||||
# Description: adjusting pose
|
||||
# Called by: advancement: armor_statues:interactions/interact
|
||||
# Entity @s: player
|
||||
#
|
||||
scoreboard players set #wand_type as_angle 0
|
||||
# gets current wand type
|
||||
execute store result score #wand_type as_angle run data get entity @s SelectedItem.tag.type
|
||||
#
|
||||
# sets score according to marker
|
||||
#
|
||||
# X axis
|
||||
execute if score #wand_type as_angle matches 0 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_head_interactable] run scoreboard players set @s as_trigger 61
|
||||
execute if score #wand_type as_angle matches 0 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] run scoreboard players set @s as_trigger 67
|
||||
execute if score #wand_type as_angle matches 0 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_right_arm_interactable] run scoreboard players set @s as_trigger 73
|
||||
execute if score #wand_type as_angle matches 0 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_left_arm_interactable] run scoreboard players set @s as_trigger 79
|
||||
execute if score #wand_type as_angle matches 0 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_right_leg_interactable] run scoreboard players set @s as_trigger 85
|
||||
execute if score #wand_type as_angle matches 0 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_left_leg_interactable] run scoreboard players set @s as_trigger 91
|
||||
execute if score #wand_type as_angle matches 0 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_base_interactable] run scoreboard players set @s as_trigger 1103
|
||||
# Y axis
|
||||
execute if score #wand_type as_angle matches 1 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_head_interactable] run scoreboard players set @s as_trigger 63
|
||||
execute if score #wand_type as_angle matches 1 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] run scoreboard players set @s as_trigger 69
|
||||
execute if score #wand_type as_angle matches 1 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_right_arm_interactable] run scoreboard players set @s as_trigger 75
|
||||
execute if score #wand_type as_angle matches 1 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_left_arm_interactable] run scoreboard players set @s as_trigger 81
|
||||
execute if score #wand_type as_angle matches 1 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_right_leg_interactable] run scoreboard players set @s as_trigger 87
|
||||
execute if score #wand_type as_angle matches 1 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_left_leg_interactable] run scoreboard players set @s as_trigger 93
|
||||
execute if score #wand_type as_angle matches 1 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_base_interactable] run scoreboard players set @s as_trigger 107
|
||||
# Z axis
|
||||
execute if score #wand_type as_angle matches 2 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_head_interactable] run scoreboard players set @s as_trigger 65
|
||||
execute if score #wand_type as_angle matches 2 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable] run scoreboard players set @s as_trigger 71
|
||||
execute if score #wand_type as_angle matches 2 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_right_arm_interactable] run scoreboard players set @s as_trigger 77
|
||||
execute if score #wand_type as_angle matches 2 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_left_arm_interactable] run scoreboard players set @s as_trigger 83
|
||||
execute if score #wand_type as_angle matches 2 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_right_leg_interactable] run scoreboard players set @s as_trigger 89
|
||||
execute if score #wand_type as_angle matches 2 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_left_leg_interactable] run scoreboard players set @s as_trigger 95
|
||||
execute if score #wand_type as_angle matches 2 if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_base_interactable] run scoreboard players set @s as_trigger 1109
|
||||
#
|
||||
scoreboard players operation @e[type=minecraft:armor_stand,tag=as_selected,limit=1,sort=nearest] as_trigger = @s as_trigger
|
||||
#
|
||||
# Adjust pose function
|
||||
#
|
||||
execute if entity @s[scores={as_trigger=60..95}] as @e[type=armor_stand,tag=as_selected] run function armor_statues:trigger/adjust
|
||||
# nudge function
|
||||
execute if entity @s[scores={as_trigger=101..112}] as @e[type=armor_stand,tag=as_selected] run function armor_statues:trigger/position
|
||||
execute if entity @s[scores={as_trigger=101..112}] as @e[type=armor_stand,tag=as_selected,nbt={Small:0b}] at @s run function armor_statues:interactions/readjust_interactions
|
||||
execute if entity @s[scores={as_trigger=101..112}] as @e[type=armor_stand,tag=as_selected,nbt={Small:1b}] at @s run function armor_statues:interactions/readjust_interactions_small
|
||||
execute if entity @s[scores={as_trigger=1100..1129}] as @e[type=armor_stand,tag=as_selected] at @s run function armor_statues:trigger/position_relative
|
||||
execute if entity @s[scores={as_trigger=1100..1129}] as @e[type=armor_stand,tag=as_selected,nbt={Small:0b}] at @s run function armor_statues:interactions/readjust_interactions
|
||||
execute if entity @s[scores={as_trigger=100..1129}] as @e[type=armor_stand,tag=as_selected,nbt={Small:1b}] at @s run function armor_statues:interactions/readjust_interactions_small
|
||||
# turn off gravity if adjust Y
|
||||
execute if entity @s[scores={as_trigger=106..107}] as @e[type=armor_stand,tag=as_selected] run data merge entity @s {NoGravity:1b}
|
||||
# Plays sound
|
||||
execute if entity @s[scores={as_trigger=1..}] run playsound minecraft:item.spyglass.use neutral @a ~ ~ ~ 1 1.5
|
@@ -0,0 +1,38 @@
|
||||
#
|
||||
# Description: Pointing pose
|
||||
# Called by: advancement: armor_statues:interactions/interact
|
||||
# Entity @s: player
|
||||
#
|
||||
#
|
||||
# sets score according to marker
|
||||
#
|
||||
# for base
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_base_interactable] run scoreboard players set @s as_trigger 124
|
||||
# if not last used
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_head_interactable, tag=!as_last_used] run data modify entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_selected] Pose merge value {Head:[0.01f, 0.01f, 0.01f]}
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable, tag=!as_last_used] run data modify entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_selected] Pose merge value {Body:[0.01f, 0.01f, 0.01f]}
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_right_arm_interactable, tag=!as_last_used] run data modify entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_selected] Pose merge value {RightArm:[0.01f, 0.01f, 0.01f]}
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_left_arm_interactable, tag=!as_last_used] run data modify entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_selected] Pose merge value {LeftArm:[0.01f, 0.01f, 0.01f]}
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_right_leg_interactable, tag=!as_last_used] run data modify entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_selected] Pose merge value {RightLeg:[0.01f, 0.01f, 0.01f]}
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_left_leg_interactable, tag=!as_last_used] run data modify entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_selected] Pose merge value {LeftLeg:[0.01f, 0.01f, 0.01f]}
|
||||
# if last used
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_head_interactable, tag=as_last_used] run scoreboard players set @s as_trigger 1160
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_body_interactable, tag=as_last_used] run scoreboard players set @s as_trigger 1161
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_right_arm_interactable, tag=as_last_used] run scoreboard players set @s as_trigger 1162
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_left_arm_interactable, tag=as_last_used] run scoreboard players set @s as_trigger 1163
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_right_leg_interactable, tag=as_last_used] run scoreboard players set @s as_trigger 1170
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable,tag=as_left_leg_interactable, tag=as_last_used] run scoreboard players set @s as_trigger 1171
|
||||
#
|
||||
scoreboard players operation @e[type=minecraft:armor_stand,tag=as_selected,limit=1,sort=nearest] as_trigger = @s as_trigger
|
||||
#
|
||||
# Pointing function
|
||||
#
|
||||
execute if entity @s[scores={as_trigger=1160..1171}] as @e[type=armor_stand,tag=as_selected,nbt={Small:0b}] at @s run function armor_statues:trigger/pointing
|
||||
execute if entity @s[scores={as_trigger=1160..1171}] as @e[type=armor_stand,tag=as_selected,nbt={Small:1b}] at @s run function armor_statues:trigger/pointing_small
|
||||
# facing function
|
||||
execute if entity @s[scores={as_trigger=124..125}] as @e[type=armor_stand,tag=as_selected] at @s run function armor_statues:trigger/facing
|
||||
execute if entity @s[scores={as_trigger=124..125}] as @e[type=armor_stand,tag=as_selected,nbt={Small:0b}] at @s run function armor_statues:interactions/readjust_interactions
|
||||
execute if entity @s[scores={as_trigger=124..125}] as @e[type=armor_stand,tag=as_selected,nbt={Small:1b}] at @s run function armor_statues:interactions/readjust_interactions_small
|
||||
# Plays sound
|
||||
execute if entity @e[type=minecraft:interaction,tag=as_selected_interaction,tag=as_interactable, tag=!as_last_used] run playsound minecraft:item.spyglass.use neutral @a ~ ~ ~ 1 1.5
|
||||
execute if entity @s[scores={as_trigger=1..}] run playsound minecraft:item.spyglass.use neutral @a ~ ~ ~ 1 1.5
|
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Description: Sets up left arm interaction for interactions
|
||||
# Called by: armor_statues:interactions/setup
|
||||
# Entity @s: interaction
|
||||
#
|
||||
tag @s add as_interactable
|
||||
tag @s add as_left_arm_interactable
|
||||
execute store result score @s as_uuid1 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[0]
|
||||
execute store result score @s as_uuid2 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[1]
|
||||
execute store result score @s as_uuid3 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[2]
|
||||
execute store result score @s as_uuid4 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[3]
|
||||
data merge entity @s {width: 0.25f, height: 0.25f, response:1b}
|
||||
# fixes rotation
|
||||
teleport @s ~ ~ ~ ~ ~
|
||||
# nbt for block display
|
||||
data merge entity @s[type=minecraft:block_display] {block_state: {Name: "minecraft:lime_stained_glass"}, transformation: {translation: [-0.125f, 0.0f, -0.125f], scale: [0.25f, 0.25f, 0.25f]}}
|
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Description: Sets up left arm interaction for interactions
|
||||
# Called by: armor_statues:interactions/setup
|
||||
# Entity @s: interaction
|
||||
#
|
||||
tag @s add as_interactable
|
||||
tag @s add as_left_arm_interactable
|
||||
execute store result score @s as_uuid1 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[0]
|
||||
execute store result score @s as_uuid2 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[1]
|
||||
execute store result score @s as_uuid3 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[2]
|
||||
execute store result score @s as_uuid4 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[3]
|
||||
data merge entity @s {width: 0.125f, height: 0.125f, response:1b}
|
||||
# fixes rotation
|
||||
teleport @s ~ ~ ~ ~ ~
|
||||
# nbt for block display
|
||||
data merge entity @s[type=minecraft:block_display] {block_state: {Name: "minecraft:lime_stained_glass"}, transformation: {translation: [-0.0625f, 0.0f, -0.0625f], scale: [0.125f, 0.125f, 0.125f]}}
|
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Description: Sets up left leg interaction for interactions
|
||||
# Called by: armor_statues:interactions/setup
|
||||
# Entity @s: interaction
|
||||
#
|
||||
tag @s add as_interactable
|
||||
tag @s add as_left_leg_interactable
|
||||
execute store result score @s as_uuid1 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[0]
|
||||
execute store result score @s as_uuid2 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[1]
|
||||
execute store result score @s as_uuid3 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[2]
|
||||
execute store result score @s as_uuid4 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[3]
|
||||
data merge entity @s {width: 0.25f, height: 0.25f, response:1b}
|
||||
# fixes rotation
|
||||
teleport @s ~ ~ ~ ~ ~
|
||||
# nbt for block display
|
||||
data merge entity @s[type=minecraft:block_display] {block_state: {Name: "minecraft:yellow_stained_glass"}, transformation: {translation: [-0.125f, 0.0f, -0.125f], scale: [0.25f, 0.25f, 0.25f]}}
|
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Description: Sets up left leg interaction for interactions
|
||||
# Called by: armor_statues:interactions/setup
|
||||
# Entity @s: interaction
|
||||
#
|
||||
tag @s add as_interactable
|
||||
tag @s add as_left_leg_interactable
|
||||
execute store result score @s as_uuid1 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[0]
|
||||
execute store result score @s as_uuid2 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[1]
|
||||
execute store result score @s as_uuid3 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[2]
|
||||
execute store result score @s as_uuid4 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[3]
|
||||
data merge entity @s {width: 0.125f, height: 0.125f, response:1b}
|
||||
# fixes rotation
|
||||
teleport @s ~ ~ ~ ~ ~
|
||||
# nbt for block display
|
||||
data merge entity @s[type=minecraft:block_display] {block_state: {Name: "minecraft:yellow_stained_glass"}, transformation: {translation: [-0.0625f, 0.0f, -0.0625f], scale: [0.125f, 0.125f, 0.125f]}}
|
@@ -0,0 +1,27 @@
|
||||
#
|
||||
# Description: teleports interactions to correct positions
|
||||
# Called by: armor_statues:interactions/interact_pointer
|
||||
# Entity @s: armor_stand
|
||||
#
|
||||
# Stores uuid to select entities
|
||||
scoreboard players operation #uuid_selector as_uuid1 = @s as_uuid1
|
||||
scoreboard players operation #uuid_selector as_uuid2 = @s as_uuid2
|
||||
scoreboard players operation #uuid_selector as_uuid3 = @s as_uuid3
|
||||
scoreboard players operation #uuid_selector as_uuid4 = @s as_uuid4
|
||||
# Selects entities from their stored uuid
|
||||
function armor_statues:select_by_uuid
|
||||
# head
|
||||
execute as @e[type=#armor_statues:selectable,tag=as_uuid_selected,tag=as_head_interactable] rotated ~ 0 run tp ^ ^1.52 ^
|
||||
# body
|
||||
execute as @e[type=#armor_statues:selectable,tag=as_uuid_selected,tag=as_body_interactable] rotated ~ 0 run tp ^ ^1.25 ^
|
||||
# right arm
|
||||
execute as @e[type=#armor_statues:selectable,tag=as_uuid_selected,tag=as_right_arm_interactable] rotated ~ 0 run tp ^-0.34375 ^1.28125 ^
|
||||
# left arm
|
||||
execute as @e[type=#armor_statues:selectable,tag=as_uuid_selected,tag=as_left_arm_interactable] rotated ~ 0 run tp ^0.34375 ^1.28125 ^
|
||||
# right leg
|
||||
execute as @e[type=#armor_statues:selectable,tag=as_uuid_selected,tag=as_right_leg_interactable] rotated ~ 0 run tp ^-0.125 ^0.65625 ^
|
||||
# left leg
|
||||
execute as @e[type=#armor_statues:selectable,tag=as_uuid_selected,tag=as_left_leg_interactable] rotated ~ 0 run tp ^0.125 ^0.65625 ^
|
||||
# base
|
||||
execute as @e[type=#armor_statues:selectable,tag=as_uuid_selected,tag=as_base_interactable] rotated ~ 0 run tp ^ ^ ^
|
||||
tag @e[tag=as_uuid_selected] remove as_uuid_selected
|
@@ -0,0 +1,27 @@
|
||||
#
|
||||
# Description: teleports interactions to correct positions
|
||||
# Called by: armor_statues:interactions/interact_pointer
|
||||
# Entity @s: armor_stand
|
||||
#
|
||||
# Stores uuid to select entities
|
||||
scoreboard players operation #uuid_selector as_uuid1 = @s as_uuid1
|
||||
scoreboard players operation #uuid_selector as_uuid2 = @s as_uuid2
|
||||
scoreboard players operation #uuid_selector as_uuid3 = @s as_uuid3
|
||||
scoreboard players operation #uuid_selector as_uuid4 = @s as_uuid4
|
||||
# Selects entities from their stored uuid
|
||||
function armor_statues:select_by_uuid
|
||||
# head
|
||||
execute as @e[type=#armor_statues:selectable,tag=as_uuid_selected,tag=as_head_interactable] rotated ~ 0 run tp ^ ^0.76 ^
|
||||
# body
|
||||
execute as @e[type=#armor_statues:selectable,tag=as_uuid_selected,tag=as_body_interactable] rotated ~ 0 run tp ^ ^0.625 ^
|
||||
# right arm
|
||||
execute as @e[type=#armor_statues:selectable,tag=as_uuid_selected,tag=as_right_arm_interactable] rotated ~ 0 run tp ^-0.171875 ^0.640625 ^
|
||||
# left arm
|
||||
execute as @e[type=#armor_statues:selectable,tag=as_uuid_selected,tag=as_left_arm_interactable] rotated ~ 0 run tp ^0.171875 ^0.640625 ^
|
||||
# right leg
|
||||
execute as @e[type=#armor_statues:selectable,tag=as_uuid_selected,tag=as_right_leg_interactable] rotated ~ 0 run tp ^-0.0625 ^0.328125 ^
|
||||
# left leg
|
||||
execute as @e[type=#armor_statues:selectable,tag=as_uuid_selected,tag=as_left_leg_interactable] rotated ~ 0 run tp ^0.0625 ^0.328125 ^
|
||||
# base
|
||||
execute as @e[type=#armor_statues:selectable,tag=as_uuid_selected,tag=as_base_interactable] rotated ~ 0 run tp ^ ^ ^
|
||||
tag @e[tag=as_uuid_selected] remove as_uuid_selected
|
@@ -0,0 +1,18 @@
|
||||
#
|
||||
# Description: Resets armor stand for interactions
|
||||
# Called by: armor_statues:3_second
|
||||
# Entity @s: armor_stand
|
||||
#
|
||||
# Stores uuid to select entities
|
||||
scoreboard players operation #uuid_selector as_uuid1 = @s as_uuid1
|
||||
scoreboard players operation #uuid_selector as_uuid2 = @s as_uuid2
|
||||
scoreboard players operation #uuid_selector as_uuid3 = @s as_uuid3
|
||||
scoreboard players operation #uuid_selector as_uuid4 = @s as_uuid4
|
||||
# Selects entities from their stored uuid
|
||||
function armor_statues:select_by_uuid
|
||||
kill @e[type=minecraft:interaction,tag=as_uuid_selected]
|
||||
kill @e[type=minecraft:block_display,tag=as_uuid_selected]
|
||||
tag @e[tag=as_uuid_selected] remove as_uuid_selected
|
||||
# Resets armor stand
|
||||
tag @s remove as_interactable
|
||||
data merge entity @s {Marker: 0b}
|
@@ -0,0 +1,7 @@
|
||||
#
|
||||
# Description: Adjust armor stand pose
|
||||
# Called by: advancement: armor_statues:use_interaction
|
||||
# Entity @s: player
|
||||
#
|
||||
data remove entity @s interaction
|
||||
data remove entity @s attack
|
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Description: Sets up right arm interaction for interactions
|
||||
# Called by: armor_statues:interactions/setup
|
||||
# Entity @s: interaction
|
||||
#
|
||||
tag @s add as_interactable
|
||||
tag @s add as_right_arm_interactable
|
||||
execute store result score @s as_uuid1 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[0]
|
||||
execute store result score @s as_uuid2 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[1]
|
||||
execute store result score @s as_uuid3 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[2]
|
||||
execute store result score @s as_uuid4 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[3]
|
||||
data merge entity @s {width: 0.25f, height: 0.25f, response:1b}
|
||||
# fixes rotation
|
||||
teleport @s ~ ~ ~ ~ ~
|
||||
# nbt for block display
|
||||
data merge entity @s[type=minecraft:block_display] {block_state: {Name: "minecraft:red_stained_glass"}, transformation: {translation: [-0.125f, 0.0f, -0.125f], scale: [0.25f, 0.25f, 0.25f]}}
|
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Description: Sets up right arm interaction for interactions
|
||||
# Called by: armor_statues:interactions/setup
|
||||
# Entity @s: interaction
|
||||
#
|
||||
tag @s add as_interactable
|
||||
tag @s add as_right_arm_interactable
|
||||
execute store result score @s as_uuid1 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[0]
|
||||
execute store result score @s as_uuid2 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[1]
|
||||
execute store result score @s as_uuid3 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[2]
|
||||
execute store result score @s as_uuid4 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[3]
|
||||
data merge entity @s {width: 0.125f, height: 0.125f, response:1b}
|
||||
# fixes rotation
|
||||
teleport @s ~ ~ ~ ~ ~
|
||||
# nbt for block display
|
||||
data merge entity @s[type=minecraft:block_display] {block_state: {Name: "minecraft:red_stained_glass"}, transformation: {translation: [-0.0625f, 0.0f, -0.0625f], scale: [0.125f, 0.125f, 0.125f]}}
|
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Description: Sets up right leg interaction for interactions
|
||||
# Called by: armor_statues:interactions/setup
|
||||
# Entity @s: interaction
|
||||
#
|
||||
tag @s add as_interactable
|
||||
tag @s add as_right_leg_interactable
|
||||
execute store result score @s as_uuid1 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[0]
|
||||
execute store result score @s as_uuid2 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[1]
|
||||
execute store result score @s as_uuid3 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[2]
|
||||
execute store result score @s as_uuid4 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[3]
|
||||
data merge entity @s {width: 0.25f, height: 0.25f, response:1b}
|
||||
# fixes rotation
|
||||
teleport @s ~ ~ ~ ~ ~
|
||||
# nbt for block display
|
||||
data merge entity @s[type=minecraft:block_display] {block_state: {Name: "minecraft:light_blue_stained_glass"}, transformation: {translation: [-0.125f, 0.0f, -0.125f], scale: [0.25f, 0.25f, 0.25f]}}
|
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Description: Sets up right leg interaction for interactions
|
||||
# Called by: armor_statues:interactions/setup
|
||||
# Entity @s: interaction
|
||||
#
|
||||
tag @s add as_interactable
|
||||
tag @s add as_right_leg_interactable
|
||||
execute store result score @s as_uuid1 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[0]
|
||||
execute store result score @s as_uuid2 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[1]
|
||||
execute store result score @s as_uuid3 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[2]
|
||||
execute store result score @s as_uuid4 run data get entity @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_interactable_temp] UUID[3]
|
||||
data merge entity @s {width: 0.125f, height: 0.125f, response:1b}
|
||||
# fixes rotation
|
||||
teleport @s ~ ~ ~ ~ ~
|
||||
# nbt for block display
|
||||
data merge entity @s[type=minecraft:block_display] {block_state: {Name: "minecraft:light_blue_stained_glass"}, transformation: {translation: [-0.0625f, 0.0f, -0.0625f], scale: [0.125f, 0.125f, 0.125f]}}
|
35
data/armor_statues/functions/interactions/setup.mcfunction
Normal file
35
data/armor_statues/functions/interactions/setup.mcfunction
Normal file
@@ -0,0 +1,35 @@
|
||||
#
|
||||
# Description: Sets up armor stand for interactions
|
||||
# Called by: armor_statues:3_second
|
||||
# Entity @s: armor_stand
|
||||
#
|
||||
tag @s add as_interactable
|
||||
tag @s add as_interactable_temp
|
||||
data merge entity @s {Marker:1b}
|
||||
execute store result score @s as_uuid1 run data get entity @s UUID[0]
|
||||
execute store result score @s as_uuid2 run data get entity @s UUID[1]
|
||||
execute store result score @s as_uuid3 run data get entity @s UUID[2]
|
||||
execute store result score @s as_uuid4 run data get entity @s UUID[3]
|
||||
# Head
|
||||
execute rotated ~ 0 positioned ^ ^1.52 ^ summon minecraft:interaction run function armor_statues:interactions/head_setup
|
||||
execute rotated ~ 0 positioned ^ ^1.52 ^ summon minecraft:block_display run function armor_statues:interactions/head_setup
|
||||
# Body
|
||||
execute rotated ~ 0 positioned ^ ^1.25 ^ summon minecraft:interaction run function armor_statues:interactions/body_setup
|
||||
execute rotated ~ 0 positioned ^ ^1.25 ^ summon minecraft:block_display run function armor_statues:interactions/body_setup
|
||||
# Right Arm
|
||||
execute rotated ~ 0 positioned ^-0.34375 ^1.28125 ^ summon minecraft:interaction run function armor_statues:interactions/right_arm_setup
|
||||
execute rotated ~ 0 positioned ^-0.34375 ^1.28125 ^ summon minecraft:block_display run function armor_statues:interactions/right_arm_setup
|
||||
# Left Arm
|
||||
execute rotated ~ 0 positioned ^0.34375 ^1.28125 ^ summon minecraft:interaction run function armor_statues:interactions/left_arm_setup
|
||||
execute rotated ~ 0 positioned ^0.34375 ^1.28125 ^ summon minecraft:block_display run function armor_statues:interactions/left_arm_setup
|
||||
# Right Leg
|
||||
execute rotated ~ 0 positioned ^-0.125 ^0.65625 ^ summon minecraft:interaction run function armor_statues:interactions/right_leg_setup
|
||||
execute rotated ~ 0 positioned ^-0.125 ^0.65625 ^ summon minecraft:block_display run function armor_statues:interactions/right_leg_setup
|
||||
# Left Leg
|
||||
execute rotated ~ 0 positioned ^0.125 ^0.65625 ^ summon minecraft:interaction run function armor_statues:interactions/left_leg_setup
|
||||
execute rotated ~ 0 positioned ^0.125 ^0.65625 ^ summon minecraft:block_display run function armor_statues:interactions/left_leg_setup
|
||||
# Base
|
||||
execute rotated ~ 0 positioned ^ ^ ^ summon minecraft:interaction run function armor_statues:interactions/base_setup
|
||||
execute rotated ~ 0 positioned ^ ^ ^ summon minecraft:block_display run function armor_statues:interactions/base_setup
|
||||
# resets temp tag
|
||||
tag @s remove as_interactable_temp
|
@@ -0,0 +1,35 @@
|
||||
#
|
||||
# Description: Sets up armor stand for interactions
|
||||
# Called by: armor_statues:3_second
|
||||
# Entity @s: armor_stand
|
||||
#
|
||||
tag @s add as_interactable
|
||||
tag @s add as_interactable_temp
|
||||
data merge entity @s {Marker:1b}
|
||||
execute store result score @s as_uuid1 run data get entity @s UUID[0]
|
||||
execute store result score @s as_uuid2 run data get entity @s UUID[1]
|
||||
execute store result score @s as_uuid3 run data get entity @s UUID[2]
|
||||
execute store result score @s as_uuid4 run data get entity @s UUID[3]
|
||||
# Head
|
||||
execute rotated ~ 0 positioned ^ ^0.76 ^ summon minecraft:interaction run function armor_statues:interactions/head_setup_small
|
||||
execute rotated ~ 0 positioned ^ ^0.76 ^ summon minecraft:block_display run function armor_statues:interactions/head_setup_small
|
||||
# Body
|
||||
execute rotated ~ 0 positioned ^ ^0.625 ^ summon minecraft:interaction run function armor_statues:interactions/body_setup_small
|
||||
execute rotated ~ 0 positioned ^ ^0.625 ^ summon minecraft:block_display run function armor_statues:interactions/body_setup_small
|
||||
# Right Arm
|
||||
execute rotated ~ 0 positioned ^-0.171875 ^0.640625 ^ summon minecraft:interaction run function armor_statues:interactions/right_arm_setup_small
|
||||
execute rotated ~ 0 positioned ^-0.171875 ^0.640625 ^ summon minecraft:block_display run function armor_statues:interactions/right_arm_setup_small
|
||||
# Left Arm
|
||||
execute rotated ~ 0 positioned ^0.171875 ^0.640625 ^ summon minecraft:interaction run function armor_statues:interactions/left_arm_setup_small
|
||||
execute rotated ~ 0 positioned ^0.171875 ^0.640625 ^ summon minecraft:block_display run function armor_statues:interactions/left_arm_setup_small
|
||||
# Right Leg
|
||||
execute rotated ~ 0 positioned ^-0.0625 ^0.328125 ^ summon minecraft:interaction run function armor_statues:interactions/right_leg_setup_small
|
||||
execute rotated ~ 0 positioned ^-0.0625 ^0.328125 ^ summon minecraft:block_display run function armor_statues:interactions/right_leg_setup_small
|
||||
# Left Leg
|
||||
execute rotated ~ 0 positioned ^0.0625 ^0.328125 ^ summon minecraft:interaction run function armor_statues:interactions/left_leg_setup_small
|
||||
execute rotated ~ 0 positioned ^0.0625 ^0.328125 ^ summon minecraft:block_display run function armor_statues:interactions/left_leg_setup_small
|
||||
# Base
|
||||
execute rotated ~ 0 positioned ^ ^ ^ summon minecraft:interaction run function armor_statues:interactions/base_setup_small
|
||||
execute rotated ~ 0 positioned ^ ^ ^ summon minecraft:block_display run function armor_statues:interactions/base_setup_small
|
||||
# resets temp tag
|
||||
tag @s remove as_interactable_temp
|
Reference in New Issue
Block a user