customize armor stands
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
#
|
||||
# Description: Summon marker area effect cloud for shrine
|
||||
# Called by: player
|
||||
# Entity @s: player
|
||||
#
|
||||
# Summon AEC
|
||||
#
|
||||
execute align xyz run summon area_effect_cloud ~0.5 ~ ~0.5 {Duration:2147000000,Radius:0.0,Tags:["as_shrine"],Particle:"minecraft:underwater"}
|
||||
#
|
||||
# Store coordinates of shrine
|
||||
#
|
||||
execute store result score #as_shrine_x as_help run data get entity @e[type=minecraft:area_effect_cloud,tag=as_shrine,distance=..3,limit=1] Pos[0] 1
|
||||
execute store result score #as_shrine_z as_help run data get entity @e[type=minecraft:area_effect_cloud,tag=as_shrine,distance=..3,limit=1] Pos[2] 1
|
||||
@@ -0,0 +1,12 @@
|
||||
#
|
||||
# Description: Display shrine particles and give book
|
||||
# Called by: as:tick
|
||||
# Entity @s: Shrine marker area effect cloud
|
||||
#
|
||||
# Particle at shrine position
|
||||
#
|
||||
particle minecraft:enchant ~ ~ ~ 0.5 0.5 0.5 0.25 5
|
||||
#
|
||||
# Give book to nearby players if they do not have it already
|
||||
#
|
||||
execute as @a[distance=..1.5,nbt=!{Inventory:[{id:"minecraft:written_book",tag:{datapack:"ArmourStatuesV2"}}]}] at @s run function as:give
|
||||
@@ -0,0 +1,13 @@
|
||||
#
|
||||
# Description: Remove marker area effect cloud
|
||||
# Called by: player
|
||||
# Entity @s: player
|
||||
#
|
||||
# If shrine AEC is within range, reset shrine coordinates
|
||||
#
|
||||
execute if entity @e[type=area_effect_cloud,tag=as_shrine,distance=..3] run scoreboard players reset #as_shrine_x as_help
|
||||
execute if entity @e[type=area_effect_cloud,tag=as_shrine,distance=..3] run scoreboard players reset #as_shrine_z as_help
|
||||
#
|
||||
# Remove AEC
|
||||
#
|
||||
kill @e[type=area_effect_cloud,tag=as_shrine,distance=..3,sort=nearest,limit=1]
|
||||
Reference in New Issue
Block a user