execute as @e[tag=cryshat] at @p[predicate=survivalplus:crystalhat] run tp @s ~ ~2.3 ~
execute at @s[predicate=survivalplus:crystalhat] positioned ~ ~2.3 ~ unless entity @e[tag=cryshat,distance=..1] run summon minecraft:item_display ~ ~ ~ {item:{id:"minecraft:emerald_block"},Tags:[cryshat,special],CustomName:{"text":"Crystal Sentry"}}
execute as @e[tag=cryshat] run data modify entity @s transformation.scale set value [.5f,.5f,.5f]
execute at @s[predicate=survivalplus:magicrobes] if entity @e[predicate=survivalplus:targeted,distance=..6] positioned ~ ~2.3 ~ as @e[tag=cryshat,limit=1,sort=nearest] run scoreboard players remove @s[scores={timer=1..}] timer 1
advancement revoke @s only survivalplus:tools/tick/hatcrystal