mirror of
https://github.com/LZStealth/armor-statues.git
synced 2025-06-07 17:16:44 +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:
parent
e6a4cb1beb
commit
1b6d7ed463
25
data/armor_statues/advancements/attack_interaction.json
Normal file
25
data/armor_statues/advancements/attack_interaction.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"criteria": {
|
||||
"attack": {
|
||||
"trigger": "minecraft:player_hurt_entity",
|
||||
"conditions": {
|
||||
"player": [{
|
||||
"condition": "minecraft:reference",
|
||||
"name": "armor_statues:holding_wand"
|
||||
}],
|
||||
"entity": {
|
||||
"type": "minecraft:interaction",
|
||||
"nbt": "{Tags: [ \"as_interactable\" ]}"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"attack"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"function": "armor_statues:interactions/attack"
|
||||
}
|
||||
}
|
25
data/armor_statues/advancements/use_interaction.json
Normal file
25
data/armor_statues/advancements/use_interaction.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"criteria": {
|
||||
"interact": {
|
||||
"trigger": "minecraft:player_interacted_with_entity",
|
||||
"conditions": {
|
||||
"player": [{
|
||||
"condition": "minecraft:reference",
|
||||
"name": "armor_statues:holding_wand"
|
||||
}],
|
||||
"entity": {
|
||||
"type": "minecraft:interaction",
|
||||
"nbt": "{Tags: [ \"as_interactable\" ]}"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"interact"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"function": "armor_statues:interactions/interact"
|
||||
}
|
||||
}
|
@ -18,4 +18,26 @@ execute as @e[type=minecraft:armor_stand, tag=as_invisible, nbt={Invisible:1b},
|
||||
# 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
|
||||
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
|
14
data/armor_statues/functions/adjustment_wand.mcfunction
Normal file
14
data/armor_statues/functions/adjustment_wand.mcfunction
Normal file
@ -0,0 +1,14 @@
|
||||
#
|
||||
# Description: adjusts wand type
|
||||
# Called by: armor_statues:second
|
||||
# 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
|
||||
# cycles and sets wand according to type
|
||||
execute if score #wand_type as_angle matches 0 run item modify entity @s weapon.mainhand armor_statues:adjustment_wand_1
|
||||
execute if score #wand_type as_angle matches 1 run item modify entity @s weapon.mainhand armor_statues:adjustment_wand_2
|
||||
execute if score #wand_type as_angle matches 2 run item modify entity @s weapon.mainhand armor_statues:adjustment_wand_0
|
||||
# sound
|
||||
playsound minecraft:block.note_block.hat block @a ~ ~ ~ 0.5 1.5
|
@ -0,0 +1,17 @@
|
||||
#
|
||||
# Description: trigger for crafting adjustment wand
|
||||
# Called by: armor_statues:second
|
||||
# Entity @s: player
|
||||
#
|
||||
# Checks if player already has a wand
|
||||
execute if data entity @s Inventory[{id:"minecraft:warped_fungus_on_a_stick", tag:{wand:1} }] run title @s actionbar [{"text":"You already have an Adjustment Wand!","color": "red"}]
|
||||
execute if data entity @s Inventory[{id:"minecraft:warped_fungus_on_a_stick", tag:{wand:1} }] run scoreboard players set @s adjustment_wand 0
|
||||
# Checks if player has an item for wand
|
||||
execute unless data entity @s[scores={adjustment_wand=1..}] Inventory[{id:"minecraft:warped_fungus_on_a_stick"}] run title @s actionbar [{"text":"Must have a ","color":"red"},{"translate":"item.minecraft.warped_fungus_on_a_stick","color":"yellow"},{"color":"red","text":" in Inventory"}]
|
||||
execute unless data entity @s[scores={adjustment_wand=1..}] Inventory[{id:"minecraft:warped_fungus_on_a_stick"}] run scoreboard players set @s adjustment_wand 0
|
||||
#
|
||||
clear @s[scores={adjustment_wand=1..}] minecraft:warped_fungus_on_a_stick 1
|
||||
loot give @s[scores={adjustment_wand=1..}] loot armor_statues:adjustment_wand
|
||||
# reset trigger
|
||||
scoreboard players set @s adjustment_wand 0
|
||||
scoreboard players enable @s adjustment_wand
|
@ -0,0 +1,7 @@
|
||||
#
|
||||
# Description: gives player pointing wand
|
||||
# Called by: armor_statues:second
|
||||
# Entity @s: player
|
||||
#
|
||||
clear @s minecraft:warped_fungus_on_a_stick{display:{Name:'{"text":"Statues"}'}} 1
|
||||
loot give @s loot armor_statues:adjustment_wand
|
@ -0,0 +1,7 @@
|
||||
#
|
||||
# Description: gives player pointing wand
|
||||
# Called by: armor_statues:second
|
||||
# Entity @s: player
|
||||
#
|
||||
clear @s minecraft:stick{display:{Name:'{"text":"Statues"}'}} 1
|
||||
loot give @s loot armor_statues:pointer_wand
|
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
|
@ -11,6 +11,8 @@ scoreboard objectives add as_angle dummy
|
||||
scoreboard objectives add as_help trigger
|
||||
scoreboard objectives add if_invisible trigger
|
||||
scoreboard objectives add as_repeat trigger
|
||||
scoreboard objectives add pointer_wand trigger
|
||||
scoreboard objectives add adjustment_wand trigger
|
||||
scoreboard objectives add as_edited_uuid1 dummy
|
||||
scoreboard objectives add as_edited_uuid2 dummy
|
||||
scoreboard objectives add as_edited_uuid3 dummy
|
||||
@ -19,6 +21,12 @@ scoreboard objectives add as_lock_uuid1 dummy
|
||||
scoreboard objectives add as_lock_uuid2 dummy
|
||||
scoreboard objectives add as_lock_uuid3 dummy
|
||||
scoreboard objectives add as_lock_uuid4 dummy
|
||||
scoreboard objectives add as_uuid1 dummy
|
||||
scoreboard objectives add as_uuid2 dummy
|
||||
scoreboard objectives add as_uuid3 dummy
|
||||
scoreboard objectives add as_uuid4 dummy
|
||||
scoreboard objectives add as_current_pose dummy
|
||||
scoreboard objectives add as_wand_used minecraft.used:minecraft.warped_fungus_on_a_stick
|
||||
#
|
||||
# Resets triggers on reload
|
||||
#
|
||||
@ -26,6 +34,8 @@ scoreboard players enable * as_trigger
|
||||
scoreboard players enable * as_help
|
||||
scoreboard players enable * if_invisible
|
||||
scoreboard players enable * as_repeat
|
||||
scoreboard players enable * pointer_wand
|
||||
scoreboard players enable * adjustment_wand
|
||||
#
|
||||
# Variables
|
||||
#
|
||||
|
17
data/armor_statues/functions/pointer_wand_trigger.mcfunction
Normal file
17
data/armor_statues/functions/pointer_wand_trigger.mcfunction
Normal file
@ -0,0 +1,17 @@
|
||||
#
|
||||
# Description: trigger for crafting pointer wand
|
||||
# Called by: armor_statues:second
|
||||
# Entity @s: player
|
||||
#
|
||||
# Checks if player already has a wand
|
||||
execute if data entity @s Inventory[{id:"minecraft:stick", tag:{wand:1} }] run title @s actionbar [{"text":"You already have a Pointer Wand!","color": "red"}]
|
||||
execute if data entity @s Inventory[{id:"minecraft:stick", tag:{wand:1} }] run scoreboard players set @s pointer_wand 0
|
||||
# Checks if player has an item for wand
|
||||
execute unless data entity @s[scores={pointer_wand=1..}] Inventory[{id:"minecraft:stick"}] run title @s actionbar [{"text":"Must have a ","color":"red"},{"translate":"item.minecraft.stick","color":"yellow"},{"color":"red","text":" in Inventory"}]
|
||||
execute unless data entity @s[scores={pointer_wand=1..}] Inventory[{id:"minecraft:stick"}] run scoreboard players set @s pointer_wand 0
|
||||
#
|
||||
clear @s[scores={pointer_wand=1..}] minecraft:stick 1
|
||||
loot give @s[scores={pointer_wand=1..}] loot armor_statues:pointer_wand
|
||||
# reset trigger
|
||||
scoreboard players set @s pointer_wand 0
|
||||
scoreboard players enable @s pointer_wand
|
@ -5,14 +5,15 @@
|
||||
#
|
||||
# Copies data to redo
|
||||
#
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.RedoStates prepend value {}
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.RedoStates prepend value {HasVisualFire:0b}
|
||||
#
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.RedoStates[0].Pose set from entity @e[type=armor_stand,sort=nearest,limit=1,tag=as_selected] Pose
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.RedoStates[0].NoBasePlate set from entity @e[type=armor_stand,sort=nearest,limit=1,tag=as_selected] NoBasePlate
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.RedoStates[0].ShowArms set from entity @e[type=armor_stand,sort=nearest,limit=1,tag=as_selected] ShowArms
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.RedoStates[0].Small set from entity @e[type=armor_stand,sort=nearest,limit=1,tag=as_selected] Small
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.RedoStates[0].Invisible set from entity @e[type=armor_stand,sort=nearest,limit=1,tag=as_selected] Invisible
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.RedoStates[0].CustomNameVisible set from entity @e[type=armor_stand,sort=nearest,limit=1,tag=as_selected] CustomNameVisible
|
||||
#data modify storage customizable_armor_stands:book_storage SavedItem.tag.RedoStates[0].CustomNameVisible set from entity @e[type=armor_stand,sort=nearest,limit=1,tag=as_selected] CustomNameVisible
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.RedoStates[0].NoGravity set from entity @e[type=armor_stand,sort=nearest,limit=1,tag=as_selected] NoGravity
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.RedoStates[0].Pos set from entity @e[type=armor_stand,sort=nearest,limit=1,tag=as_selected] Pos
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.RedoStates[0].Rotation set from entity @e[type=armor_stand,sort=nearest,limit=1,tag=as_selected] Rotation
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.RedoStates[0].HasVisualFire set from entity @e[type=armor_stand,sort=nearest,limit=1,tag=as_selected] HasVisualFire
|
||||
|
@ -5,14 +5,15 @@
|
||||
#
|
||||
# Saves state for undoing
|
||||
#
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.UndoStates prepend value {}
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.UndoStates prepend value {HasVisualFire:0b}
|
||||
#
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.UndoStates[0].Pose set from entity @e[type=armor_stand,sort=nearest,limit=1,tag=as_selected] Pose
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.UndoStates[0].NoBasePlate set from entity @e[type=armor_stand,sort=nearest,limit=1,tag=as_selected] NoBasePlate
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.UndoStates[0].ShowArms set from entity @e[type=armor_stand,sort=nearest,limit=1,tag=as_selected] ShowArms
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.UndoStates[0].Small set from entity @e[type=armor_stand,sort=nearest,limit=1,tag=as_selected] Small
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.UndoStates[0].Invisible set from entity @e[type=armor_stand,sort=nearest,limit=1,tag=as_selected] Invisible
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.UndoStates[0].CustomNameVisible set from entity @e[type=armor_stand,sort=nearest,limit=1,tag=as_selected] CustomNameVisible
|
||||
#data modify storage customizable_armor_stands:book_storage SavedItem.tag.UndoStates[0].CustomNameVisible set from entity @e[type=armor_stand,sort=nearest,limit=1,tag=as_selected] CustomNameVisible
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.UndoStates[0].NoGravity set from entity @e[type=armor_stand,sort=nearest,limit=1,tag=as_selected] NoGravity
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.UndoStates[0].Pos set from entity @e[type=armor_stand,sort=nearest,limit=1,tag=as_selected] Pos
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.UndoStates[0].Rotation set from entity @e[type=armor_stand,sort=nearest,limit=1,tag=as_selected] Rotation
|
||||
data modify storage customizable_armor_stands:book_storage SavedItem.tag.UndoStates[0].HasVisualFire set from entity @e[type=armor_stand,sort=nearest,limit=1,tag=as_selected] HasVisualFire
|
||||
|
@ -17,6 +17,11 @@ execute as @a[scores={as_trigger=1..}] at @s run function armor_statues:trigger
|
||||
#
|
||||
execute as @a[scores={if_invisible=1..}] at @s run function armor_statues:if_trigger
|
||||
#
|
||||
# wand triggers
|
||||
#
|
||||
execute as @a[scores={pointer_wand=1..}] at @s run function armor_statues:pointer_wand_trigger
|
||||
execute as @a[scores={adjustment_wand=1..}] at @s run function armor_statues:adjustment_wand_trigger
|
||||
#
|
||||
# Makes empty invisible item frames visible
|
||||
#
|
||||
execute as @e[type=#armor_statues:item_frames,tag=if_invisible,nbt=!{Item:{Count:1b}}] run function armor_statues:item_frames/visible
|
||||
@ -27,4 +32,13 @@ execute as @e[tag=as_shrine] at @s run function armor_statues:shrine/main
|
||||
#
|
||||
# resets crafting advancement
|
||||
#
|
||||
execute if data storage customizable_armor_stands:settings as_admin{book_craft:"Enabled"} as @a[advancements={armor_statues:crafting=true}] run advancement revoke @s only armor_statues:crafting
|
||||
execute if data storage customizable_armor_stands:settings as_admin{book_craft:"Enabled"} as @a[advancements={armor_statues:crafting=true}] run advancement revoke @s only armor_statues:crafting
|
||||
# resets interaction advancements
|
||||
execute as @a[advancements={armor_statues:attack_interaction=true}] run advancement revoke @s only armor_statues:attack_interaction
|
||||
execute as @a[advancements={armor_statues:use_interaction=true}] run advancement revoke @s only armor_statues:use_interaction
|
||||
# resets wand interaction
|
||||
execute as @a[scores={as_wand_used=1..},predicate=armor_statues:holding_adjustment, predicate=armor_statues:is_sneaking] at @s run function armor_statues:adjustment_wand
|
||||
execute as @a[scores={as_wand_used=1..}] run scoreboard players reset @s as_wand_used
|
||||
# give wandsf
|
||||
execute as @a[nbt={Inventory: [{id: "minecraft:stick", tag: { display: { Name: '{"text":"Statues"}' } } }] }] run function armor_statues:give_pointer_wand
|
||||
execute as @a[nbt={Inventory: [{id: "minecraft:warped_fungus_on_a_stick", tag: { display: { Name: '{"text":"Statues"}' } } }] }] run function armor_statues:give_adjustment_wand
|
6
data/armor_statues/functions/select_by_uuid.mcfunction
Normal file
6
data/armor_statues/functions/select_by_uuid.mcfunction
Normal file
@ -0,0 +1,6 @@
|
||||
#
|
||||
# Description: Selects entities by stored uuid
|
||||
# Called by: armor_statues:interactions/reset_interactable
|
||||
# Entity @s:
|
||||
#
|
||||
execute as @e[type=#armor_statues:selectable] if score @s as_uuid1 = #uuid_selector as_uuid1 if score @s as_uuid2 = #uuid_selector as_uuid2 if score @s as_uuid3 = #uuid_selector as_uuid3 if score @s as_uuid4 = #uuid_selector as_uuid4 run tag @s add as_uuid_selected
|
@ -26,7 +26,7 @@ execute if entity @s[scores={as_trigger=999}] as @e[type=armor_stand,tag=as_sele
|
||||
#
|
||||
# armor stand settings
|
||||
#
|
||||
execute if entity @s[scores={as_trigger=1..12}] as @e[type=armor_stand,tag=as_selected] run function armor_statues:trigger/settings
|
||||
execute if entity @s[scores={as_trigger=1..14}] as @e[type=armor_stand,tag=as_selected] run function armor_statues:trigger/settings
|
||||
#
|
||||
# Nudge position
|
||||
#
|
||||
|
@ -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
|
||||
#
|
||||
|
29
data/armor_statues/item_modifiers/adjustment_wand_0.json
Normal file
29
data/armor_statues/item_modifiers/adjustment_wand_0.json
Normal file
@ -0,0 +1,29 @@
|
||||
[
|
||||
{
|
||||
"function": "minecraft:set_nbt",
|
||||
"tag":"{wand:1, Enchantments: [{}]}"
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_nbt",
|
||||
"tag":"{type:0}"
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_name",
|
||||
"entity": "this",
|
||||
"name": {
|
||||
"text": "Adjustment Wand: X axis"
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_lore",
|
||||
"entity": "this",
|
||||
"lore": [
|
||||
["",
|
||||
{"keybind":"key.sneak"},
|
||||
{"text":"+"},
|
||||
{"keybind":"key.use"},
|
||||
{"text":" to set mode"}]
|
||||
],
|
||||
"replace": true
|
||||
}
|
||||
]
|
29
data/armor_statues/item_modifiers/adjustment_wand_1.json
Normal file
29
data/armor_statues/item_modifiers/adjustment_wand_1.json
Normal file
@ -0,0 +1,29 @@
|
||||
[
|
||||
{
|
||||
"function": "minecraft:set_nbt",
|
||||
"tag":"{wand:1, Enchantments: [{}]}"
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_nbt",
|
||||
"tag":"{type:1}"
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_name",
|
||||
"entity": "this",
|
||||
"name": {
|
||||
"text": "Adjustment Wand: Y axis"
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_lore",
|
||||
"entity": "this",
|
||||
"lore": [
|
||||
["",
|
||||
{"keybind":"key.sneak"},
|
||||
{"text":"+"},
|
||||
{"keybind":"key.use"},
|
||||
{"text":" to set mode"}]
|
||||
],
|
||||
"replace": true
|
||||
}
|
||||
]
|
29
data/armor_statues/item_modifiers/adjustment_wand_2.json
Normal file
29
data/armor_statues/item_modifiers/adjustment_wand_2.json
Normal file
@ -0,0 +1,29 @@
|
||||
[
|
||||
{
|
||||
"function": "minecraft:set_nbt",
|
||||
"tag":"{wand:1, Enchantments: [{}]}"
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_nbt",
|
||||
"tag":"{type:2}"
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_name",
|
||||
"entity": "this",
|
||||
"name": {
|
||||
"text": "Adjustment Wand: Z axis"
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_lore",
|
||||
"entity": "this",
|
||||
"lore": [
|
||||
["",
|
||||
{"keybind":"key.sneak"},
|
||||
{"text":"+"},
|
||||
{"keybind":"key.use"},
|
||||
{"text":" to set mode"}]
|
||||
],
|
||||
"replace": true
|
||||
}
|
||||
]
|
24
data/armor_statues/item_modifiers/pointer_wand.json
Normal file
24
data/armor_statues/item_modifiers/pointer_wand.json
Normal file
@ -0,0 +1,24 @@
|
||||
[
|
||||
{
|
||||
"function": "minecraft:set_nbt",
|
||||
"tag":"{wand:1, Enchantments: [{}]}"
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_name",
|
||||
"entity": "this",
|
||||
"name": {
|
||||
"text": "Pointer Wand"
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_lore",
|
||||
"entity": "this",
|
||||
"lore": [
|
||||
["",
|
||||
{"text":"Point at "},
|
||||
{"translate":"entity.minecraft.armor_stand"},
|
||||
{"text":" to use"}]
|
||||
],
|
||||
"replace": true
|
||||
}
|
||||
]
|
16
data/armor_statues/item_modifiers/wand.json
Normal file
16
data/armor_statues/item_modifiers/wand.json
Normal file
@ -0,0 +1,16 @@
|
||||
[
|
||||
{
|
||||
"function": "minecraft:copy_nbt",
|
||||
"source": {
|
||||
"type": "context",
|
||||
"target": "this"
|
||||
},
|
||||
"ops": [
|
||||
{
|
||||
"source": "UUID",
|
||||
"target": "LastUsed",
|
||||
"op": "replace"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
44
data/armor_statues/loot_tables/adjustment_wand.json
Normal file
44
data/armor_statues/loot_tables/adjustment_wand.json
Normal file
@ -0,0 +1,44 @@
|
||||
|
||||
{
|
||||
"type": "minecraft:loot",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:warped_fungus_on_a_stick",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:set_nbt",
|
||||
"tag":"{wand:1, Enchantments: [{}]}"
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_nbt",
|
||||
"tag":"{type:0}"
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_name",
|
||||
"entity": "this",
|
||||
"name": {
|
||||
"text": "Adjustment Wand: X axis"
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_lore",
|
||||
"entity": "this",
|
||||
"lore": [
|
||||
["",
|
||||
{"keybind":"key.sneak"},
|
||||
{"text":"+"},
|
||||
{"keybind":"key.use"},
|
||||
{"text":" to set mode"}]
|
||||
],
|
||||
"replace": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -11,15 +11,15 @@
|
||||
{
|
||||
"function": "minecraft:set_nbt",
|
||||
"tag": "{
|
||||
title:\"Statues V2.9\",
|
||||
title:\"Statues V2.10\",
|
||||
author:\"Stick God\",
|
||||
datapack:\"ArmorStatuesV2\",
|
||||
CustomModelData:10,
|
||||
pages:[
|
||||
'[
|
||||
{\"text\":\" \",\"color\":\"white\"},
|
||||
{\"text\":\"Statues V2.9\",\"color\":\"dark_blue\"},
|
||||
{\"text\":\" \",\"color\":\"white\"},
|
||||
{\"text\":\"Statues V2.10\",\"color\":\"dark_blue\"},
|
||||
{\"text\":\" \",\"color\":\"white\"},
|
||||
{\"text\":\"\\\\u24be\",\"color\":\"dark_purple\",\"hoverEvent\":{\"action\":\"show_text\",\"contents\":[{\"text\":\"This book allows you to apply basic settings to an armor stand. Clicking the coloured links will adjust the closest armor stand within three blocks.\",\"color\":\"yellow\"}]}},
|
||||
|
||||
{\"text\":\"\\\\n \",\"color\":\"white\"},
|
||||
@ -93,11 +93,11 @@
|
||||
{\"text\":\"Yes\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger as_trigger set 9\"}},
|
||||
{\"text\":\" / \",\"color\":\"black\"},
|
||||
{\"text\":\"No\",\"color\":\"red\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger as_trigger set 10\"}},
|
||||
{\"text\":\"\\\\nDisplay Name:\",\"color\":\"black\"},
|
||||
{\"text\":\"\\\\nHas Visual Fire:\",\"color\":\"black\"},
|
||||
{\"text\":\"\\\\n \",\"color\":\"white\"},
|
||||
{\"text\":\"Yes\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger as_trigger set 11\"}},
|
||||
{\"text\":\"Yes\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger as_trigger set 13\"}},
|
||||
{\"text\":\" / \",\"color\":\"black\"},
|
||||
{\"text\":\"No\",\"color\":\"red\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger as_trigger set 12\"}}
|
||||
{\"text\":\"No\",\"color\":\"red\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger as_trigger set 14\"}}
|
||||
]',
|
||||
'[
|
||||
\"\",
|
||||
@ -234,7 +234,8 @@
|
||||
{\"text\":\"Pointing\",\"color\":\"dark_blue\"},
|
||||
{\"text\":\" \",\"color\":\"white\"},
|
||||
{\"text\":\"\\\\u24be\",\"color\":\"dark_purple\",\"hoverEvent\":{\"action\":\"show_text\",\"contents\":[{\"text\":\"Points selected appendage at head or feet.\",\"color\":\"yellow\"}]}},
|
||||
{\"text\":\"\\\\n\\\\n\",\"color\":\"white\"},
|
||||
{\"text\":\"\\\\nGet Pointer Wand\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger pointer_wand\"}},
|
||||
{\"text\":\"\\\\n\",\"color\":\"white\"},
|
||||
{\"text\":\"Head:\",\"color\":\"black\"},
|
||||
{\"text\":\" .\",\"color\":\"white\"},
|
||||
{\"text\":\"Head\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger as_trigger set 1160\"}},
|
||||
@ -321,7 +322,8 @@
|
||||
{\"text\":\"Pose Adjustment\",\"color\":\"dark_blue\"},
|
||||
{\"text\":\" \",\"color\":\"white\"},
|
||||
{\"text\":\"\\\\u24be\",\"color\":\"dark_purple\",\"hoverEvent\":{\"action\":\"show_text\",\"contents\":[{\"text\":\"The angle step set for adjusting the stand rotation is also used for the pose adjustments.\",\"color\":\"yellow\"}]}},
|
||||
{\"text\":\"\\\\n\\\\n .\",\"color\":\"white\"},
|
||||
{\"text\":\"\\\\nGet Adjustment Wand\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger adjustment_wand\"}},
|
||||
{\"text\":\"\\\\n .\",\"color\":\"white\"},
|
||||
{\"text\":\"X\",\"color\":\"black\"},
|
||||
{\"text\":\" .\",\"color\":\"white\"},
|
||||
{\"text\":\"Y\",\"color\":\"black\"},
|
||||
|
39
data/armor_statues/loot_tables/pointer_wand.json
Normal file
39
data/armor_statues/loot_tables/pointer_wand.json
Normal file
@ -0,0 +1,39 @@
|
||||
|
||||
{
|
||||
"type": "minecraft:loot",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:stick",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:set_nbt",
|
||||
"tag":"{wand:1, Enchantments: [{}]}"
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_name",
|
||||
"entity": "this",
|
||||
"name": {
|
||||
"text": "Pointer Wand"
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_lore",
|
||||
"entity": "this",
|
||||
"lore": [
|
||||
["",
|
||||
{"text":"Point at "},
|
||||
{"translate":"entity.minecraft.armor_stand"},
|
||||
{"text":" to use"}]
|
||||
],
|
||||
"replace": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
12
data/armor_statues/predicates/holding_adjustment.json
Normal file
12
data/armor_statues/predicates/holding_adjustment.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"equipment": {
|
||||
"mainhand": {
|
||||
"items": [ "minecraft:warped_fungus_on_a_stick" ],
|
||||
"nbt": "{wand:1}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
12
data/armor_statues/predicates/holding_pointer.json
Normal file
12
data/armor_statues/predicates/holding_pointer.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"equipment": {
|
||||
"mainhand": {
|
||||
"items": [ "minecraft:stick" ],
|
||||
"nbt": "{wand:1}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
14
data/armor_statues/predicates/holding_wand.json
Normal file
14
data/armor_statues/predicates/holding_wand.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"equipment": {
|
||||
"mainhand": {
|
||||
"items": ["minecraft:stick",
|
||||
"minecraft:warped_fungus_on_a_stick"
|
||||
],
|
||||
"nbt": "{wand:1}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
10
data/armor_statues/predicates/is_sneaking.json
Normal file
10
data/armor_statues/predicates/is_sneaking.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"type": "minecraft:player",
|
||||
"flags": {
|
||||
"is_sneaking": true
|
||||
}
|
||||
}
|
||||
}
|
17
data/armor_statues/tags/entity_types/selectable.json
Normal file
17
data/armor_statues/tags/entity_types/selectable.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"replace": "false",
|
||||
"values": [
|
||||
{
|
||||
"id": "minecraft:armor_stand",
|
||||
"required": "true"
|
||||
},
|
||||
{
|
||||
"id": "minecraft:interaction",
|
||||
"required": "true"
|
||||
},
|
||||
{
|
||||
"id": "minecraft:block_display",
|
||||
"required": "true"
|
||||
}
|
||||
]
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"pack": {
|
||||
"pack_format": 7,
|
||||
"pack_format": 13,
|
||||
"description": [{"text":"Armor Statues","color":"gold"},{"text":"\n","color":"yellow"}]
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user